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
Assign a new instance of Gears to the view property
public function __construct() { $this->view = new \Core\Libraries\Gears; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct()\r\n {\r\n $this->view = new View();\r\n }", "function __construct()\n {\n $this->view = new View();\n }", "function __construct()\n {\n $this->view = new View(); \n }", "protected function setView()\n {\n $view = 'Src\\Modules\\\\' . $this->module_name . '\\Views\\\\' . $this->class . 'View';\n $this->view = new $view;\n \n $this->view->setData( $this->model->getData() );\n \n $this->view->run();\n }", "public function setView($view): self\r\n {\r\n $this->extras['view'] = $view;\r\n return $this;\r\n }", "public function setView(\\App\\View $view)\r\n {\r\n $this->view = $view;\r\n return $this;\r\n }", "function __construct(){\n $this->view=new View(); \n }", "protected function _view()\r\n\t\t{\r\n\t\t\t((!is_object($this->_view)) ? $this->_view = init_class(VIEW_NAME) : '');\r\n\t\t}", "public function __construct()\r\n {\r\n $this->view = new stdClass;\r\n $this->view->placeHolder = $this->placeHolder;\r\n $this->view->settingOptionName = $this->settingOptionName;\r\n }", "public function __construct()\n {\n $this->view = new View($this);\n }", "public function setView(View &$view) {\n\t\t$this->view = $view;\n\t}", "public function setView($view) {\n\t\t$this->view = $view;\n\t\treturn $this;\n\t}", "public function setView($view)\n {\n $this->_view = $view;\n return $this;\n }", "public function setView($view)\n {\n $this->view = $view;\n return $this;\n }", "protected function initView()\n {\n $view = $this->objectProviderService->get($this->resolveViewClassName());\n\n if (!$view instanceof ViewInterface) {\n throw new \\UnexpectedValueException(\n 'View \"' . get_class($view) . '\" does not implement Signature\\Mvc\\View\\ViewInterface.'\n );\n }\n\n $this->view = $view;\n\n // Assign basic view data\n $this->view->setViewData([\n 'moduleContext' => $this->getModuleContext(),\n 'config' => $this->configurationService->getConfig($this->getModuleContext()),\n 'resourceDir' => $this->getResourceDir(),\n 'templateDir' => $this->getTemplateDir(),\n ]);\n }", "function view($view){\r\r\n $this->view = $view;\r\r\n }", "public function view($view)\n {\n $this->view = $view;\n\n return $this;\n }", "public function __construct($view) {\n $this->view = $view;\n }", "public function setView($view)\n {\n $this->view = $view;\n\n return $this;\n }", "public function __construct( View $view ) {\n\t\t$this->view = $view;\n\t}", "public function setView($view) {\n $this->checkNotStopped();\n $this->_view = $view;\n return $this;\n }", "public function setView($view) {\n\t\t$this->_view = $view;\n\t}", "public function setView(View $view)\n {\n $this->view = $view;\n\n return $this;\n }", "public function __construct($view)\n {\n $this->view = $view;\n }", "public function setView($view) {\n\t\t$this->view = $view;\n\t}", "function testSetViewExpectsViewReplaced() {\n\t\t// Arrange\n\t\t$newView = new \\StdClass;\n\t\t$form = new TestNumberField();\n\n\t\t// act\n\t\t$form->set_view($newView);\n\n\t\t// Assert\n\t\t$this->assertInstanceOf('StdClass', $form->View, 'Not working.');\n\t}", "public function __construct(View $view) {\n $this->view = $view;\n }", "public function set_view( Pronamic_Mail_View $view ) {\n $this->view = $view;\n return $this;\n }", "public function setView($view);", "function setView($value) {\r\n $this->view = $value;\r\n }", "public function __construct(){\n //l'intensification de la classe view\n $this->view=new View();\n }", "public function __construct($view)\n\t{\n\t\t$this->view = $view;\n\t}", "public function setView($view)\n {\n $this->view = $view;\n }", "function __construct() {\r\n $this->view = new View();\r\n $this->deviceType = View::getInstance();\r\n }", "protected function getNewViewInstance() {\n return $this->objectManager->get('TYPO3\\\\CMS\\\\Fluid\\\\View\\\\StandaloneView');\n }", "public function init()\n {\n Zend_Registry::set('view', new Omeka_View);\n }", "public function setView(FW_Mvc_View $view){\n\t\t$this->view = $view;\n\t}", "public function setView( \\Aimeos\\MW\\View\\Iface $view )\n\t{\n\t\tparent::setView( $view );\n\n\t\t$this->client->setView( $view );\n\t\treturn $this;\n\t}", "public function setView( \\Aimeos\\MW\\View\\Iface $view )\n\t{\n\t\t$this->view = $view;\n\t\treturn $this;\n\t}", "public function makeView() {\n\t\treturn \n\t\t\t$this->getView()\n\t\t\t\t->with('option', $this);\n\t}", "public function makeNew()\n\t{\n\t\treturn new static($this->view);\n\t}", "public function setView($sView) {\n \t\n \t// Set the view we \n \t// wish to render\n \t$this->sView = (string) $sView;\n \t\n \t// Return instance\n \treturn $this;\n }", "function __construct() {\n// \t\t$this -> view = new View();\n \t}", "public function initializeView() {}", "public function initializeView() {}", "public function __clone()\n {\n if (isset($this->view) && $this->view instanceof Zend_View_Interface) {\n $this->view = clone $this->view;\n\n }\n }", "public function __construct($view = null) {\n \t parent::__construct();\n $this->view = $view;\n }", "public function setViewFactory($view)\n {\n $this->view = $view;\n\n return $this;\n }", "public function setView(Zend_View_Interface $view) \n {\n $this->view = $view;\n return $this;\n\t}", "private function _View() {\n\t \n // $this->_View;\n\t\t\t//$View = ClassRegistry::getObject('');\n\t\treturn $this->_View;\n\t}", "public function __construct($view = null) {}", "public function registerView(View $view)\r\n\t{\r\n\t $this->m_View = $view; \r\n\t}", "public function __construct( $view = null )\n {\n $this->view = $view;\n }", "public function getView() {}", "public function getView() {}", "public function setViews($val)\n {\n $this->_propDict[\"views\"] = $val;\n return $this;\n }", "private function _setView()\n\t{\n\t\tif (preg_match('/^[a-z0-9_-]+$/', $this->_requestVars[1])) {\n\t\t\t$this->_view = $this->_requestVars[1];\n } else {\n \t$this->_view = $this->_requestVars[1] = self::DEFAULT_VIEW;\n }\n\n return $this;\n\t}", "public function setLibraryViewConfiguration()\r\n {\r\n // Gets the library configuration manager\r\n $this->libraryConfigurationManager = $this->getController()->getLibraryConfigurationManager();\r\n\r\n // Gets the view identifier\r\n $this->viewIdentifier = $this->libraryConfigurationManager->getViewIdentifier($this->viewType);\r\n\r\n // Gets the view configuration\r\n $this->libraryViewConfiguration = $this->libraryConfigurationManager->getViewConfiguration($this->viewIdentifier);\r\n }", "public function testNewViewInstance()\n {\n $this->assertInstanceOf(CalculatorView::class, new CalculatorView(new CalculatorModel(), new JsonTemplate()));\n }", "protected function install(View $view) {\r\n\t\t$this->view = $view;\r\n\t}", "public function createView();", "public function render(\\Opt_View $view)\n\t{\n\t\t$this->_view = $view;\n\t}", "public function __construct()\n\t{\n\t\t$this->_view = new \\App\\View\\View('welcome'); \n\t}", "public function create(View $view)\n {\n $settings = Auth::check()\n ? Auth::user()->settings\n : (object) User::$BASE_SETTINGS;\n\n $view->with('overview_container', $settings->serie_overview);\n $view->with('serie_fanart', $settings->serie_fanart);\n $view->with('serie_actor_images', $settings->serie_actor_images == 'yes');\n }", "protected function initializeView() {\n\t}", "public function __construct()\n {\n $this->view = new Views('about');\n }", "public function getView()\n {\n }", "public function setView(\\Yaf\\View_Interface $view){ \r\n\t\t$this->_view = $view;\r\n\t}", "public function __construct()\n {\n $contact =Contact::whereId(1)->first();\n\n return view()->share('contact', $contact);\n\n }", "private function _initView()\n {\n App::front()->registerPlugin(new App_Controller_Plugin_View());\n }", "static function set_viewmodel($view, $data) {\n Messenger::$arr[$view] = $data;\n }", "public function setView (Zend_View_Interface $view)\n\t{\n\t\t$this->view = $view;\n\t}", "public function setView(Zend_View_Interface $view)\n {\n $this->view = $view;\n return $this;\n }", "public function setView(Zend_View_Interface $view)\n {\n $this->view = $view;\n return $this;\n }", "public function setView(Zend_View_Interface $view) {\n\t\t$this->_view = $view;\n\t}", "public function getView(){ }", "public function setView(tx_egovapi_domain_model_view $view) {\n\t\t$this->view = $view;\n\t\treturn $this;\n\t}", "public function & SetViewClass ($viewClass);", "function __construct()\n {\n $this->reg = Core_Registery::singleton();\n $this->reg->view = $this;\n $this->initTemplateEngine();\n \n }", "public function createView(){\n\t\t$vue = new View(\"Create\");\n\t\t$vue->generer();\n\t}", "protected function initializeStandaloneViewInstance() {}", "public function __construct($view)\n {\n $this->view = $view;\n $this->loadJsonData();\n }", "public function __construct()\n {\n $socials = Social::all();\n\n // Sharing is caring\n View::share('socials', $socials);\n }", "public function __construct() {\n\t\tparent::__construct();\n\t\t$this->view = new ViewController();\t\t\n\t}", "public function setStpGarage(\\MediaStoreNet\\OpenImmo\\Classes\\StpGarage $stpGarage)\n {\n $this->stpGarage = $stpGarage;\n return $this;\n }", "function __construct() {\n // Create a new instance of the corresponding view.\n $this->view = new View();\n // $this->session = new Session(); // Sessions still not working.\n }", "protected function make($view)\n\t{\n\t\t$provider = $this->provider;\n\n\t\tif (strpos($view, ':'))\n\t\t{\n\t\t\tlist($prefix, $view) = explode(':', $view, 2);\n\n\t\t\tif ($provider->getPrefix() != $prefix)\n\t\t\t{\n\t\t\t\t$provider = $provider->make('App')->get($prefix);\n\t\t\t}\n\t\t}\n\n\t\treturn new static($view, $provider);\n\t}", "public function create()\n {\n return view('gasto.create',[\n 'gasto' => new Gasto\n ]);\n }", "public function setView (Zend_View_Interface $view)\n {\n $this->view = $view;\n }", "public function setView (Zend_View_Interface $view)\n {\n $this->view = $view;\n }", "public function setView (Zend_View_Interface $view)\n {\n $this->view = $view;\n }", "public function setView (Zend_View_Interface $view)\n {\n $this->view = $view;\n }", "public function setView (Zend_View_Interface $view)\n {\n $this->view = $view;\n }", "public function setView(Zend_View_Interface $view) {\r\n\t\t$this->view = $view;\r\n\t}", "public function setView(Zend_View_Interface $view) {\r\n\t\t$this->view = $view;\r\n\t}", "public function setLinkedObjects()\n\t{\n\t\treturn array(\n\t\t\t'view' => new View( $this->m_view_id, TRUE )\n\t\t);\n\t}", "public function __construct(ViewFactory $view)\n\t{\n\t\t$this->view = $view;\n\t}", "public function setView(Zend_View_Interface $view) {\n\t\t$this->view = $view;\n\t}", "public function setView(Zend_View_Interface $view) {\n\t\t$this->view = $view;\n\t}", "public function setView(Zend_View_Interface $view) {\n\t\t$this->view = $view;\n\t}" ]
[ "0.61637133", "0.61618423", "0.6148535", "0.61242723", "0.6073945", "0.60577977", "0.60032684", "0.6000113", "0.5991512", "0.5977732", "0.5973455", "0.5963443", "0.5898052", "0.5881164", "0.5834694", "0.58236593", "0.58013153", "0.57917356", "0.5774", "0.5735332", "0.57333404", "0.57270354", "0.57225674", "0.5711019", "0.567546", "0.56750727", "0.56729716", "0.56674606", "0.5658241", "0.5651594", "0.56412494", "0.5629278", "0.5592342", "0.5558844", "0.5557596", "0.5549774", "0.5535794", "0.55237615", "0.5508799", "0.5502389", "0.55014354", "0.5475769", "0.547257", "0.5447802", "0.5447802", "0.54450005", "0.54422", "0.5416337", "0.5406345", "0.54054624", "0.53918797", "0.53684866", "0.53304476", "0.5328616", "0.5328616", "0.5297012", "0.5291195", "0.5267013", "0.52402073", "0.5225896", "0.522398", "0.5219993", "0.519669", "0.5164268", "0.51585954", "0.51540947", "0.5152418", "0.51443446", "0.51371425", "0.51324433", "0.5119527", "0.511452", "0.511396", "0.511396", "0.5084107", "0.50813323", "0.5078566", "0.50751853", "0.5062728", "0.5057357", "0.50525516", "0.50423175", "0.50321865", "0.50289154", "0.5022825", "0.5015889", "0.5014056", "0.50134796", "0.50122035", "0.50122035", "0.50122035", "0.50122035", "0.50122035", "0.5005286", "0.5005286", "0.5003186", "0.5002596", "0.49923334", "0.49923334", "0.49923334" ]
0.68965524
0
Render a view via the Gears template engine
public function render ($view, $data = array()) { list ($path, $view) = explode ('::', $view); $path = PACKAGES_PATH.str_replace ('.', DS, strtolower ($path)).DS; $view = ! strstr ($view, '.tpl') ? $view.'.tpl' : $view; $this->view->setPath ($path); if (count ($data)) { $this->view->bind ($data); } return $this->view->display ($view); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function renderTemplate();", "abstract protected function renderView();", "protected function render(){\n //render view\n \n }", "public function render()\n {\n $page = $this->twig->load($this->template);\n $this->prepareFlashMessages();\n $html = $page->render($this->vars);\n Router::sendResponse($html);\n }", "public function render() {\n\n\t\t$context = $this->options;\n\t\t$context = $this->load($context);\n\n\t\textract($context);\n\n\t\tinclude __DIR__ . '/../views/' . $this->template();\n\t}", "protected function render_template()\n {\n }", "protected function render_template()\n {\n }", "protected function render_template()\n {\n }", "protected function render_template()\n {\n }", "protected function render()\n {\n $params = ['title' => $this->title, 'content' => $this->content];\n $html = $this->template('Views/v_main.php', $params);\n echo $html;\n }", "public function renderView()\n {\n //$_SESSION[\"info\"] zobrazuje vysledek operaci, paklize se nejake udaly\n if((isset($_SESSION[\"info\"])) && (!empty($_SESSION[\"info\"]))){\n $this->view_data[\"info\"] = $_SESSION[\"info\"];\n $_SESSION[\"info\"] = null;\n } \n\n //generuje csrf token pro formulare\n if (!isset($_SESSION[\"csrf_token\"])) {\n $_SESSION[\"csrf_token\"] = rand(1, 1e9);\n }\n \n if ($this->view)\n {\n $this->view_data[\"view\"] = $this->view;\n extract($this->view_data);\n $main_template = (dirname(__FILE__) .'/../view/@layout.phtml');\n \n if(file_exists($main_template))\n require_once($main_template); \n }\n }", "public function _render($view)\n {\n $this->data['admin'] = false;\n\n $data = $this->data;\n $data['css'] = $this->css;\n $data['js'] = $this->js;\n $data['bower_components'] = $this->bower_components;\n\n $data['title'] = $this->title;\n $data['description'] = $this->description;\n $data['keywords'] = $this->keywords;\n $data['author'] = $this->author;\n\n $data['head'] = $this->load->view('templates/head', $data, true);\n if (isset($data['user'])) {\n $data['nav'] = $this->load->view('templates/logged/nav', $data, true);\n } else {\n $data['nav'] = $this->load->view('templates/nav', $data, true);\n }\n $data['scripts'] = $this->load->view('templates/scripts', $data, true);\n $data['footer'] = $this->load->view('templates/footer', $data, true);\n\n $data['content'] = $this->load->view($view, $data, true);\n\n $this->load->view('templates/skeleton', $data);\n }", "public function renderHTML() \n\t{\n\t\t$viewTemplate = file_get_contents('view_file.html');\n\t\techo $viewTemplate;\n\t}", "private function renderView(){\n\t\trequire($this->ViewFile);\n\t}", "public function view()\n {\n $this->processParametersForView();\n \n if ($this->view === 'main/base') { //Legacy and body\n extract($this->data);\n \n include(__DIR__ . '/../View/' . $this->view . '.php');\n \n return;\n }\n \n //Templates\n $this->latteView();\n }", "public function render()\n\t{\n\t\treturn $this->viewFactory->make($this->view)\n\t\t\t->with( 'presenter', $this )\n\t\t\t->render();\n\t}", "public function render()\n {\n $theme = Yii::app()->theme->name;\n $name = get_class($this);\n $templateName = \"themes/$theme/templates/$name.xhtml\";\n $content = $this->renderContent();\n if (!file_exists($templateName))\n {\n $templateName = \"themes/default/templates/$name.xhtml\";\n }\n if (file_exists($templateName))\n {\n $span = \"<span class=\\\"$name\\\" />\";\n $templateSource = file_get_contents($templateName);\n if (strpos($templateSource, $span))\n {\n $content = str_replace($span, $content, $templateSource);\n }\n $content = \"<!-- Start of $templateName -->$content<!-- End of $templateName -->\";\n }\n $classes = RuntimeUtil::getClassHierarchy(get_class($this), 'View');\n if ($this->isUniqueToAPage())\n {\n $id = \" id=\\\"$name\\\"\";\n unset($classes[0]);\n }\n else\n {\n $id = $this->getId();\n if ($id != null)\n {\n $id = \" id=\\\"$id\\\"\";\n }\n }\n $classes = join(' ', array_merge($this->getCssClasses(), $classes));\n if ($classes != '')\n {\n $classes = \" class=\\\"$classes\\\"\";\n }\n $calledClass = get_called_class();\n if (YII_DEBUG)\n {\n $reflection = new ReflectionClass( $calledClass );\n $classFile = $reflection->getFileName();\n return \"<!--Called in: $classFile--><div\" . $id . $classes . $this->getViewStyle() . \">$content</div>\";\n }\n else\n {\n return \"<div\" . $id . $classes . $this->getViewStyle() . \">$content</div>\";\n }\n }", "function view(string $render, array $params = [], int $status = 200, array $headers = [])\n{\n $content = app(\"twig\")->render(\"renders\" . DS . $render, $params);\n response($content, $status, $headers);\n}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Executing all modules methods.\" );\n\t\tW2P::getInstance()->modules()->exec_all_functions();\n\t\t\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Generating rendering of the view: {$this->view}\" );\n\t\t\n\t\tob_start ();\n\t\tinclude_once (W2P_INCLUDE . W2P::getInstance()->configuration()->layout_path . '/views/' . $this->view . '.phtml');\n\t\t$this->content = ob_get_clean ();\n\t\t\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Content of the rendered view\" );\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Adding to the project layout\" );\n\t\t\n\t\tinclude (W2P_INCLUDE . W2P::getInstance()->configuration()->layout_path . '/' . $this->layout . '.phtml');\n\t\t\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Layout successfully mastered\" );\n\t\t\n\t\tif (W2P::getInstance()->configuration()->debug)\n\t\t\tW2P::getInstance()->debug()->save_debug ( W2P::getInstance()->configuration()->debug_format );\n\t}", "protected function render() {}", "protected function render() {}", "protected function render() {}", "private static function view(): void\n {\n Debug::setBacklog();\n\n /**\n * Calls the methods to define and validate the template and view files.\n */\n self::viewCheckTemplateFile();\n self::viewDefineViewPath();\n self::viewCheckFileExists();\n\n /**\n * Calls the method that will import the template file to be returned to the request.\n */\n self::viewRequireTemplate(\n new ViewHelper(\n self::$routeController->getResultData(),\n self::$viewPath\n ),\n );\n }", "public function render()\n {\n // Pass messages by reference, as all messages are created after this function call\n $data = [ \"messages\" => &$this->messages ];\n $this->di->view->add($this->template, $data, $this->region);\n }", "public function yieldView()\r\n {\r\n require $this->view;\r\n }", "private function renderTemplate()\n {\n $this->html = view($this->template, [$this->contextAs => $this->viewData])->render();\n\n // We may try to minify the html before storing it in cache to save space.\n if (env('WIDGET_MINIFICATION', false)) {\n $this->minifyHtml();\n }\n\n // We add some comments to be able to easily identify the widget in browser's developer tool.\n if(env('WIDGET_IDENTIFIER',false)){\n $this->addIdentifierToHtml();\n }\n\n return $this->html;\n }", "public function render (View $view, array $environment = array()) {\n extract($environment);\n ob_start();\n include $view->getTemplate();\n $contents = ob_get_clean();\n echo $contents;\n}", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render()\n {\n return $this\n ->blade_instance\n ->view()\n ->make(static::TEMPLATE_NAME, $this->entity_data)\n ->render();\n }", "public function index()\n {\n\n\n $this->view->render();\n }", "public function index()\n\t{\n $this->view->render();\n\t}", "private function renderView()\n\t{\n\t\tff_renderView(substr(__CLASS__, 7));\n\t}" ]
[ "0.7650863", "0.76000774", "0.73168266", "0.7223769", "0.7196695", "0.7160795", "0.7158699", "0.7158699", "0.7158699", "0.7157996", "0.7098405", "0.70688707", "0.7047418", "0.7042157", "0.70402104", "0.6992882", "0.6944563", "0.6934764", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.68817693", "0.6880086", "0.6880086", "0.6880086", "0.6880086", "0.6880086", "0.6880086", "0.6880086", "0.6880086", "0.6880086", "0.6880086", "0.6880086", "0.6880086", "0.6880086", "0.6880086", "0.6880086", "0.6880086", "0.6880086", "0.6874498", "0.68731946", "0.68731946", "0.68730897", "0.68723387", "0.68721694", "0.6865571", "0.68589664", "0.68566334", "0.6849476", "0.6849476", "0.6849476", "0.6849476", "0.6849476", "0.6849476", "0.6849476", "0.6849476", "0.6849476", "0.6849476", "0.6849476", "0.6849476", "0.6849476", "0.6849476", "0.6849476", "0.6849476", "0.6849476", "0.6849476", "0.6844479", "0.6842428", "0.6835541", "0.6825531" ]
0.0
-1
Get list of subscribers. In addition, register reinstallMagento annotation processing.
protected function _getSubscribers(\Magento\TestFramework\Application $application) { return [ new \Magento\TestFramework\Workaround\Segfault(), new \Magento\TestFramework\Workaround\Cleanup\TestCaseProperties(), new \Magento\TestFramework\Workaround\Cleanup\StaticProperties(), new \Magento\TestFramework\Isolation\WorkingDirectory(), new \Magento\TestFramework\Workaround\DeploymentConfig(), new \Magento\TestFramework\Annotation\ComponentRegistrarFixture($this->_fixturesBaseDir), new \Magento\TestFramework\Annotation\SchemaFixture($this->_fixturesBaseDir), new \Magento\TestFramework\Annotation\Cache(), new \Magento\TestFramework\Workaround\CacheClean(), new \Magento\TestFramework\Annotation\ReinstallInstance($application), new \Magento\TestFramework\Annotation\CopyModules(), new \Magento\TestFramework\Annotation\DataProviderFromFile() ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSubscribers()\n {\n return $this['subscribers'];\n }", "public function collectSubscribers();", "public function getSubscribers()\n\t\t{\n\t\t\treturn $this->subscribers;\n\t\t}", "private function get_subscribers()\n {\n return array(\n new CommentIQ_Subscriber_AssetsSubscriber($this->plugin_url . 'assets/', $this->get_supported_post_types()),\n new CommentIQ_Subscriber_PostmaticAssetsSubscriber($this->plugin_path . 'assets/' ),\n new CommentIQ_Subscriber_AutomatedatozsitesCommentSubscriber($this->get_atozsites_comment_generator(), $this->get_supported_post_types()),\n new CommentIQ_Subscriber_CommentIQAPISubscriber($this->api_client, $this->get_supported_post_types()),\n );\n }", "public function subscribers()\n { \n return $this->contracts()->inProgress()->with('auth')->get()->map->auth->push($this->auth);\n }", "public function subscribers() {\n\n $output['subscribers'] = $this->Admin_model->get_subscriber();\n\n //If you have to display grocery crud in the content panel:\n\n $crud = new grocery_CRUD();\n $crud->set_table('subscribers');\n $crud->set_theme('bootstrap');\n $crud->set_subject('Feliratkozók');\n $crud->display_as(array(\n 'name' => 'Név',\n 'email' => 'E-mail',\n 'date' => 'Dátum',\n 'active' => 'Aktív',\n )\n );\n $output = $crud->render();\n $this->load->viewadmin('index', $output, FALSE, 1);\n\n }", "public function getSubscriptions();", "public function importSubscribers() \n\t{\n\t\tif (!$this->_isImportSubscribersEnabled()) \n\t\t{\n\t\t\treturn;\n\t\t}\n Mage::getModel(\"contactlab_hub/importer_subscribers\")->import();\n\t}", "private function registerSubscribers()\n {\n $extensions = $this->dataGridFactory->getExtensions();\n\n foreach ($extensions as $extension) {\n $extension->registerSubscribers($this);\n }\n }", "public function index()\n {\n $subscribers = $this->subscribers->getSubscribers();\n\n abort_unless(! empty($subscribers), 204);\n\n return $subscribers;\n }", "public function subscribers() {\n return new Subscriber($this);\n }", "public function subscribers() {\n return $this->belongsToMany('App\\Subscribe')->withTimestamps();\n }", "public function subscribes()\r\n\r\n {\r\n\r\n return new Engine_ProxyObject($this, Engine_Api::_()->getDbtable('subscribes', 'core'));\r\n\r\n }", "public function getSubscriberEmails() {\n $stmt = $this->pdo->query(\"SELECT email\n FROM subscribers\n \");\n $subscribers = [];\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n $subscribers[] = $row['email'];\n }\n return $subscribers;\n }", "public static function getSubscribedEvents()\n {\n return array(\n SubscriptionNotificationCenterBridgeEvents::BUILD_TOKENS_FROM_RECIPIENT => array(\n array('buildRecipientTokens'),\n ),\n );\n }", "public function subscribeOn(): array\n {\n }", "public function getSubscriber()\n {\n return $this->subscriber;\n }", "public function getSubscriptions()\n {\n return [\n self::NAME.'.command.message',\n self::NAME.'.command.part',\n self::NAME.'.command.join',\n self::NAME.'.command.quit',\n self::NAME.'.command.kick',\n self::NAME.'.command.invite',\n ];\n }", "function getSubscriptions ()\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['cms_manager_url']}/resources/subscriptions.json\",array(),'json');\n return $this->createResponse($result,'get My Subscriptions');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "public function all()\n {\n return $this->subscriptions;\n }", "public function getSubscriberRecords() {\n if($stmt = $this->pdo->query(\"SELECT * FROM subscribers;\")){\n $subscribers = [];\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n $subscribers[] = $row;\n }\n return $subscribers;\n }else{\n return 'unset';\n }\n }", "public function SubscriberInfo() {\n return $this->belongsToMany ( Customer::class, 'subscribers' );\n }", "public static function getSubscribedEvents()\n {\n return [\n SubscriptionController::USER_SUBSCRIBED => 'onUserSubscribed',\n ];\n }", "public function exportSubscribers(){\n\n\t\t// Get all records\n\t\t$list = model('NewsletterSubscriberModel')->adminGetForExport();\n\n\t\t// Generate CSV data\n\t\t$counter = 1;\n\t\t$csv = 'Nr;Naam;Email;Ingeschreven;Blacklisted';\n\t\tforeach($list as &$row){\n\t\t\t$csv .= \"\\n\" . implode(';', array(\n\t\t\t\t$counter++,\n\t\t\t\tstr_replace(';', ' ', $row['name']),\n\t\t\t\tstr_replace(';', ' ', $row['email']),\n\t\t\t\tdate('d/m/Y', strtotime($row['created'])),\n\t\t\t\t$row['blacklisted']\n\t\t\t));\n\t\t}\n\t\tunset($row);\n\n\t\t// Output data\n\t\theader('Pragma: public');\n\t\theader('Expires: 0');\n\t\theader('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n\t\theader('Cache-Control: private', false);\n\t\theader('Content-Type: text/csv');\n\t\theader('Content-Disposition: attachment; filename=\"inschrijvingen.csv\"');\n\t\theader('Content-Transfer-Encoding: binary');\n\t\theader('Content-Length: '.strlen($csv));\n\t\texit($csv);\n\t}", "function hook_message_subscribe_get_subscribers_alter(&$uids, $values) {\n\n}", "public function findEmailSubscriptions()\n {\n return $this->em\n ->createQueryBuilder('q')\n ->select('s.email')\n ->from('BackendBundle:Subscription', 's')\n ->getQuery()\n ->getResult();\n }", "public function subscriptions()\n {\n return Subscription::byCustomer($this->id);\n }", "public function getSubscribersCount()\n {\n return $this->formattedData['subscribers'];\n }", "public function admin_subscribeList()\n {\n \tif (!$this->request->is('ajax')) {\n $this->Session->delete('direction');\n $this->Session->delete('sort');\n }\n $this->layout = 'admin';\n $perpage = $this->Functions->get_param('perpage', Configure::read('PER_PAGE'), true);\n $page = $this->Functions->get_param('page', Configure::read('PAGE_NO'), false);\n $counter = (($page - 1) * $perpage) + 1;\n $this->set('counter', $counter);\n\n $search = $this->Functions->get_param('search');\n $this->Functions->set_param('direction'); \n $this->Functions->set_param('sort');\n if ($this->Session->read('sort') != '') {\n $this->paginate['NewsletterSubscribe']['order'] = array($this->Session->read('sort') => $this->Session->read('direction'));\n }else{\n $this->paginate['NewsletterSubscribe']['order']=array('modified'=>'desc');\n }\n $this->paginate['NewsletterSubscribe']['limit'] = $perpage;\n $this->paginate['NewsletterSubscribe']['order']=array('NewsletterSubscribe.id'=>'desc');\n if ($search != '') {\n $this->paginate['NewsletterSubscribe']['conditions'] = array(\n 'NewsletterSubscribe.subscribe_email_id LIKE' => '%' . $search . '%'\n );\n }\n $this->set('subscribers', $this->paginate('NewsletterSubscribe'));\n if ($this->request->is('ajax')) {\n $this->layout = false;\n $this->set('perpage', $perpage);\n $this->set('search', $search);\n $this->render('admin_subscriber_ajax_list'); // View, Layout\n }\n }", "public function GetSubscriptionsList()\n {\n \t$output = array();\n \n \t$rs = mysql_query(\"SELECT subscription_id, \" . $this->lang_name_field . \" FROM subscriptions ORDER BY \" . $this->lang_name_field . \" ASC\");\n \n \tif(mysql_num_rows($rs)==0)\n \t{\n \t\t$output = 0;\n \t}\n \telse\n \t{\n \t\twhile($row=mysql_fetch_array($rs))\n \t\t{\n \t\t\t$output[] = array(\n\t \t\t\t\t\t\"subscription_id\" => $row['subscription_id'],\n\t \t\t\t\t\t\"subscription_name\"\t=> $row[$this->lang_name_field]\n \t\t\t);\n \t\t}\n \t}\n \n \treturn $output;\n }", "public function subscribe($subscriber);", "public function Subscribers() {\n return $this->hasMany ( Subscribers::class )->where('is_active', 1);\n }", "public function getSubscriptions() {\n\t\t$urlSubscriptions = \"http://www.reddit.com/reddits/mine.json\";\n\t\treturn $this->runCurl ( $urlSubscriptions );\n\t}", "public function get_subscribers( $list_id ) {\n \n $this->db->select('body');\n $this->db->from('scheduled_stats');\n $this->db->where(['unsubscribed' => '1']);\n $query = $this->db->get();\n \n if ( $query->num_rows() > 0 ) {\n \n $result = parse_array($query->result_array());\n return $result;\n \n } else {\n \n return [''];\n \n }\n \n }", "public function subscriptions()\n {\n return $this->hasMany('DragonLancers\\Subscription');\n }", "public function getRegistries()\n {\n return $this->registries;\n }", "public function getSubscribersCount();", "public static function getSubscribedEvents()\n {\n return [\n TheliaEvents::ORDER_UPDATE_STATUS => ['implementInvoice', 100]\n ];\n }", "public static function getSubscribedEvents() {\n return [];\n }", "function getSubscribersCount()\r\n\t{\r\n\t\t$query = 'SELECT COUNT(*)'\r\n\t\t\t\t.' FROM #__flexicontent_favourites'\r\n\t\t\t\t.' WHERE itemid = ' . (int)$this->_id\r\n//\t\t\t\t.' AND notify = 1'\r\n\t\t\t\t;\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$subscribers = $this->_db->loadResult();\r\n\t\treturn $subscribers;\r\n\t}", "public function listSubscriptions($request);", "public function GetSubscriptionsNamesForImport()\n {\n \t$output = array();\n \n \t$rs = mysql_query(\"SELECT subscription_name_en FROM subscriptions ORDER BY subscription_name_en ASC\");\n \n \tif(mysql_num_rows($rs)==0)\n \t{\n \t\t$output = 0;\n \t}\n \telse\n \t{\n \t\twhile($row=mysql_fetch_array($rs))\n \t\t{\n \t\t\tarray_push($output, $row['subscription_name_en']);\n \t\t}\n \t}\n \n \treturn $output;\n }", "public function getSubscribedEvents()\n {\n return [FeedFacade::FEED_EVENT];\n }", "public function getSubscribedEvents()\n {\n return array(\n Events::onFlush,\n Events::loadClassMetadata\n );\n }", "function getOnRegisterServices() { return $this->_onregisterservices; }", "public function getSubscribedEvents()\n {\n return array('onFlush', 'loadClassMetadata');\n }", "public function getSubscriberCount();", "function get_subscriberList(){\n return selectQuery(TAB_SUBSCRIBERS, \"\", \"id DESC\");\n}", "public function send_subscriptions(){\r\n //send email to all those who have subscribed to posts from this author\r\n\r\n }", "public function subscribe($subscriber): void;", "public static function getSubscribedEvents()\n {\n return [\n FOSUserEvents::REGISTRATION_CONFIRM => [\n ['onRegistrationConfirm', -10],\n ],\n ];\n }", "public static function eventSubscriptions() : iterable;", "public static function getSubscribedEvents(): array\n\t{\n\t\t// Only subscribe events if the component is installed and enabled\n\t\tif (!ComponentHelper::isEnabled('com_ars'))\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t'onContentPrepare' => 'onContentPrepare',\n\t\t];\n\t}", "function evel_list_subscribe($scope, $tag, $address, $isadmin = null) {\n global $evel_client;\n $params = func_get_args();\n $result = $evel_client->call('EvEl.list_subscribe', $params);\n return $result;\n}", "public function get_all_registered()\n {\n }", "public function get_all_registered()\n {\n }", "public static function getSubscribedEvents()\n {\n return array(\n ServiceCacheEvents::LOADED => 'onCacheLoaded',\n );\n }", "public function getSources($context = null)\n {\n $sources = [];\n $sources['*'] = ['label' => Craft::t('All Subscribers')];\n\n $sources[] = ['heading' => Craft::t('Subscriptions')];\n foreach (craft()->charge_membershipSubscription->getAllMembershipSubscriptions() as $subscription) {\n $sources['membershipSubscriptionId:' . $subscription->id] = ['label' => $subscription->name, 'criteria' => ['membershipSubscriptionId' => $subscription->id]];\n }\n\n return $sources;\n }", "public static function getSubscribers(\\Elgg\\Event $event): ?array {\n\t\t\n\t\tif ((bool) elgg_get_plugin_setting('separate_notifications', 'tag_tools')) {\n\t\t\t// don't extend normal notifications\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t$notification_event = $event->getParam('event');\n\t\tif (!$notification_event instanceof SubscriptionNotificationEvent) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t$entity = $notification_event->getObject();\n\t\t$action = $notification_event->getAction();\n\t\tif (!$entity instanceof \\ElggEntity || !in_array($action, ['create', 'publish'])) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif (!tag_tools_is_notification_entity($entity->guid)) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t$sending_tags = tag_tools_get_unsent_notification_tags($entity);\n\t\t$subscribers = $event->getValue();\n\t\t\n\t\t// get interested users\n\t\t$users_batch = elgg_get_entities([\n\t\t\t'type' => 'user',\n\t\t\t'annotation_name_value_pairs' => [\n\t\t\t\t'name' => 'follow_tag',\n\t\t\t\t'value' => $sending_tags,\n\t\t\t\t'case_sensitive' => false,\n\t\t\t],\n\t\t\t'limit' => false,\n\t\t\t'batch' => true,\n\t\t]);\n\t\t\n\t\t/* @var $user \\ElggUser */\n\t\tforeach ($users_batch as $user) {\n\t\t\tif ($entity->owner_guid === $user->guid) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// check user access\n\t\t\tif (!tag_tools_validate_entity_access($entity, $user)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// get the notification settings of the user for one of the sending tags\n\t\t\t// this will prevent duplicate notifications,\n\t\t\tforeach ($sending_tags as $tag) {\n\t\t\t\tif (!tag_tools_is_user_following_tag($tag, $user->guid)) {\n\t\t\t\t\t// user is not following this tag, check the next tag\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$notifiction_settings = tag_tools_get_user_tag_notification_settings($tag, $user->guid);\n\t\t\t\tif (empty($notifiction_settings)) {\n\t\t\t\t\t// no notification settings for this tag\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (isset($subscribers[$user->guid])) {\n\t\t\t\t\t$subscribers[$user->guid] = array_merge($subscribers[$user->guid], $notifiction_settings);\n\t\t\t\t\t$subscribers[$user->guid] = array_unique($subscribers[$user->guid]);\n\t\t\t\t} else {\n\t\t\t\t\t$subscribers[$user->guid] = $notifiction_settings;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $subscribers;\n\t}", "public function getsubscribers() {\r\n if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH']==\"XMLHttpRequest\") {\r\n $this->db->select()\r\n ->from('ci_subscribers sub')\r\n ->where('sub.status', 1)\r\n ->order_by('sid', 'ASC');\r\n $query = $this->db->get();\r\n $query = $query->result_array();\r\n print json_encode($query);\r\n }else{\r\n header(\"Location: \" . base_url());\r\n }\r\n }", "public function getSubscribedEvents()\n {\n return array(\n 'prePersist',\n 'preUpdate',\n 'loadClassMetadata'\n );\n }", "public function subscriptions()\n {\n return $this->morphMany('App\\Subscription', 'subscriptionable');\n }", "public function clearSubscribers();", "public function removeSubscribes();", "public static function getSubscribedEvents()\n {\n return [\n FOSUserEvents::REGISTRATION_INITIALIZE => [\n ['disableUser', 0],\n ],\n FOSUserEvents::REGISTRATION_SUCCESS => [\n ['registrationFlashMessage', 0],\n ],\n ];\n }", "public function subscribe()\n {\n return $this->gate->request(Gate::URL_SUBSCRIBED_APPS);\n }", "public function processSubscriptions()\n {\n $subscriptions = new Calendar\\Subscriptions(array('calendar_id'=>$this->id));\n foreach ($subscriptions as $subscription) {\n $subscriptions->process();\n }\n }", "public static function getSubscribedEvents()\n {\n return [\n Events::COUPON_ADDED => ['resetDealPurchasables', 1],\n Events::COUPON_REMOVED => ['resetDealPurchasables', 1]\n ];\n }", "function getSubscribedAddressBooks() {\n $principalUriExploded = explode('/', $this->addressBookInfo['principaluri']);\n $path = 'addressbooks/' . $principalUriExploded[2] . '/' . $this->addressBookInfo['uri'];\n $id = $this->addressBookInfo['id'];\n\n $result = array_merge(\n $this->carddavBackend->getSharedAddressBooksBySource($id),\n $this->carddavBackend->getSubscriptionsBySource($path)\n );\n\n return $result;\n }", "public static function getSubscribedEvents();", "public static function getSubscribedEvents();", "public function listInscriptions()\n {\n $slug_socio = Auth()->user()->Socio->slugSocio;\n return Inscription::listaInscripciones($slug_socio);\n }", "public function getSubscribedEvents();", "public function getSubscribedEvents()\n {\n return array(\n Events::prePersist,\n Events::onFlush,\n Events::loadClassMetadata\n );\n }", "public function subscribes();", "public function all()\n {\n return response()->json(\n Subscriber::all()\n );\n }", "public function getSubscribedEvents()\n {\n return array(\n 'postPersist',\n \t'postFlush',\n 'onFlush'\n );\n }", "public function addSubscriber(array $data)\n {\n return $this->ozioma->newsletter->addSubscriber($data);\n }", "public function addBulkSubscribers(array $data)\n {\n return $this->ozioma->newsletter->addBulkSubscribers($data);\n }", "public function getSubscriptionTypes();", "public static function getSubscribedEvents() {\n return [\n ScriptEvents::POST_INSTALL_CMD => 'install',\n ScriptEvents::POST_UPDATE_CMD => 'install',\n ];\n }", "public function get_active_subscriptions() {\r\n return $this->get_all_subscriptions( true );\r\n }", "public function subscriptions()\n {\n return $this->hasMany(Subscription::class);\n }", "public function subscriptions()\n {\n return $this->hasMany(Subscription::class);\n }", "public function getSubscribedEvents()\n {\n return [\n InvitedExistingUserToTenancy::class => 'whenInvitedExistingUserToTenancy',\n InvitedNewUserToTenancy::class => 'whenInvitedNewUserToTenancy',\n ];\n }", "public static function getSubscriptionProductsList() {\n $sku = array();\n $query = db_select('commerce_product', 'cp');\n $query->fields('cp', array('sku'));\n $query->leftJoin('field_data_field_product', 'pr', 'cp.product_id = pr.entity_id');\n $query->condition('pr.bundle', 'subscription', '=');\n $result = $query->execute();\n while ($product = $result->fetchAssoc()) {\n $sku[] = $product['sku'];\n }\n return new Response(TRUE, $sku, NULL);\n }", "public function getSubscribedEvents()\n {\n return [\n Events::postPersist,\n Events::postUpdate,\n// Events::preUpdate,\n ];\n\n }", "public static function get_subscribed_events() {\r\n\t\treturn [\r\n\t\t\t'rocket_buffer' => [\r\n\t\t\t\t[ 'extract_ie_conditionals', 1 ],\r\n\t\t\t\t[ 'inject_ie_conditionals', 34 ],\r\n\t\t\t],\r\n\t\t];\r\n\t}", "public function getSubscribedEvents()\n {\n return array(\n 'loadClassMetadata'\n );\n }", "public function getSubscribedEvents()\n {\n return [\n Events::postFlush,\n Events::preRemove\n ];\n }", "public static function getSubscribedEvents()\n {\n $events[ConfigEvents::IMPORT][] = array('onConfigImporterImport', 40);\n return $events;\n }", "public function getCachedSubscribersAttribute(): Collection\n {\n return Cache::remember($this->cacheKey().':subscribers', 10, function () {\n return $this->subscribers()->latest()->get();\n });\n }", "public function subscribersGrid(){\n\n\t\t// Define range and order\n\t\t$start\t\t\t= abs(Input::postInt('start'));\n\t\t$limit\t\t\t= abs(Input::postInt('limit'));\n\t\t$order\t\t\t= Input::post('sort', 'created');\n\t\t$direction\t\t= Input::post('dir', 'DESC');\n\n\t\t// Search query\n\t\t$search\t\t\t= Input::post('search', null);\n\n\t\t// Get records\n\t\t$records\t= model('NewsletterSubscriberModel')->adminGetSubscribersGrid($start, $limit, $order, $direction, $search);\n\t\t$total\t\t= model('NewsletterSubscriberModel')->adminCountSubscribersGrid($search);\n\n\t\t// Output data\n\t\toutput_json_encode(array(\n\t\t\t'records'\t=> $records,\n\t\t\t'total'\t\t=> $total\n\t\t));\n\t}", "public function getSubscribedEvents()\n {\n return [InvitedNewUserToTenancy::class => ['whenInvitedNewUserToTenancy']];\n }", "public static function getSubscribedEvents()\n {\n // event can be dispatch with dispatcher in a controller ...\n return [\n 'user.update' => 'updateUser'\n ];\n }", "public static function getSubscribedEvents(): array\n {\n return [\n 'post-install-cmd' => 'clearCache',\n 'post-update-cmd' => 'clearCache'\n ];\n }", "public function getSubscribedEvents()\n {\n return array(self::prePersist);\n }", "private function writeSubscribersData()\n { \n // subscribers counter\n $addedSubs = 0;\n\n // get subscribers collection\n $subscribersCollection = Mage::getModel('newsletter/subscriber')->getCollection();\n\n // we only want subscribers that are not customers\n $subscribersCollection->addFieldToFilter('customer_id', array(\n 'eq' => 0,\n 'null' => true\n ));\n\n // we want to pick up from where we did stop last time\n $subscribersCollection->addFieldToFilter('subscriber_id', array(\n 'gt' => $this->currentStatus->getLastSubscriptionId()\n ));\n\n // we want to get sorted collection\n $subscribersCollection->setOrder('subscriber_id', 'ASC');\n\n // cap collection with current writes limit\n $subscribersCollection->setPageSize($this->writesLimit);\n\n // iterate over all subscribers and write such profiles to data files\n foreach ($subscribersCollection as $subscriber) {\n // write subscriber\n $this->writeSubscriber($subscriber);\n\n // increament counter\n $addedSubs++;\n\n // store last subscription Id\n $this->currentStatus->setLastSubscriptionId($subscriber->getId());\n\n // if we are reaching time limit we should stop processing \n if ($this->isTimeLimitReached()) {\n throw new Exception('Time limit reached');\n }\n }\n\n // return amount of subscribers that we add\n return $addedSubs;\n }", "function pressforward_ab_subscriber() {\n\trequire( dirname( __FILE__ ) . '/includes/pressforward-ab-subscribe.php' );\n\treturn PF_AB_Subscriber::init();\n}", "function listSubscribe($id, $email_address, $merge_vars, $email_type='html', $double_optin=true) {\n $params = array();\n $params[\"id\"] = $id;\n $params[\"email_address\"] = $email_address;\n $params[\"merge_vars\"] = $merge_vars;\n $params[\"email_type\"] = $email_type;\n $params[\"double_optin\"] = $double_optin;\n return $this->callServer(\"listSubscribe\", $params);\n }" ]
[ "0.69961363", "0.69953275", "0.6803105", "0.67790896", "0.6567562", "0.65089154", "0.6489106", "0.6457621", "0.6323084", "0.6245208", "0.62275606", "0.6119219", "0.60983825", "0.60770994", "0.5949607", "0.5928331", "0.59195143", "0.5914152", "0.5898258", "0.58796275", "0.5856541", "0.5852389", "0.5848597", "0.582873", "0.5818103", "0.5778281", "0.57765466", "0.57380074", "0.5736497", "0.5723731", "0.57203853", "0.5675477", "0.56704694", "0.5655395", "0.565177", "0.56505376", "0.5645722", "0.5638858", "0.5637279", "0.56187695", "0.55939287", "0.5560864", "0.5559266", "0.5551239", "0.55444086", "0.5543058", "0.5537691", "0.55358905", "0.55355275", "0.5524799", "0.55139655", "0.5504241", "0.5496131", "0.5488157", "0.54800785", "0.5479639", "0.54712623", "0.5463102", "0.545849", "0.54348314", "0.5431642", "0.542761", "0.54252255", "0.54116917", "0.5405073", "0.5405035", "0.5403271", "0.5401502", "0.5400688", "0.54006505", "0.54006505", "0.5398883", "0.5374735", "0.5363857", "0.5360327", "0.5356786", "0.535418", "0.5339192", "0.5335302", "0.53334284", "0.53271264", "0.5319868", "0.5318901", "0.5318901", "0.5313074", "0.5310549", "0.53055537", "0.530517", "0.53050214", "0.52922064", "0.5286473", "0.52829045", "0.5282031", "0.52741563", "0.52735746", "0.52703285", "0.52650183", "0.5263225", "0.52621096", "0.52513295" ]
0.5500867
52
Gets the config options as an array, if a key is supplied then that keys options is returned.
protected function getConfig($key = null) { if ($this->config === null) { $this->setConfig(); } if (null === $key) { return $this->config; } if (!array_key_exists($key, $this->config)) { throw new InvalidArgumentException("key: '" . $key . "' is not set in configuration options."); } return $this->config[$key]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOptions($key): mixed\n {\n return $this->options[$key];\n }", "public\n function options($key = null)\n {\n if ($key !== null)\n {\n return $this->options[$key];\n }\n\n return $this->options;\n }", "public\n function options($key = null)\n {\n if ($key !== null) {\n return $this->options[$key];\n }\n\n return $this->options;\n }", "protected function getOptions()\r\n\t{\r\n\t\treturn isset($this->options) ? $this->options : array();\r\n\t}", "public function getConfig() : array {\n\t\treturn static::$options;\n\t}", "private function getAllOptions() {\n return $this->config[$this->context];\n }", "public static function get($key = null)\n {\n $options = json_decode(get_option('wpindexer', json_encode(array())), true);\n \n if (is_null($key)) {\n return $options;\n } else if (isset($options[$key])) {\n return $options[$key];\n }\n return array();\n }", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "public static function getOptions(array $options = []): array\n {\n $configuration = self::readConfiguration();\n $configurationValues = [];\n\n /**\n * Return all options if none are specified.\n */\n if (!$options) {\n return $configuration;\n }\n\n /**\n * Iterate through all specified options and list them\n * in $configurationValues.\n */\n foreach ($options as $key) {\n if (isset($configuration[$key])) {\n $configurationValues[$key] = $configuration[$key];\n }\n }\n\n return $configurationValues;\n }", "public static function getOptions($key = null)\n {\n if ($key == null) {\n return Zend_TimeSync::$options;\n }\n\n if (isset(Zend_TimeSync::$options[$key]) === true) {\n return Zend_TimeSync::$options[$key];\n } else {\n require_once 'Zend/TimeSync/Exception.php';\n throw new Zend_TimeSync_Exception(\"'$key' does not point to valid option\");\n }\n }", "protected function getOptions() {\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\r\n\t{\r\n\t\treturn array();\r\n\t}", "protected function configurations(string $key): array\n {\n return $this['config'];\n }", "public function getOptions() : array;", "protected function _getConfigValueArray($configKey = null) {\n\t\t$result = [];\n\t\tif (empty($configKey)) {\n\t\t\treturn $result;\n\t\t}\n\n\t\t$configPath = 'CakeInstaller.' . $configKey;\n\t\tif (!Configure::check($configPath)) {\n\t\t\treturn $result;\n\t\t}\n\n\t\t$configValue = (array)Configure::read($configPath);\n\t\tif (!empty($configValue)) {\n\t\t\t$result = $configValue;\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getOptions()\n {\n if ($this->options === null) {\n $this->dispatch(new BuildOptions($this));\n }\n\n $topOptions = array_get($this->getConfig(), 'top_options');\n\n if (!is_array($topOptions)) {\n $topOptions = array_filter(array_reverse(explode(\"\\r\\n\", $topOptions)));\n }\n\n foreach ($topOptions as $key) {\n $this->options = [$key => $this->options[$key]] + $this->options;\n }\n\n return $this->options;\n }", "public function load_options() {\n\t\treturn $this->get_config();\n\t}", "protected function getOptions()\n {\n return array(\n );\n }", "protected function getOptions()\n {\n return array(\n );\n }", "protected function getOptions()\n {\n return array(\n );\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function _options() {\n\t\t\treturn array();\n\t\t}", "protected function getOptions()\n {\n return array(\n\n );\n }", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "protected static abstract function getOptions();", "protected function getOptions() {\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "public function getOptions()\n {\n return $this->options ?: [];\n }", "public function options($key){\n\t\t$vars = get_object_vars($this);\n\t\treturn $vars[$key];\n\t}", "private function getOptions(): array\n {\n $options = [];\n foreach ($this->optionsMap as $property => $name) {\n $options[$name] = $this->options[$property];\n }\n return $options;\n }", "protected function getOptions($key = null)\n {\n $options = \\apply_filters(\n self::FILTER_CACHE_OPTIONS,\n \\get_option(self::OPTION_KEY, $this->settings->getSettings())\n );\n\n if (\\is_string($key) && \\array_key_exists($key, $options)) {\n return $options[$key];\n }\n\n return $options;\n }", "public function get_options() {\n\n if( $this->args['database'] === 'transient' ) {\n $this->options = get_transient( $this->unique );\n } else if( $this->args['database'] === 'theme_mod' ) {\n $this->options = get_theme_mod( $this->unique );\n } else if( $this->args['database'] === 'network' ) {\n $this->options = get_site_option( $this->unique );\n } else {\n $this->options = get_option( $this->unique );\n }\n\n if( empty( $this->options ) ) {\n $this->options = array();\n }\n\n return $this->options;\n\n }", "public function getOptions(): array\n {\n return $this->options;\n }", "public function getOptions(): array\n {\n return $this->options;\n }", "public function getOptions(): array\n {\n return $this->options;\n }", "public function getOptions(): array\n {\n return $this->options;\n }", "public function getOptions(): array\n {\n return $this->options;\n }", "public function getOptions(): array\n {\n return $this->options;\n }", "public function getOptions(): array\n {\n return $this->options;\n }", "public function getOptions(): array\n {\n return $this->_options;\n }", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public static function getCouchConfigOptions()\n {\n return [\n 'couch_username' => self::$username,\n 'couch_password' => self::$password,\n 'couch_url' => self::$url,\n 'return_json' => self::$json\n ];\n }", "private static function getOption()\n {\n return array_merge(\n array_flip(['application_id', 'api_key', 'index_name']),\n array_filter((array) get_option('algolia_index'))\n );\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }" ]
[ "0.7126416", "0.7070007", "0.7054318", "0.7015635", "0.7004087", "0.69703877", "0.6957293", "0.68644273", "0.68644273", "0.68644273", "0.68644273", "0.68644273", "0.68644273", "0.68644273", "0.68644273", "0.68644273", "0.68563", "0.6841256", "0.6827613", "0.68174416", "0.68174416", "0.68174416", "0.68174416", "0.68174416", "0.68174416", "0.68174416", "0.68174416", "0.68174416", "0.68174416", "0.68174416", "0.68174416", "0.68174416", "0.68026906", "0.67996484", "0.67910457", "0.6787074", "0.678307", "0.677694", "0.67561525", "0.67561525", "0.67561525", "0.67524993", "0.67524993", "0.67524993", "0.67524993", "0.67524993", "0.67524993", "0.67524993", "0.6735568", "0.6731182", "0.67303985", "0.67303985", "0.67303985", "0.67303985", "0.67303985", "0.67303985", "0.67303985", "0.6728588", "0.67236954", "0.6720526", "0.6720526", "0.6720526", "0.6720526", "0.6720526", "0.6720526", "0.6720526", "0.6715859", "0.6702184", "0.6699988", "0.66734856", "0.6646824", "0.6642581", "0.6642581", "0.6642581", "0.6642581", "0.6642581", "0.6642581", "0.6642581", "0.66341645", "0.66284615", "0.66284615", "0.66284615", "0.66284615", "0.66284615", "0.66284615", "0.66284615", "0.66284615", "0.66284615", "0.66284615", "0.66284615", "0.66284615", "0.66284615", "0.66284615", "0.66284615", "0.66284615", "0.6616612", "0.66162556", "0.66110474", "0.66110474", "0.66110474", "0.66110474" ]
0.0
-1
Sets the config array.
protected function setConfig() { $this->config = $this->getServiceLocator() ->getServiceLocator() ->get('config'); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setConfiguration(array $config);", "public static function set(array $config): void;", "public function setConfig(array $config)\r\n {\r\n $this->config = $config;\r\n }", "public function set(array $config)\r\n {\r\n $this->config = $this->validateConfig($config);\r\n }", "public function setConfig(array $config): void\r\n {\r\n }", "public function setConfig(array $config): void\r\n {\r\n }", "public function setConfig($config) {\n\t\tif (is_array($config)) {\n\t\t\t$this->config = array_merge($this->config, $config);\n\t\t}\n\t}", "protected function initConfig()\n {\n $this->config = [];\n }", "public function setConfig(array $config) {\n $this->container->offsetSet('config', $config);\n }", "public function set($config){\n\t\t$this->configValues = $config;\n\t}", "public function setConfig($config)\n {\n if (!is_array($config)) {\n return;\n }\n\n $this->config = $config;\n $this->bootstrapTheme();\n }", "public function setConfig(array $config){\n self::$_config = $config;\n return $this;\n }", "public function setData(array $data)\n {\n $this->config->setData($data);\n }", "public function setConfig($config = array()) \n { \n\n if(is_array($config) ) {\n\n if(!empty($config)) {\n foreach($config as $key=>$value) {\n \n if(!isset($this->_config[$key])){\n $this->_config[$key] = $value;\n }\n }\n }\n \n } else {\n \n throw new Exception( \"Invalid parameter\".\"(\".print_r($config,1).\")\");\n }\n\n }", "public function config(array $config) {\n parent::config($config);\n }", "protected function setConfig()\n {\n $dbconfig = atkconfig('db');\n $config = $dbconfig[$this->m_name];\n foreach ($config['nodes'] as $mode=>$nodes)\n {\n if (is_array($nodes))\n {\n foreach ($nodes as $node) $this->setNodeConfig($node, $dbconfig[$node], $mode);\n }\n else $this->setNodeConfig($nodes, $dbconfig[$nodes], $mode);\n }\n }", "public function config(array $config): void;", "public function onSetConfiguration($configArr) {\n\t\t\n\t\t$this->_FIELDS_CONFIG = $configArr ['fields'];\n\t\tunset ( $configArr ['fields'] );\n\t\t$this->_FORM_CONFIG = $configArr;\n\t\n\t}", "public static function initConfig(array $config = [])\n {\n self::$config = $config;\n }", "public function configure(array $config);", "public static function set_config(array $config)\n\t{\n\t\tforeach ($config as $key => $value)\n\t\t{\n\t\t\tif ($key == 'template')\n\t\t\t{\n\t\t\t\tstatic::$template = array_merge(static::$template, $config['template']);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tstatic::${$key} = $value;\n\t\t}\n\t\t\n\t\tstatic::initialize();\n\t}", "public function setConfig(array $config)\n {\n $this->path = rtrim($config['path'], '/');\n }", "public function setAdapterConfigFromArray(array $config): void\n {\n foreach ($config as $name => $options) {\n if (!isset($options['class'])) {\n throw new RuntimeException('Adapter class or name is missing');\n }\n\n if (!isset($options['options']) || !is_array($options['options'])) {\n throw new RuntimeException('Adapter options must be an array');\n }\n\n $this->adapterConfig[$name] = $options;\n }\n }", "public function setAll($name, $subarray) {\n if ($name != NULL && $this->isTrueArray($subarray)) {\n $this->_config[$name] = $subarray;\n }\n }", "public function setConfig(array $config=null)\n {\n $defaults = $this->getConfigDefaults();\n $this->config = null === $config ? $defaults : $config+$defaults;\n }", "public function set_config($config = array())\n\t{\n\t\tif ( ! empty($config))\n\t\t{\n\t\t\tforeach ($config as $key => $value)\n\t\t\t{\n\t\t\t\t$this->{$key} = $value;\n\t\t\t}\n\t\t}\n\t}", "public function setConfig(array $config)\n {\n $this->_config = $config;\n\n return $this;\n }", "public function setConfig($config)\n {\n if(!is_array($config))\n throw new Exception('Unable to use non-array configuration');\n\n foreach($config as $key=>$value)\n {\n $_key='_'.$key;\n $this->$_key=$value;\n }\n }", "protected function setConfigurations()\n {\n if ($files = $this->getFiles('config'))\n {\n foreach ($files as $key => $filename)\n {\n $this->config->set(basename($filename, '.php'), require path('config').DIRECTORY_SEPARATOR.($filename));\n }\n }\n }", "public function setConfig($config = array())\n {\n// var_dump($config);\n echo \"Set CurlProxy Config\\n\"; \n if (! is_array($config)) {\n require_once 'Zend/Http/Client/Exception.php';\n throw new Zend_Http_Client_Exception('Expected array parameter, given ' . gettype($config));\n }\n\n foreach ($config as $k => $v)\n $this->config[strtolower($k)] = $v;\n\n return $this;\n }", "private function setUpConfig() {\n\n //Get the file where the configs are and process the arrays\n require($this->_data['pathtodata']);\n\n $this->_data = array_merge($this->_data,$acs_confdata);\n\n if (empty($this->_data['indexfile']))\n $this->_data['indexfile'] = 'index';\n\n if (empty($this->_data['common_extension']))\n $this->_data['common_extension'] = COMMON_EXTENSION;\n \n $this->setUriData($this->_data); \n \n //Create the cache file of the config\n if (isset($this->_data['cache_config']) && $this->_data['cache_config'])\n $this->saveConfig();\n else\n if (file_exists($this->_data['cache_config_file']))\n unlink($this->_data['cache_config_file']); \n }", "public static function config($config = array())\n {\n self::$config = $config;\n }", "public function setConfigs($configs)\n {\n $this->configs = $configs;\n }", "public function addConfig(): array\n {\n // TODO: Implement addConfig() method.\n }", "public function setConfig(array $config, $store = false)\n {\n $this->configuration = $config;\n\n if ($store) {\n $values = array('configuration' => serialize($config));\n $connection = \\Zend_Registry::get('doctrine')->getConnection();\n $connection->update('daemon', $values, array('name' => $this->getName()));\n }\n }", "public function setValues(array $configs) {\n\t\t$this->config->setValues($configs);\n\t}", "public function setConfig($configs)\n {\n self::set('_config', $configs);\n }", "public function setupConfig()\n {\n registry::getInstance()->set('config', $this->parseConfig());\n }", "public function set_config( $config ) {\n\t\tif ( is_string( $config ) && file_exists( $config ) ) {\n\t\t\t$config = require_once $config;\n\t\t}\n\n\t\tif ( is_array( $config ) ) {\n\t\t\t$this->config = array_replace_recursive( $this->config, $config );\n\t\t}\n\t}", "public function setConfig(array $params);", "private function setConfig(array $config = [])\n {\n // Set Api Credentials\n if (function_exists('config')) {\n $this->setApiCredentials(\n config('paypal')\n );\n } elseif (!empty($config)) {\n $this->setApiCredentials($config);\n }\n\n $this->setRequestData();\n }", "public function setArray($array){\n $this->array=$array;\n }", "private function reconfigure() {\n\t\t$global = JConfig::getInstance();\n\t\tforeach ($global as $key => $value) {\n\t\t\tif (array_key_exists($key, $this->config)) {\n\t\t\t\t$this->config[$key] = $value;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tif (class_exists('JPConfig')) {\n\t\t\t\t$this->config = array_merge($this->config, JPConfig::getData());\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t// class JPConfig doesn't exist\n\t\t}\n\t}", "public function setConfig($config)\r\n {\r\n $this->config = $config;\r\n }", "public function setConfig(array $config)\n {\n foreach ($config as $key => $value) {\n app('config')->set($key, $value);\n }\n\n return $this;\n }", "public function setConfig($config)\n\t{\n\t\t$this->config = $config;\n\t}", "public function set_config($data, $value = null)\n\t{\n\t\tif (is_array($data) && $value === null) {\n\t\t\t$this->config = array_merge($this->config, $data);\n\t\t} else {\n\t\t\t$this->config[$data] = $value;\n\t\t}\n\t}", "public function setConfig($config)\n {\n $this->config = $config;\n }", "public function setConfig($config)\n {\n $this->config = $config;\n }", "public function getConfigArray() {}", "public static function init(array $config) {\n\t\tstatic::$_config = $config;\n\t}", "public function initConfig() {\r\n\t$config = array();\r\n\tinclude($this->name . '/config.php');\r\n\t\\app::$config = array_merge(\\app::$config, $config);\r\n }", "protected function _setOptions($config = array()){\n if(!is_array($config)){\n throw new Zend_Exception('Config should be an array, '.gettype($config).' given.');\n }\n \n if(!isset($config['router'])) $config['router'] = null;\n $this->_initRouterParams($config['router']);\n unset($config['router']);\n \n foreach($config as $key=>$value){\n $strParam = '_'.$key;\n $this->{$strParam} = $value;\n }\n }", "public function setConfig($config) {\n $this->appconfig = $config;\n }", "public function setConfig($config)\n {\n self::$config = $config;\n }", "public function setConfiguration($config){\r\n $this->configuration=$config;\r\n }", "function setArray( array $storearray ) {\n$this->array = $storearray;\n}", "public function set($arr)\n {\n $this->arr = $arr;\n }", "function setArray($array) {\n\t\tif ($array['blogName'])\n\t\t\t$this->blogName = $array['blogName'];\n\t\tif ($array['blogDescription'])\n\t\t\t$this->blogDescription = $array['blogDescription'];\n\t\tif ($array['blogOwner'])\n\t\t\t$this->blogOwner = $array['blogOwner'];\n\t\tif ($array['blogEmailNotify'])\n\t\t\t$this->blogEmailNotify = $array['blogEmailNotify'];\n\t\tif ($array['blogAllowViewing'])\n\t\t\t$this->blogAllowViewing = $array['blogAllowViewing'];\n\t\tif ($array['blogAllowPosting'])\n\t\t\t$this->blogAllowPosting = $array['blogAllowPosting'];\n\n\t\t$this->_modified = true;\n\t}", "public function setArray(array $array)\n {\n $this->array = $array;\n }", "function cfg_set(...$args)\n{\n\tglobal $CONFIG;\n\tswitch( count($args) )\n\t{\n\t\tcase 2: $CONFIG[$args[0]] = $args[1]; break;\n\t\tcase 3: $CONFIG[$args[0]][$args[1]] = $args[2]; break;\n\t\tcase 4: $CONFIG[$args[0]][$args[1]][$args[2]] = $args[3]; break;\n\t\tcase 5: $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]] = $args[4]; break;\n\t\tcase 6: $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]] = $args[5]; break;\n\t\tcase 7: $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]][$args[5]] = $args[6]; break;\n\t\tdefault: WdfException::Raise(\"Illegal argument count: \".count($args));\n\t}\n}", "public function set_config(array $config)\n\t{\n\t\tif (isset($config['convert_integers']))\n\t\t{\n\t\t\t$this->config['convert_integers'] = (bool)$config['convert_integers'];\n\t\t}\n\n\t\tif (isset($config['typecast_objects']))\n\t\t{\n\t\t\t$this->config['typecast_objects'] = (bool)$config['typecast_objects'];\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setSettings(array $settings)\n {\n }", "public function setSettings(array $settings)\n {\n }", "public function overrideConfiguration($config) {\n if (is_array($config)) \n $this->config = array_replace_recursive($this->config, $config);\n }", "protected function defineConfig()\n {\n // Get config paths\n $configs = $this->config->getDirectly(__DIR__ . '/../Config/path.php')['default_config'] ?? [];\n\n // Add all of them to config collector if $configs is an array\n if (is_array($configs)) {\n foreach ($configs as $alias => $path) {\n $this->config->set($alias, $path);\n }\n }\n }", "public function initialize(array $config);", "public function setConfig(array $aConfig) {\n \t\n \t// Set configuration\n \t$this->aConfig = (array) $aConfig;\n \t\n \t// Return instance\n \treturn $this;\n }", "public static function setup($name,$value = \"\") {\n if(!is_array($name)) {\n if($name == \"storage\") {\n self::$storage = $value;\n }\n\n self::$config[$name] = $value;\n } else {\n foreach($name as $n=>$value) {\n self::setup($n,$value);\n }\n }\n\n }", "protected function _initConfig()\n\t{\n\t\tZend_Registry::set('config', $this->getOptions());\n\t}", "public function configure(array $config): void;", "public function set_config( $config, $value = null )\n\t{\n\t\tif ( is_array( $config ) ) {\n\t\t\tforeach ( $config as $name => $value ) {\n\t\t\t\t$this->set_config( $name, $value );\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif ( is_array( $value ) ) {\n\t\t\t\t$this->config[ $config ] = array_merge( $this->config[ $config ], $value );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->config[ $config ] = $value;\n\t\t\t}\n\t\t}\n\t}", "function setConfig( array $input ){\n\n\t\tif ( is_array( $input ) ) {\n\t\t\t$phpClass = !isset( $input['php-class'] ) ? IMAP_DEFAULT_ACTION_CLASS : $input['php-class'];\n\t\t\t$this->phpClass = $phpClass;\t\t\t\n\t\t\t$this->config = $input[ 'config' ];\t\t\t\n\t\t}\n\t}", "public function __construct(array $config)\n {\n $this->_config = $config;\n }", "public function __construct($configVar_arr =array())\n {\n if(!empty($configVar_arr)) {\n foreach ($configVar_arr as $key => $value) {\n $this->config_arr[$key] = $value;\n }\n }\n\n }", "public function initialize(array $config)\n {\n }", "private function setConfigToConfiguratorService(array $configArr) : void\n {\n $config = $this->container->get(ConfigInterface::class);\n $config->setConfig($configArr);\n }", "public function setConfig($config)\n {\n $this->config = $this->processArray($config);\n\n return $this;\n }", "public function setupConfig()\n {\n\n $settings = settings_m::get()->groupBy(\"setting_key\")->all();\n\n $settings_arr = [];\n foreach($settings as $key => $item)\n {\n $value = $item[0]->setting_value;\n if(in_array($item[0]->setting_type,[\"image\", \"file\"]))\n {\n\n if($item[0]->setting_value > 0)\n {\n $get_path = attachments_m::find($item[0]->setting_value);\n if(is_object($get_path))\n {\n $value = $get_path->path;\n }\n }\n\n }\n\n $settings_arr[\"$key\"] = $value;\n\n }\n\n config()->set('settings_arr', $settings_arr);\n\n #endregion\n\n #region set timezone config\n\n date_default_timezone_set($settings_arr['timezone']);\n\n #endregion\n\n #region set mail config\n\n config([\n \"mail.driver\" => $settings_arr['mail_type'],\n \"mail.host\" => $settings_arr['smtp_host'],\n \"mail.port\" => $settings_arr['smtp_port'],\n \"mail.from.address\" => $settings_arr['email'],\n \"mail.from.name\" => $settings_arr['name'],\n \"mail.encryption\" => $settings_arr['smtp_ssl'],\n \"mail.username\" => $settings_arr['smtp_user'],\n \"mail.password\" => $settings_arr['smtp_pass'],\n ]);\n\n #endregion\n\n }", "public function __set($name, $value)\n {\n if ($this->_allowModifications) {\n if (is_array($value)) {\n $this->_data[$name] = new self($value, true);\n } else {\n $this->_data[$name] = $value;\n }\n $this->_count = count($this->_data);\n } else {\n /** @see Zend_Config_Exception */\n require_once 'Zend/Config/Exception.php';\n throw new Zend_Config_Exception('Zend_Config is read only');\n }\n }", "public function configure(array $config)\n {\n $this->appKey = $config['app_key'];\n $this->appSecret = $config['app_secret'];\n $this->endPoint = $config['end_point'];\n $this->consumerKey = $config['consumer_key'];\n if (isset($config['domain_delegation'])) {\n $this->domainDelegation = $config['domain_delegation'];\n }\n }", "public function initialize(array $config) {\n\t}", "private function __init_config() {\n if (empty($this->config[\"dnshaper\"][\"queue\"][$this->id][\"queue\"])) {\n $this->config[\"dnshaper\"][\"queue\"][$this->id][\"queue\"] = [];\n }\n # Check if there is no dnshaper queue array in the config\n if (empty($this->config[\"dnshaper\"][\"queue\"][$this->id][\"queue\"][\"item\"])) {\n $this->config[\"dnshaper\"][\"queue\"][$this->id][\"queue\"][\"item\"] = [];\n }\n }", "protected function bootstrapConfig()\n {\n if (is_array($this->config) || $this->configInBootstrap) {\n return;\n }\n $this->configInBootstrap = true;\n $id = $this->getConfigClassId();\n if (!array_key_exists($id, self::$configCache['config'])) {\n $this->initConfig();\n $lazy = [];\n foreach ($this->config as $name => $value) {\n if ($value === null) {\n $lazy[$name] = true;\n }\n }\n self::$configCache['config'][$id] = $this->config;\n self::$configCache['lazy_init'][$id] = $lazy;\n }\n $this->config = self::$configCache['config'][$id];\n $this->configPendingLazyInit = self::$configCache['lazy_init'][$id];\n $this->configInBootstrap = false;\n }", "public function setup()\n {\n $this->_config = array(\n 'adapters' => array(\n array(\n 'adapter' => 'Solar_Log_Adapter_File',\n 'events' => 'debug',\n 'file' => Solar_File::tmp('test_solar_log_adapter_multi.debug.log'),\n 'format' => '%e %m',\n ),\n array(\n 'adapter' => 'Solar_Log_Adapter_File',\n 'events' => 'info, notice',\n 'file' => Solar_File::tmp('test_solar_log_adapter_multi.other.log'),\n 'format' => '%e %m',\n ),\n ),\n );\n \n parent::setup();\n @unlink($this->_config['adapters'][0]['file']);\n @unlink($this->_config['adapters'][1]['file']);\n }", "public function setSettings (array $settings)\n {\n $this->settings = array_merge($this->settings, $settings);\n }", "public function setSettings (array $settings)\n {\n $this->settings = array_merge($this->settings, $settings);\n }", "public function set($config, $value = null) {\n if (!is_array($config)) {\n $config = array($config => $value);\n }\n\n foreach ($config as $names => $value) {\n $name = $this->__configVarNames($names);\n\n // Make sure to expand nested array keys too!\n // @todo: Refactor\n if (is_array($value)) {\n foreach ($value AS $k => $v) {\n $key = $name;\n $key[] = $k;\n $this->set(join('.', $key), $v);\n }\n continue;\n }\n\n switch (count($name)) {\n case 7:\n $this->data[$name[0]][$name[1]][$name[2]][$name[3]][$name[4]][$name[5]][$name[6]] = $value;\n break;\n case 6:\n $this->data[$name[0]][$name[1]][$name[2]][$name[3]][$name[4]][$name[5]] = $value;\n break;\n case 5:\n $this->data[$name[0]][$name[1]][$name[2]][$name[3]][$name[4]] = $value;\n break;\n case 4:\n $this->data[$name[0]][$name[1]][$name[2]][$name[3]] = $value;\n break;\n case 3:\n $this->data[$name[0]][$name[1]][$name[2]] = $value;\n break;\n case 2:\n $this->data[$name[0]][$name[1]] = $value;\n break;\n case 1:\n $this->data[$name[0]] = $value;\n break;\n default:\n $this->data = MOC_Array::insert($this->data, join('.', $name), $value);\n break;\n //throw new MOC_Configuration_Exception(sprintf('Unable to set the value. Depth is invalid (\"%s\")', count($name)));\n }\n }\n }", "public function set_config($config, $value = null) {\n\t\t$config = is_array ( $config ) ? $config : array (\n\t\t\t\t$config => $value \n\t\t);\n\t\tforeach ( $config as $key => $value ) {\n\t\t\tif (strpos ( $key, '.' ) === false) {\n\t\t\t\t$this->config [$key] = $value;\n\t\t\t} else {\n\t\t\t\t\\Arr::set ( $this->config, $key, $value );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "public function __construct(array $config){\n\t\t$this->config = $config;\n\t}", "abstract protected function loadConfig(array $config);", "public function onConfig(array $config = []);", "public function testGetSetAllConfig()\n {\n $this->config->setConfig(array('foo' => 'bar'));\n $this->assertEquals($this->config->getConfig('foo'), 'bar');\n }", "public function __construct(array $config = [])\n {\n $this->config = array_replace_recursive($this->config, $config);\n }", "function setConfigValues( $values )\n\t{\n\t\tif( !is_array( $values ) )\n\t\t\treturn\tfalse;\n\t\tforeach( $values as $path => $value )\n\t\t\t$this->setConfigValue( $path, $value );\n\t}", "protected function config( $config = [] ) {\n\t\t// Bail early if no config.\n\t\tif ( empty( $config ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tforeach ( $config as $key => $value ) {\n\t\t\t$this->$key = $value;\n\t\t}\n\t}", "public function setConfig($config){\n $this->config = array_merge($this->config, $config);\n return $this;\n }", "public function setConfig(array $config)\n {\n $simpleMethods = [\n 'from', 'sender', 'to', 'replyTo', 'readReceipt', 'returnPath',\n 'cc', 'bcc', 'messageId', 'domain', 'subject', 'attachments',\n 'emailFormat', 'emailPattern', 'charset', 'headerCharset',\n ];\n foreach ($simpleMethods as $method) {\n if (isset($config[$method])) {\n $this->{'set' . ucfirst($method)}($config[$method]);\n }\n }\n\n if (isset($config['headers'])) {\n $this->setHeaders($config['headers']);\n }\n\n return $this;\n }", "protected function setupConfig(array $config) {\n\t\t$this->debuggerDisabled = isset($config['debuggerDisabled']) ? (bool)$config['debuggerDisabled'] : false;\n\t}", "function set_new_config()\n{\n\tglobal $avalaible_config, $_POST;\n\n\t$new_config = array();\n\tforeach ($avalaible_config as $element) {\n\t\tswitch ($element['type']) {\n\t\tcase 'array':\n\t\t\t$new_config[$element['name']] = explode(',', $_POST[$element['name']]);\n\t\t\tbreak;\n\t\tcase 'boolean':\n\t\t\tif ($_POST[$element['name']] == 'TRUE')\n\t\t\t\t$new_config[$element['name']] = TRUE;\n\t\t\telse\n\t\t\t\t$new_config[$element['name']] = FALSE;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$new_config[$element['name']] = $_POST[$element['name']];\n\t\t}\n\t}\n\t\t\n\treturn $new_config;\n}", "public function setRegistry()\n {\n $reg = controllers\\Registry::getInstance();\n foreach ($this->config as $key => $value)\n {\n $reg->setResource($key, $value, true);\n }\n\n\n }" ]
[ "0.7816703", "0.76205647", "0.7571238", "0.73596597", "0.7352628", "0.7352628", "0.71626115", "0.7049095", "0.69920164", "0.69464207", "0.6945286", "0.68843204", "0.6882026", "0.67062396", "0.6668455", "0.6602296", "0.6565727", "0.6565234", "0.6549235", "0.6542518", "0.6534025", "0.6491979", "0.6475442", "0.64291745", "0.64175314", "0.6415606", "0.63843966", "0.6374358", "0.63252884", "0.6305666", "0.62900555", "0.627312", "0.6267442", "0.62646717", "0.62589", "0.62585425", "0.625772", "0.6252727", "0.62467223", "0.6245292", "0.62248933", "0.6193245", "0.61788774", "0.6150919", "0.6135868", "0.6116616", "0.61011595", "0.60798234", "0.60798234", "0.6068817", "0.6060125", "0.6049851", "0.6035273", "0.60023296", "0.59985435", "0.59944594", "0.5980098", "0.5978021", "0.597031", "0.59693474", "0.5956564", "0.59387153", "0.59343654", "0.59343654", "0.5928311", "0.5905524", "0.59046906", "0.58990073", "0.5890231", "0.5882127", "0.5877093", "0.58741343", "0.58740544", "0.58665997", "0.5861848", "0.5846742", "0.5844918", "0.583727", "0.5830488", "0.5823932", "0.5817157", "0.58101904", "0.580498", "0.58005077", "0.5798038", "0.57968926", "0.57968926", "0.579231", "0.5790256", "0.5783042", "0.5779913", "0.5774144", "0.5771054", "0.5770627", "0.5769978", "0.57699305", "0.57694", "0.5764698", "0.57619125", "0.5756306", "0.5751176" ]
0.0
-1
Called after loading the form description display menu in uppermenu (visible like a tab)
public function onContentPrepareForm($form, $data)//OK { if (!($form instanceof JForm)) { $this->_subject->setError('JERROR_NOT_A_FORM'); return false; } // only for catid=10 ['nasi beneficjenci'] if( isset($data->{'catid'}) && $data->{'catid'} != 10 ) return true; // Add the extra fields to the form. JForm::addFormPath(dirname(__FILE__) . '/fanimani'); $form->loadFile('fanimani', false); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onRsformBackendAfterShowFormEditTabsTab(): void\n\t{\n\t\t?>\n\t\t<li>\n\t\t\t<?php\n\t\t\techo HTMLHelper::_(\n\t\t\t\t'link',\n\t\t\t\t'javascript: void(0);',\n\t\t\t\t'<span class=\"rsficon jdicon-jdideal\"></span><span class=\"inner-text\">'\n\t\t\t\t. Text::_(\n\t\t\t\t\t'PLG_RSFP_JDIDEAL_LABEL'\n\t\t\t\t) . '</span>'\n\t\t\t);\n\t\t\t?>\n\t\t</li>\n\t\t<?php\n\t}", "public static function menu()\n\t\t\t{\n\t\t\t\t// Create menu tab\n\t\t\t\tadd_options_page(HE_PLUGINOPTIONS_NICK.' Plugin Options', HE_PLUGINOPTIONS_NICK, 'manage_options', HE_PLUGINOPTIONS_ID.'_options', array('HiddenEmpirePluginOptions', 'options_page'));\n\t\t\t}", "function displayMenu()\n\t{\n\t\tshowInfo();\n\t\tshowActions();\n\t}", "function edit_form_after_title()\n {\n }", "function edit_form_after_title()\n {\n }", "protected function _menu()\n\t{\n\t\tif (ee()->view->disabled('ee_menu'))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tee()->view->cp_main_menu = ee()->menu->generate_menu();\n\t}", "function DisplayFeatures()\r\n\t{\r\n\t\tif (! $this->m_news->GetID ())\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$newsID = $this->m_news->GetID ();\r\n\t\t// language strings \r\n\t\t$doneS = $this->GetNameString ( 'done' );\r\n\t\t$optionsS = $this->GetNameString ( 'options' );\r\n\t\t\r\n\t\t$NameS = 'Tab Name'; //$this->GetNameString('Name');\r\n\t\t\r\n\r\n\t\t// values\r\n\t\t$NameV = $this->m_news->GetName ();\r\n\t\t\r\n\t\t//Display title\r\n\t\t$name = $this->m_news->GetName ();\r\n\t\t$this->DisplayTitle ( $name, null, false );\r\n\t\t//////////////////////////////////////\r\n\t\t$panelIndex = 0;\r\n\t\t\r\n\t\tprint ( \"<div class='someGTitleBox'>$optionsS</div>\" );\r\n\t\tprint ( '<div class=\"someGBox\">' );\r\n\t\t\r\n\t\t//Forms\r\n\t\t$updating = true;\r\n\t\t$reading = false;\r\n\t\t\r\n\t\tif (CMSObject::$controller)\r\n\t\t{\r\n\t\t\t$reading = CMSObject::$controller->IsRecReadable ( $this->m_news, 'name' );\r\n\t\t\t$updating = CMSObject::$controller->IsRecUpdatable ( $this->m_news, 'name' );\r\n\t\t}\r\n\t\t\r\n\t\tif ($reading || $updating)\r\n\t\t{\r\n\t\t\t// tab header\r\n\t\t\t$this->DisplayTabHeader ( ++ $panelIndex, $NameS );\r\n\t\t\t\r\n\t\t\tif ($updating)\r\n\t\t\t{\r\n\t\t\t\t$this->DisplayFormHeadr ( 'changeName' );\r\n\t\t\t\t$this->DisplayHidden ( 'newsID', $newsID );\r\n\t\t\t\tprint ( \"<input type='text' value='$NameV' name='Name' id='Name' size='40' maxlength='32' />\\n\" );\r\n\t\t\t\t$this->DisplayFormFooter ( $doneS );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tprint ( $NameV );\r\n\t\t\t}\r\n\t\t\t// tab footer\r\n\t\t\t$this->DisplayTabFooter ();\r\n\t\t}\r\n\t\tprint ( '</div>' );\r\n\t\t\r\n\t\t// display javascript\r\n\t\tprint ( '<script type=\"text/javascript\"><!--' );\r\n\t\t\r\n\t\tfor($index = 0; $index <= $panelIndex; $index ++)\r\n\t\t\tprint ( \"var CollapsiblePanel$index = new Spry.Widget.CollapsiblePanel(\\\"CollapsiblePanel$index\\\", {contentIsOpen:false});\\n\" );\r\n\t\tprint ( '//--></script>' );\r\n\t}", "public function init() {\n $menu = \"<li><a href=\\\" /eu-type-acteur/new \\\">Nouveau</a></li>\";\n $this->view->placeholder(\"menu\")->set($menu);\n $this->view->jQuery()->enable();\n $this->view->jQuery()->uiEnable(); \n }", "private function init_menu()\n {\n // it's a sample code you can init some other part of your page\n }", "public function afterRegistry()\n {\n parent::afterRegistry();\n\n if ($this->showForRespondents && is_bool($this->showForRespondents)) {\n $this->showForRespondents = $this->_('Respondents');\n }\n if ($this->showForStaff && is_bool($this->showForStaff)) {\n $this->showForStaff = $this->_('Staff');\n }\n if ($this->showForTracks && is_bool($this->showForTracks)) {\n $this->showForTracks = $this->_('Tracks');\n }\n if ($this->showTitle && is_bool($this->showTitle)) {\n $this->showTitle = $this->_('Add');\n }\n }", "function show_normal_tabs() {\n //$this->log(\"show_normal_tabs() top\", LOG_DEBUG);\n $this->show_tabs(Configure::read('tabs_order_default'));\n }", "function display() {\r parent::display();\r }", "public function onBackForm()\n {\n // Load another page\n AdiantiCoreApplication::loadPage('MultiStepMultiFormView', 'onLoadFromSession');\n }", "public function init() {\n $menu = \"<li><a href=\\\" /eu-zone/new \\\">Ajouter zone</a></li>\";\n $this->view->placeholder(\"menu\")->set($menu);\n $this->view->jQuery()->enable();\n $this->view->jQuery()->uiEnable();\n }", "public function add_menu() {\n\t\tadd_submenu_page(\n\t\t\t'edit.php?post_type=blicki',\n\t\t\t__( 'Suggestion Review', 'blicki' ),\n\t\t\t__( 'Suggestion Review', 'blicki' ),\n\t\t\t'edit_others_posts',\n\t\t\t'blicki-show-diff',\n\t\t\tarray( $this, 'admin_suggestion_viewer' )\n\t\t);\n\t\tremove_submenu_page( 'edit.php?post_type=blicki', 'blicki-show-diff' );\n\t}", "function initlab_options_page() {\n add_menu_page(\n __('init Lab Options', 'initlab-addons'),\n __('init Lab', 'initlab-addons'),\n 'manage_options',\n 'initlab',\n 'initlab_options_page_html'\n );\n}", "public function admin_page_display()\n {\n?>\n <div class=\"wrap cmb2-options-page <?php echo $this->key; ?>\">\n <h2><?php echo esc_html(get_admin_page_title()); ?></h2>\n <?php cmb2_metabox_form($this->metabox_id, $this->key); ?>\n </div>\n<?php\n }", "public function afterLoadRegisterControlsUI(){\n\t\t\n\t}", "protected function afterActivation() {\n self::createReportMainMenuEntries();\n }", "public function setLoadControllerMenu()\r\n {\r\n add_menu_page(\r\n $_SESSION['controller_data_current']['page_title'], // Title of the page\r\n $_SESSION['controller_data_current']['page_menu_text'], // Text to show on the menu link\r\n $_SESSION['controller_data_current']['page_capability'], // Capability requirement to see the link\r\n $_SESSION['controller_data_current']['page_slug'],\r\n $_SESSION['controller_data_current']['page_render'],\r\n $_SESSION['controller_data_current']['page_menu_icon'],\r\n $_SESSION['controller_data_current']['page_menu_position']\r\n );\r\n }", "function display_active() {\n $this->_activeform->display();\n }", "public function initializePage()\n\t{\n\t\tadd_menu_page('Thema opties', 'Thema opties', 'manage_options', 'theme-options');\n\t}", "public function add_menu() {\n\n add_options_page('Форум phpbb3 :: администрирование', 'Форум phpbb3', 'manage_options', 'phpbb3', array($this, 'plugin_options'));\n }", "function main_screen()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\t$g_array = array();\n\t\t$content = \"\";\n\t\t$form = array();\n\n\t\t//-----------------------------------------\n\t\t// Page details\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->admin->page_title = \"Группы пользователей\";\n\t\t$this->ipsclass->admin->page_detail = \"Разделение на&nbsp;группы является очень полезной и&nbsp;мощной функцией для организации пользователей на&nbsp;форуме. Нужно помнить, что есть 4 группы, которые Вы&nbsp;не&nbsp;сможете удалить, это: (Неактивированные, Гости, Пользователи и&nbsp;Администраторы), однако Вы&nbsp;можете их&nbsp;редактировать. Рекомендуем Вам создать группу &laquo;Модераторы&raquo; и&nbsp;наделить их&nbsp;соответствующими правам на&nbsp;форуме (в&nbsp;разделах), которых нет у&nbsp;простых&nbsp;пользователей.<br /> В&nbsp;параметрах доступа Вы&nbsp;можете произвести быстрые настройки доступов к&nbsp;созданию тем, ответам и&nbsp;чтению форумов. Параметры доступа можно также отредактировать и&nbsp;через меню &laquo;Управление&nbsp;форумами&raquo;.\";\n\t\t$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Управление группами пользователей' );\n\n\t\t//-----------------------------------------\n\t\t// Get groups\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->cache_add_query( 'groups_main_screen', array() );\n\t\t$this->ipsclass->DB->cache_exec_query();\n\n\t\twhile ( $row = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Set up basics\n\t\t\t//-----------------------------------------\n\n\t\t\t$row['_can_delete'] = ( $row['g_id'] > 4 ) ? 1 : 0;\n\t\t\t$row['_can_acp'] = ( $row['g_access_cp'] == 1 ) ? 1 : 0;\n\t\t\t$row['_can_supmod'] = ( $row['g_is_supmod'] == 1 ) ? 1 : 0;\n\t\t\t$row['_title'] = $row['prefix'].$row['g_title'].$row['suffix'];\n\n\t\t\tif ( $this->ipsclass->vars['admin_group'] == $row['g_id'] )\n\t\t\t{\n\t\t\t\t$row['_title'] .= \" ( ROOT )\";\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\t\t\t// IMAGES\n\t\t\t//-----------------------------------------\n\n\t\t\t$row['_can_acp_img'] = $row['_can_acp'] ? 'aff_tick.png' : 'aff_cross.png';\n\t\t\t$row['_can_supmod_img'] = $row['_can_supmod'] ? 'aff_tick.png' : 'aff_cross.png';\n\n\t\t\t//-----------------------------------------\n\t\t\t// Add\n\t\t\t//-----------------------------------------\n\n\t\t\t$content .= $this->html->groups_overview_wrapper_row( $row );\n\n\t\t\t//-----------------------------------------\n\t\t\t// Add to array\n\t\t\t//-----------------------------------------\n\n\t\t\t$g_array[] = array( $row['g_id'], $row['g_title'] );\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Add form\n\t\t//-----------------------------------------\n\n\t\t$form['_new_dd'] = $this->ipsclass->adskin->form_dropdown(\"id\", $g_array, 3 );\n\n\t\t$this->ipsclass->html .= $this->html->groups_overview_wrapper( $content, $form );\n\n\t\t$this->ipsclass->admin->output();\n\t}", "function display_add() {\n $this->_addform->display();\n }", "protected function get_displayinmenublock() {\n return false;\n }", "public function display_admin_menu_item() {\n add_menu_page(\n 'Visit Seattle Partners Importer',\n 'Partners Importer',\n 'manage_options',\n 'visit-seattle-partners-importer',\n array( 'VSPI_Admin', 'display_page' ),\n 'dashicons-update'\n );\n }", "public function admin_page_display() {\n\t\t?>\n\t\t<div class=\"wrap cmb2-options-page <?php echo $this->key; ?>\">\n\t\t\t<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>\n\t\t\t<?php cmb2_metabox_form( $this->metabox_id, $this->key ); ?>\n\t\t\t\n\t\t</div>\n\t\t<?php\n\t}", "function show_forms()\n {\n }", "public function _afterLoad()\n {\n $this->_setStateText();\n return parent::_afterLoad();\n }", "public function admin_page_display() {\r\n\t\t?>\r\n\t\t<div class=\"wrap cmb2-options-page <?php echo $this->key; ?>\">\r\n\t\t\t<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>\r\n\t\t\t<?php cmb2_metabox_form( $this->metabox_id, $this->key ); ?>\r\n\t\t</div>\r\n\t\t<?php\r\n\t}", "function add_from_tab_content () {\n require_once dirname(__FILE__).'/templates/form-tab-content.php';\n }", "public function hl_first_step()\n {\n $this->_hl_form_xoopsheadline();\n }", "protected function setDisplayData() {\n parent::setDisplayData();\n $this->template->setDisplayData( \"person_header\", $this->getTitle() );\n if ( !($form_link = $this->form_link)) {\n if ($this->module == 'I2CE') {\n $form_link = $this->page;\n } else {\n $form_link = $this->module .'/' . $this->page;\n }\n }\n $this->template->setDisplayData( \"person_form\", $form_link);\n }", "public function admin_page_display() {\n\t\t?>\n\t\t<div class=\"wrap cmb2-options-page <?php echo $this->key; ?>\">\n\t\t\t<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>\n\t\t\t<?php cmb2_metabox_form( $this->metabox_id, $this->key ); ?>\n\t\t</div>\n\t\t<?php\n\t}", "public function setup_help_tab()\n {\n }", "public function company_edit() {\n add_submenu_page(\n 'companies',\n \"Add New Company\", // page title\n \"Add New Company\", // menu title\n 'manage_options', // capability\n 'companies_edit', // menu_slug,\n [ $this, 'company_edit_page' ]\n );\n }", "public function options_page_init(){\n\t\t\tadd_options_page(__('Breaking News options', 'text-domain'), __('Breaking News', 'text-domain'), 'manage_options', 'breakingnews', [ $this, 'options_page_content']);\n\t\t}", "function hook_plugin_in_panel(){\n add_menu_page( 'Formularze zamówień', 'Formularze zamówień', 'manage_options', 'Formularze zamówień', 'load_plugin_backend' ); #settings for menu acces\n}", "public function displayPage()\n {\n\n // I check if there is a duplicate action\n $this->handleDuplicate();\n\n $formTable = new FormListTable();\n\n $formTable->prepare_items();\n require_once __DIR__ . '/templates/index.php';\n }", "public function initDisplay(){\n\t\tif (!$this->getPage()){\n\t\t\tif (\\Settings::DISPLAY_BREADCRUMB) Front::displayBreadCrumb($this->breadCrumb, $this->version);\n\t\t\t$this->mainDisplay();\n\t\t}\n\t}", "public function bp_advancedsubnav_tab_action() {\n\t\techo $this->get_instance( \\MyVideoRoomExtrasParking\\Library\\SectionTemplates::class )->control_panel_store_advanced();\n\t}", "public function setLoadControllerMenuSub()\r\n {\r\n add_submenu_page(\r\n $_SESSION['controller_data_sub']['page_slug_current'],\r\n $_SESSION['controller_data_sub']['page_title'], // Title of the page\r\n $_SESSION['controller_data_sub']['page_menu_text'], // Text to show on the menu link\r\n $_SESSION['controller_data_sub']['page_capability'], // Capability requirement to see the link\r\n $_SESSION['controller_data_sub']['page_slug'],\r\n $_SESSION['controller_data_sub']['page_render'],\r\n $_SESSION['controller_data_sub']['page_menu_position']\r\n );\r\n }", "function altlab_student_data_motherblog_menu(){\n\tadd_menu_page(\n\t\t'Mother Blog Student Data', \n\t\t'Student Data', \n\t\t'manage_options', \n\t\t'altlab_student_data_motherblog', \n\t\t'altlab_student_data_motherblog_options_page', \n\t\t'dashicons-chart-bar'\n\t\t); \n\n}", "function article_plugin_setup_menu(){\n\tadd_menu_page( 'New Article Page', 'New Article', 'manage_options', 'faculty-plugin', 'create_form' );\n\t}", "function gecapa_mant_BeforeShow()\n{\n $gecapa_mant_BeforeShow = true;\n//End gecapa_mant_BeforeShow\n\n//Custom Code @300-8D83BE6B\n// ------------------------- Si agrega una categorža, tomar la categoria padre del QueryString\n global $gecapa_mant;\n\t\n\tIF (!$gecapa_mant->EditMode) {\n\t\t$liCatPadre = CCGetParam(\"pPadre\", 0);\n\t\tif (is_null($liCatPadre) or empty ($liCatPadre)) $liCatPadre = 0;\n\t\t$gecapa_mant->lkNuevo->Visible = False;\n\t\t$gecapa_mant->cat_CodPadre->SetValue($liCatPadre);\n\t}\n if (!isset($_GET[\"pPadre\"]) AND !isset($_GET[\"cat_Codigo\"])) $gecapa_mant->Visible = False;\n if (isset($_GET[\"pPadre\"])) {\n\t\t$gecapa_mant->tbTitulo1->SetValue(\"NUEVA CATEGORIA\"); } \n if (isset($_GET[\"cat_Codigo\"])) {\n\t\t$gecapa_mant->tbTitulo1->SetValue(\"MODIFICACION DE CATEGORIA\"); } \n// -------------------------\n//End Custom Code\n\n//Close gecapa_mant_BeforeShow @288-96845E7F\n return $gecapa_mant_BeforeShow;\n}", "public function adminMenu()\r\n {\r\n add_meta_box('wpGoogleMaps', 'Google Maps for WordPress', array($this, 'insertForm'), 'post', 'normal');\r\n add_meta_box('wpGoogleMaps', 'Google Maps for WordPress', array($this, 'insertForm'), 'page', 'normal');\r\n if ( function_exists('add_submenu_page') ) {\r\n $page = add_submenu_page('plugins.php', __('wpGoogleMaps Configuration'), __('wpGoogleMaps Configuration'), 'manage_options', 'wpGoogleMaps-config', array($this, 'configPage'));\r\n add_action( 'admin_print_scripts-'.$page, array($this, 'printScripts') );\r\n }\r\n }", "protected function menus()\n {\n\n }", "function afterLayout() { \t\t\n }", "public function section_cb()\n {\n echo '<p class=\"description\">';\n _e('These options were added by Simple Login Lockdown and control ' .\n 'access to your login form.', 'simple-login-lockdown');\n echo '</p>';\n }", "function mr_megaresult_admin_menu() {\n add_menu_page(\"MegaResult\", \"MegaResult\", \"manage_options\", \"megaresult-plugin\", \"mr_megaresult_admin_init\",\"dashicons-awards\");\n}", "function scfw_menu(){\n add_menu_page('SCFW - Order List', 'SCFW', 'manage_options', 'scfw-options', 'scfw_orders_list');\n add_submenu_page( 'scfw-options', 'Settings page title', 'Teste Ajax', 'manage_options', 'scfw-op-settings', 'scfw_theme_func_settings');\n add_submenu_page( 'scfw-options', 'FAQ page title', 'FAQ menu label', 'manage_options', 'scfw-op-faq', 'scfw_theme_func_faq');\n}", "function settings_gui(){\n\t$tabs = new tabs('system_settings');\n\t$tabs->add('capabilities','Brukerroller');\n\t\n\t$tabs->draw();\n\tglobal $hd_active_tab;\n\tswitch($hd_active_tab) {\n\t\tcase 'capabilities':\n\t\t\trequire_once('gui.capabilites.settings.php');\n\t\t\tgui_capas();\n\t\t\tbreak;\n\t}\n}", "function khLess_options_page()\n{\n add_menu_page(\n 'Настройка файла расписания',\n 'Расписание',\n 'manage_options',\n 'khLess',\n 'khLess_options_page_html'\n );\n}", "public function display(){\n\t\t$this->setMenu('limit_order');\n\t\t\n\n\t\tif( $this->isSubmitted()){\n\t\t\t$dati = $this->getFormdata();\n\t\t\t$array = $this->checkDataForm('b2b_limit_order_general',$dati);\n\t\t\tif( $array[0] == 'ok' ){\n\t\t\t\tunset($array[0]);\n\t\t\t\tforeach($array as $k => $v){\n\t\t\t\t\tMarion::setConfig('b2b_limit_order_general',$k,$v);\n\t\t\t\t}\n\t\t\t\t$this->displayMessage('Dati salvati con successo!');\n\t\t\t}else{\n\t\t\t\t$this->errors[] = $array[1];\n\t\t\t}\n\t\t}else{\n\t\t\t$dati = Marion::getConfig('b2b_limit_order_general');\n\t\t}\n\n\t\t$dataform = $this->getDataForm('b2b_limit_order_general',$dati);\n\t\t$this->setVar('dataform',$dataform);\n\t\t$this->output('limit_order/setting_general.htm');\n\t}", "function admin_menu() {\n\t\t// Set Admin Access Level\n\t\tif(!$this->options['access_level']): \n\t\t\t$access = 'edit_dashboard';\n\t\telse: \n\t\t\t$access = $this->options['access_level'];\n\t\tendif;\n\t\t\n\t\t// Create Menu Items \n\t\tadd_options_page('Escalate Network', 'Escalate Network', $access, 'escalate-network-options', array($this, 'settings_page'));\n\t}", "function display()\n {\n parent::display();\n }", "function display()\n {\n parent::display();\n }", "function display()\n {\n parent::display();\n }", "public function initMenu()\n {\n add_menu_page(\n 'Flickr Group Gallery',\n 'Flickr Group Gallery',\n 'administrator',\n 'flickr-group-gallery',\n array($this, 'render'),\n 'dashicons-admin-generic'\n );\n }", "function bpfit_walk_subtab_show_screen() {\n\t\t\tadd_action( 'bp_template_title', array($this, 'bpfit_walk_subtab_function_to_show_title') );\n\t\t\tadd_action( 'bp_template_content', array($this, 'bpfit_walk_subtab_function_to_show_content') );\n\t\t\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t}", "function admin_menu() {\n\t\t// The designation of add_MANAGEMENT_page causes the menu item to be listed under the Tools menu!\n\t\tadd_management_page('Revitalize Orders Output', 'Revitalize Orders', 'edit_posts', basename(__FILE__), array(&$this, 'page_handler'));\n\t}", "function admin_menu()\n {\n }", "function admin_menu()\n {\n }", "function admin_menu()\n {\n }", "function ft_hook_menu() {}", "public function mostrarMenu( ) {\n $this->setMenuOn(true);\n $this->enviarMenu();\n\n }", "public function admin_page_display() {\n ?>\n <div class=\"wrap cmb_options_page <?php echo self::$key; ?>\">\n <h2><?php echo esc_html( get_admin_page_title() ); ?></h2>\n <?php cmb_metabox_form( self::option_fields(), self::$key ); ?>\n </div>\n <?php\n }", "function load_sailthru_admin_display() {\n\n\t\t$active_tab = empty( $this->views[ current_filter() ] ) ? '' : $this->views[ current_filter() ];\n\t\t// display html\n\t\tinclude SAILTHRU_PLUGIN_PATH . 'views/admin.php';\n\n\t}", "public function init()\n {\n $menus = P4Cms_Menu::fetchAll();\n $menuNames = array();\n foreach ($menus as $menu) {\n $menuNames[$menu->getId()] = $menu->getLabel();\n }\n\n // tack on the various dynamic items so they can\n // pick from those as well\n $group = 'Dynamic';\n $menuNames[$group] = array();\n $dynamicTypes = P4Cms_Navigation_DynamicHandler::fetchAll();\n foreach ($dynamicTypes as $dynamicType) {\n $label = $dynamicType->getLabel();\n $value = 'P4Cms_Navigation_DynamicHandler/' . $dynamicType->getId();\n\n $menuNames[$group][$value] = $label;\n }\n natcasesort($menuNames[$group]);\n\n $this->addElement(\n 'select',\n 'menu',\n array(\n 'label' => 'Menu',\n 'value' => P4Cms_Menu::DEFAULT_MENU,\n 'required' => true,\n 'description' => \"Choose a menu to display\",\n 'multiOptions' => $menuNames,\n 'onChange' => \"p4cms.menu.refreshSubForm(this.form);\"\n )\n );\n\n // add option to select the display root\n $this->addElement(\n 'select',\n P4Cms_Menu::MENU_ROOT,\n array(\n 'value' => '',\n 'label' => 'Display Root',\n )\n );\n $this->getElement(P4Cms_Menu::MENU_ROOT)\n ->getDecorator('htmlTag')\n ->setOption('class', 'menu-root');\n $this->_loadRootOptions();\n\n // add option to toggle inclusion of root item, when rooting a menu.\n $this->addElement(\n 'checkbox',\n P4Cms_Menu::MENU_KEEP_ROOT,\n array(\n 'label' => 'Include Root Item',\n 'description' => 'Set the display root (starting point) to display from.<br/>'\n . 'Optionally show the root item in the displayed menu.'\n )\n );\n P4Cms_Form::moveCheckboxLabel($this->getElement(P4Cms_Menu::MENU_KEEP_ROOT));\n $this->getElement(P4Cms_Menu::MENU_KEEP_ROOT)\n ->getDecorator('htmlTag')\n ->setOption('class', 'keep-root');\n $this->getElement(P4Cms_Menu::MENU_KEEP_ROOT)\n ->getDecorator('Description')\n ->setEscape(false);\n\n // add option to limit depth of the displayed menu.\n $options = array('' => 'Unlimited') + range(1, 10);\n $this->addElement(\n 'select',\n P4Cms_Menu::MENU_MAX_DEPTH,\n array(\n 'value' => '',\n 'label' => 'Maximum Depth',\n 'description' => 'Set the maximum depth of items to display.',\n 'multiOptions' => $options\n )\n );\n\n // add option to limit depth of the displayed menu.\n $options = array('' => 'Unlimited')\n + array_combine(range(1, 10), range(1, 10))\n + array_combine(range(15, 50, 5), range(15, 50, 5))\n + array_combine(range(60, 100, 10), range(60, 100, 10));\n $this->addElement(\n 'select',\n P4Cms_Menu::MENU_MAX_ITEMS,\n array(\n 'value' => '',\n 'label' => 'Maximum Items',\n 'description' => 'Set the maximum number of items to display.',\n 'multiOptions' => $options\n )\n );\n }", "public function modMenu() {}", "public function modMenu() {}", "public function modMenu() {}", "public function onWpAdminMenu() {\n\t}", "public function page_setup(){\n add_menu_page( PLUGIN_NAME, PLUGIN_NAME, 'manage_options', sanitize_key(PLUGIN_NAME), array($this, 'admin_page'), $this->icon, 3 );\n }", "public function admin_page_display() {\n ?>\n <div class=\"wrap cmb_options_page <?php echo $this->key; ?>\">\n <h2><?php echo esc_html( get_admin_page_title() ); ?></h2>\n <?php cmb_metabox_form( self::option_fields(), $this->key ); ?>\n </div>\n <?php\n }", "function on_admin_menu() {\n $theme_data = wp_get_theme();\n \n $this->pagehook = add_options_page( 'Slideshow Settings', 'Slideshow Settings', 'manage_options', SLIDESHOW_SETTINGS, array(&$this, 'on_show_page'));\n add_action('load-' . $this->pagehook, array(&$this, 'on_load_page'));\n }", "function zdtw_init_menu() {\n add_options_page(\n 'Zing Design Testimonials',\n 'ZD Testimonials',\n 'manage_options',\n $this->settings_page_id,\n array($this, $this->prefix . '_menu_options_callback')\n );\n }", "function admin_menu() {\n\t\tadd_menu_page(\n\t\t\t__( 'Display Sitewide Notice', 'mfsn' ),\n\t\t\t__( 'Sitewide Notice', 'mfsn' ),\n\t\t\t'edit_pages',\n\t\t\t'mfsn',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'settings_page_callback'\n\t\t\t),\n\t\t\t'dashicons-megaphone',\n\t\t);\n\t}", "function infoScreen()\n\t{\n\t\t$this->ctrl->setCmd(\"showSummary\");\n\t\t$this->ctrl->setCmdClass(\"ilinfoscreengui\");\n\t\t$this->infoScreenForward();\n\t}", "public function cfs_add_admin_menu( ) { \n\t\t\tadd_options_page( 'WP CoSign Forms Support', 'WP CoSign Forms Support', 'manage_options', 'cosign_forms_support', array($this,'cfs_options_page') );\n\t\t}", "function displayTools()\n\t{\n\t\t$this->checkDisplayMode();\n\n\t\t// output\n\t\tilUtil::sendInfo();\n\n\t\t// use property forms and add the settings type switch\n\t\t$ctrl_structure_form = $this->initControlStructureForm();\n\t\t$settings_type_form = $this->initSettingsTypeForm();\n\t\t$mp_ns_form = $this->initTreeImplementationForm();\n\n\t\t$this->tpl->setVariable(\"SETUP_CONTENT\",\n\t\t\t$ctrl_structure_form->getHTML() . \"<br />\" .\n\t\t\t$settings_type_form->getHTML().'<br />'.\n\t\t\t$mp_ns_form->getHTML());\n\n\t}", "function LinkITMenu() {\n add_menu_page('123LinkIt', '123LinkIt', 'manage_options', 'LinkITPluginCentral', 'LinkITPluginCentral', 'http://www.123linkit.com/images/123linkit.favicon.gif', 3);\n }", "public function add_menus()\n {\n }", "public function event()\n\t{\n\t\tif (defined('ADMIN_THEME'))\n\t\t{\n\t\t\t$this->CI->type->add_misc($this->CI->type->load_view('codemirror', 'codemirror_admin', null));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->CI->type->add_misc($this->CI->type->load_view('codemirror', 'codemirror_entry_form', null));\n\t\t}\n\t}", "function zdtw_menu_options_callback() {\n echo '<form id=\"'.$this->prefix.'-form\" class=\"zd-settings-form\" method=\"POST\" action=\"options.php\">'.\"\\n\";\n\n// print_r( $this->options );\n// echo $this->settings_page_id;\n\n // settings_fields( $option_group )\n settings_fields( $this->settings_page_id );\n// settings_fields( $this->prefix . '-general-section' );\n\n do_settings_fields( $this->settings_page_id, $this->prefix .'-general-section' );\n\n submit_button();\n\n echo '</form>'.\"\\n\";\n }", "public function pluginSettingsMenu()\n {\n $hook_suffix = add_options_page(__('Rundizable WP Features', 'rundizable-wp-features'), __('Rundizable WP Features', 'rundizable-wp-features'), 'manage_options', 'rundizable-wp-features-settings', [$this, 'pluginSettingsPage']);\n add_action('load-' . $hook_suffix, [$this, 'registerScripts']);\n unset($hook_suffix);\n\n //add_options_page(__('Rundizable WP Features read settings value', 'rundizable-wp-features'), __('Rundizable WP Features read settings', 'rundizable-wp-features'), 'manage_options', 'rundizable-wp-features-read-settings', [$this, 'pluginReadSettingsPage']);\n }", "function admin_menu() {\n\t\t\n\t\t// Bail early if ACF is hidden.\n\t\tif( !acf_get_setting('show_admin') ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Vars.\n\t\t$slug = 'edit.php?post_type=acf-field-group';\n\t\t$cap = acf_get_setting('capability');\n\t\t\n\t\t// Add menu items.\n\t\tadd_menu_page( __(\"Custom Fields\",'acf'), __(\"Custom Fields\",'acf'), $cap, $slug, false, 'dashicons-welcome-widgets-menus', '80.025' );\n\t\tadd_submenu_page( $slug, __('Field Groups','acf'), __('Field Groups','acf'), $cap, $slug );\n\t\tadd_submenu_page( $slug, __('Add New','acf'), __('Add New','acf'), $cap, 'post-new.php?post_type=acf-field-group' );\n\t\t\n\t\t// Only register info page when needed.\n\t\tif( isset($_GET['page']) && $_GET['page'] === 'acf-settings-info' ) {\n\t\t\tadd_submenu_page( $slug, __('Info','acf'), __('Info','acf'), $cap,'acf-settings-info', array($this,'info_page_html') );\n\t\t}\n\t}", "protected function after_load(){\n\n\n }", "function sr_frontpage_admin_menu() {\n add_menu_page(\n 'Home Sections',\n 'Home Sections',\n 'manage_options',\n 'front-sections',\n '',\n 'dashicons-admin-home',\n 40\n );\n}", "function abc_admin_dashboard()\n{\n add_menu_page('Awesome BMI Dashboard', 'Awesome BMI', 'manage_options', 'awesome-bmi', 'abc_admin_dashboard_init');\n}", "static function admin_init ()\n {\n add_menu_page(\n __x('People', 'admin menu page title'),\n __x('People', 'admin menu title'),\n 'read',\n 'epfl-people',\n null, // Render callback\n 'dashicons-calendar', // Icon type\n 70 // Position\n );\n }", "public function postSetupForm() {\r\n\r\n $l = $this->bootstrap->getLocalization();\r\n // ugyanaz submitnak mint title-nek\r\n $this->form->submit =\r\n $this->controller->toSmarty['title'] = $l('users', 'login_title');\r\n if ( $this->application->getParameter('nolayout') )\r\n $this->controller->toSmarty['nolayout'] = true;\r\n\r\n $this->controller->toSmarty['formclass'] = 'halfbox centerformwrap';\r\n $this->controller->toSmarty['titleclass'] = 'center';\r\n parent::postSetupForm();\r\n\r\n }", "function handleAdminMenu ()\n\t{\n\t\tadd_meta_box( 'avhamazonmetabox01', 'AVH Amazon Short Code', array (&$this, 'createMetabox' ), 'post', 'normal' );\n\t\tadd_meta_box( 'avhamazonmetabox01', 'AVH Amazon Short Code', array (&$this, 'createMetabox' ), 'page', 'normal' );\n\t}", "protected function adminMenu()\n {\n \\add_submenu_page(\n 'options-general.php',\n \\esc_html__('WP REST API Cache', 'wp-rest-api-cache'),\n \\esc_html__('REST API Cache', 'wp-rest-api-cache'),\n self::CAPABILITY,\n self::MENU_SLUG,\n function () {\n $this->renderPage();\n }\n );\n }", "function display() {\r\n\t\tparent::display ();\r\n\t}", "function initAdminMenu() {\r\n\r\n\t\t$accounts_hook = $this->addMenu('accounts', ShoppWholesale::SHOPP_MENU_ROOT);\r\n\t\t$this->addMenu('account-review', $accounts_hook);\r\n\t\t$this->addMenu('account-settings', $accounts_hook);\r\n\t\t$this->addMenu('account-shortcode-help', $accounts_hook);\r\n\r\n\t\t//reorder menus\r\n\t\t$this->sendToBottom('Settings');\r\n\r\n\t}", "function display()\r\n\t {\r\n\t parent::display();\r\n\t }", "public function adminMenu()\n {\n add_menu_page( 'Barcode', 'Barcode', 'manage_options', 'wp-barcode', [$this, 'adminPage'] );\n }", "public function onAdminMenu()\n {\n foreach( $this->pages as $slug => $page ) {\n add_submenu_page(\n $page['parent'], L10n::__( $page['title'] ), \n L10n::__( $page['title_menu'] ), $page['capability'], \n $slug, array( $this, 'page' . ucfirst( $slug ) )\n );\n }\n }", "public function init()\r\n {\r\n parent::init();\r\n $this->visible = true;\r\n $this->descriptionashint = true;\r\n $this->active = false;\r\n }" ]
[ "0.65113455", "0.6471007", "0.63150775", "0.6314267", "0.6314267", "0.6313428", "0.62901294", "0.6187986", "0.61805195", "0.6131876", "0.6105446", "0.6089235", "0.6035851", "0.602191", "0.5996983", "0.59947056", "0.5980416", "0.5960157", "0.59319323", "0.59291583", "0.59187394", "0.59116215", "0.59078085", "0.58921677", "0.58901983", "0.58820134", "0.58769226", "0.58751094", "0.58739907", "0.58699834", "0.5869812", "0.58629817", "0.5861662", "0.5857469", "0.58381146", "0.58374864", "0.5832895", "0.5828586", "0.582266", "0.5815062", "0.5813564", "0.5810047", "0.5804017", "0.58031595", "0.58026004", "0.5792976", "0.5791559", "0.5786219", "0.57801324", "0.57789725", "0.5777598", "0.57755226", "0.57697976", "0.5765239", "0.5761258", "0.57585365", "0.5753776", "0.5753776", "0.5753776", "0.5753074", "0.5740586", "0.572328", "0.57203054", "0.57203054", "0.57203054", "0.5720017", "0.57177913", "0.5717018", "0.5715471", "0.57133424", "0.57122314", "0.5712159", "0.57117945", "0.5700732", "0.5698402", "0.5697996", "0.56958073", "0.56838846", "0.5677835", "0.5674206", "0.56688344", "0.5667795", "0.5665388", "0.566323", "0.56624734", "0.56613904", "0.5659687", "0.5655811", "0.5651759", "0.5649269", "0.5647573", "0.5646948", "0.5645339", "0.56399065", "0.5637036", "0.5635386", "0.5634935", "0.5634097", "0.56316656", "0.5624797", "0.5623275" ]
0.0
-1
$a = print_r($article, true);
public function onContentBeforeSave($context, $article, $isNew) { //JError::raiseNotice( 100+strlen($a),"<br/><br/>Results: ".$a."<br/><br/>" ); if( !isset($article->{attribs}) ) return true; if( isset(json_decode($article->{attribs})->{fanimani_exists}) && json_decode($article->{attribs})->{fanimani_exists} == 1 ){ //JError::raiseNotice( 100,"Dodawanie!<br/>" ); $db = JFactory::getDbo(); // ustawianie danych $dane = array(); $dane["name"] = $article->{title}; //JError::raiseNotice( 100,$article->{title}."<br/>" ); $dane["slug"] = str_replace('_','-',strtolower($article->{alias})); //JError::raiseNotice( 1000,strtolower($article->{alias})."<br/>" ); $dane["description"] = ($this->rip_tags($article->{fulltext})); //JError::raiseNotice( 10000,$article->{fulltext}."<br/>" ); //$a = print_r($dane, true); //JError::raiseNotice( 100+strlen($a),"3Desc: ".$a."<br/>" ); /****** PHOTO UPDATE *****/ $dane["images"] = json_decode($article->{images}); //old user if( isset(json_decode($article->{attribs})->{fanimani_id}) && json_decode($article->{attribs})->{fanimani_id}!='' ){ $dane['id'] = json_decode($article->{attribs})->{fanimani_id}; } // tworzenie i wysyłanie danych $user = $this->createUser($dane); //$a = print_r($user, true); //JError::raiseNotice( 100+strlen($a),"<br/><br/>Results: ".$a."<br/><br/>" ); $response = $this->addUser($user); //$a = print_r($response, true); //JError::raiseNotice( 100+strlen($a),"<br/><br/>a_Results: ".$a."<br/><br/>" ); if( $response == null ){ JError::raiseNotice( 100,"Problem przy wysyłaniu do serwisu avalon.<br/>" ); return true; } $response = json_decode($response); if( isset($response->{id}) ){ $query = $db->getQuery(true) ->delete($db->quoteName('#__user_profiles')) ->where('user_id = '.$article->{id}) ->where('profile_key IN (' . $db->Quote('fanimani.fanimani_url').', '.$db->Quote('fanimani.fanimani_msg').', '. $db->Quote('fanimani.fanimani_id').', '. $db->Quote('fanimani.fanimani_exists') .')'); $db->setQuery($query); $db->execute(); $query = $db->getQuery(true) ->insert($db->quoteName('#__user_profiles')) ->columns($db->quoteName(array('user_id','profile_key','profile_value'))) ->values(implode(',',array($article->{id},$db->Quote("fanimani.fanimani_url"),$db->Quote("https://fanimani.pl".$response->url)))) ->values(implode(',',array($article->{id},$db->Quote("fanimani.fanimani_id"),$db->Quote($response->{id})))) ->values(implode(',',array($article->{id},$db->Quote("fanimani.fanimani_msg"),$db->Quote(JText::_('PLG_CONTENT_FANIMANI_IS_IN_DB'))))) ->values(implode(',',array($article->{id},$db->Quote("fanimani.fanimani_exists"),$db->Quote('1')))); $db->setQuery($query); $res = $db->execute(); $query = $db->getQuery(true) ->select("profile_key, profile_value") ->from($db->quoteName('#__user_profiles')) ->where('user_id = '.$article->{id}) ->where('profile_key LIKE ' . $db->Quote('fanimani.%')); $db->setQuery($query); $results = $db->loadRowList(); $df = array(); foreach($results as $k=>$v){ $df[str_replace('fanimani.','',$v[0])] = $v[1]; } $article->{fanimani} = $df; //$a = print_r($results, true); //JError::raiseNotice( 100+strlen($a),"<br/><br/>Results: ".$a."<br/><br/>" ); //JError::raiseNotice( 100,"Zapisano!<br/>" ); /*************** SEND A PHOTOS ******************/ //$user->{'photos'}[0]->{'photo'} // path //$response->{'id'} //user id $query = $db->getQuery(true) ->delete($db->quoteName('#__user_profiles')) ->where('user_id = '.$article->{id}) ->where('profile_key = ' . $db->Quote('fanimani.fanimani_images')); $db->setQuery($query); $db->execute(); $photos = (isset($article->{fanimani}->{fanimani_images}))?$article->{fanimani}->{fanimani_images}:"[]"; $photos = json_decode($photos);//[24:link,35:link] $newPhoto = array(); foreach($user->{'photos'} as $img){ if( !in_array($img->{'photo'}, $photos) ){ if( !in_array($img->{'photo'},$newPhoto) ) $newPhoto[] = $img->{'photo'};//http://www.fundacjaavalon.pl/ } } /**************** SENDING A PICTURES **************/ foreach($newPhoto as $img){ $path = "../".$img; $results = $this->curlQueryPictures($response->{'id'}, $path); if( $results != null ){ $results = json_decode($results); $photos[$results->{id}] = $img; } } //$a = print_r($photos, true); //JError::raiseNotice( 100+strlen($a),"<br/><br/>Results: ".$a."<br/><br/>" ); $photos = json_encode($photos); $query = $db->getQuery(true) ->insert($db->quoteName('#__user_profiles')) ->columns($db->quoteName(array('user_id','profile_key','profile_value'))) ->values(implode(',',array($article->{id},$db->Quote("fanimani.fanimani_images"),$db->Quote($photos)))); $db->setQuery($query); $results = $db->loadRowList();//this will execute the query $article->{fanimani}->{fanimani_images} = $photos; /*$a = print_r($newPhoto, true); JError::raiseNotice( 100+strlen($a),"<br/><br/>Results: ".$a."<br/><br/>" ); $photos = (isset($article->{fanimani}['fanimani_images']))?$article->{fanimani}['fanimani_images']:"[]"; $photos = json_decode($photos);//[24:link,35:link] if( $photos == null ) $photos = array(); $newPhoto = array(); foreach($user->{'photos'} as $img){ if( !in_array($img->{'photo'}, $photos) ){ if( !in_array($img->{'photo'},$newPhoto) ) $newPhoto[] = $img->{'photo'};//http://www.fundacjaavalon.pl/ } }*/ //$a = print_r($newPhoto, true); //JError::raiseNotice( 100+strlen($a),"<br/><br/>Results: ".$a."<br/><br/>" ); /**************** SENDING A PICTURES **************/ /*foreach($newPhoto as $img){ $path = "../".$img; //$b64_img = 'data:image/' . pathinfo($path, PATHINFO_EXTENSION) . ';base64,' . base64_encode(file_get_contents($path)); //$results = null; $results = $this->curlQueryPictures($response->{'id'}, $path); if( $results != null ){ $results = json_decode($results); $photos[$results->{id}] = $img; } /*$args['photo'] = null; if( class_exists('CurlFile') ){ $args['photo'] = new CurlFile($path, pathinfo($path, PATHINFO_EXTENSION)); } else if( function_exists('curl_file_create')){ $args['photo'] = curl_file_create($path, pathinfo($path, PATHINFO_EXTENSION)); } else { $args['photo'] = "@{$path};filename=" . ($postname ?: basename($filename)) . ";type=".pathinfo($path, PATHINFO_EXTENSION); } $a = print_r($args, true); JError::raiseNotice( 100+strlen($a),"<br/><br/>Response: ".$a."<br/><br/>" ); $a = print_r(array("id"=>$response->{'id'}, "path"=>"../".$img), true); JError::raiseNotice( 100+strlen($a),"<br/><br/>Response: ".$a."<br/><br/>" ); *//* $a = print_r($results, true); JError::raiseNotice( 100+strlen($a),"<br/><br/>Response: ".$a."<br/><br/>" ); } $a = print_r($photos, true); JError::raiseNotice( 100+strlen($a),"<br/><br/>1Response: ".$a."<br/><br/>" ); $photos = json_encode($photos); $a = print_r($photos, true); JError::raiseNotice( 100+strlen($a),"<br/><br/>1Response: ".$a."<br/><br/>" ); $query = $db->getQuery(true) ->insert($db->quoteName('#__user_profiles')) ->columns($db->quoteName(array('user_id','profile_key','profile_value'))) ->values(implode(',',array($article->{id},$db->Quote("fanimani.fanimani_images"),$db->Quote($photos)))); $db->setQuery($query); $results = $db->loadRowList(); $a = print_r($results, true); JError::raiseNotice( 100+strlen($a),"<br/><br/>2Response: ".$a."<br/><br/>" ); $df = array(); foreach($results as $k=>$v){ $df[str_replace('fanimani.','',$v[0])] = $v[1]; } $a = print_r($df, true); JError::raiseNotice( 100+strlen($a),"<br/><br/>3Response: ".$a."<br/><br/>" ); $article->{fanimani} = $df;*/ } } else { //JError::raiseNotice( 100,"Usuwanie!<br/>" ); $attribs = json_decode($article->{attribs}); //JError::raiseNotice( 100, $attribs->{fanimani_id}."<br/>" ); if( !isset($attribs->{fanimani_id}) ) return true; if( $attribs->{fanimani_id}=='' ) return true; $this->curlQuery(null,$attribs->{fanimani_id},"DELETE"); $this->onContentAfterDelete($context,$article); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dump($array) {\n\treturn \"<pre>\" . htmlentities(print_r($array, 1)) . \"</pre>\";\n}", "function get_a($object, $html_format = true)\n{\n if (is_array($object)) {\n $content = print_r($object, true);\n } else {\n ob_start();\n var_dump($object);\n $content = ob_get_contents();\n ob_end_clean();\n }\n if ($html_format) {\n $content = \"<pre>\".htmlentities($content).\"</pre>\";\n }\n return $content;\n}", "function pr($data) {\n echo \"<pre>\" . print_r($data, true) . \"</pre>\";\n}", "function format_print_r($output) {\n echo '<pre>';\n print_r($output);\n echo '</pre>';\n}", "function pr($a) {\n\techo '<pre>', gettype($a), ' - ', print_r($a, true), '</pre>';\n}", "function print_r_html ($arr) {\n\techo \"<pre>\";\n print_r($arr);\n echo \"</pre>\";\n}", "function dump($data){\n\n $data=print_r($data,true);\n $html=\"<pre>$data</pre>\";\n return $html;\n}", "function pr($array)\n{\n echo \"<pre>\";\n print_r($array);\n echo \"</pre>\";\n}", "function pre_r($array){\n echo '<pre>';\n print_r($array);\n echo '</pre>';\n}", "function pprint($a) {\n\t\techo '<pre>'.print_r($a,1).'</pre>';\n\t}", "function pp( $a ){\n echo \"<pre>\";\n print_r( $a );\n echo \"</pre>\";\n }", "function debug($arr) {\n echo \"<pre>\" . print_r($arr, true) . \"</pre>\";\n}", "function pr ($arr) \n{\n echo '<pre>'; print_r($arr); echo '</pre>';\n}", "function printr($array, $return = false) {\n $str = '<pre>' . print_r($array, true) . '</pre>';\n if (!$return) {\n echo $str;\n } else {\n return $str;\n }\n}", "function print_obj($obj)\n{\n echo \"<pre>\".print_r($obj,1).\"</pre>\";\n}", "function debug($arr)\n{\n echo '<pre>' . print_r($arr, true) . '</pre>';\n}", "function debug($arr)\n{\n echo '<pre>' . print_r($arr, true) . '</pre>';\n}", "function print_contenido($var){\n echo '<pre>';\n print_r($var);\n echo '</pre>';\n}", "static function printr($array)\n {\n echo '<pre>' . print_r($array, true) . '</pre>';\n }", "function printr($array, $print = true) { //imprime o devuelve la cadena\n if ($print)\n return print_r($array, true);\n else\n echo '<pre>' . print_r($array, true) . '</pre>'; //tabula bien gracias a los <pre>\n }", "function dump($arg){\r\n echo \"<pre>\";\r\n print_r($arg);\r\n echo \"</pre>\";\r\n}", "function printarr($a, $descr = '') \r\n{\r\n\tif (!is_array($a)) \r\n\t{\r\n\t\tob_start();\r\n\t\tif (!empty($descr))\r\n\t\t{\r\n\t\t\tprintbr('<b>' . $descr . '</b>');\r\n\t\t}\r\n\t\tvar_dump($a);\r\n\t\t$str = ob_get_clean();\r\n\t\tprintNicely($str);\r\n\t} else {\r\n\t\tob_start();\r\n\t\tprint '<pre>';\r\n\t\tif (!empty($descr))\r\n\t\t{\r\n\t\t\tprint('<b>' . $descr . '</b>' . \"\\n\");\r\n\t\t}\r\n\t\tprint_r($a);\r\n\t\tprint '</pre>';\r\n\t\t$str = ob_get_clean();\r\n\t\tprintNicely($str);\r\n\t}\r\n}", "function pr($data) {\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n}", "function print_array($array)\r\n{\r\n\techo '<pre>';\r\n\tprint_r($array);\r\n\techo '</pre>';\r\n}", "function print_r2($val){\n echo '<pre>';\n print_r($val);\n echo '</pre>';\n}", "function myVar_dump($var)\n{\n echo sprintf('<pre>%s</pre>', print_r($var, true));\n}", "function debug_capture_print_r($data)\r\r\n{\r\r\n\tob_start();\r\r\n\tprint_r($data);\r\r\n\t$result = ob_get_contents();\r\r\n\r\r\n\tob_end_clean();\r\r\n\treturn $result;\r\r\n}", "function printArray($array){\n print '<pre>';\n print_r($array);\n print '</pre>';\n}", "function print_r($expression, $return = false)\n{\n}", "function pre_print_r($array){\n\n\techo '<pre style=\"font-family: monospace; font-size: 14px; text-align:left!important\">';\n\tprint_r($array);\n\techo '</pre>';\n\n}", "function print_r2($val) {\n echo '<pre>';\n print_r($val);\n echo '</pre>';\n}", "function diplayArray($array){\n echo '<pre>';\n var_dump($array);\n echo'</pre>';\n}", "function print_array($array) {\n\n echo \"<pre>\";\n\n print_r($array);\n\n echo \"</pre>\";\n\n }", "public function dump(): array;", "function printArray($array){\n echo \"<pre>\";\n print_r($array);\n echo \"</pre>\";\n }", "function printobj($a, $descr = '') \r\n{\r\n\tob_start();\r\n\tprint '<pre>';\r\n\tif (!empty($descr))\r\n\t{\r\n\t\tprint('<b>' . $descr . '</b>' . \"\\n\");\r\n\t}\r\n\tprint_r($a);\r\n\tprint '</pre>';\r\n\t$str = ob_get_clean();\r\n\tprintNicely($str);\r\n}", "function dprint_r ($expression) {\n\techo '<pre>';\n\tprint_r($expression);\n\techo '</pre>';\n}", "function pr( $data){\n\techo \"<pre>\";\n\tprint_r($data);\n\techo \"</pre>\";\n}", "function dde($arr){\n\techo \"<pre>\"; print_r($arr);die;\n}", "function pre_r ( $array ) {\n\t\t\t\t\techo '<pre>';\n\t\t\t\t\tprint_r($array);\n\t\t\t\t\techo'</pre>';\n\n\t\t\t\t\t//hhahahahahahahhahahahah borges\n\t\t\t\t}", "function preint_r($var){\n\techo '<pre>';\n\tprint_r($var);\n\techo '</pre>';\n}", "function print_array($data){\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n }", "function pr($var) {\n\t\t\t\n\t\t\tob_start();\n\t\t\tprint_r($var);\n\t\t\t$content = ob_get_contents();\n\t\t\tob_clean();\n\t\t\t\n\t\t\techo \"<pre>\";\n\t\t\techo htmlentities($content);\n\t\t\techo \"</pre>\";\n\t}", "function printArray($data)\r\n{\r\n\techo \"<pre>\";\r\n\tprint_r($data);\r\n\techo \"</pre>\";\r\n}", "function myShowArray($data)\n{\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n}", "function _pre($array) { echo '<pre>'; print_r ($array); echo '</pre>'; }", "function print_r_slim($arr, $no_print=false)\r\n{\r\n $out = print_r($arr, true);\r\n\r\n $out = str_replace(\" \", \"\", $out);\r\n $out = str_replace(\"\\n\", \", \", $out);\r\n $out = str_replace(\", )\", \"), \", $out);\r\n $out = str_replace(\", , \", \"\", $out);\r\n $out = str_replace(\", (, \", \"(\", $out);\r\n $out = str_replace(\"Array, \", \"Array\", $out);\r\n $out = str_replace(\"Object\", \" Object\", $out);\r\n\r\n if (!$no_print)\r\n {\r\n echo $out;\r\n return;\r\n }\r\n\r\n return $out;\r\n}", "function dump($title, $array) {\n echo '---=[ ' . $title . ' ]=---'. PHP_EOL;\n var_dump($array);\n}", "function tf_print_r($var, $return = false, $depth = 10) {\r\n if ($return)\r\n return TF_Dumper::dump($var, $depth);\r\n else\r\n echo TF_Dumper::dump($var, $depth);\r\n }", "function varDump($object) {\n\t\techo \"<pre>\";\n\t\tprint_r($object);\n\t\techo \"</pre>\";\n\t}", "function dump($variable)\n {\n echo '<pre>';\n print_r($variable);\n }", "function printr($t) {\n\techo \"<pre class='printr'>\";\n\tprint_r($t);\n\techo \"</pre>\";\n}", "function p($data){\n echo \"<pre>\";\n echo \"<hr>\";\n print_r($data);\n}", "function preShow( $arr, $returnAsString=false ) {\n $ret = '<pre>' . print_r($arr, true) . '</pre>';\n if ($returnAsString)\n return $ret;\n else\n echo $ret;\n}", "function debug($variable)\n{\n echo \"<pre>\" . print_r($variable, true) . \"</pre>\";\n}", "function webmoney_get_dump($var){\n//dump of array\n$s = \"\";\nforeach ((array)$var as $k=>$v)\n $s .= \"$k => $v<br />\\n\";\nreturn $s;\n}", "function robm_dump() {\r\n echo '<pre style=\"border:1px solid #000; padding:5px; margin:5px; max-height:150px; overflow:auto;\" id=\"' . md5(serialize($object)) . '\">';\r\n $i = 0; $args = func_get_args();\r\n foreach ( (array) $args as $object ) {\r\n if ( $i == 0 && count($args) > 1 && is_string($object) )\r\n echo \"<h3>$object</h3>\";\r\n var_dump($object);\r\n $i++;\r\n }\r\n echo '</pre>';\r\n }", "function pr(&$data) {\n\techo \"<pre>\";\n\tprint_r($data);\n\techo \"</pre>\";\n}", "function debug($var) {\n echo '<pre>'. print_r($var, 1) .'</pre>';\n}", "private function printArray($array){\n\t\techo \"<pre>\".print_r($array,true).\"</pre>\";\n\t}", "function show($data)\n{\n echo \"<pre>\";\n print_r($data);\n echo \"</pre>\";\n}", "function prn($x)\r\n{\r\n\tif (is_array($x) || is_object($x))\r\n\t{\r\n\t\tprint_r($x);\r\n\t}\r\n\telse\r\n\t{\r\n\t\tprint $x . \"\\n\";\r\n\t}\r\n}", "function dump($var)\n{\n echo '<br /><pre>';\n var_dump($var);\n echo'</pre><hr />';\n}", "function pre($data){\r\n echo \"<pre>\";\r\n print_r($data);\r\n echo \"</pre>\";\r\n return FALSE;\r\n}", "function print_pre($array){\n\t\techo '<pre>';\n\t\tprint_r($array);\n\t\techo '</pre>';\n\t}", "function showMe($output) {\r\n echo '<pre>';\r\n print_r($showMe);\r\n echo '</pre>';\r\n}", "function dump($var)\n{\n echo '<pre>';\n var_dump($var);\n echo '</pre>';\n}", "function debug ($what){\r\n echo '<pre>';\r\n if (is_array($what)) {\r\n\t\tprint_r ($what);\r\n }else{\r\n var_dump ($what);\r\n }\r\n echo '</pre>';\r\n}", "function print_array($array,$exit = false) {\n echo '<pre>';\n print_r($array);\n echo '</pre>';\n if($exit) {\n exit();\n }\n}", "public static function dump()\n\t{\n\t\techo nl2br(print_r(self::$data));\n\t}", "function show_array($array, $die=true){\n echo \"<pre>\";\n print_r($array);\n echo \"</pre>\";\n if($die){\n die();\n }\n}", "function pre_r($array) // This will show the array after the user clicks 'add to cart' in a pretty way.\n{\n echo \"<pre>\";\n print_r($array);\n echo \"</pre>\";\n}", "function s($str){ echo '<pre>'; print_r($str); echo '</pre>'; }", "function dump_data() {\n\t\treturn $this->to_array();\n\n\t}", "function pre($data)\n{\n echo \"<pre>\";\n print_r($data);\n echo \"</pre>\";\n}", "public function dump();", "public function dump();", "function pa($arr) {\n\t\techo '<pre>';\n\t\tprint_r($arr);\n\t\techo '</pre>';\n\t}", "function to_a($cursor)\n{\n\t$res = iterator_to_array($cursor);\n\tif (!empty($res)) {\n\t\techo '----------'.\"<br/>\";\n\t\tforeach ($res as $obj) {\n\t\t echo $obj[\"title\"] . \"\\n\";\n\t\t echo $obj[\"_id\"] . \"\\n\";\n\t\t}\n\t}\n\treturn $res;\n}", "function atk_var_dump($a, $d=\"\")\n{\n\tob_start();\n\tvar_dump($a);\n\t$data = ob_get_contents();\n\tatkdebug(\"vardump: \".($d!=\"\"?$d.\" = \":\"\").\"<pre>\".$data.\"</pre>\");\n\tob_end_clean();\n}", "function psa_debug( $variable ) {\n\techo \"<pre>\";\n\tif( is_array( $variable ) || is_object( $variable ) ) {\n\t\tprint_r( $variable );\n\t} else {\n\t\tvar_dump( $variable );\n\t}\n\techo \"</pre>\";\n}", "function pre($data){\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n}", "function pre($data){\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n}", "function dump($mixed = null)\n{\n echo '<pre>';\n var_dump($mixed);\n echo '</pre>';\n}", "function var_dump_ret($mixed = null) {\r\n\t ob_start();\r\n\t var_dump($mixed);\r\n\t $content = ob_get_contents();\r\n\t ob_end_clean();\r\n\t return $content;\r\n\t}", "public static function dump($var)\n {\n echo \"<pre>\" . htmlentities(print_r($var, true)) . \"</pre>\";\n }", "function display($content)\n{\n foreach($content as $key => $value) \n {\n\t print_r($key.\"=>\");\n print_r($value);\n print_r(\"\\n\");\n }\n}", "function dd( $var ){\n echo \"<prev>\";\n die(print_r($var));//Finaliza la ejecucion\n}", "public function dump(){\r\n print_r($this->_registry);\r\n }", "function printr($var, $bPrint=true) {\n ob_start();\n if (is_array($var)) { echo '<pre>'; print_r($var); echo '</pre>';\n }else echo $var;\n $sMessage = ob_get_contents();\n ob_end_clean();\n if ($bPrint == true) echo $sMessage;\n return ($bPrint == true) ? true : $sMessage;\n}", "function dump() {\n\t\t$vars = get_object_vars( $this );\n\t\techo '<pre style=\"text-align:left\">';\n\t\tforeach( $vars as $name => $value ) {\n\t\t\techo $name.': '.$value.\"\\n\";\n\t\t}\n\t\techo '</pre>';\n\t}", "function var_show($var)\n{\n echo '<pre>';\n var_dump($var);\n echo '</pre>';\n}", "public static function print_r($array, $name = null)\r\n\t{\r\n\t\techo \"<pre>\" . (( $name ) ? \"$name: \" : \"\");\r\n\t\tprint_r($array);\r\n\t\techo \"</pre>\\n\";\r\n\t}", "function pre($data) {\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n}", "function indeed_debug_var($variable){\n\t if (is_array($variable) || is_object($variable)){\n\t\t echo '<pre>';\n\t\t print_r($variable);\n\t\t echo '</pre>';\n\t } else {\n\t \tvar_dump($variable);\n\t }\n}", "function prettyPrint($moves) {\n echo '<pre>',print_r($moves,1),'</pre>';\n\n}", "function print_a($object, $html_format=true)\n{\n print(get_a($object, $html_format));\n}", "function pr($obj, $label = '')\n{\n echo \"<hr>\" . $label . \":<br>\";\n echo \"<pre>\";\n print_r($obj);\n echo \"</pre><hr>\";\n}", "function dd(){\n $args = func_get_args();\n ob_start();\n echo '<pre>';\n foreach($args as $vars){\n if(is_bool($vars) || is_null($vars))\n var_dump($vars);\n else\n echo htmlspecialchars(print_r($vars, true), ENT_QUOTES);\n echo PHP_EOL;\n }\n echo '</pre>';\n \n $ctx = ob_get_contents();\n ob_end_clean();\n \n echo $ctx;\n die;\n}", "function dump($content)\n {\n die(var_dump($content));\n exit;\n }", "function dd($parsed)\n{\n\t echo '<pre>';\n\t var_dump($parsed);\n\t echo '</pre>';\n die;\n}" ]
[ "0.7189156", "0.70824164", "0.7072425", "0.70225483", "0.69503176", "0.6931521", "0.68993187", "0.6859816", "0.68321884", "0.68292904", "0.6807428", "0.67952675", "0.67893463", "0.67485166", "0.6717147", "0.67142636", "0.67142636", "0.6714076", "0.6683753", "0.66774195", "0.66753596", "0.66408", "0.6630207", "0.66245854", "0.6621616", "0.6607088", "0.6605329", "0.6605179", "0.65925145", "0.6565887", "0.65568125", "0.65507066", "0.6548321", "0.652739", "0.6526805", "0.6521646", "0.6498524", "0.6488928", "0.6480537", "0.645905", "0.6411143", "0.6393213", "0.638531", "0.6371742", "0.63604176", "0.6349675", "0.6348494", "0.6327125", "0.62974375", "0.6294994", "0.6285865", "0.62506586", "0.62241405", "0.6197894", "0.61736816", "0.61577463", "0.615686", "0.61488277", "0.61130005", "0.6109782", "0.6104878", "0.6089456", "0.60575706", "0.6046921", "0.6038", "0.6037587", "0.6029542", "0.6005027", "0.59516585", "0.593763", "0.59361136", "0.5935659", "0.59207433", "0.5915064", "0.5894261", "0.5892856", "0.5892856", "0.5885468", "0.5867631", "0.5867272", "0.5850879", "0.58494884", "0.58494884", "0.5842246", "0.58149624", "0.58105737", "0.58031625", "0.58029217", "0.57796973", "0.5778488", "0.57723516", "0.57640815", "0.5742776", "0.57398266", "0.57262516", "0.57190955", "0.5714889", "0.57142216", "0.57031196", "0.5703029", "0.5702239" ]
0.0
-1
Called after loading the article from the database load script which show content from tabmenu in contentview _&&_ load data about settings this content
public function onContentPrepareData($context, $data) { $cols = array("fanimani_id"=>"","fanimani_url"=>"","fanimani_msg"=>"","fanimani_exists"=>0); if (is_object($data)) { foreach($cols as $k=>$v) $data->{attribs}[$k] = $v; $db = JFactory::getDbo(); $articleId = isset($data->id) ? $data->id : 0; $popup = array(); if( $articleId != 0 ){ $query = $db->getQuery(true) ->select("profile_key, profile_value") ->from($db->quoteName('#__user_profiles')) ->where('user_id = '.$articleId) ->where('profile_key LIKE ' . $db->Quote('fanimani.%')); $db->setQuery($query); $results = $db->loadRowList(); foreach($results as $v) $popup[str_replace('fanimani.','',$v[0])] = $v[1]; //$data->fanimani = $popup; foreach($popup as $k=>$v) $data->{attribs}[$k] = $v; /*$query = $db->getQuery(true) ->select("user_id, profile_key, profile_value") ->from($db->quoteName('#__user_profiles')) ->where('profile_key LIKE ' . $db->Quote('fanimani.%')); $db->setQuery($query); $results = $db->loadRowList(); //$a = print_r($results, true); //JError::raiseNotice( 100+strlen($a),"<br/><br/>Results: ".$a."<br/><br/>" ); echo '--------------<pre>'; echo $articleId.'<br/>'; var_dump($results); echo '</pre>--------------'; echo '--------------<pre>'; var_dump($data); echo '</pre>--------------';*/ } //$a = print_r($data->attribs, true); //JError::raiseNotice( 100+strlen($a),"3Desc: ".$a."<br/>" ); if( !isset($data->attribs['fanimani_id']) || $data->attribs['fanimani_id'] == '' || $data->attribs['fanimani_id'] == 0 ){ $data->attribs['fanimani_msg'] = JText::_('PLG_CONTENT_FANIMANI_NOT_IN_DB');//'Użytkownika nie ma w bazie!'; $query = $db->getQuery(true) ->delete($db->quoteName('#__user_profiles')) ->where('user_id = '.$articleId) ->where('profile_key LIKE ' . $db->Quote('fanimani.%')); $db->setQuery($query); $db->execute(); $query = $db->getQuery(true) ->insert($db->quoteName('#__user_profiles')) ->columns($db->quoteName(array('user_id','profile_key','profile_value'))) ->values(implode(',',array($articleId,$db->quote("fanimani.fanimani_msg"),$db->quote(JText::_('PLG_CONTENT_FANIMANI_NOT_IN_DB'))))); $db->setQuery($query); $db->execute(); } echo "<script type=\"text/javascript\">"; include (dirname(__FILE__) . '/custom_fields.js'); echo "</script>"; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function postLoad(){\n\t\t\t\n\t\t}", "public function postLoad() {}", "public function postLoad() { }", "public function init() {\n // Load article from db\n $article = ORM::forTable('articles')->findOne($this->id);\n\n // If article exists set variables using the db object\n if($article) {\n $this->alias = $article->get('alias');\n $this->preview = $article->get('preview');\n\n $this->month = $article->get('month');\n $this->year = $article->get('year');\n $this->publishing_date = $article->get('publishing_date');\n $this->published = $article->get('published');\n\n $this->load();\n }\n }", "private function load()\n\t{\n\t\tglobal $mediaWiki;\n\t\t\n\t\t$title = Title::newFromText( $this->title );\n\t\t \n\t\t// Can't load page if title is invalid.\n\t\tif ($title == null)\n\t\t\treturn;\n\t\t\n\t\t$article = $mediaWiki->articleFromTitle($title);\n\t\t\n\t\t// Also, if article can't be found, bail out.\n\t\tif ($article == null )\n\t\t\treturn;\n\t\t\n\t\t// Let's try fetching the page content.\n\t\t$article->loadContent();\n\t\t\n\t\t// V1.3 security feature.\n\t\t// At this point, the page's restriction\n\t\t// is loaded. Get 'edit' protection state.\n\t\t$state = $title->getRestrictions('edit');\n $this->protectState = false;\n $state = $title->getRestrictions('edit');\n foreach ($state as $index => $group )\n if ( $group == 'sysop' )\n $this->protectState = true;\n\t\t\n\t\tif (! $this->protectState)\n\t\t\treturn; \n\t\t\n\t\t# if no page or an empty one\n\t\tif (!$article->mDataLoaded)\n\t\t\treturn;\n\t\t \n\t\t$this->content = $article->mContent;\n\t\t$this->raw = $article->mContent;\n\t\t\n\t\t// Now, let's analyse the page\n\t\t// to determine things like page type.\n\t\t$this->analyse();\n\t}", "private function load()\r\n {\r\n $this->dbFields = MySQL::fetchRecord(MySQL::executeQuery('SELECT * FROM training_slideshow WHERE ts_id='.(int)$this->id),MySQL::fmAssoc);\r\n }", "protected function afterLoad()\n {\n }", "public function afterLoad() { }", "public function admin_load()\n {\n }", "protected function after_load(){\n\n\n }", "public function load() {\n\t\t$statement = $this -> db -> query(\"SELECT * FROM \" . FORUM_DB . \".forum_settings\");\n\t\twhile($settingData = $statement -> fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$this -> settings[$settingData['key']] = new ForumSetting($settingData['key'], $settingData['value']);\n\t\t}\n\t}", "protected function setContent() {}", "protected function _afterLoad()\r\n {\r\n if ($this->_previewFlag) {\r\n $items = $this->getColumnValues('slider_id');\r\n if (count($items)) {\r\n $select = $this->getConnection()->select()->from(\r\n $this->getTable('slider_store')\r\n )->where(\r\n $this->getTable('slider_store') . '.slider_id IN (?)',\r\n $items\r\n );\r\n if ($result = $this->getConnection()->fetchPairs($select)) {\r\n foreach ($this as $item) {\r\n if (!isset($result[$item->getData('slider_id')])) {\r\n continue;\r\n }\r\n if ($result[$item->getData('slider_id')] == 0) {\r\n $stores = Mage::app()->getStores(false, true);\r\n $storeId = current($stores)->getId();\r\n $storeCode = key($stores);\r\n }\r\n else {\r\n $storeId = $result[$item->getData('slider_id')];\r\n $storeCode = Mage::app()->getStore($storeId)->getCode();\r\n }\r\n $item->setData('_first_store_id', $storeId);\r\n $item->setData('store_code', $storeCode);\r\n }\r\n }\r\n }\r\n }\r\n\r\n parent::_afterLoad();\r\n }", "protected function _after_read(): void\n {\n $contents = PageContent::get_data_by( ['page_id' => $this->page_id], $offset = 0,$limit = 1, $use_like = FALSE, $sort_by = 'page_content_id', $sort_desc = TRUE );\n if (isset($contents[0]) && !$this->is_property_modified('page_content')) {\n $this->page_content = $contents[0]['page_content_data'];\n }\n\n if ($this->page_group_id && !$this->is_property_modified('page_group_uuid') ) {\n $PageGroup = new PageGroup($this->page_group_id);\n $this->page_group_uuid = $PageGroup->get_uuid();\n }\n\n //the property may be NULL not because it is not set/initialized but because it was explicitely set to NULL on another instance\n if (!$this->page_slug && !$this->is_property_modified('page_slug')) {\n $this->page_slug = $this->get_alias();\n }\n }", "function set_sections()\n { \n // render accessory tab only on Publish/Edit page (it will be hidden by extension)\n if($this->EE->input->get('D') == 'cp' AND $this->EE->input->get('C') == 'addons_accessories')\n {\n $this->EE->db->where('class', TRUE_PREVIEW_CLASS.'_acc');\n $this->EE->db->update('accessories', array('controllers' => 'content_publish'));\n }\n \n $channel_id = $this->EE->input->get('channel_id');\n $entry_id = $this->EE->input->get('entry_id');\n $site_id = $this->EE->config->item('site_id');\n\n if ($this->EE->input->get('C') == 'content_publish' AND $this->EE->input->get('M') == 'entry_form' AND is_numeric($channel_id) AND is_numeric($entry_id))\n {\n $this->EE->lang->loadfile('true_preview');\n $channel_title = $this->_fetch_channel_title($site_id, $channel_id);\n //echo '$channel_title: '.$channel_title;\n $crumb_text = $this->EE->lang->line('channel');\n $button_text = $this->EE->lang->line('preview');\n \n // create URL of the entry being edited\n $entry_url = $this->_create_entry_url($site_id, $channel_id, $entry_id);\n //echo '$entry_url: [['.$entry_url.']]';\n \n ob_start(); \n?>\n\n<script type=\"text/javascript\">\n\n$(document).ready(function() {\n if ('<?= @$channel_title ?>') {\n $('#breadCrumb ol li.last').append(' (<?= @$channel_title ?> <?= @$crumb_text ?>)');\n }\n if ('<?= @$entry_url ?>') {\n var right_nav_div;\n \n right_nav_div = $('#mainContent div.rightNav');\n //alert('right_nav_div.length: ' + right_nav_div.length);\n if (right_nav_div.length == 1) {\n $('#mainContent div.rightNav div').prepend('<span class=\"button\"><a class=\"submit\" target=\"_blank\" href=\"<?= @$entry_url ?>\" title=\"<?= @$button_text ?>\"><?= @$button_text ?></a></span>');\n }\n else {\n $('#mainContent').prepend('<div class=\"rightNav\"><div style=\"float: left; width: 100%;\"><span class=\"button\"><a class=\"submit\" target=\"_blank\" href=\"<?= @$entry_url ?>\" title=\"<?= @$button_text ?>\"><?= @$button_text ?></a></span></div></div>');\n }\n }\n});\n\n</script>\n\n<?php\n $js = ob_get_contents();\n ob_end_clean();\n \n $this->sections[] = $js;\n }\n }", "public function load() {\n $filename = STORAGE_PATH.$this->id.'.fba';\n if (file_exists($filename)) {\n\n // Split the file where the blocks terminate '<!--SPLITME-->'\n $text = file_get_contents($filename);\n $array = explode('<!--SPLITME-->',$text);\n\n // Set the texts for this article\n $this->article_title = $array[0];\n $this->article_body = $array[1];\n $this->article_comments = $array[2];\n if(strpos($this->article_body, '<!--DESCRIPTION-->')) {\n $this->article_description = strip_tags((explode('<!--DESCRIPTION-->', $this->article_body))[0]);\n } else {\n $this->article_description = '';\n }\n // Confirm the existence of the article\n $this->existence = true;\n }\n }", "public function load() {\n\t\t$this -> template = TemplateManager::load(\"ForumPreference\");\n\t\t$this -> template -> insert(\"profileImage\", $this -> user -> getProfileImage());\n\t\t$this -> template -> insert(\"signature\", $this -> user -> getSignature());\n\t\t$this -> display();\n\t}", "public function init() {\n\n //set title\n $this->title = get_string('dd_content', 'block_dd_content');\n\n }", "private function load_settings() {\n\t\t\n\t}", "protected function _afterLoad()\n {\n $this->performAfterLoad('cms_page_store', 'page_id');\n $this->_previewFlag = false;\n\n return parent::_afterLoad();\n }", "protected function loadSettings() {}", "protected function loadSettings() {}", "protected function loadSettings() {}", "public function loadSettings()\n\t{\n\t\t// Update picto for Dolibarr 12++\n\t\tif (function_exists('version_compare') && version_compare(DOL_VERSION, '12.0.0') >= 0) {\n\t\t\t$this->picto = \"quicknotes_128.png@quicknotes\";\n\t\t}\n\n\t\t$this->addJsFile('quicknotes.js.php');\n\t\t$this->enableHooks(array(\n\t\t\t'toprightmenu',\n\t\t\t'main',\n\t\t\t'login'\n\t\t));\n\t}", "public function loaded()\n {\n // check to delete att\n if(isset($_GET['deleteAtt']) && ($_GET['deleteAtt'] == '1')){\n if((isset($_GET['c'])) && is_numeric($_GET['c'])){\n WPLMS_Assignments::deleteAttachment($_GET['c']);\n delete_comment_meta($_GET['c'], 'attachmentId');\n add_action('admin_notices',array($this, 'mynotice'));\n }\n }\n }", "public function settings_page_init() {\n $this->registration();\n $this->sections();\n }", "public function set_content( $content )\r\n\t {\r\n\t \t$this->_content_to_load = $con;\r\n\t }", "public function loadSettings()\n {\n $this->loadJSON($this->settings);\n }", "function admin_page_load() {\n\t\t$this->jetpack->admin_page_load();\n\t}", "protected function _afterLoad()\n {\n return parent::_afterLoad();\n }", "protected function _load()\r\n {\r\n $page = new Model_Page();\r\n $children = $page->getChildren($this->_parentId);\r\n if ($children != null && $children->count() > 0) {\r\n foreach ($children as $child) {\r\n if ($child->show_on_menu == 1) {\r\n $this->items[] = new Digitalus_Menu_Item($child);\r\n }\r\n }\r\n }\r\n }", "public function initContent()\n {\n $aps_params = Tools::getAllValues();\n if (isset($aps_params['content_only'])) {\n if (1 == $aps_params['content_only']) {\n $this->context->smarty->assign('nobots', true);\n $this->setTemplate('module:amazonpaymentservices/views/templates/hook/payment_valu_term.tpl');\n }\n }\n parent::initContent();\n }", "protected function MetaAfterLoad() {\n\t\t}", "public function load_settings_page() : void {\n\n\t\t\tglobal $learndash_assets_loaded;\n\n\t\t\tself::enqueue_support_assets();\n\n\t\t\t$learndash_assets_loaded['styles']['learndash-admin-help-page-style'] = __FUNCTION__;\n\n\t\t\t$learndash_assets_loaded['scripts']['learndash-admin-help-page-script'] = __FUNCTION__;\n\t\t}", "public function loadDataAction()\n {\n $contentService = Dm_Session::GetServiceFactory()->getContentService();\n\n $filter = new Service_Api_Filter_Content();\n\n $filter->id = $this->_getParam('id');\n $filter->mimeType = $this->_getParam('mimeType');\n $filter->limit = $this->_getParam('limit');\n $filter->offset = $this->_getParam('offset');\n $filter->search = $this->_getParam('search');\n $filter->sources = $this->_getParam('sources');\n $filter->format = $this->_getParam('dim');\n $filter->properties = $this->_getParam('properties');\n $contents = $contentService->contentsRead($filter);\n $this->view->data = $contents;\n }", "public function _afterLoad()\n {\n $this->_setStateText();\n return parent::_afterLoad();\n }", "abstract protected function loadSettings();", "public function onContentBeforeDisplay($context, &$article, &$params, $limitstart = 0)\n {\n\n $jversion = new JVersion();\n if (version_compare($jversion->getShortVersion(), '2.5.10', '>=')) {\n return;\n }\n\n // return;\n\n if (isset($this->_params) && $this->_params->get('context_debug')) {\n echo \"Multithumb onContentBeforeDisplay: context:$context, is_blog:$this->is_blog, is_article:$this->is_article<br/>\";\n }\n\n /*\t\tif ( $this->_params->get('by_context' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t*/\n\n\n if (isset($this->is_blog) and $this->is_blog && preg_match(\"/^com_content./\", $context)) {\n\n // $text_save = @$article->text;\n // $article->text = $article->introtext;\n $this->_onPrepareContent($context, $article, $params, $limitstart);\n // $article->introtext = $article->text ;\n\n // $article->text = $text_save;\n }\n }", "private function _loadPageSettings(){\r\n\r\n $uri = $this->_getContentURI();\r\n $settings = ROOT.DS.'site'.DS.'content'.DS.$uri.DS.'settings.json';\r\n\r\n if(file_exists($settings)){\r\n $this->pageSettings = json_decode(file_get_contents($settings));\r\n } else {\r\n $page_dir = ROOT.DS.'site'.DS.'content';\r\n foreach(explode('/', $uri) as $dir){\r\n $page_dir .= DS.$dir;\r\n if(!file_exists($page_dir)){\r\n mkdir($page_dir);\r\n }\r\n }\r\n $pageSettings = new stdClass();\r\n $pageSettings->page_title = '';\r\n $pageSettings->page_script = '';\r\n file_put_contents($settings, json_encode($pageSettings));\r\n }\r\n\r\n }", "function loadSettings() {\n\tsetupSiteURLs();\n}", "protected function childLoad() {}", "final public function load() {\n $this->childLoad();\n \\add_action('admin_menu', [$this, 'addAdminMenuEntries']);\n }", "public function options_page_init(){\n\t\t\tadd_options_page(__('Breaking News options', 'text-domain'), __('Breaking News', 'text-domain'), 'manage_options', 'breakingnews', [ $this, 'options_page_content']);\n\t\t}", "public function prepareImportContent();", "public function ee_breakouts_page_load() {}", "function set_sections() {\n\t\t\n\t\t$this->sections[] = '<script type=\"text/javascript\" charset=\"utf-8\">$(\"#accessoryTabs a.'.$this->id.'\").parent().remove();</script>';\n\n\t\tif($this->EE->input->get('C') == 'admin_content' && $this->EE->input->get('M') == 'category_edit' ) {\n\n\t\t\t// help!\n\t\t\trequire_once(PATH_THIRD.'dm_eeck/includes/eeck_helper.php');\n\t\t\t$this->helper = new eeck_helper();\n\n\t\t\t// we'll need the settings from the Editor field type\n\t\t\t$this->eeck_settings = $this->helper->load_editor_settings();\n\n\t\t\t$this->helper->include_editor_js($this->eeck_settings['eeck_ckepath'], $this->eeck_settings['eeck_ckfpath']);\n\t\t\t\n\t\t\t// get our settings for this field\n\t\t\t$myConf = $this->eeck_settings['eeck_config_settings'];\n\t\t\t\n\t\t\t// load out config file\n\t\t\t$conf = $this->load_config_file($myConf);\n\t\t\tif($conf != '') $conf .= ',';\n\n\t\t\t// add on integration for CK finder\n\t\t\t$conf .= $this->integrate_ckfinder($this->eeck_settings['eeck_ckfpath'],'Images','Files','Flash');\n\n\t\t\t$str = 'CKEDITOR.replace( \"cat_description\",{'.$conf.'});';\n\t\t\t$this->sections[] = '<script type=\"text/javascript\" charset=\"utf-8\">'.$str.'</script>';\n\t\t}\n\t}", "function admin_preload ()\n\t{\n\t\t$this->CI->admin_navigation->child_link('configuration',65,'phpBB3',site_url('admincp/phpbb'));\n\t}", "function admin_load() {\n\n\t}", "public function load() {\n\t\tif ($this -> user -> getRights() < 2) {\n\t\t\techo \"Permission denied.\";\n\t\t\treturn;\n\t\t}\n\t\t$this -> configure();\n\t\t$this -> template = TemplateManager::load(\"AdministratorPreferences\");\n\t\t$this -> template -> insert(\"worlds\", $this -> getWorlds());\n\t\t$this -> template -> insert(\"configs\", $this -> getConfigs());\n\t\t$this -> display();\n\t}", "public function initialize_settings_page()\n {\n }", "function load_content_builder() {\n\t// acf-content-builder-fieldset.php\n\tlist_all_cpts();\n\tlist_all_module_names();\n\t\n // INCLUDE DEFAULT CONTENT BUILDER FIELDSET\n include_once( EFFLAB_CB_BASE_DIR . '/acf-content-builder-fieldset.php' );\n \n // ADD IN CONTENT BUILDER FIELDSETS \n // FROM PLUGIN AND THEME\n echo efflab_cb_get_module_fieldset();\n \n}", "public function main_load() {\n\t\tadd_action( 'admin_init', array( $this, 'custom_admin_init_action' ) );\n\t\tadd_action( 'add_meta_boxes', array( $this, 'add_meta_boxes_action' ) );\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'custom_admin_enqueue_scripts' ) );\n\t\tadd_action( 'pre_get_posts', array( $this, 'custom_pre_get_posts_action' ) );\n\t\tadd_action( 'restrict_manage_posts', array( $this, 'custom_restrict_manage_posts_action' ) );\n\t\tadd_filter( 'posts_where', array( $this, 'custom_posts_where_filter' ), 10, 2 );\n\t}", "public function loadData(){\r\n\t\t\t $pseudo = addslashes($this -> getPseudo()) ;\r\n\r\n\t\t if(! empty($pseudo)){\r\n\t\t\t$q = \"select * from UserTab where User_pseudo='\".$pseudo.\"'\";\r\n\t\t\t$r = execute($q);\r\n\t\t\twhile( $l = mysql_fetch_assoc($r) ){\r\n\t\t\t\t$this -> setFields($l);//Affectation aux champs de l'objet UserTab \r\n\t\t\t}\r\n\t\t }\r\n\r\n\t }", "public function links_load($settings);", "public function loadContents() {}", "public function loadContents() {}", "public function loadContents() {}", "public function loadContents() {}", "public function doLoad()\n {\n $this->DataSourceInstance->doLoad();\n }", "public function page_init()\n {\n register_setting(\n 'cementlap_option_group', // Option group\n 'cementlap_option_name', // Option name\n array( $this, 'sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n 'Cementlap Custom Settings', // Title\n array( $this, 'print_section_info' ), // Callback\n 'cementlap-setting-admin' // Page\n );\n\n\n\n /***** Konténer vége ******/\n\n add_settings_field(\n 'ntd',\n 'Gyártandó termékek ekkor érkezhetnek legkorábban',\n array( $this, 'ntd_callback' ),\n 'cementlap-setting-admin',\n 'setting_section_id'\n );\n add_settings_field(\n 'subtitle',\n 'Advert Sub Title',\n array( $this, 'subtitle_callback' ),\n 'cementlap-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'button_text', // ID\n 'Advert button text', // Title\n array( $this, 'button_text_callback' ), // Callback\n 'cementlap-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n add_settings_field(\n 'button_url', // ID\n 'Button url', // Title\n array( $this, 'button_url_callback' ), // Callback\n 'cementlap-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n add_settings_field(\n 'change', // ID\n 'Euro arfolyam', // Title\n array( $this, 'change_callback' ), // Callback\n 'cementlap-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n add_settings_field(\n 'vat', // ID\n 'ÁFA', // Title\n array( $this, 'vat_callback' ), // Callback\n 'cementlap-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n\n }", "public function testArticlePageLoads() {\n\t\t$articleElement = $this->locatorObj->readConfigData ( \"mainArticleLocator\" );\n\t\t$mainArticleElement = $this->locatorObj->readConfigData ( \"subArticleLocator\" );\n\t\t$articleCountLocator = $this->locatorObj->readConfigData ( \"articleCounter\" );\n\t\t$this->currentWindow ()->maximize ();\n\t\t$this->url ( \"/\" );\n\t\t$this->logger->info ( \"*************** start of ArticlePageLoads testcase*********** \" );\n\t\t$this->applicationFunctionObj->navigateToMainPage ( $this );\n\t\t$this->applicationFunctionObj->waitUntilElementIsVisible ($this, $articleElement,\"name\" );\n\t\t$this->byName ( $articleElement )->click ();\n\t\t$this->logger->info ( \"Clicked Successfully on Article Page\" );\n\t\t$this->applicationFunctionObj->waitUntilElementIsVisible ( $this, $mainArticleElement,\"name\");\n\t\t$this->byName ( $mainArticleElement)->click ();\n\t\t$this->applicationFunctionObj->waitUntilElementIsVisible ( $this, $articleCountLocator,\"xpath\" );\n\t\t$ArticleCount = $this->byXPath ( $articleCountLocator )->text ();\n\t\t$parts = explode ( ' ', $ArticleCount );\n\t\t$this->logger->info ( \"Main article page is loaded\" );\n\t\t$count = ( int ) array_values ( $parts ) [0];\n\t\tif ($count > 15) {\n\t\t\t$this->logger->info ( \"Main Article page is loaded successfully and count is greaterthan 15\" );\n\t\t}\n\t\telse {\n\t\t\t$this->fail ( \"Article page is not fully loaded\" );\n\t\t}\n\t\t$this->logger->info ( \"*************** end of ArticlePageLoads testcase********** \" );\n\t}", "public function load()\n {\n if ($this->is_loaded()) {\n return;\n }\n\n foreach($this->get_shortcodes() as $shortcode) {\n $this->register_shortcode($shortcode);\n }\n\n foreach ($this->get_subscribers() as $subscriber) {\n $this->event_manager->add_subscriber($subscriber);\n }\n \n // Settings Page\n $settings_page = new CommentIQ_Admin_Settings();\n $settings_page->run();\n\n $this->loaded = true;\n }", "function load_articles()\n{\n\n\tglobal $pages, $activePages, $ofy, $localeclass, $articleclass, $pageclass, $langcode, $contents;\n\t\n\t$locales = $ofy->query($localeclass)->filter('id',$langcode)->list();\t\n\t\n\tforeach ( $locales as $locale ) {\n\n\t\t\t$localeArticles = $ofy->query($articleclass)->filter('locale',$langcode)->order('order')->list();\t//json_decode( $locale->getProperty('articles')->getValue() );\n\t\t\t\n\t\t\tforeach ($localeArticles as $article) {\n\t\t\t\t$stub = $article->getStub();\n\t\t\t\t$title = $article->getTitle();\n\t\t\t\t$subtitle = $article->getSubtitle();\n\t\t\t\t$numberofpages = $article->getNumberOfPages();\n\t\t\t\t$active = $article->getActive();\n\t\t\t\t$hidden = $article->getHidden();\n\t\t\t\t$order = $article->getOrder();\n\t\t\t\t\n\t\t\t\t$articlepages = $ofy->query($pageclass)->filter('locale',$langcode)->filter('stub', $stub)->list();\n\t\t\t\t\n\t\t\t\t$contents = array();\n\t\t\t\t$templates = array();\n\t\t\t\tforeach($articlepages as $articlepage) {\n\t\t\t\t\tarray_push($templates, $articlepage->getTemplate());\n\t\t\t\t\tarray_push($contents, $articlepage->getContent());\n\t\t\t\t}\t\t\t\t\t\n\t\t\n\t\t\t\t\n\t\t\t\t$pages[$stub] = array(\n\t\t\t\t\t'numberOfPages' => $numberofpages,\n\t\t\t\t\t'title' => $title,\n\t\t\t\t\t'subtitle' => $subtitle,\n\t\t\t\t\t'active' => $active,\n\t\t\t\t\t'hidden' => $hidden,\n\t\t\t\t\t'order' => $order,\n\t\t\t\t\t'templates' => $templates,\n\t\t\t\t\t'contents' => $contents,\n\t\t\t\t\t'stub' => $stub\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tif($active == '1') {\n\t\t\t\t\t$activePages[$stub] = array(\n\t\t\t\t\t\t'numberOfPages' => $numberofpages,\n\t\t\t\t\t\t'title' => $title,\n\t\t\t\t\t\t'subtitle' => $subtitle,\n\t\t\t\t\t\t'active' => $active,\n\t\t\t\t\t\t'hidden' => $hidden,\n\t\t\t\t\t\t'templates' => $templates,\n\t\t\t\t\t\t'contents' => $contents\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t//}\t\n\t}\n}", "public function load() {\n // Load settings\n\t $this->lookup_title = $this->getProjectSetting('lookup-title');\n\t $this->lookup_header = $this->getProjectSetting('lookup-header');\n\t $this->lookup_field = $this->getProjectSetting('lookup-field');\n\t $this->lookup_event_id = $this->getProjectSetting('lookup-event-id');\n\t $this->validate_mrn = $this->getProjectSetting('validate-mrn');\n\t $this->found_action = $this->getProjectSetting('found-action');\n\t $this->repeating_event_id = $this->getProjectSetting('repeating-event-id');\n\t $this->repeating_form_name = $this->getProjectSetting('repeating-form-name');\n\t $this->is_loaded = true;\n }", "function admin_load()\n {\n }", "public function onPagesInitialized()\n {\n // Don't proceed if we are in the admin plugin\n if ($this->isAdmin()) {\n $this->active = false;\n return;\n }\n // Do not act upon empty POST payload or any POST not for this plugin\n $post = $_POST;\n if (!$post || ! isset($post['ce_data_post']) ) {\n return;\n }\n // Preemtively handle review edits ajax call\n if ($post['action'] == 'ceReviewEdits') {\n $output = $this->grav['twig']->processTemplate(\n 'partials/data-manager/content-edit/item.html.twig',\n [ 'itemData' => CompiledYamlFile::instance(DATA_DIR . $this->edits_loc . DS . $post['file'])->content() ]\n );\n } else {\n $pages = $this->grav['pages'];\n $page = $pages->dispatch($post['page'] , true);\n if ($post['language'] && $post['language'] != 'Default' ) {\n $fn = preg_match('/^(.+)\\..+?\\.md$/', $page->name(), $matches);\n if ($fn) {\n $fileP = $page->path() . DS . $matches[1] . '.' . $post['language'] . '.md';\n $route = $page->route();\n $page = new Page();\n $page->init(new \\SplFileInfo($fileP), $post['language'] . '.md');\n }\n }\n switch ($post['action']) {\n case 'ceTransferContent': // Transfer the md for the page\n $hd = $page->header();\n $menuExists = property_exists($hd,'menu') && $hd->menu !== null;\n $output = [ 'data' => $page->rawMarkdown(), 'menu' => $page->menu(), 'menuexists' => $menuExists ];\n break;\n case 'ceSaveContent': // Save markdown content\n $output = $this->saveContent($post, $page);\n break;\n case 'cePreviewContent': // Preview a route\n $r = ( $post['language'] == 'Default' ? '' : $post['language'] ) . $post['page'] ;\n $this->grav->redirect($r);\n break;\n case 'ceFileUpload': // Handle a file (or image) upload\n $output = $this->saveFile($post, $page);\n break;\n case 'ceFileDelete': // Deleting a file or images\n $output = $this->deleteFile($post, $page);\n break;\n default:\n return;\n }\n }\n $this->setHeaders();\n echo json_encode($output);\n exit;\n }", "public function page_init()\n { \n register_setting(\n 'firebird_grupo',\n 'firebird_name',\n array( $this, 'sanitize' )\n );\n\n add_settings_section(\n 'setting_section_id',\n 'Configurações',\n array( $this, 'print_section_info' ),\n 'integracao-firebird-admin'\n ); \n\n add_settings_field(\n 'chave_token_api',\n 'Chave a ser utilizada no acesso a API de Importação',\n array( $this, 'chave_token_api_callback' ),\n 'integracao-firebird-admin',\n 'setting_section_id'\n );\n }", "function onPrepareContent(&$article, &$params, $limitstart=0)\n\t{\n\t\t\n\t\t// regular expression\n\t\t$regex = \"#{magictabs(?:\\s?(.*?)?)?}(.*?){/magictabs}#is\";\n\n\t\tif (!preg_match($regex, $article->text)) return false;\n\t\t\n\t\t// Scriptegrator check\n\t\tif (!class_exists('JScriptegrator')) {\n\t\t\tJError::raiseNotice('', JText::_('CDMT_ENABLE_SCRIPTEGRATOR'));\n\t\t\treturn false;\n\t\t} else {\n\t\t\t$message = JScriptegrator::check('1.3.8', 'jquery', 'site');\n\t\t\tif ($message) {\n\t\t\t JError::raiseNotice('', $message);\n\t\t\t return false;\n \t\t}\n\t\t}\n\n\t\t$document = &JFactory::getDocument(); // set document for next usage\n\t\t$live_path = JURI::base(true) . '/'; // define live site\n//\t\t$document->addScript($live_path.\"plugins/system/cdscriptegrator/libraries/jquery/js/ui/ui.tabs.js\");\n//\t\t$document->addScript($live_path.\"plugins/system/cdscriptegrator/libraries/jquery/js/ui/ui.core.js\");\t\n\t\n\t\t$document->addStyleSheet($live_path . 'plugins/content/cdmagictabs/css/cdmagictabs.css', 'text/css');\n\t\t\n\t\t\n\t\t// add general stylesheet\n\n\t\tJScriptegrator::importUI('ui.tabs');\n\t\t\n\t\t// Explication:\n\t\t// $match[1]\t-> parameters\n\t\t// $match[2]\t-> text to tabs\n\n\t\t// replacement regular expression\n\t\t$article->text = preg_replace_callback($regex, array($this, 'replacer'), $article->text);\n\n\t}", "abstract function setContent();", "private function loadBlockSettings() {\n\t\t$this->block['limited_categories'] = get_sub_field($this->current . '_category_filter');\n\n\t\t$this->block['limited_categories_term_string'] = [];\n\t\t$category_filters = get_sub_field($this->current . '_category_filter');\n\t\tif(!empty($category_filters)):\n\t\t\tforeach($category_filters as $filter_cat):\n\t\t\t\t$this->block['limited_categories_term_string'][] = $filter_cat->slug;\n\t\t\tendforeach;\n\t\tendif;\n\n\t\t$this->block['block_title'] = get_sub_field($this->current . '_title_title');\n\n\t\tif($this->layout == 'key_areas')\n\t\t\t$this->block['sections'] = get_sub_field($this->current . '_keyarea');\n\n\t\tif($this->layout == 'jobs_aside')\n\t\t\t$this->block['sections'] = get_sub_field($this->current . '_sections');\n\n\t}", "public function load_settings()\n {\n // Basic Settings\n\t\t$args = array(\n\t\t\t'id'\t\t\t => 'asse_http_basic',\n\t\t\t'title'\t\t\t => 'Grundeinstellungen',\n\t\t\t'page'\t\t\t => $this->page,\n\t\t\t'description'\t=> '',\n\t\t);\n\t\t$asse_http_basic = new Section( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_send_cache_control_header',\n\t\t\t'title'\t\t\t\t => 'Cache-Control Headers',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_basic',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page\n\t\t);\n\t\t$asse_http_send_cache_control_header = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_add_etag',\n\t\t\t'title'\t\t\t\t => 'ETag',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_basic',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_add_etag = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_generate_weak_etag',\n\t\t\t'title'\t\t\t\t => 'Weak ETag',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_basic',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_generate_weak_etag = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_add_last_modified',\n\t\t\t'title'\t\t\t\t => 'Modified Header',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_basic',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_add_last_modified = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_add_expires',\n\t\t\t'title'\t\t\t\t => 'Expries Header',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_basic',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_add_expires = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_add_backwards_cache_control',\n\t\t\t'title'\t\t\t\t => 'Legacy Cache Control',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_basic',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_add_backwards_cache_control = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_mobile_detect',\n\t\t\t'title'\t\t\t\t => 'Mobile Geräteerkennung',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_basic',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_mobile_detect = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_expires_max_age',\n\t\t\t'title'\t\t\t\t => 'Expires Max-Age',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_basic',\n\t\t\t'description' => 'Sekunden',\n\t\t\t'type'\t\t\t\t => 'text', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_expires_max_age = new Field( $args );\n\n // Compression\n\t\t$args = array(\n\t\t\t'id'\t\t\t => 'asse_http_compression',\n\t\t\t'title'\t\t\t => 'Kompression',\n\t\t\t'page'\t\t\t => $this->page,\n\t\t\t'description'\t=> '',\n\t\t);\n\t\t$asse_http_compression = new Section( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_gzip',\n\t\t\t'title'\t\t\t\t => 'GZip',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_compression',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_gzip = new Field( $args );\n\n\t $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_br',\n\t\t\t'title'\t\t\t\t => 'Brotli',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_compression',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_br = new Field( $args );\n\n\t $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_deflate',\n\t\t\t'title'\t\t\t\t => 'Deflate (Zlib)',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_compression',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_deflate = new Field( $args );\n\n // Monitoring\n\t\t$args = array(\n\t\t\t'id'\t\t\t => 'asse_http_health',\n\t\t\t'title'\t\t\t => 'Monitoring',\n\t\t\t'page'\t\t\t => $this->page,\n\t\t\t'description'\t=> '',\n\t\t);\n\t\t$asse_http_health = new Section( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_health',\n\t\t\t'title'\t\t\t\t => 'Health Check',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_health',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox, dropbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page\n\t\t);\n\t\t$asse_http_health_enable = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_health_url',\n\t\t\t'title'\t\t\t\t => 'Health Url',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_health',\n\t\t\t'description' => 'Z.B. /healthz',\n\t\t\t'type'\t\t\t\t => 'text', // text, textarea, password, checkbox, dropbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page\n\t\t);\n\t\t$asse_http_healt_url= new Field( $args );\n\n // CDN\n\t\t$args = array(\n\t\t\t'id'\t\t\t => 'asse_http_cdn',\n\t\t\t'title'\t\t\t => 'CDN',\n\t\t\t'page'\t\t\t => $this->page,\n\t\t\t'description'\t=> '',\n\t\t);\n\t\t$asse_http_cdn = new Section( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_cdn',\n\t\t\t'title'\t\t\t\t => 'CDN',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_cdn',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'dropdown', // text, textarea, password, checkbox, dropbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n 'options' => array( CDN::None => 'Keins', CDN::Akamai => 'Akamai', CDN::Cloudfront => 'Cloudfront' )\n\t\t);\n\t\t$asse_http_cdn = new Field( $args );\n\n // Advanced\n\t\t$args = array(\n\t\t\t'id'\t\t\t => 'asse_http_experimental',\n\t\t\t'title'\t\t\t => 'Experimental',\n\t\t\t'page'\t\t\t => $this->page,\n\t\t\t'description'\t=> '',\n\t\t);\n\t\t$asse_http_experimental = new Section( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_origin',\n\t\t\t'title'\t\t\t\t => 'Origin',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_experimental',\n\t\t\t'description' => 'Vorsicht! Kann nicht gesetzt werden, wenn HTTP_ORIGIN gesetzt ist',\n\t\t\t'type'\t\t\t\t => 'text', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n 'disabled' => true,\n 'disabled_default' => ORIGIN_HOST, // todo\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_origin = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_replace_urls',\n\t\t\t'title'\t\t\t\t => 'Urls ersetzen',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_experimental',\n\t\t\t'description' => 'Vorsicht!',\n\t\t\t'type'\t\t\t\t => 'text', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => true,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_etag_salt = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_etag_salt',\n\t\t\t'title'\t\t\t\t => 'ETag Salt',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_experimental',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'text', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_etag_salt = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_try_rewrite_categories',\n\t\t\t'title'\t\t\t\t => 'Rewrite Kategorien',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_experimental',\n\t\t\t'description' => 'Vorsicht!',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_try_rewrite_categories = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_try_catch_404',\n\t\t\t'title'\t\t\t\t => 'Try Catch 404',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_experimental',\n\t\t\t'description' => 'Vorsicht!',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_expires_max_age = new Field( $args );\n }", "private function loadConfig()\n {\n $this->category->config = [];\n $this->loadMeta('admins', 'array');\n $this->loadMeta('members', 'array');\n $this->loadMeta('template');\n $this->loadMeta('category', 'array');\n //$this->loadMetaCategory();\n $this->loadInitScript();\n }", "public function init() {\n $this->_helper->_acl->allow('fa',null);\n $this->_helper->_acl->allow('admin',null);\n $this->_content = new Content();\n \n }", "function loadActivity(){\n\t\t\t$this->articleEvents->add( $this->db->getUserActivity($this->getName()) ,true );\t\t\t\n\t\t}", "public function afterLoad(){\n $this->getType()->afterLoadProcess($this);\n return parent::afterLoad();\n }", "function initData() {\n\t\t$navigationMenuItemDao = DAORegistry::getDAO('NavigationMenuItemDAO');\n\t\t$navigationMenuItem = $navigationMenuItemDao->getById($this->navigationMenuItemId);\n\n\t\tif ($navigationMenuItem) {\n\t\t\t$this->_data = array(\n\t\t\t\t'path' => $navigationMenuItem->getPath(),\n\t\t\t\t'title' => $navigationMenuItem->getTitle(null),\n\t\t\t\t'url' => $navigationMenuItem->getUrl(),\n\t\t\t\t'menuItemType' => $navigationMenuItem->getType(),\n\t\t\t);\n\t\t\t$this->setData('content', $navigationMenuItem->getContent(null)); // Localized\n\t\t} \n\t}", "public function admin_init() {\n\t\t\tdo_action( 'learndash_settings_page_init', $this->settings_page_id );\n\t\t}", "public function initChangeStateContent()\n {\n }", "function on_load_movies_admin_settings_panel() {\n\t\t\tglobal $movies;\n\t\t\n\t\t\twp_register_style( 'movies-xml-admin-css', $movies->plugin_url .'css/movies-xml-admin.css' , array(), $movies->version );\n\t\t\twp_enqueue_style( 'movies-xml-admin-css' ); \n\t\t\t\t\t\n\t\t\t// We load the 'theatres' feed object to drive the Theatre select shown on the admin setttings panel.\n\t\t\t$movies->movies_xml_processor->load_feed_objects( false, 'theatres' );\n\t\t}", "private function adminContentArea(): void {\n global $security;\n global $media_admin;\n global $media_manager;\n\n // Prepare Query\n if(($absolute = MediaManager::absolute($_GET[\"path\"] ?? DS)) === null) {\n $absolute = PATH_UPLOADS_PAGES;\n $relative = DS;\n } else {\n $relative = MediaManager::relative($absolute);\n }\n\n // Load Main Content Modal\n include \"admin\" . DS . \"modal.php\";\n\n // Load Modals\n \trequire \"admin\" . DS . \"modal-folder.php\";\n if(PAW_MEDIA_PLUS) {\n require \"admin\" . DS . \"modal-search.php\";\n }\n }", "protected function _preloadContainerData()\r\n\t{\r\n\t\t$this->preloadTemplate('page_nav');\r\n\t}", "protected function _afterLoad(\\Magento\\Framework\\Model\\AbstractModel $object)\r\n {\r\n $stores = array();\r\n if ($object->getId()) {\r\n $stores = $this->lookupStoreIds($object->getId());\r\n }\r\n // get cms page data\r\n if(($alias = $object->getAlias()) && $object->getBlockType() == \"page\") {\r\n $block_model = $this->_objectManager->create('Ves\\PageBuilder\\Model\\Block');\r\n $cms_page = $block_model->loadCMSPage($alias, \"identifier\", $stores);\r\n\r\n if($cms_page->getPageId()) {\r\n if(!$stores) {\r\n $stores = $cms_page->getStoreId();\r\n }\r\n //$stores = $cms_page->getStoreId();\r\n\r\n $object->setData(\"cmspage_id\", $cms_page->getPageId());\r\n $object->setData(\"page_layout\", $cms_page->getPageLayout());\r\n $object->setData(\"root_template\", $cms_page->getPageLayout());\r\n $object->setData(\"layout_update_xml\", $cms_page->getLayoutUpdateXml());\r\n $object->setData(\"custom_theme_from\", $cms_page->getCustomThemeFrom());\r\n $object->setData(\"custom_theme_to\", $cms_page->getCustomThemeTo());\r\n $object->setData(\"custom_theme\", $cms_page->getCustomTheme());\r\n $object->setData(\"custom_root_template\", $cms_page->getCustomRootTemplate());\r\n $object->setData(\"custom_layout_update_xml\", $cms_page->getCustomLayoutUpdateXml());\r\n $object->setData(\"meta_keywords\", $cms_page->getMetaKeywords());\r\n $object->setData(\"meta_title\", $cms_page->getMetaTitle());\r\n $object->setData(\"meta_description\", $cms_page->getMetaDescription());\r\n $object->setData(\"content_heading\", $cms_page->getContentHeading());\r\n }\r\n }\r\n if($settings = $object->getSettings()) {\r\n $settings = unserialize($settings);\r\n if($settings) {\r\n foreach($settings as $key => $val) {\r\n $object->setData($key, $val);\r\n }\r\n }\r\n }\r\n $stores = $stores?$stores:array(0);\r\n $object->setData(\"store_id\", $stores);\r\n\r\n //Load params and widgets\r\n if($params = $object->getParams()) {\r\n $widgets = $this->lookupWidgets($object->getId());\r\n $data_widgets = [];\r\n if($widgets) {\r\n foreach($widgets as $key => $widget){\r\n $data_widgets[$widget['widget_key']] = $widget['widget_shortcode'];\r\n }\r\n }\r\n $object->setData(\"widgets\", $data_widgets);\r\n }\r\n\r\n return parent::_afterLoad($object);\r\n }", "public function prePageContent();", "public function postLoad($entity);", "function settings_section_article_before() {\n\techo '<p>' . __( 'These settings may be overridden for individual articles.' ) . '</p>';\n}", "public function beforeAdminLoad(): void {\n global $url;\n global $media_admin;\n\n // Trigger on 'Media' View\n if(strpos($url->slug(), \"media\") !== 0) {\n return;\n }\n checkRole(array(\"admin\"));\n\n // Change Layout\n if(isset($_GET[\"layout\"]) && in_array($_GET[\"layout\"], [\"table\", \"grid\"])) {\n $this->setField(\"layout\", $_GET[\"layout\"]);\n }\n\n // Init Administration\n $media_admin->path = trim($url->slug(), \"/\");\n $media_admin->view = \"media\";\n $media_admin->method = explode(\"/\", $media_admin->path)[1] ?? \"index\";\n $media_admin->query = $_GET;\n\n // Handle Request\n if($media_admin->method !== \"index\") {\n $media_admin->submit();\n }\n }", "public function _load()\n {\n $query = new Query(\n \"SELECT *\n FROM `\" . Leder::TABLE . \"`\n WHERE `arrangement_fra` = '#fra'\n AND `arrangement_til` = '#til'\",\n [\n 'fra' => $this->getArrangementFraId(),\n 'til' => $this->getArrangementTilId()\n ]\n );\n\n $res = $query->getResults();\n while( $row = Query::fetch($res) ) {\n $this->add(\n Leder::loadFromDatabaseRow( $row )\n );\n }\n }", "protected function _afterLoad()\n {\n $value = $this->getValue();\n $value = $this->_helper->makeArrayFieldValue($value);\n $this->setValue($value);\n }", "function main($content, $conf) {\n// $this->pi_USER_INT_obj = 0;\n $this->conf=$conf;\n $this->pi_setPiVarDefaults();\n $this->pi_loadLL();\n\n $galleryPID = intval($this->piVars['galleryPID']);\n $galleryCID = intval($this->piVars['galleryCID']);\n $imageOrderID = intval($this->piVars['imgID']);\n\n $hideMeta = 0;\n $hideNav = 0;\n\n if($galleryPID > 0 && $galleryCID > 0) {\n $GLOBALS['TYPO3_DB']->sql_pconnect(TYPO3_db_host, TYPO3_db_username, TYPO3_db_password);\n $GLOBALS['TYPO3_DB']->sql_select_db(TYPO3_db);\n\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('tx_hldamgallery_hidemeta, tx_hldamgallery_hidenav',\n 'tt_content', 'uid=' . $galleryCID . ' and pid = ' . $galleryPID, '', '', '');\n\n if($res) {\n $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n $hideMeta = $row['tx_hldamgallery_hidemeta'];\n $hideNav = $row['tx_hldamgallery_hidenav'];\n }\n\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('tx_dam_mm_ref.sorting, tx_dam.file_name, tx_dam.file_path, tx_dam.tx_hldamgallery_viewcount',\n 'tx_dam_mm_ref, tx_dam',\n 'tx_dam.uid=tx_dam_mm_ref.uid_local and tx_dam_mm_ref.uid_foreign=' . $galleryCID .\n ' and tx_dam_mm_ref.sorting = ' . $imageOrderID, '', '', '');\n\n $viewCount = 1;\n\n if($res) {\n $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n $this->file = $row['file_path'] . $row['file_name'];\n $viewCount = $row['tx_hldamgallery_viewcount'] + 1;\n\n $updateArray = array(\n 'tx_hldamgallery_viewcount' => $viewCount\n );\n $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dam', 'file_name=\"' . $row['file_name'] .\n '\" and file_path=\"' . $row['file_path'] . '\"', $updateArray);\n }\n\n // ========================================================================================================\n //\n // Creating meta data\n //\n $metaContent = '';\n $metaConn = '';\n\n if($this->conf['useIPTC']) {\n //\n // Using IPTC data, currently the fields are hardcoded.\n //\n $metaContent = htmlspecialchars($this->getIPTC($this->file));\n $conf['altText'] = $metaContent;\n $conf['titleText'] = $metaContent;\n\n $this->appendMetaTags($metaContent);\n\n $metaContent = '<div class=\"tx_hldamgallery_iptc\">' . $metaContent . '</div>';\n } else {\n //\n // Reading meta data from DAM-table\n //\n\n //\n //\n $fileName = basename($this->file);\n $filePath = dirname($this->file) . '/';\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_dam',\n \"file_name='\" . $fileName . \"' and file_path='\" . $filePath . \"'\", '', '', 1);\n\n $title = '';\n $caption = '';\n $imgUID = -1;\n\n $imgAltText = '';\n $imgTitleText = '';\n $keywords = '';\n\n if($res) {\n $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n $imgUID = intval($row['uid']);\n\t\t\t\t\t$row['title']\t= $this->cbMkReadableStr($row['title']);\n\t\t\t\t\t// MLC set page title\n\t\t\t\t\t$GLOBALS['TSFE']->page['title'] = $row['title'];\n $title = $this->prepareMetaEntry('showTitle', $row['title'], 'tx_hldamgallery_meta_title');\n $imgTitleText = $row['title'];\n\n $description = $this->prepareMetaEntry('showDescription', $row['description'], 'tx_hldamgallery_meta_desc');\n $country = $this->prepareMetaEntry('showCountry', $row['loc_country'], 'tx_hldamgallery_meta_country');\n $city = $this->prepareMetaEntry('showCity', $row['loc_city'], 'tx_hldamgallery_meta_city');\n $location = $this->prepareMetaEntry('showLocDesc', $row['loc_desc'], 'tx_hldamgallery_meta_locdesc');\n $caption = $this->prepareMetaEntry('showCaption', $row['caption'], 'tx_hldamgallery_meta_caption');\n $keywords = $this->prepareMetaEntry('showKeywords', $row['keywords'], 'tx_hldamgallery_meta_keywords');\n $this->appendMetaTags($row['keywords']);\n $creator = $this->prepareMetaEntry('showCreator', $row['creator'], 'tx_hldamgallery_meta_creator');\n $publisher = $this->prepareMetaEntry('showPublisher', $row['publisher'], 'tx_hldamgallery_meta_publisher');\n $copyright = $this->prepareMetaEntry('showCopyright', $row['copyright'], 'tx_hldamgallery_meta_copyright');\n $usage = $this->prepareMetaEntry('showUsage', $row['instructions'], 'tx_hldamgallery_meta_usage');\n\n $imgAltText = $row['alt_text'];\n $category = $row['category'];\n }\n\n $conf['altText'] = $imgAltText;\n $conf['titleText'] = $imgTitleText;\n\n if(intval($hideMeta) != 1) {\n $metaContent = '\n <div class=\"tx_hldamgallery_meta\">' . $title . $caption . $description . $country . $city . $location .\n $keywords . $creator . $publisher . $copyright . $usage . '\n </div>';\n }\n }\n\n if($this->conf['showHits']) {\n $metaContent .= '\n <div class=\"tx_hldamgallery_count\">\n ' . $viewCount . ' Hits\n </div>';\n }\n\n $conf['file.'] = $this->cObj->image_compression[$this->cObj->data['image_compression']];\n\n list($width, $height, $type, $attr) = getImageSize($this->file);\n $orientation = ($width >= $height) ? 'landscape' : 'portrait';\n if($this->conf['shrinkImagesToWidth']) {\n $conf['file.']['maxW'] = $this->conf['shrinkImagesToWidth'];\n if($orientation == 'landscape') {\n $conf['file.']['width'] = $this->conf['shrinkImagesToWidth'];\n } else {\n $conf['file.']['height'] = $this->conf['shrinkImagesToWidth'];\n }\n }\n\n // ========================================================================================================\n //\n // Prepare img-Tag and back-link\n //\n $a1 = '<a href=\"'. htmlspecialchars($this->pi_getPageLink($galleryPID, '','')) . '\" >';\n $a2 = '</a>';\n $backLink = $a1 . 'back' . $a2;\n\n $info = $this->cObj->getImgResource($this->file, $conf['file.']);\n $info[3] = t3lib_div::png_to_gif_by_imagemagick($info[3]);\n\n $altParam = $this->cObj->getAltParam($conf);\n $bigImageTag = '<img src=\"'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.t3lib_div::rawUrlEncodeFP($info[3])) .\n '\" width=\"' . $info[0] . '\" height=\"' . $info[1] . '\"' .\n $this->cObj->getBorderAttr(' border=\"' . intval($conf['border']).'\"') . ($altParam) . ' />';\n\n $downloadLink = '';\n if($this->conf['addDownloadLink']) {\n $downloadLink = '<div class=\"tx_hldamgallery_download\"><a href=\"' . $info['origFile'] . '\"' .\n $target.$GLOBALS['TSFE']->ATagParams . '>download original image</a></div>';\n }\n\n // ========================================================================================================\n //\n // Checking for other images in the same gallery\n //\n if(intval($hideNav) != 1) {\n $backLink = $a1 . $this->pi_getLL( 'back' ) . $a2;\n\n if($this->conf['numberOfThumbs']) {\n $numberOfThumbs = intval($this->conf['numberOfThumbs.']);\n } else {\n $numberOfThumbs = 2;\n }\n\n $linkToNextImage = '';\n\n $navArray = array();\n\n if($imgUID >= 0 && $numberOfThumbs > 0) {\n $refreshTimeout = -1;\n\n if($this->conf['slideShowTimeOut']) {\n $refreshTimeout = intval($this->conf['slideShowTimeOut']);\n }\n\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n 'tx_dam_mm_ref.sorting, tx_dam.title, tx_dam.description, tx_dam.alt_text, tx_dam.keywords, tx_dam.file_name, tx_dam.file_path',\n 'tx_dam_mm_ref, tx_dam',\n 'tx_dam.uid=tx_dam_mm_ref.uid_local and tx_dam_mm_ref.uid_foreign=' . $galleryCID .\n ' and abs(tx_dam_mm_ref.sorting - ' . $imageOrderID . ')<=' . $numberOfThumbs, '',\n 'tx_dam_mm_ref.sorting', $numberOfThumbs * 2 + 1);\n\n while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n $imageFile = $row['file_path'] . $row['file_name'];\n\n $img = array();\n\t\t\t\t\t\t$row['title']\t= $this->cbMkReadableStr($row['title']);\n if($this->conf['useIPTC']) {\n $metaConn = htmlspecialchars($this->getIPTC($imageFile));\n $img['altText'] = $metaConn;\n $img['titleText'] = $metaConn;\n } else {\n $img['altText'] = strlen($row['alt_text']) > 0 ? $row['alt_text'] : $row['description'];\n $img['titleText'] = strlen($row['title']) > 0 ? $row['title'] : $row['description'];\n }\n\n $this->appendMetaTags($row['keywords']);\n\n $imgID = $row['sorting'];\n $imgTag = $this->createImageTag($imageFile, $img);\n $url = $this->createNavigationURL($galleryPID, $galleryCID, $imgID);\n $imgLink = $this->createNavigationLink($url, $imgTag);\n\n if($row['sorting'] == ($imageOrderID + 1)) {\n // Make the big image a link to the next\n $bigImageTag = $this->createNavigationLink($url, $bigImageTag);\n if($refreshTimeout > 0) {\n $GLOBALS['TSFE']->additionalHeaderData['tx_hldamgallery_refresh'] =\n '<meta http-equiv=\"refresh\" content=\"' . $refreshTimeout . '; URL=' . $url . '\" />';\n }\n } else if($row['sorting'] == $imageOrderID) {\n $imgLink = '<span class=\"tx_hldamgallery_current_thumb\">' . $imgTag . '</span>';\n }\n\n $navArray[$row['sorting'] - $imageOrderID + $numberOfThumbs] = $imgLink;\n }\n\n $navContent = '';\n for($i = 0; $i < ($numberOfThumbs * 2 + 1); $i++) {\n $navContent .= $navArray[$i];\n }\n\n $navContent = '\n <div class=\"tx_hldamgallery_navigation\">' .\n $navContent . '\n </div>';\n }\n }\n // ========================================================================================================\n //\n // Creating final output\n //\n $content = '\n <div class=\"tx_hldamgallery_back_link\">' . $backLink . '</div>\n <div class=\"tx_hldamgallery_img\">' . $bigImageTag . '</div>' . $downloadLink . $metaContent . $navContent;\n }\n return $this->pi_wrapInBaseClass($content);\n }", "function loadContents() ;", "public function load_settings_page() : void {\n\n\t\t\tglobal $learndash_assets_loaded;\n\n\t\t\t$object = array(\n\t\t\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t'plugin_url' => LEARNDASH_LMS_PLUGIN_URL,\n\t\t\t\t'admin_dashboard_url' => admin_url( '/' ),\n\t\t\t\t'learndash_cloud_setup_url' => add_query_arg(\n\t\t\t\t\tarray( 'page' => 'learndash-setup' ),\n\t\t\t\t\tadmin_url( 'admin.php' )\n\t\t\t\t),\n\t\t\t\t'learndash_cloud_setup_wizard_url' => add_query_arg(\n\t\t\t\t\tarray( 'page' => 'learndash-setup-wizard' ),\n\t\t\t\t\tadmin_url( 'admin.php' )\n\t\t\t\t),\n\t\t\t\t'learndash_setup_wizard_url' => add_query_arg(\n\t\t\t\t\tarray( 'page' => 'learndash-setup-wizard' ),\n\t\t\t\t\tadmin_url( 'admin.php' )\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t// phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t\tif ( isset( $_GET['page'] ) && 'learndash-setup' === $_GET['page'] ) {\n\t\t\t\tHelp_Page::enqueue_support_assets();\n\n\t\t\t\twp_enqueue_style(\n\t\t\t\t\t'learndash-setup',\n\t\t\t\t\tLEARNDASH_LMS_PLUGIN_URL . '/assets/css/setup.css',\n\t\t\t\t\tarray(),\n\t\t\t\t\tLEARNDASH_VERSION,\n\t\t\t\t\t'all'\n\t\t\t\t);\n\t\t\t\t$learndash_assets_loaded['styles']['learndash-admin-setup-page-style'] = __FUNCTION__;\n\n\t\t\t\twp_enqueue_script(\n\t\t\t\t\t'learndash-setup',\n\t\t\t\t\tLEARNDASH_LMS_PLUGIN_URL . '/assets/js/setup.js',\n\t\t\t\t\tarray( 'jquery', 'wp-element' ),\n\t\t\t\t\tLEARNDASH_VERSION,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\t$learndash_assets_loaded['scripts']['learndash-admin-setup-page-script'] = __FUNCTION__;\n\n\t\t\t\twp_localize_script(\n\t\t\t\t\t'learndash-setup',\n\t\t\t\t\t'LearnDashSetup',\n\t\t\t\t\t$object\n\t\t\t\t);\n\t\t\t}\n\t\t}", "protected function _afterLoad()\n {\n $value = $this->getValue();\n $value = $this->makeArrayFieldValue($value);\n $this->setValue($value);\n }", "public function initContent() {\n $this->initTabModuleList();\n $this->initToolbar();\n $this->initPageHeaderToolbar();\n\n if ($this->display == 'edit' || Tools::getValue('display') == 'formPlayer') {\n if (!$this->loadObject(true)) {\n return;\n }\n $this->content = $this->renderForm();\n $this->content.= $this->generateListPlayerLevels();\n $this->content.= $this->generateListPlayerHistory();\n $deletePlayers = false;\n }\n elseif (Tools::isSubmit('addCustomAction')) {\n $this->content = $this->generateFormCustomAction();\n $deletePlayers = false;\n }\n else {\n $this->content = $this->renderList();\n $deletePlayers = true;\n }\n\n // This are the real smarty variables\n $this->context->smarty->assign(\n array(\n 'content' => $this->content,\n 'tab' => 'Players',\n 'loyalty_name' => Configuration::get('krona_loyalty_name', $this->context->language->id, $this->id_shop_group, $this->id_shop),\n 'import' => Configuration::get('krona_import_customer', null, $this->id_shop_group, $this->id_shop),\n 'dont' => Configuration::get('krona_dont_import_customer', null, $this->id_shop_group, $this->id_shop),\n 'deletePlayers' => $deletePlayers,\n 'show_page_header_toolbar' => $this->show_page_header_toolbar,\n 'page_header_toolbar_title' => $this->page_header_toolbar_title,\n 'page_header_toolbar_btn' => $this->page_header_toolbar_btn,\n )\n );\n\n $tpl = $this->context->smarty->fetch(_PS_MODULE_DIR_ . 'genzo_krona/views/templates/admin/main.tpl');\n\n $this->context->smarty->assign(array(\n 'content' => $tpl, // This seems to be anything inbuilt. It's just chance that we both use content as an assign variable\n ));\n\n }", "public function render()\n {\n $myConfig = $this->getConfig();\n\n parent::render();\n\n $this->_aViewData[\"edit\"] = $oArticle = oxNew(\"oxarticle\");\n\n $soxId = $this->getEditObjectId();\n if ($soxId != \"-1\" && isset($soxId)) {\n\n // load object\n $oArticle->loadInLang($this->_iEditLang, $soxId);\n\n // load object in other languages\n $oOtherLang = $oArticle->getAvailableInLangs();\n if (!isset($oOtherLang[$this->_iEditLang])) {\n // echo \"language entry doesn't exist! using: \".key($oOtherLang);\n $oArticle->loadInLang(key($oOtherLang), $soxId);\n }\n\n foreach ($oOtherLang as $id => $language) {\n $oLang = new stdClass();\n $oLang->sLangDesc = $language;\n $oLang->selected = ($id == $this->_iEditLang);\n $this->_aViewData[\"otherlang\"][$id] = clone $oLang;\n }\n\n\n // variant handling\n if ($oArticle->oxarticles__oxparentid->value) {\n $oParentArticle = oxNew(\"oxarticle\");\n $oParentArticle->load($oArticle->oxarticles__oxparentid->value);\n $this->_aViewData[\"parentarticle\"] = $oParentArticle;\n $this->_aViewData[\"oxparentid\"] = $oArticle->oxarticles__oxparentid->value;\n }\n\n if ($myConfig->getConfigParam('blMallInterchangeArticles')) {\n $sShopSelect = '1';\n } else {\n $sShopID = $myConfig->getShopID();\n $sShopSelect = \" oxshopid = '$sShopID' \";\n }\n\n $oPriceList = oxNew(\"oxlist\");\n $oPriceList->init('oxbase', \"oxprice2article\");\n $sQ = \"select * from oxprice2article where oxartid = '{$soxId}' \" .\n \"and {$sShopSelect} and (oxamount > 0 or oxamountto > 0) order by oxamount \";\n $oPriceList->selectstring($sQ);\n\n $this->_aViewData[\"amountprices\"] = $oPriceList;\n\n }\n\n return \"article_stock.tpl\";\n }", "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}", "public function loadFromContentID( $id=null );", "public function init()\n {\n //Get all all authors with their articles\n\t $query = Proyecto::find();\n $query->select('proyecto.*, Nombre AS nombre')\n ->leftJoin('categoriaproyecto','categoriaProyecto_idcategoriaProyecto=idcategoriaProyecto')\n ->groupBy('idProyecto')\n ->with('categoriaProyectoIdcategoriaProyecto');\n\t\tforeach($query->all() as $pro) {\n\t\t\t//Add rows with the Author, # of articles and last publishing date\n\t\t\t$this->allModels[] = [\n\t\t\t\t'IdProyecto' => $pro->idProyecto,\n\t\t\t\t'Titulo' => $pro->Titulo,\n\t\t\t\t'Descripcion' => $pro->Descripcion,\n\t\t\t\t'Url' => $pro->Url,\n\t\t\t\t'Imagen' => $pro->Imagen,\n\t\t\t\t'UserID' => $pro->user_id,\n\t\t\t\t'Fecha' => $pro->Fecha,\n\t\t\t\t'Categoria' =>$pro->nombre,\n\t\t\t];\n\t\t}\n\t}", "public function testMainArticlePageLoads() {\n\t\t$articleElement = $this->locatorObj->readConfigData ( \"mainArticleLocator\" );\n\t\t$articleCountLocator = $this->locatorObj->readConfigData ( \"articleCounter\" );\n\t\t$this->currentWindow ()->maximize ();\n\t\t$this->url ( \"/\" );\n\t\t$this->logger->info ( \"*************** start of MainArticlePageLoads testcase*********** \" );\n\t\t$this->applicationFunctionObj->navigateToMainPage ( $this );\n\t\t$this->applicationFunctionObj->waitUntilElementIsVisible ($this,$articleElement,\"name\" );\n\t\t$this->byName($articleElement)->click ();\n\t\t$this->logger->info ( \"Clicked Successfully on Main Article Page menu\" );\n\t\t$this->applicationFunctionObj->waitUntilElementIsVisible ( $this,$articleCountLocator ,\"xpath\" );\n\t\t$MainArticleCount = $this->byXPath ( $articleCountLocator )->text ();\n\t\t$this->logger->info ( \"The count value of the available results is fetched\" );\n\t\t$parts = explode ( ' ', $MainArticleCount );\n\t\t$count = ( int ) array_values ( $parts ) [0];\n\t\tif ($count > 25) {\n\t\t\t$this->logger->info ( \"Main Article page is loaded successfully and cunt is greaterthan 25\" );\n\t\t} else {\n\t\t\t$this->fail ( \"Main article page is not fully loaded\" );\n\t\t}\n\t\t$this->logger->info ( \"*************** end of MainArticlePageLoads testcase********** \" );\n\t}", "public function onContentBeforeDisplay($context, $article, $params, $page = 0)\n\t{\n\t\t$result = null;\n\n\t\t// Blog View Clearly\n\t\tif ($this->params->get('blogViewClearly', 1))\n\t\t{\n\t\t\t$this->call(array('Article\\\\Blog', 'clearView'), $context, $article, $params);\n\t\t}\n\n\t\t@include $this->includeEvent(__FUNCTION__);\n\n\t\treturn $result;\n\t}", "public function settings_api_init() {\n\t\t// Register sections and settings.\n\t\tadd_settings_section(\n\t\t\t$this->menu_slug,\n\t\t\t__( 'Top Story', 'top-story' ),\n\t\t\tnull,\n\t\t\t$this->menu_slug\n\t\t);\n\n\t\t// Register settings and add fields.\n\t\tregister_setting( $this->menu_slug, 'current-top-story' );\n\n\t\t// Add field.\n\t\tadd_settings_field(\n\t\t\t$this->menu_slug,\n\t\t\t__( 'Search for post by title to replace current top story. (Leave blank to disable.)', 'top-story' ),\n\t\t\tarray( $this, 'option_display' ),\n\t\t\t$this->menu_slug,\n\t\t\t$this->menu_slug\n\t\t);\n\t}", "public function onLoad() {\n \n }" ]
[ "0.6912168", "0.6592185", "0.65455896", "0.65072566", "0.6499246", "0.63287926", "0.6326859", "0.6307072", "0.6132104", "0.61185926", "0.6109039", "0.6090116", "0.6061948", "0.60572803", "0.604433", "0.6041131", "0.5974385", "0.59606326", "0.5944134", "0.59263325", "0.592019", "0.59200025", "0.59200025", "0.59058964", "0.5845773", "0.5840113", "0.5829179", "0.58244956", "0.5808306", "0.57983255", "0.57890135", "0.57851845", "0.57825804", "0.57797146", "0.57773095", "0.573781", "0.5732151", "0.5720019", "0.5718498", "0.57171315", "0.57024497", "0.5698186", "0.56955886", "0.5694987", "0.5687754", "0.56859535", "0.56839406", "0.56812197", "0.5672747", "0.56651217", "0.5662445", "0.5648645", "0.564234", "0.564208", "0.56362903", "0.5635374", "0.5635374", "0.5635353", "0.56330985", "0.5618149", "0.56174517", "0.5605849", "0.5601943", "0.5590799", "0.5589999", "0.55716056", "0.55665535", "0.5566014", "0.5558844", "0.55490667", "0.5547922", "0.5544313", "0.55392283", "0.5537456", "0.55352587", "0.55320203", "0.5531424", "0.5530978", "0.5499544", "0.54884934", "0.54822594", "0.5479991", "0.54792106", "0.54709375", "0.5467906", "0.54554206", "0.54497415", "0.5448218", "0.5443258", "0.54321194", "0.5431445", "0.54295826", "0.5429404", "0.54271", "0.5424765", "0.54209834", "0.5420425", "0.5418244", "0.5414042", "0.5412985", "0.54122895" ]
0.0
-1
Returns the lines where errors should occur. The key of the array should represent the line number and the value should represent the number of errors that should occur on that line.
public function getErrorList() { return [ 13 => 1, 33 => 1, 83 => 1, 88 => 1, 92 => 1, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getErrorLines()\n {\n return array('Something went wrong... ಠ_ಠ');\n }", "public function getFailedLines(): array;", "public function getErrorList() : array {\n\t\t$file = func_get_arg( 0 );\n\t\tswitch ( $file ) {\n\t\t\tcase 'SlowMetaQueryUnitTest.success.inc':\n\t\t\t\treturn [];\n\n\t\t\tcase 'SlowMetaQueryUnitTest.fail.inc':\n\t\t\t\treturn [\n\t\t\t\t\t7 => 1,\n\t\t\t\t\t14 => 1,\n\t\t\t\t\t27 => 1,\n\t\t\t\t\t37 => 1,\n\t\t\t\t\t47 => 1,\n\t\t\t\t\t59 => 1,\n\t\t\t\t\t78 => 1,\n\t\t\t\t\t94 => 1,\n\t\t\t\t\t98 => 1,\n\t\t\t\t\t105 => 1,\n\t\t\t\t];\n\t\t}\n\t\treturn [];\n\t}", "public function getErrorList() {\n\t\treturn array(\n\t\t\t11 => 2,\n\t\t\t12 => 2,\n\t\t\t13 => 2,\n\t\t\t16 => 2,\n\t\t\t19 => 2,\n\t\t\t22 => 2,\n\t\t\t26 => 2,\n\t\t\t36 => 2,\n\t\t\t37 => 2,\n\t\t\t38 => 2,\n\t\t\t47 => 2,\n\t\t\t51 => 2,\n\t\t);\n\t}", "public function getErrorList()\n {\n return [\n 5 => 1,\n 7 => 1,\n 9 => 1,\n 11 => 1,\n 14 => 1,\n 16 => 1,\n 19 => 1,\n 21 => 1,\n 26 => 2,\n 27 => 2,\n 28 => 2,\n 29 => 2,\n 32 => 2,\n 33 => 2,\n 34 => 2,\n 35 => 2,\n 41 => 1,\n 47 => 1,\n 51 => 1,\n 53 => 1,\n 55 => 1,\n 57 => 1,\n 60 => 1,\n 62 => 1,\n 67 => 1,\n 69 => 1\n ];\n }", "public function getErrorList()\n {\n return [\n 8 => 1,\n 13 => 1,\n ];\n }", "public function getErrorList()\n {\n return [15 => 1, 29 => 2, 30 => 1, 42 => 1, 57 => 3, 59 => 3, 61 => 1, 63 => 5, 65 => 1, 71 => 1, 73 => 2, 76 => 1, 86 => 2, 103 => 1, 112 => 1, 122 => 1, 132 => 1, 157 => 1, 165 => 1, 170 => 1, 208 => 1, 219 => 3];\n }", "public function getErrorList()\n {\n return [\n 2 => 1,\n 3 => 2,\n 4 => 1,\n 5 => 2,\n 6 => 2,\n 9 => 3,\n 10 => 2,\n 11 => 3,\n 13 => 3,\n 14 => 2,\n 18 => 1,\n 20 => 1,\n 22 => 2,\n 23 => 2,\n 26 => 1,\n 37 => 4,\n 39 => 1,\n 40 => 1,\n 44 => 2,\n 47 => 2,\n ];\n }", "public function getErrorList()\n {\n return [\n 6 => 1,\n 8 => 1,\n 10 => 1,\n 14 => 1,\n 16 => 1,\n 18 => 1,\n 21 => 1,\n 23 => 1,\n 25 => 1,\n 38 => 1,\n 39 => 1,\n 40 => 1\n ];\n }", "public function getErrorList()\n {\n return [\n 9 => 1,\n 14 => 1,\n 20 => 1,\n 22 => 1,\n 32 => 1,\n 36 => 1,\n 44 => 1,\n 48 => 1,\n 56 => 1,\n 60 => 1,\n 68 => 1,\n 72 => 1,\n 84 => 1,\n 88 => 2,\n 100 => 1,\n 104 => 2,\n 122 => 2,\n 128 => 1,\n 132 => 3,\n 133 => 2,\n 147 => 1,\n 157 => 1,\n 165 => 1,\n ];\n\n }", "public function getErrorList() {\n\t\treturn [\n\t\t\t12 => 1,\n\t\t\t13 => 1,\n\t\t\t14 => 1,\n\t\t\t16 => 1,\n\t\t\t17 => 1,\n\t\t\t21 => 1,\n\t\t\t22 => 1,\n\t\t];\n\t}", "public function getErrorList()\n {\n return [\n 4 => 1,\n 13 => 1,\n 19 => 1,\n 24 => 1,\n 30 => 1,\n 40 => 1,\n 44 => 1,\n 50 => 1,\n 55 => 1,\n 67 => 1,\n 78 => 1,\n 85 => 1,\n 91 => 1,\n 98 => 1,\n 110 => 1,\n 115 => 1,\n 122 => 1,\n 128 => 1,\n 155 => 1,\n 158 => 1,\n 164 => 1,\n 168 => 1,\n 172 => 1,\n 176 => 1,\n 196 => 1,\n 201 => 1,\n 205 => 2,\n 210 => 2,\n 215 => 1,\n 220 => 1,\n 231 => 1,\n 236 => 1,\n 244 => 1,\n 252 => 1,\n 260 => 1,\n ];\n\n }", "public function getErrorList() {\n\n\t\treturn array(\n\t\t\t5 => 1,\n\t\t\t9 => 1,\n\t\t\t31 => 1,\n\t\t\t44 => 1,\n\t\t\t48 => 1,\n\t\t\t69 => 1,\n\t\t\t89 => 1,\n\t\t\t113 => 1,\n\t\t\t114 => 1,\n\t\t\t122 => 1,\n\t\t\t126 => 1,\n\t\t\t148 => 1,\n\t\t\t150 => 1,\n\t\t\t159 => 1,\n\t\t\t160 => 1,\n\t\t\t161 => 1,\n\t\t\t177 => 1,\n\t\t\t185 => 1,\n\t\t\t190 => 1,\n\t\t\t198 => 1,\n\t\t\t202 => 1,\n\t\t\t252 => 1,\n\t\t\t269 => 1,\n\t\t);\n\t}", "public function getErrorList() {\n\t\treturn array(\n\t\t\t12 => 1,\n\t\t\t13 => 1,\n\t\t\t14 => 1,\n\t\t\t15 => 1,\n\t\t\t24 => 1,\n\t\t\t25 => 2,\n\t\t\t26 => 1,\n\t\t\t27 => 2,\n\t\t\t28 => 1,\n\t\t\t29 => 2,\n\t\t\t30 => 2,\n\t\t\t31 => 1,\n\t\t\t32 => 1,\n\t\t\t33 => 1,\n\t\t\t34 => 1,\n\t\t\t35 => 1,\n\t\t\t38 => 1,\n\t\t\t39 => 2,\n\t\t\t40 => 1,\n\t\t\t41 => 2,\n\t\t\t42 => 1,\n\t\t\t43 => 2,\n\t\t\t44 => 2,\n\t\t\t45 => 1,\n\t\t\t46 => 1,\n\t\t\t47 => 1,\n\t\t\t48 => 1,\n\t\t\t49 => 1,\n\t\t\t60 => 1,\n\t\t\t61 => 1,\n\t\t\t62 => 1,\n\t\t\t63 => 1,\n\t\t);\n\t}", "private function getErrors() {\n \n $inError = $this->getInErrorWords();\n $errors = array();\n $length = count($inError);\n if ($length === 0) {\n return $errors;\n }\n $error = null;\n $currentErrorType = null;\n for ($i = 0; $i <= $length; $i++) {\n \n if ($i === $length) {\n $errors[] = $error;\n break;\n }\n \n if (!isset($currentErrorType) || $currentErrorType === $inError[$i]['error']) {\n $message = (isset($error) ? $error['message'] . ' ' : '') . $inError[$i]['word'];\n }\n else {\n $errors[] = $error;\n $message = $inError[$i]['word'];\n }\n \n $currentErrorType = $inError[$i]['error'];\n $error = array(\n 'error' => $currentErrorType,\n 'message' => (isset($error) ? $error['message'] . ' ' : '') . $inError[$i]['word']\n );\n }\n return $errors;\n }", "public function errors() : array\n {\n $errors = [];\n foreach ($this->tests as $error => $test) {\n if (!$test($this->getValue())) {\n $errors[] = $error;\n }\n }\n return $errors;\n }", "function getErrors()\n {\n ksort($this->errors);\n $e = array();\n foreach ($this->errors as $v) foreach ($v as $e[]) {}\n return $e;\n }", "public function get_errors() {\n $res = array();\n foreach($this->errors as $error) {\n $res[] = $error->errormsg;\n }\n return $res;\n }", "public function getErrorList() {\n\t\treturn array();\n\n\t}", "public static function errors(): array\n\t{\n\t\treturn self::$errorsArray;\n\t}", "public function getErrorsCount()\n {\n return $this->count(self::ERRORS);\n }", "public function getErrors()\n {\n $errors = $this->getValue('klarna_validation_errors');\n return $errors ? $errors : array();\n }", "public function errors()\n {\n $errors = [];\n foreach($this->errors as $type => $error) {\n if (!empty($error)) {\n $errors[] = $error;\n }\n }\n return $errors;\n }", "protected function get_errors_description() {\n $errors = array();\n if ($this->options->is_check_errors == true) {\n\n $i = 0;\n $rules_names = $this->get_error_hints_names();\n\n foreach($rules_names as $rule_name) {\n $rule = new $rule_name($this->get_dst_root());\n $rhr = $rule->check_hint();\n\n if (count($rhr->problem_ids) > 0) {\n $errors[$i] = array();\n\n $errors[$i][\"problem\"] = $rhr->problem;\n $errors[$i][\"solve\"] = $rhr->solve;\n $errors[$i][\"problem_ids\"] = $rhr->problem_ids;\n $errors[$i][\"problem_type\"] = $rhr->problem_type;\n $errors[$i][\"problem_indfirst\"] = $rhr->problem_indfirst;\n $errors[$i][\"problem_indlast\"] = $rhr->problem_indlast;\n\n ++$i;\n }\n }\n }\n return $errors;\n }", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function getErrorList()\n {\n return [\n 3 => 1,\n 7 => 1,\n 12 => 1,\n 15 => 1,\n 18 => 2,\n 20 => 1,\n 22 => 2,\n 28 => 2,\n 32 => 2,\n 38 => 2,\n 42 => 2,\n 48 => 2,\n 52 => 2,\n 62 => 2,\n 66 => 4,\n 76 => 4,\n 80 => 4,\n 82 => 1,\n 86 => 1,\n 90 => 1,\n 94 => 1,\n 95 => 1,\n 99 => 1,\n 108 => 2,\n 112 => 1,\n 115 => 1,\n 120 => 1,\n 122 => 2,\n 123 => 1,\n 130 => 2,\n 134 => 1,\n 150 => 1,\n 151 => 1,\n 153 => 1,\n 154 => 1,\n 158 => 2,\n 163 => 1,\n 165 => 1,\n 170 => 2,\n 186 => 2,\n 187 => 2,\n 225 => 1,\n 231 => 1,\n 240 => 1,\n 254 => 1,\n 260 => 2,\n 272 => 1,\n 278 => 1,\n 284 => 3,\n 290 => 2,\n 296 => 2,\n 302 => 2,\n 316 => 1,\n 326 => 1,\n 330 => 1,\n 335 => 1,\n 337 => 8,\n 339 => 2,\n 340 => 2,\n 343 => 6,\n 344 => 2,\n 346 => 1,\n 348 => 1,\n 350 => 1,\n 351 => 3,\n 352 => 2,\n 354 => 1,\n 357 => 2,\n 363 => 2\n ];\n }", "public static function getErrors(): array\n {\n return self::$errors;\n }", "function getErrors()\n\t{\n\t\treturn [];\n\t}", "public function getErrorList($testFile='ComparisonOperatorUsageUnitTest.inc')\n {\n switch ($testFile) {\n case 'ComparisonOperatorUsageUnitTest.inc':\n return [\n 6 => 1,\n 7 => 1,\n 10 => 1,\n 11 => 1,\n 18 => 1,\n 19 => 1,\n 22 => 1,\n 23 => 1,\n 29 => 2,\n 32 => 2,\n 38 => 4,\n 47 => 2,\n 69 => 1,\n 72 => 1,\n 75 => 1,\n 78 => 1,\n 80 => 1,\n 82 => 1,\n 83 => 1,\n 89 => 1,\n 92 => 1,\n 100 => 1,\n 106 => 1,\n 112 => 1,\n 123 => 1,\n 127 => 1,\n 131 => 1,\n 135 => 1,\n ];\n break;\n case 'ComparisonOperatorUsageUnitTest.js':\n return [\n 5 => 1,\n 6 => 1,\n 17 => 1,\n 18 => 1,\n 28 => 2,\n 40 => 1,\n 47 => 1,\n 52 => 1,\n 63 => 1,\n 67 => 1,\n 71 => 1,\n ];\n break;\n default:\n return [];\n break;\n }//end switch\n\n }", "public function errors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n $error = [];\n\n foreach ($this->list as $r) {\n $error[$r->getPropertyPath()] = $r->getMessage();\n }\n\n return $error;\n }", "public function errorsArray()\n {\n return $this->errors;\n }", "public function getErrors(): array;", "public function getErrors(): array;", "public function getErrors(): array;", "public function getErrors(): array\n {\n return Logger::getErrorMessages();\n }", "public function getErrorList($testFile = 'ForLoopDeclarationUnitTest.inc')\n {\n switch ($testFile) {\n case 'ForLoopDeclarationUnitTest.inc':\n return [8 => 2, 11 => 2, 14 => 2, 17 => 2, 21 => 6, 27 => 1, 30 => 1, 37 => 2, 39 => 2, 43 => 1, 49 => 1, 50 => 1, 53 => 1, 54 => 1, 59 => 4, 62 => 1, 63 => 1, 64 => 1, 66 => 1, 69 => 1, 74 => 1, 77 => 1, 82 => 2, 86 => 2, 91 => 1, 95 => 1, 101 => 2, 105 => 2, 110 => 1, 116 => 2];\n case 'ForLoopDeclarationUnitTest.js':\n return [6 => 2, 9 => 2, 12 => 2, 15 => 2, 19 => 6, 33 => 1, 36 => 1, 43 => 2, 45 => 2, 49 => 1, 55 => 1, 56 => 1, 59 => 1, 60 => 1, 65 => 4, 68 => 1, 69 => 1, 70 => 1, 72 => 1, 75 => 1, 80 => 1, 83 => 1, 88 => 2, 92 => 2, 97 => 1, 101 => 1, 107 => 2, 111 => 2, 116 => 1, 122 => 2];\n default:\n return [];\n }\n //end switch\n }", "public function validation_errors()\n\t{\n\t\t$errors = array();\n\n\t\tforeach ($this->validators as $fld=>$arr)\n\t\t{\n\t\t\tforeach ($arr as $vl)\n\t\t\t{\n\t\t\t\t$vl->page = $this;\n\n\t\t\t\tif (!$vl->validate($fld, $this->vars))\n\t\t\t\t{\n\t\t\t\t\t$errors[$fld] = $vl->error_message($fld, $this->vars);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $errors;\n\t}", "public function getErrors()\n {\n return $this->processerrors;\n }", "public function errors()\n\t{\n\t\treturn $this->_errors['errors'];\n\t}", "public function errors()\n\t{\n\t\treturn $this->_errors['errors'];\n\t}", "public function getErrors () : array {\n\t\treturn $this->errors;\n\t}", "public function getErrors(): array\n {\n $errors = [];\n\n /** @var string $name @var HashSet $messages */\n foreach ($this->errors as $name => $messages) {\n $errors[$name] = [];\n foreach ($messages as $message) {\n $errors[$name][] = $message;\n }\n }\n\n return $errors;\n }", "public function errors() {\n\t\treturn $this->errs;\n\t}", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrorList($testFile='')\r\n {\r\n switch ($testFile) {\r\n\t case 'ClassDeclarationUnitTest.inc':\r\n\t \treturn array(2 => 1);\r\n\t case 'ClassDeclarationUnitTest.2.inc':\r\n\t \treturn array(4 => 1);\r\n\t case 'ClassDeclarationUnitTest.3.inc':\r\n\t \treturn array(3 => 1);\t\r\n\t case 'ClassDeclarationUnitTest.4.inc':\r\n\t \treturn array(3 => 1);\r\n\t \tcase 'ClassDeclarationUnitTest.5.inc':\r\n\t \treturn array(7 => 1);\r\n\t case 'ClassDeclarationUnitTest.6.inc':\r\n\t \treturn array(2 => 1);\r\n\t case 'ClassDeclarationUnitTest.7.inc':\r\n\t \treturn array(2 => 1);\r\n\t case 'ClassDeclarationUnitTest.8.inc':\r\n\t \treturn array(5 => 1);\r\n\t case 'ClassDeclarationUnitTest.9.inc':\r\n\t \treturn array(4=> 1);\r\n\t case 'ClassDeclarationUnitTest.12.inc':\r\n\t \treturn array(4 => 1);\r\n\t case 'ClassDeclarationUnitTest.14.inc':\r\n\t \treturn array(2 => 1);\r\n\t case 'ClassDeclarationUnitTest.15.inc':\r\n\t \treturn array(2 => 1);\r\n\t case 'ClassDeclarationUnitTest.17.inc':\r\n\t \treturn array(2 => 1);\r\n\t case 'ClassDeclarationUnitTest.18.inc':\r\n\t \treturn array(2 => 1);\t\t\t\t\r\n\t default:\r\n\t return array();\r\n\t break;\r\n } \t\r\n }", "public function errors()\n {\n // return new \\ArrayList($this->errorList.values());\n }", "public function errors() {\r\n\t\treturn $this->_errors;\r\n\t}", "public function getErrors() : array;", "public function getErrorMessages() {\n\t\t$errorMessages = '';\n\t\tforeach ($this->errorMessages as $index => $error) {\n\t\t\t$errorMessages .= \"[Error:\" . $index . '] ' . $error . \"\\n<br />\";\n\t\t}\n\t\treturn $errorMessages;\n\t}", "public function get_list_errors()\n\t{\n\t\treturn $this->errors;\n\t}", "public function getErrors() : array\n {\n return $this->errors;\n }", "public function errors()\n\t{\n\t\treturn $this->_errors;\n\t}", "public function errorCount()\n\t{\n\t\treturn count($this->errors);\n\t}", "public function getErrorList($testFile = 'ScopeIndentUnitTest.inc')\n {\n if ($testFile === 'ScopeIndentUnitTest.1.js') {\n return [6 => 1, 14 => 1, 21 => 1, 30 => 1, 32 => 1, 33 => 1, 34 => 1, 39 => 1, 42 => 1, 59 => 1, 60 => 1, 75 => 1, 120 => 1, 121 => 1, 122 => 1, 123 => 1, 141 => 1, 142 => 1, 155 => 1, 156 => 1, 168 => 1, 184 => 1];\n }\n //end if\n if ($testFile === 'ScopeIndentUnitTest.3.inc') {\n return [6 => 1, 7 => 1, 10 => 1];\n }\n if ($testFile === 'ScopeIndentUnitTest.4.inc') {\n return [];\n }\n return [7 => 1, 10 => 1, 13 => 1, 17 => 1, 20 => 1, 24 => 1, 25 => 1, 27 => 1, 28 => 1, 29 => 1, 30 => 1, 58 => 1, 123 => 1, 224 => 1, 225 => 1, 279 => 1, 280 => 1, 281 => 1, 282 => 1, 283 => 1, 284 => 1, 285 => 1, 286 => 1, 336 => 1, 349 => 1, 380 => 1, 386 => 1, 387 => 1, 388 => 1, 389 => 1, 390 => 1, 397 => 1, 419 => 1, 420 => 1, 465 => 1, 467 => 1, 472 => 1, 473 => 1, 474 => 1, 496 => 1, 498 => 1, 500 => 1, 524 => 1, 526 => 1, 544 => 1, 545 => 1, 546 => 1, 639 => 1, 660 => 1, 662 => 1, 802 => 1, 803 => 1, 823 => 1, 858 => 1, 879 => 1, 1163 => 1, 1197 => 1, 1198 => 1, 1259 => 1, 1264 => 1, 1265 => 1, 1266 => 1, 1269 => 1, 1272 => 1, 1273 => 1, 1274 => 1, 1275 => 1, 1276 => 1, 1277 => 1, 1280 => 1, 1281 => 1, 1282 => 1, 1284 => 1, 1285 => 1, 1288 => 1, 1289 => 1, 1290 => 1, 1292 => 1, 1293 => 1, 1310 => 1, 1312 => 1, 1327 => 1, 1328 => 1, 1329 => 1, 1330 => 1, 1331 => 1, 1332 => 1, 1335 => 1, 1340 => 1, 1342 => 1, 1345 => 1, 1488 => 1, 1489 => 1, 1500 => 1, 1503 => 1, 1518 => 1, 1520 => 1, 1527 => 1, 1529 => 1, 1530 => 1, 1590 => 1, 1591 => 1, 1592 => 1, 1593 => 1];\n }", "public function errors()\n\t{\n\t\treturn $this->errors;\n\t}", "public function errors()\n\t{\n\t\treturn $this->errors;\n\t}", "public function getErrorList(): array\n {\n return $this->errorList;\n }", "public function getAllerrors() {\n return $this->errors;\n }", "public function getError()\n {\n $errors = self::$errors;\n self::$errors = array();\n return $errors;\n }", "public function get_errors($Light = false) {\n if ($Light) {\n foreach (self::$Errors as $Key => $Value) {\n self::$Errors[$Key][3] = '';\n }\n }\n return self::$Errors;\n }", "public function getErrorMessages()\n {\n $translator = Mage::helper('importexport');\n $messages = array();\n\n foreach ($this->_errors as $errorCode => $errorRows) {\n if (isset($this->_messageTemplates[$errorCode])) {\n $errorCode = $translator->__($this->_messageTemplates[$errorCode]);\n }\n foreach ($errorRows as $errorRowData) {\n $key = $errorRowData[1] ? sprintf($errorCode, $errorRowData[1]) : $errorCode;\n $messages[$key][] = $errorRowData[0];\n }\n }\n return $messages;\n }", "public function getErrorCount();", "public function errors() {\n return $this->_errors;\n }", "public function errors() {\n $Errors = array();\n foreach ($this->__fields() as $field) {\n $E = $this->$field->errorsList();\n if ($E) $Errors[$field] = $E;\n }\n return $Errors;\n }", "public function getErrors()\r\n\t{\r\n\t\treturn $this->errors;\r\n\t}", "function getErrors() {\n global $totalErrorsOnPage;\n $totalErrors = \"\";\n\n foreach ($totalErrorsOnPage as $error) { //Go through each error and make it into one string on multiple lines\n $totalErrors = $totalErrors . \"\\n\" . trim($error);\n }\n if (strlen($totalErrors) > 0) { //Remove the extra \\n on the front\n return trim(substr($totalErrors, 1));\n }\n return \"\";\n}", "public function errors()\n {\n return $this->errors;\n }", "public function errors()\n {\n return $this->errors;\n }", "public function errors()\n {\n return $this->errors;\n }", "public function errors()\n {\n return $this->getRules()->getMessageBag()->all();\n }", "public function getErrors() {\r\n\t\treturn $this->errors;\r\n\t}", "private function readErrors()\n {\n $fh = fopen($this->logdir.\"hermes.log\", \"r\");\n if($fh == FALSE)\n return;\n if(flock($fh, LOCK_EX))\n {\n $line = fgets($fh);\n while($line != FALSE)\n {\n $pair = split(' ', $line);\n $this->errors[$pair[0]] = $pair[1]; //undefined offset whatever lol\n $line = fgets($fh);\n }\n flock($fh, LOCK_UN);\n }\n fclose($fh);\n }", "public function getErrors()\n\t{\n\t\treturn $this->_errors;\n\t}", "static public function getErrors()\n\t{\n\t\treturn static::$aErrors;\n\t}", "public function getErrors()\n\t\t{\n\t\t\treturn $this->errors;\n\t\t}", "public function get_error_objects() {\n return $this->errors;\n }", "public function getErrors()\n\t{\n\t\treturn $this->errors;\n\t}", "public function getErrors()\n\t{\n\t\treturn $this->errors;\n\t}", "public function getErrors()\n\t{\n\t\treturn $this->errors;\n\t}", "public function getErrors()\n\t{\n\t\treturn $this->errors;\n\t}", "public function getErrors()\n\t{\n\t\treturn $this->errors;\n\t}", "function get_errors(){\r\n\t\t$errors = array();\r\n\r\n\t\tforeach($this->feeds as $feed){\r\n\t\t\tif($feed->error()) $errors[] = $feed->get_feed_id();\r\n\t\t}\r\n\r\n\t\treturn $errors;\r\n\t}", "public function get_errors($Light = false) {\n\t\tif ($Light) {\n\t\t\tforeach ($this->Errors as $Key => $Value) {\n\t\t\t\t$this->Errors[$Key][3] = '';\n\t\t\t}\n\t\t}\n\t\treturn $this->Errors;\n\t}", "public function getErrors(): array\n {\n return $this->errorBucket;\n }", "public function getErrors() {\n\t\treturn $this->errors;\n\t}", "static function showLines($errfile, $errline) {\n\t\t$lines = file($errfile);\n\t\t$offset = $errline-10;\n\t\t$lines = array_slice($lines, $offset, 16);\n\t\techo '<pre>';\n\t\t$offset++;\n\t\tforeach($lines as $line) {\n\t\t\t$line = htmlentities($line);\n\t\t\tif ($offset == $errline) {\n\t\t\t\techo \"<span>$offset</span> <span class=\\\"error\\\">$line</span>\";\n\t\t\t} else {\n\t\t\t\techo \"<span>$offset</span> $line\";\n\t\t\t}\n\t\t\t$offset++;\n\t\t}\n\t\techo '</pre>';\t\t\n\t}", "public function getError(): array\n {\n return $this->errorMessages;\n }", "public function errors()\n {\n $_output = '';\n foreach ($this->errors as $error)\n {\n $errorLang = $this->lang->line($error) ? $this->lang->line($error) : '##' . $error . '##';\n $_output .= $this->error_start_delimiter . $errorLang . $this->error_end_delimiter;\n }\n\n return $_output;\n }", "public function getErrors(){\r\n return $this->_errors['error'];\r\n }", "public function getErrors() {\n return $this->_errors;\n }" ]
[ "0.7633277", "0.73337495", "0.7272207", "0.6981461", "0.69379115", "0.6921507", "0.6912529", "0.6908259", "0.68823206", "0.68724495", "0.6795629", "0.6748919", "0.67395264", "0.6725019", "0.6708239", "0.6605295", "0.65925217", "0.6514959", "0.64788556", "0.6412835", "0.63948876", "0.63940996", "0.63939506", "0.63752", "0.63612294", "0.63612294", "0.63612294", "0.63612294", "0.6349868", "0.6319129", "0.6318945", "0.63076025", "0.62968975", "0.6296488", "0.6249988", "0.6241025", "0.6241025", "0.6241025", "0.6240972", "0.6239151", "0.62300533", "0.6217862", "0.621372", "0.621372", "0.6205844", "0.6200465", "0.6198201", "0.61980987", "0.61980987", "0.61980987", "0.61980987", "0.61980987", "0.61980987", "0.61980987", "0.6185251", "0.61821055", "0.61714536", "0.6167284", "0.6165231", "0.61648077", "0.6164439", "0.6140841", "0.6130975", "0.6119707", "0.6113103", "0.6113103", "0.6112607", "0.6111018", "0.6105967", "0.6103327", "0.6093178", "0.6084615", "0.6081494", "0.60772645", "0.6067747", "0.60661894", "0.6056772", "0.6056772", "0.6056772", "0.60525817", "0.6044471", "0.6030794", "0.6024913", "0.6019969", "0.6013759", "0.60124534", "0.6010396", "0.6010396", "0.6010396", "0.6010396", "0.6010396", "0.6007279", "0.6005472", "0.6004044", "0.5993183", "0.5992986", "0.59912133", "0.598375", "0.5983646", "0.59834087" ]
0.7015604
3
Add your modelspecific methods here. This file will not be overriden by gtc except you force it.
public static function model($className = __CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function model();", "abstract protected function model();", "protected abstract function model();", "abstract public function model();", "abstract public function model();", "abstract public function model();", "abstract public function model();", "abstract function model();", "abstract function model();", "abstract function model();", "abstract function model();", "protected function setup_models()\n\t{\n\t}", "function miguel_MCourse() \r\n {\t\r\n $this->base_Model();\r\n }", "public abstract function model();", "public static function preModel(){\n\t\t\n\t}", "protected function tableModel()\n {\n }", "abstract protected function getModelClass();", "abstract protected function getModel();", "public function model();", "public function model();", "abstract protected function getModelAttributes();", "function __construct() {\r\n parent::Model();\r\n }", "function miguel_mMain()\r\n {\t\r\n\t\t$this->base_Model();\r\n }", "protected function getDefaultModelObject() : void\n {\n return;\n }", "function Page_Model()\n\t{\n\t\tparent::__construct();\n\t}", "protected function _beforeSave() {\n\t}", "abstract protected function getDefaultModel();", "function __construc()\r\n\t{\r\n\t\tparent::Model();\r\n\t}", "function Usermodel()\r\n {\r\n parent::Model();\r\n }", "function __construct()\r\n {\r\n parent::Model();\r\n }", "abstract function getModel();", "public function model()\n {\n //use model\n }", "function __construct() {\n // Call the Model constructor \n parent::__construct();\n }", "abstract public function getModel();", "protected function processModel(\\MUtil_Model_ModelAbstract $model)\n { }", "private static function model()\n {\n $files = ['ORM_', 'CRUD', 'ORM', 'Collection', 'ModelArray'];\n $folder = static::$root.'MVC/Model'.'/';\n\n self::call($files, $folder);\n\n $files = ['ForeingKeyMethodException', 'ColumnNotEmptyException', 'ManyPrimaryKeysException', 'TableNotFoundException', 'ModelNotFoundException', 'PrimaryKeyNotFoundException'];\n $folder = static::$root.'MVC/Model/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "function __construct()\n {\n parent::Model();\n }", "public static function __init() {\r\n\t\t// $validates properites to this Page model. $_schema can never be changed,\r\n\t\t// only extended. $validates can be changed and extended, but if default\r\n\t\t// field rules are left out, they will be used from this parent model.\r\n\t\t$class = __CLASS__;\r\n\t\t\r\n\t\t// Use the library Page model's validation rules combined with the default (but the library gets priority) this way the default rules can be changed, but if left out will still be used (to help make things nicer)\r\n\t\t// $class::_object()->validates = static::_object()->validates += $class::_object()->validates;\r\n\t\t// Now going to just override... The way things were extended, it somehow picked up validates property from other models...weird.\r\n\t\t// All this means is care needs to be taken, there's not many validation rules by default anyway...\r\n\t\t// TODO: Think about this, because it may not be a bad thing it gives more control to a developer but it \r\n\t\t$class::_object()->validates = static::_object()->validates;\r\n\t\t\r\n\t\t// Same for the search schema, the library gets priority, but combine them.\r\n\t\t$class::_object()->search_schema = static::_object()->search_schema += $class::_object()->search_schema;\r\n\t\t\r\n\t\t// Replace any set display name for context\r\n\t\t$class::_object()->display_name = static::_object()->display_name;\r\n \r\n // Append access rules as models get extended, giving the last model priority\r\n // ie. Main model has a rule for index to restrict all. Extended model says to allow all. Everyone is allowed.\r\n // ie. Main model has no index rule. Extended model says to allow all. Everyone is allowed.\r\n // ie. Main model has an index rule to restrict all. Extended model has no index rule. Everyone is restricted.\r\n // ie. This model has an index rule to restirct all. Main model has a rule to allow all. Extended model has an index rule to restrict all. Everyone is restricted.\r\n // TODO: look into doing this for other properties...\r\n\t\t$class::_object()->access = static::_object()->access += $class::_object()->access;\r\n\t\t\r\n\t\t// Replace any action_redirect properties (holds redirects for each core Minerva controller method, ie. create, update, and delete)\r\n\t\t$class::_object()->action_redirects = static::_object()->action_redirects;\r\n\t\t\r\n\t\t// Replace any URL field and URL separator values\r\n\t\t$class::_object()->url_field = static::_object()->url_field;\r\n\t\t$class::_object()->url_separator = static::_object()->url_separator;\r\n\t\t\r\n\t\t// Set the library name for this model\r\n\t\t$model_path = Libraries::path(get_class(static::_object()));\r\n\t\t$full_lib_path = LITHIUM_APP_PATH . DIRECTORY_SEPARATOR . 'libraries' . DIRECTORY_SEPARATOR;\r\n\t\t$library_string = substr($model_path, strlen($full_lib_path));\r\n\t\t$library_pieces = explode('/', $library_string);\r\n\t\t$class::_object()->library_name = $library_pieces[0];\r\n\t\t\r\n parent::__init();\r\n }", "function before_save(){}", "final protected function beforeSave(ModelBase $model): void {\n }", "abstract protected function getModelName(): string;", "public function createModel()\n {\n }", "abstract protected function setModel(): String;", "public static function __init() {\r\n\t\t$class = __CLASS__;\r\n\t\t\r\n\t\t// Use the library Page model's validation rules combined with the default (but the library gets priority) this way the default rules can be changed, but if left out will still be used (to help make things nicer)\r\n\t\t// $class::_object()->validates = static::_object()->validates += $class::_object()->validates;\r\n\t\t// Now going to just override... The way things were extended, it somehow picked up validates property from other models...weird.\r\n\t\t// All this means is care needs to be taken, there's not many validation rules by default anyway...\r\n\t\t// TODO: Think about this, because it may not be a bad thing it gives more control to a developer but it \r\n\t\t$class::_object()->validates = static::_object()->validates;\r\n\t\t\r\n\t\t// Same for the search schema, the library gets priority, but combine them.\r\n\t\t$class::_object()->search_schema = static::_object()->search_schema += $class::_object()->search_schema;\r\n\t\t\r\n\t\t// Replace any set display name for context\r\n\t\t$class::_object()->display_name = static::_object()->display_name;\r\n\t\t\r\n\t\t// Replace any action_redirect properties (holds redirects for each core Minerva controller method, ie. create, update, and delete)\r\n\t\t$class::_object()->action_redirects = static::_object()->action_redirects;\r\n\t\t\r\n\t\t// Replace any URL field and URL separator values\r\n\t\t$class::_object()->url_field = static::_object()->url_field;\r\n\t\t$class::_object()->url_separator = static::_object()->url_separator;\r\n\t\t\r\n\t\t// Set the library name for this model\r\n\t\t$model_path = Libraries::path(get_class(static::_object()));\r\n\t\t$full_lib_path = LITHIUM_APP_PATH . DIRECTORY_SEPARATOR . 'libraries' . DIRECTORY_SEPARATOR;\r\n\t\t$library_string = substr($model_path, strlen($full_lib_path));\r\n\t\t$library_pieces = explode('/', $library_string);\r\n\t\t$class::_object()->library_name = $library_pieces[0];\r\n\t\t\r\n\t\t// Set the document type (for manualy set document_type values)\r\n\t\t$class::_object()->document_type = static::_object()->document_type;\r\n\t\t\r\n parent::__init();\r\n }", "protected function beforeSave() {\n\n }", "protected function addModelConfigs()\n {\n // TODO: add model configs\n }", "abstract public function getBookingModel(): string;", "public function before_save() {\n \n }", "public function before_save() {\n \n }", "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "function\t__construct()\t{\n\t\t\t\t/* contrutor da classe pai */\n\t\t\t\tparent::__construct();\n\t\t\t\t/* abaixo deverão ser carregados helpers, libraries e models utilizados\n\t\t\t\t\t por este model */\n\t\t}", "function payment_model()\n\t{\n\t\tparent::__construct();\t\t\n\t}", "public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n }", "public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n }", "public function overrideAppModel() {\n\t\t$appModel = file_get_contents(FORUM_PLUGIN . 'Model/ForumAppModel.php');\n\t\t$appModel = preg_replace('/public \\$tablePrefix = \\'(.*?)\\';/', 'public \\$tablePrefix = \\'' . $this->install['prefix'] . '\\';', $appModel);\n\t\t$appModel = preg_replace('/public \\$useDbConfig = \\'(.*?)\\';/', 'public \\$useDbConfig = \\'' . $this->install['database'] . '\\';', $appModel);\n\n\t\tfile_put_contents(FORUM_PLUGIN . 'Model/ForumAppModel.php', $appModel);\n\t}", "function addModel(){\n\t\n\t}", "function Classes_model() {\r\n parent::Model();\r\n }", "function Site()\n\t\t{\n\t\t\tparent::CI_Model(); \n\t\t}", "abstract protected function updateModel();", "function AccountsModel() {\n\t\tparent::__construct(); \n }", "public function models();", "protected function get_model_name()\n {\n }", "public function populateModels()\n {\n }", "public function beforeSave(Model $model) {\n\t\tparent::beforeSave($model);\n }", "protected function GetModel() {\n\t\treturn parent::GetModel();\n\t}", "protected function beforeSaveInDB(){}", "public function beforeSave(){\n\t}", "public function __construct() {\n parent::__construct();\n $this->load->model(array('dt_diag_klsf_model','dt_obat_model','dt_pasien_model','dt_pemeriksaan_model','dt_proses_model','dt_thpan_model'));\n }", "protected function onBeforeSave()\n {\n }", "public function custom()\n\t{\n\t}", "abstract public function getTicketModel(): string;", "protected function add_common_attribute_classes(){\n\t\tparent::add_common_attribute_classes();\n\t}", "function model()\n {\n return \"\";\n }", "public function __construct()\n {\n parent::Model();\n\n }", "protected function hook_beforeSave(){}", "function Logging_model()\r\n {\r\n parent::Model();\r\n }", "public function __construct() {\n // Call the Model constructor\n parent::__construct();\n }", "function __construct(){\n\t\tparent::__construct();\n\t\t\t$this->set_model();\n\t}", "protected function on_new_model_generated(Jelly_Model $model)\n\t{\n\t\t// Nothing here but subclasses can implement...\n\t}", "public function __construct(Model $model) {\n parent::__construct($model);\n \n }", "protected function preUpdate( ModelInterface &$model ) {\n }", "function post_model_init($from_cache = FALSE)\n {\n }", "function post_model_init($from_cache = FALSE)\n\t{\n\t}", "private function before_custom_save()\n\t\t{\n\t\t\t$fields = self::$db->table_info($this->table_name);\n\t\t\tforeach($fields AS $field)\n\t\t\t{\n\t\t\t\tif(!strlen($this->$field['name'])) {\n\t\t\t\t\t$this->$field['name'] = 'NULL';\n\t\t\t\t}\n\t\t\t\tif(method_exists($this, 'preSave_'.$field['name'])) {\n\t\t\t\t\t$this->{'preSave_'.$field['name']}($field);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function Home()\n\t\t{\n\t\t\tparent::CI_Model(); \n\t\t}", "public function __construct()\n {\n parent::__construct();\n //Codeigniter : Write Less Do More\n $this->load->model(array('Dbs'));\n\n\n }", "public function testSetNativeModel()\n {\n $this->todo('stub');\n }", "abstract protected function prepareModels();", "public function beforeSave() {\n $this->name = $this->title_name;\n// $this->created_version = parent::CREATED_VERSION_PARAMOUNT;//TODO:!\n $this->create_type = parent::CREATE_TYPE_REGULAR;\n\n $this->due_date = $this->client_due_date;\n\n return parent::beforeSave();\n }", "function Borrow_model()\n\t{\n\t\tparent::Query();\n\t}", "public function __construct() {\n parent::__construct();\n $this->load->model(\"modelo_base\");\n \n }", "public function _set_model_fields(){\n // set fields only when they have not been set for this object\n if($this->_fields_loaded===FALSE){\n\n foreach ($this->_meta() as $meta) {\n\n $this->{$meta->name} = '';\n }\n }\n }", "public function __construct()\n {\n // All of my models are like this\n parent::__construct(get_class($this));\n // Calling methods to get the relevant data\n $this->generateNewsData();\n $this->generateAnalyticsData();\n $this->generatePostsData();\n }", "public function __construct($model) \n {\n parent::__construct($model);\n }", "public function __construct() {\n//to make connection db \n//when you make object from class baseModel Or any child(extends) Class\n\n parent::__construct();\n $this->connecToDB();\n }", "protected function beforeSave()\n {\n return;\n }", "protected function cliModelInit()\n {\n }", "abstract public function getPrimaryModel();" ]
[ "0.65740985", "0.65740985", "0.63966787", "0.62842137", "0.62842137", "0.62842137", "0.62842137", "0.62300676", "0.62300676", "0.62300676", "0.62300676", "0.62129664", "0.62062055", "0.61146456", "0.606547", "0.6053379", "0.59576136", "0.59538496", "0.5953466", "0.5953466", "0.5939444", "0.5908143", "0.5874584", "0.58711684", "0.5864319", "0.5848483", "0.584149", "0.5831423", "0.5828876", "0.58273435", "0.5819294", "0.5806212", "0.57744324", "0.57722914", "0.5767694", "0.57519287", "0.5739925", "0.57320094", "0.5729905", "0.57294", "0.57279617", "0.5723586", "0.57167906", "0.57143974", "0.5712095", "0.57023203", "0.5683811", "0.56783664", "0.56783664", "0.5677992", "0.5677992", "0.5677992", "0.5677992", "0.56758183", "0.5671233", "0.56673944", "0.56673944", "0.5654191", "0.5653515", "0.5644852", "0.56373453", "0.56306595", "0.56289494", "0.56123865", "0.56092", "0.56035006", "0.5601484", "0.5592004", "0.55911666", "0.5586287", "0.5583832", "0.55778867", "0.5561348", "0.55575955", "0.5552188", "0.5542614", "0.5532569", "0.5489077", "0.5483924", "0.54838115", "0.54748315", "0.5471295", "0.5466909", "0.54640603", "0.54592204", "0.5438609", "0.5422424", "0.54184014", "0.54066324", "0.5402007", "0.5394114", "0.5385157", "0.53832227", "0.5379556", "0.5375663", "0.53738385", "0.5366677", "0.53650403", "0.53627264", "0.535711", "0.5357104" ]
0.0
-1
set system company id
public function save($runValidation = true, $attributes = NULL) { if ($this->isNewRecord && Yii::app()->sysCompany->getActiveCompany()){ $this->ccmp_sys_ccmp_id = Yii::app()->sysCompany->getActiveCompany(); } return parent::save($runValidation,$attributes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCompany($company_nid);", "function updatePricingCompanyId($params) {\n $sql = __query_update_pricing_company_id($params);\n execute_sql($sql);\n}", "public function setCompanyIdAttribute($input)\n {\n $this->attributes['company_id'] = $input ? $input : null;\n }", "protected function _setCompanyCode($storeId=null) {\n\t\t$config = Mage::getSingleton('avatax/config');\n\t\t$this->_request->setCompanyCode($config->getCompanyCode($storeId));\n\t}", "public function setCompany(string $company): void\n {\n $this->_company = $company;\n }", "public function getCompanyId()\n {\n return array_get($this->config, 'company_id');\n }", "public function getCompanyId()\n {\n return $this->company_id;\n }", "public function getCompanyId()\n {\n return $this->company_id;\n }", "function getCompanyId() {\n return $this->getAdditionalProperty('company_id');\n }", "public function setYomiCompany($value)\n {\n $this->setProperty(\"YomiCompany\", $value, true);\n }", "function administercompany(){\n $this->auth(SUPPORT_ADM_LEVEL);\n $company_id = $this->uri->segment(3);\n if($company_id > 0){\n $session_data = array('administer_company_id' => $company_id);\n $this->session->set_userdata($session_data);\n $this->companyadmin();\n }else{\n //todo nice error\n echo \"error, company id = $company_id\";\n }\n }", "public function getCompanyId()\n\t{\n\t\t$column = self::COL_COMPANY_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "function setSiteId($value)\n {\n $this->_props['SiteId'] = $value;\n }", "public function setCompany($company)\n {\n $this->company = $company;\n }", "public function setCompanyId($company_id)\n\t\t{\n\t\t\t$this->company_id = $company_id;\n\t\t}", "function get_company_id()\n {\n $subdomain_arr = explode('.', $_SERVER['HTTP_HOST'], 2); //creates the various parts\n $subdomain_name = $subdomain_arr[0];\n\n $company = DB::table('admin')->where('username',$subdomain_name)->get();\n \n if(count($company) > 0){\n return $company[0]->company_id;\n }\n else\n {\n return 0;\n }\n }", "public function setclient_id($value);", "private function getUserCompanyId(){\n $id = NULL;\n\n if(isset($this->user_id) && !empty($this->user_id)){\n $query = $this->companies->get_company_id($this->user_id);\n if(!is_null($query)){\n $id = $query->id;\n }\n }\n return $id;\n }", "public function getCompanyCode(){\n\t\t/* return company code */\n\t\treturn $this->_intCompanyCode;\n\t}", "public function setCustomerCompany($companyName = '') {\n $company = array(\n 'x_company'=>$this->truncateChars($companyName, 50),\n );\n $this->NVP = array_merge($this->NVP, $company); \n }", "public function setClientData($company) {\n // Make file name like: {client-name}-invoice-exported-31-Mar-2015-{uniqid}\n $this->invoiceHistory->file_name = $company->getClientName() . '-invoice-exported-' . date(\"d-M-Y\") . '-' . uniqid();\n // Set client_id column\n $this->invoiceHistory->client_id = $company->id;\n \n // Save client data\n return $this->invoiceHistory->save(false);\n }", "private function add_company()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator();\n \t$company = $serviceManager->get('PM/Model/Companies');\n \t\n \t$result = $company->getCompanyById($this->pk);\t\n \tif($result)\n \t{\n \t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['id']));\n \t\t$this->add_breadcrumb($company_url, $result['name'], TRUE);\n \t} \t\n }", "function update_company($company_id, $company_name, $email, $address, $city, $state, $zip, $phone, $fax, $sic_code, $sic_description, $website,$mc_number,$dot_number) {\n\t\t $str = \"UPDATE company SET company_name = '$company_name', email_address = '$email', address = '$address', city = '$city', state = '$state', zipcode = '$zip', phone_number = '$phone', fax_number = '$fax', sic_code = $sic_code, sic_description = '$sic_description', web_address = '$website',mc_number = '$mc_number', dot_number = '$dot_number' WHERE Comany_ID = $company_id\"; \n\t\tif($req = mysqli_query($link,$str)) return true;\n\t\telse return false;\n\t}", "public function setCompany($quote, $company)\n {\n $quote->getBillingAddress()->setCompany($company)->save();\n $quote->getShippingAddress()->setCompany($company)->save();\n $customerAddressId = $quote->getBillingAddress()->getCustomerAddressId();\n if ($customerAddressId) {\n $customerAddress = Mage::getModel('customer/address')->load($customerAddressId);\n $customerAddress->setCompany($company)->save();\n }\n }", "public function setCompany($quote, $company)\n {\n $quote->getBillingAddress()->setCompany($company)->save();\n $quote->getShippingAddress()->setCompany($company)->save();\n $customerAddressId = $quote->getBillingAddress()->getCustomerAddressId();\n if ($customerAddressId) {\n $customerAddress = Mage::getModel('customer/address')->load($customerAddressId);\n $customerAddress->setCompany($company)->save();\n }\n }", "private function _setCompanyConfig(){\n\t\t/* Loading the company configuration file */\n\t\t$this->config->load('company'.DIRECTORY_SEPARATOR.$this->getCompanyCode().DIRECTORY_SEPARATOR.'config');\n\t}", "protected function companyCode(){\n return config('company.code');\n }", "function getCostAccountCompany(){\n\treturn campo('config_system','id','1','cost_account_company');\n}", "function getCostAccountCompany(){\n\treturn campo('config_system','id','1','cost_account_company');\n}", "public function getCompanyId()\n {\n if ($this->userContext->getUserId()\n && $this->userContext->getUserType() == UserContextInterface::USER_TYPE_CUSTOMER\n ) {\n try {\n $customer = $this->customerRepository->getById($this->userContext->getUserId());\n\n if ($customer->getExtensionAttributes()\n && $customer->getExtensionAttributes()->getCompanyAttributes()\n && $customer->getExtensionAttributes()->getCompanyAttributes()->getCompanyId()\n ) {\n return $customer->getExtensionAttributes()->getCompanyAttributes()->getCompanyId();\n }\n } catch (\\Magento\\Framework\\Exception\\NoSuchEntityException $e) {\n return null;\n }\n }\n return null;\n }", "protected function setOrganization() {}", "public function setCompteIdAttribute($input)\n {\n $this->attributes['compte_id'] = $input ? $input : null;\n }", "public function changeCompany()\r\n\t{\t\t\t\r\n\t\t$data = array('company_name' => $this->input->post('company_name'));\t\r\n\t\t\t\t//die('update');\r\n\t\t$where = array('id' => $this->session->userdata('emp_id'));\t\t\t\t\r\n\t\t$iStatus = $this->My_model->updateRecord('lang_company',$data,$where);\r\n\t\techo $iStatus;\t\t\r\n\t}", "function eZCompanyType( $id = -1 )\r\n {\r\n if ( $id != -1 )\r\n {\r\n $this->ID = $id;\r\n $this->get( $this->ID );\r\n }\r\n }", "function getCostPersonalTagCompany(){\n\treturn campo('config_system','id','1','cost_company_personal_tag');\n}", "function getCostPersonalTagCompany(){\n\treturn campo('config_system','id','1','cost_company_personal_tag');\n}", "public function getCompanyNameIdentifier()\n {\n return 'company_name';\n }", "public function setCompanyShort($company)\n\t\t{\n\t\t\t$this->company = $company;\n\t\t}", "public function getFormId() {\n return 'pmmi_personify_company_settings';\n }", "public function setClientSystemId($clientSystemId) {\n $this->_clientSystemId = $clientSystemId;\n }", "function SetId($value) { $this->id=$value; }", "public function update_data_company($data, $id)\n {\n $this->db->update('social_media_empresa', $data, array('socialEmpresaId'=>$id));\n }", "public function __construct($company) {\n $this->company = $company;\n }", "public function setComunaIdAttribute($input)\n {\n $this->attributes['comuna_id'] = $input ? $input : null;\n }", "public function setCompanyNameAttribute($value) {\n\t\t$this->company_name = $value;\n\t}", "public function __construct($company)\n {\n $this->company = $company;\n }", "function setDevId($value)\n {\n $this->_props['DevId'] = $value;\n }", "public function getEmployCompanyId() {\n\t\treturn ($this->employCompanyId);\n\t}", "public function setNameAndId() {}", "public function afterSave() {\n if(!$this->ccucUserCompanies){\n $ccuc = new CcucUserCompany;\n $ccuc->ccuc_person_id = $this->pprs_id;\n $ccuc->ccuc_ccmp_id = Yii::app()->sysCompany->getActiveCompany();\n $ccuc->ccuc_status = CcucUserCompany::CCUC_STATUS_SYS;\n $ccuc->save();\n\n //person company\n if(!empty($this->pprs_ccmp_id)){\n $ccuc = new CcucUserCompany;\n $ccuc->ccuc_person_id = $this->pprs_id;\n $ccuc->ccuc_ccmp_id = $this->pprs_ccmp_id;\n $ccuc->ccuc_status = CcucUserCompany::CCUC_STATUS_PERSON;\n $ccuc->save();\n }\n }\n parent::afterSave();\n }", "public function contact_company()\n {\n }", "public function storeCompany(GenericCompany $company);", "public static function getCompanyAuth()\n {\n $userData = User::where('TenantId', Auth::user()->TenantId)->where('IsAdmin', 1)->first();\n return $userData->id;\n }", "public function setLoginId(): void\n {\n }", "public static function syncCompanies()\n {\n $ak_company_users = self::find()->where(['space_id' => NULL])->all();\n\n foreach($ak_company_users as $ak_company_user)\n {\n $ak_copmany = new Companies();\n $ak_copmany = Json::decode($ak_copmany->view($ak_company_user->akc_id));\n\n if(!empty($ak_copmany))\n {\n $space = Space::findOne(['name' => $ak_copmany['data']['name']]);\n\n if(!empty($space))\n {\n // AkauntingCompany::linkSpace($space->id, $ak_copmany['data']['id']);\n\n $ak_company_user->space_id = $space->id;\n if(!$ak_company_user->save())\n {\n Yii::error('Error in saving record in ' . self::tableName() . ' ' . __CLASS__ . ' ' . __FUNCTION__ . \"\\n\\n\" . Json::encode($ak_company_user->getErrors()));\n }\n }\n }\n }\n }", "public function setId($id) {\n $this->vendorData[\"ID_VENDOR\"] = (int)$id;\n }", "public function actionUpdate($id)\n { \n\t\t$model = $this->findModel($id);\n\n\t if(!CommonFunctions::lockThisRecord($id,$model,'bpr_person_company','company_id_pk'))\n\t {\n\t\t\t$session = Yii::$app->session;\n\t\t\t$session->set('LockError', 'This record is locked for you, because another user is accessing same record.');\n\t\t\theader('Location:'.Yii::$app->homeUrl.\"personcompany/personcompany\");\n\t\t\texit;\n\t }\n\t\t\n\t\t$request = Yii::$app->request;\n\t\t$gmp_company_name = trim($request->post('gmp_company_name',''));\n\t\t$gmp_address1 = trim($request->post('gmp_address1',''));\n\t\t$gmp_address2 = trim($request->post('gmp_address2',''));\n\t\t$gmp_city_id_fk = intval($request->post('gmp_city_id_fk',0));\n\t\t$gmp_state_id_fk = intval($request->post('gmp_state_id_fk',0));\n\t\t$gmp_country_id_fk = intval($request->post('gmp_country_id_fk',0));\n\t\t$gmp_pobox = trim($request->post('gmp_pobox',''));\n\t\t$gmp_zip_pincode = trim($request->post('gmp_zip_pincode',''));\n\t\t\n\t\t$gmp_company_id_pk = intval($request->post('gmp_company_id_pk',0));\n\t\t\n\t\tif(isset($_POST) && strlen($gmp_company_name) > 0){\n\t\t\n\t\t\t$command = Yii::$app->db->createCommand()\n\t\t\t\t->update('bpr_person_company', [\n\t\t\t\t'name' => trim($gmp_company_name),\n\t\t\t\t'address1' => trim($gmp_address1),\n\t\t\t\t'address2' => trim($gmp_address2),\n\t\t\t\t'city_id_fk' => $gmp_city_id_fk,\n\t\t\t\t'state_id_fk' => $gmp_state_id_fk,\n\t\t\t\t'country_id_fk' => $gmp_country_id_fk,\n\t\t\t\t'pobox'=> trim($gmp_pobox),\n\t\t\t\t'zip_postalcode' => trim($gmp_zip_pincode),\n\t\t\t\t'addedby_person_id_fk' => Yii::$app->user->id,\n\t\t\t\t'created_datetime' => date(\"Y-m-d H:i:s\"),\t\t\t\t\n\t\t\t],\"company_id_pk='\".$id.\"'\")->execute();\n\t\t\tActivityLog::logUserActivity(Yii::$app->user->id,Yii::$app->params['audit_log_screen_name']['PersonCompany'],Yii::$app->params['audit_log_action']['UPDATE'],'Updated person company',\"\");\n\t\t\treturn $this->redirect(['index']);\n\t\t}else{\n\t\t\t\t\t\t\n\t\t\treturn $this->render('update', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n }", "private function setCompanyData($companyResult)\n\t{\n\t\t$_SESSION['company_id'] = $companyResult->id;\n\t\t$_SESSION['company_name'] = $companyResult->name;\n\t}", "function _set_id( $idGrupo ){\n \t\t$this->idGrupo = $idGrupo;\n }", "public function update($conn, ApplicantsCompany $obj)\n {\n }", "public function updateWithCompanyId(Request $request)\n {\n $device = Device::where('unique_id', '=', $request->get('unique_id'))->first();\n\n $msg = \"\";\n if(!$device){\n $msg = \"Sorry! This device does not exist\";\n }\n else if($device->company_id != 0){\n $msg = \"Sorry! This device does not belong to you\";\n }\n else{\n $device->company_id = $request->get('company_id');\n\n\n\n $device->created_by = auth::user()->id;\n\n try{\n\n $device->save();\n $msg = \"Successfully Added\";\n\n }\n catch (\\Exception $ex){\n $msg = $ex;\n }\n }\n return response()->json($msg);\n\n\n\n }", "public function updateStockId();", "public function findCompanyId($name) {\n return $this->findRecordId('company', array(\n 'name' => $name\n ));\n }", "function showCompany() {\n\t\t\t\t\t$company = Partner::find_by_name(params(0));\n\n\t\t\t\t\t$editForm = new h2o('views/editCompany.html');\n\t\t\t\t\techo $editForm->render(compact('company'));\n\t\t\t\t}", "public function register_company() {\n \n $this->data['building'] = $this->company_management_model->get_building_listing();\n $this->output('company_management/register_company');\n }", "public function setShippingCompany($companyName = '') {\n $company = array(\n 'x_ship_to_company'=>$this->truncateChars($companyName, 50),\n );\n $this->NVP = array_merge($this->NVP, $company); \n }", "public function setID($value) {\r\n //if (!is_numeric($value)) die(\"setID() only accepts a numerical ID value\");\r\n $this->id = $value;\r\n }", "public function byCompanyId($companyId);", "function setSyncIdDev()\n {\n }", "public function setConfigId($input) {\n\t\tif(!Validator::UnsignedNumber($input)) throw new Exception(lang('error_131'));\n\t\tif(!$this->_configurationExists($input)) throw new Exception(lang('error_131'));\n\t\t$this->_configId = $input;\n\t}", "function setIdentifier($val) {\n $this->identifier = $this->updateDB('identifier', $val);\n }", "public function saveCompanySetting($obj)\n {\n $obj['created_by'] = $this->requester->getUserId();\n $obj['created_at'] = Carbon::now();\n\n DB::table('company_settings')->insert($obj);\n }", "function setId($value) {\n $this->_id = intval($value);\n }", "public function setServiceCenterIdAttribute($input)\n {\n $this->attributes['service_center_id'] = $input ? $input : null;\n }", "public function setCompany($companyIdAsString) {\n $this->companyId = $companyIdAsString;\n return $this;\n }", "function set_customer_id($blog_id, $customer_id) {\n\t\tglobal $wpdb;\n\t\t\n\t\t$exists = $wpdb->get_var( $wpdb->prepare(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites_stripe_customers WHERE blog_id = %d\", $blog_id) );\t\t\t\t\t\t\t\t\t\n\t\tif ( $exists ) {\t\t\t\n\t\t\t$wpdb->query($wpdb->prepare(\"UPDATE {$wpdb->base_prefix}pro_sites_stripe_customers SET customer_id = %s WHERE blog_id = %d\", $customer_id, $blog_id) );\t\t\t\t\t\t\t\n\t\t} else {\t\t\t\n\t\t\t$wpdb->query($wpdb->prepare(\"INSERT INTO {$wpdb->base_prefix}pro_sites_stripe_customers(blog_id, customer_id) VALUES (%d, %s)\", $blog_id, $customer_id) );\t\t\t\t\t\t\t\n\t\t}\n\t}", "public function setIdByServiceId($serviceid) {\n\t\t$q = mysql_safequery('SELECT packageid FROM tblhosting WHERE id = ' . (int) $serviceid);\n\t\t$row = mysql_fetch_assoc($q);\n\t\t$this->id = (int) $row['packageid'];\n\t}", "public function setCompanyName($companyName)\r\n {\r\n $this->companyName = strip_tags($companyName);\r\n }", "public function setDoorId()\n {\n if(isset($_GET['doorId']))\n {\n echo 'const doorId = '.$_GET['doorId'].';';\n }\n else\n {\n $config = new Config;\n echo 'const doorId = '.$config->defaultDoor.';';\n }\n }", "function set_id( $id ){\n\t\t$this->id = $id;\n\t\t// this is add request. so number is 0\n\t\tif( $this->id == $this->id_base ){\n\t\t\t$this->number = 0;\n\t\t\t$this->is_new = true;\n\t\t}\n\t\t// parse number\n\t\telse{\n\t\t\t$this->number = str_replace($this->id_base.'-', '', $this->id);\n\n\t\t\t// load instance data\n\t\t\t$this->instance = jcf_field_settings_get( $this->id );\n\t\t\tif( !empty($this->instance) ){\n\t\t\t\t$this->slug = $this->instance['slug'];\n\t\t\t}\n\t\t}\n\t}", "function setIdHistorialCambio($idHistorialCambio) {\r\n $this->idHistorialCambio = $idHistorialCambio;\r\n }", "private function getCompanyStore(array $user_data)\n {\n $company_id = 0;\n\n if ($this->is_ultimate) {\n $company_id = $this->forced_company_id;\n } elseif ($user_data['user_type'] === UserTypes::VENDOR && !empty($user_data['company_id'])) {\n $company_id = (int) $user_data['company_id'];\n }\n\n return $company_id;\n }", "public function setIdClientMoral($idClientMoral)\n {\n $this->idClientMoral = $idClientMoral;\n }", "public function setId($valor){\n\t\t\t$this->id = $valor;\n\t\t}", "public function setId()\n {\n throw new \\RuntimeException('It is not possible to set job id, you must create a new job');\n }", "function setCountryId( $value )\n {\n $this->CountryID = $value;\n }", "public function setCompany(\\App\\Domain\\Model\\Company $object) : void\n {\n $this->setRef('from__company_id__to__table__companies__columns__id', $object, 'products');\n }", "public function getYomiCompany()\n {\n return $this->getProperty(\"YomiCompany\");\n }", "public function edit_vehicle_companies(){\n\t\t$parameters['where'] = array('company_id !=' => 0);\n\t\t$parameters['select'] = '*';\n\t\t$data['companies'] = $this->MY_Model->getRows('company',$parameters);\n\t\techo json_encode($data);\n\t\t// print_r($data);\n\t}", "public function onSetCompany($compId)\n {\n $users = DB::table('users')->select('*')->where('comp_id', $compId)->get();\n $companies = DB::table('companies')->where('company_id', $compId)->get();\n return view('company_setting', compact(['companies', 'compId', 'users']));\n }", "public function setCompanyId($company_id)\n\t{\n\t\t$column = self::COL_COMPANY_ID;\n\t\t$this->$column = $company_id;\n\n\t\treturn $this;\n\t}", "function editCompany() {\n\t\t\t\t\tif ($_POST['updateDelete'] == 'update') {\n\n\t\t\t\t\t\t/* params(0) represents the apprentice name passed in via the URL */\n\t\t\t\t\t\t$company = Partner::find_by_name(params(0));\n\t\t\t\t\t\t\n\t\t\t\t\t\t$company->update_attributes(array('name'\t\t => $_POST['inputName'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'city'\t\t => $_POST['inputCity'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'unix_linux'\t => $_POST['inputUnixLinux'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'sql'\t\t\t => $_POST['inputSql'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'git'\t\t\t => $_POST['inputGit'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'wordpress'\t => $_POST['inputWordpress'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'drupal'\t\t => $_POST['inputDrupal'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'python'\t\t => $_POST['inputPython'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'svn'\t\t\t => $_POST['inputSVN'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'objective_c'\t => $_POST['inputObjectiveC'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'ruby_rails'\t => $_POST['inputRuby'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'c_plusplus'\t => $_POST['inputCPlusPlus'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'dot_net'\t\t => $_POST['inputNet'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'php'\t\t\t => $_POST['inputPHP'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'html_css'\t => $_POST['inputHtmlCss'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'java'\t\t => $_POST['inputJava'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'javascript'\t => $_POST['inputJavascript'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'comments'\t => $_POST['inputComments'])\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if ($_POST['updateDelete'] == 'delete') {\n\t\t\t\t\t\t$company = Partner::find_by_name(params(0));\n\t\t\t\t\t\t$company->delete();\n\t\t\t\t\t}\n\n\t\t\t\t\t$success = new h2o('views/happySuccess.html');\n\t\t\t\t\techo $success->render();\n\t\t\t\t}", "public static function getSiteId(){\n return 1;\n\n }", "public function setIdCalendario($idCalendario){\n $this->idCalendario = $idCalendario;\n }", "public function setIduser($value)\n {\n $this->iduser = $value;\n }", "public function saving(Model $model)\n\t{\n\t\t$tenantIdColumn = $model->getTenantIdColumn();\n\t\t$model->$tenantIdColumn = Helpers::currentScope('user')->id;\n\t}", "function\tupdate_company_categories($company_id,$company_categories)\n{\n\t//INSERT INTO entrp_company_categories (`id`, `companyid`, `category`) VALUES (NULL, '1', 'xcvxc');\n\t$qry1=\"SELECT id FROM entrp_company_categories WHERE companyid=\".$company_id.\"\";\n\t$res=getData($qry1);\n $count_res=mysqli_num_rows($res);\n if($count_res>0)\n {\n \t$qry2=\"UPDATE entrp_company_categories SET category='\".$company_categories.\"' WHERE companyid=\".$company_id.\" \";\n\t\tsetData($qry2); \n }\n else\n {\n \t$qry3=\"INSERT INTO entrp_company_categories ( companyid, category) VALUES (\".$company_id.\", '\".$company_categories.\"')\";\n\t\tsetData($qry3); \n }\n}", "public function set_id($setid){\n $this->id = $setid;\n }", "public function setId()\n {\n $apiKey = new ApiKey;\n $apiKey->setId();\n $this->id = $apiKey->getId();\n }", "function updateMyCompanyDetails()\n{\n\n\t$data= array();\n\t$company_categories=array();\n\t$session_values=get_user_session();\n\t$my_session_id\t= $session_values['id'];\n\t$role\t\t\t=\tgetUserDesignationFromCompUserRelation($my_session_id);\n\t\n\t$companyName\t\t=validate_input($_POST['companyName']);\n\t$companyDesc\t\t=validate_input($_POST['companyDesc']);\n\t$email\t\t\t\t=validate_input($_POST['email']);\n\t$website\t\t\t\t=validate_input($_POST['website']);\n\t$mobile\t\t\t\t=validate_input($_POST['mobile']);\n\t$telephone\t\t\t=validate_input($_POST['tel']);\n\t$fax\t\t\t\t\t=validate_input($_POST['fax']);\n\t\n\t\n\tif(!empty($_POST['categories']))\n\t{\n\t\t$count_category=count($_POST['categories']);\n\t\tfor($i=0;$i<$count_category;$i++)\t\n\t\t{\n\t\t\t$company_categories[$i]=$_POST['categories'][$i]['text'];\n\t\t}\n\t}\t\n\t$companyID=getCompanyIDFromCompUserRelation($my_session_id);\n\t$qry=\"UPDATE company_profiles SET company_name='\".$companyName.\"', description='\".$companyDesc.\"', email='\".$email.\"',website='\".$website.\"',mobile='\".$mobile.\"'\n\t\t\t,telephone='\".$telephone.\"',fax='\".$fax.\"' \n\t\t\tWHERE id=\".$companyID.\" \";\n if(setData($qry))\n {\n \t//updation successful\n \t$data=fetch_company_information_from_userid($my_session_id);\n \t\n \t$company_id=$data['id'];\n\t\t$category_json= json_encode($company_categories);\n\t\t//delete_company_categories($company_id);\n\t\tupdate_company_categories($company_id,$category_json); \t\n \t$data['categories']\t= fetch_company_categories($company_id);\n \t\n \t$data['followers']\t= entrp_company_follows($company_id);\n \t\n\t\t$data['success'] \t\t= true;\n\t\t$data['msg'] \t\t\t= 'Company Profile updated.'; \n }\n else\n {\n \t$data['success'] \t\t= false;\n\t\t$data['msg'] \t\t\t= 'Something went wrong. Profile not updated.'; \n }\n\treturn $data;\n\n}" ]
[ "0.6709161", "0.6544029", "0.6527315", "0.64362013", "0.63712233", "0.6333566", "0.6325846", "0.6325846", "0.61410975", "0.6114779", "0.60698014", "0.60034114", "0.6000746", "0.5986199", "0.5885805", "0.58470154", "0.5805946", "0.57775337", "0.5703043", "0.56549144", "0.5607906", "0.5589414", "0.5524616", "0.5519195", "0.5519195", "0.5501739", "0.5501337", "0.5456214", "0.5456214", "0.5447333", "0.5400849", "0.5387301", "0.53863025", "0.53804415", "0.5375412", "0.5375412", "0.53628105", "0.5354086", "0.53395677", "0.5327329", "0.5319414", "0.5300564", "0.5295068", "0.5283702", "0.52782303", "0.526674", "0.5265098", "0.52610016", "0.5240881", "0.52348685", "0.523181", "0.52234614", "0.52195346", "0.5205286", "0.5197415", "0.5195187", "0.5186464", "0.51661706", "0.51596224", "0.5155243", "0.5152531", "0.5150349", "0.51334566", "0.51300305", "0.5116551", "0.5114294", "0.5106081", "0.5104751", "0.5093848", "0.5089606", "0.5086518", "0.5065119", "0.50648814", "0.50634384", "0.50580126", "0.5047621", "0.50342333", "0.50311923", "0.50301623", "0.50300854", "0.5027383", "0.50262624", "0.5012362", "0.500569", "0.50018907", "0.5001011", "0.49838522", "0.49832273", "0.49691063", "0.49687174", "0.49660176", "0.49615088", "0.49578425", "0.49542892", "0.49460992", "0.49437767", "0.49277624", "0.4925269", "0.49214184", "0.49203628" ]
0.5033352
77
spec defined access to companies
protected function beforeFind() { $uc = false; //get defined user positions in companies $sql = " SELECT DISTINCT cucp_id FROM AuthItem ai INNER JOIN cucp_user_company_position ON ai.name = cucp_role INNER JOIN AuthAssignment aa ON ai.name = aa.itemname WHERE aa.userid = ".Yii::app()->user->id." "; $user_def_company_positions = Yii::app()->db->createCommand($sql)->queryAll(); $criteria = false; if($user_def_company_positions){ $udcp = array(); foreach($user_def_company_positions as $v){ $udcp[] = $v['cucp_id']; } //get companies, where is user positions $sql = " SELECT DISTINCT ccuc_ccmp_id FROM ccuc_user_company WHERE ccuc_cucp_id in (".implode(',',$udcp).") AND ccuc_person_id = ".Yii::app()->getModule('user')->user()->profile->person_id." AND ccuc_status = '".CcucUserCompany::CCUC_STATUS_PERSON."' "; $user_companies = Yii::app()->db->createCommand($sql)->queryAll(); //add to criteria user companies $uc = array(); $uc[] = 0; //for avoiding error if empty user company list foreach($user_companies as $v){ $uc[] = $v['ccuc_ccmp_id']; } } if(Yii::app()->getModule('d2company')->access){ $user_roles = Authassignment::model()->getUserRoles(Yii::app()->user->id); foreach(Yii::app()->getModule('d2company')->access as $access){ //validate roles $intersect = array_intersect($user_roles,$access['roles']); if(empty($intersect)){ continue; } //get group companies $sql = " SELECT ccxg_ccmp_id FROM ccxg_company_x_group WHERE ccxg_ccgr_id IN (".implode(',',$access['ccgr_id']).")"; $ccmp_id_list = Yii::app()->db->createCommand($sql)->queryAll(); if(!empty($ccmp_id_list)){ if($uc === false){ $uc = array(); $uc[] = 0; //for avoiding error if empty user company list } foreach($ccmp_id_list as $row){ $uc[] = $row['ccxg_ccmp_id']; } } } } if($uc !== false){ if(!$criteria){ $criteria = new CDbCriteria; } $criteria->compare('ccmp_id', $uc); } //filter by syscomapny if( Yii::app()->hasComponent('sysCompany') && Yii::app()->sysCompany->getActiveCompany()){ if(!$criteria){ $criteria = new CDbCriteria; } $criteria->compare('ccmp_sys_ccmp_id', Yii::app()->sysCompany->getActiveCompany()); } if($criteria){ $this->dbCriteria->mergeWith($criteria); } parent::beforeFind(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCompany() {}", "public function getCompany();", "public function getAuthorcompany() {}", "public function getCompanyWithUsers();", "public function testCompanyApi()\n {\n $this->call('GET', '/companies');\n\n $this->assertResponseStatus(200);\n $this->seeJson();\n $this->seeJsonStructure([\n 'data' => ['*' => [\n 'id',\n 'name',\n 'uniqueSymbol',\n 'exchangeSymbol',\n 'lastKnowSharePrice',\n 'snowFlakeScoreTotal',\n ]],\n 'meta' => [\n 'last_page',\n 'to',\n 'total',\n 'per_page',\n 'current_page',\n 'links',\n ],\n ]);\n }", "public function get_company() \n {\n return $this->company;\n }", "public function authorize()\n {\n // to do update verification and rules on the rights to create a company\n return true;\n }", "public function contact_company()\n {\n }", "function showCompany() {\n\t\t\t\t\t$company = Partner::find_by_name(params(0));\n\n\t\t\t\t\t$editForm = new h2o('views/editCompany.html');\n\t\t\t\t\techo $editForm->render(compact('company'));\n\t\t\t\t}", "public static function createAuthenticationCompany(){\n\t\t$continent_id = ModelTestHelper::createContinent();\n\t\t$currency_id = ModelTestHelper::createCurrency();\n\t\t$country_id = ModelTestHelper::createCountry($continent_id, $currency_id);\n\t\t$company_id = ModelTestHelper::createCompany($country_id, $currency_id, \"AUTH\");\n\t\t$company = Company::find($company_id);\n\t\treturn $company;\n\t}", "public function getCompany()\n {\n return $this->company;\n }", "function Companies(){\n\t\t\t\treturn $this->companies;\n\t\t\t}", "public function company()\n {\n return $this->business();\n }", "public function show(Company $company)\n {\n\n }", "function get_companies_list() {\n return get_view_data('org_list');\n}", "public function company(array $options);", "public function getOperatingCompany()\n {\n return $this->operatingCompany;\n }", "public function __construct($company) {\n $this->company = $company;\n }", "public function __construct($company)\n {\n $this->company = $company;\n }", "public function company()\n {\n return $this->author()->company();\n }", "public function __construct(Company $company)\n {\n $this->companies= $company;\n\n }", "public function setVisibilityForAllCompanies();", "public function getOwnedByAttribute()\n {\n return $this->site->company;\n }", "abstract protected function getCompanyInfo($companyId);", "public function getCompanyWithUniqueLogins();", "public function testGetAllCompanies()\n {\n $response = $this->get('/api/v1/company');\n\n $response->assertStatus(200);\n }", "public function authorize()\n {\n return session('company');\n }", "public function getCompany() {\n return Companies::findById($this->company_id);\n }", "public function index(Company $company)\n {\n //\n }", "public function index(Company $company)\n {\n //\n }", "public function companyIsActive()\n {\n return true ;\n }", "public function index()\n {\n //\n $company = Company::where('representative_id',Auth::user()->id)->get();\n return CompanyResource::collection($company);\n }", "public function show(Company $company)\n {\n //\n }", "public function show(Company $company)\n {\n //\n }", "public function show(Company $company)\n {\n //\n }", "public function show(Company $company)\n {\n //\n }", "public function show(Company $company)\n {\n //\n }", "public function show(Company $company)\n {\n //\n }", "public function show(Company $company)\n {\n //\n }", "function findCompanyWebsite($company_name) \n {\n \n }", "public function testGetCreditcardofallcompanyAdmin()\n {\n $client = static::createClient();\n $client->request('GET', '/api/creditcardsofallcompany', [], [], ['HTTP_CONTENT_TYPE' => 'application/json','HTTP_AUTH-TOKEN' => 'keyAdmin']);\n $response = $client->getResponse();\n $content = $response->getContent();\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertJson($content);\n $arrayContent = json_decode($content, true);\n $this->assertCount(9, $arrayContent);\n }", "public function getCompany()\n {\n return $this->getParameter('billingCompany');\n }", "public function testCompanyApiPagination()\n {\n $params = [\n 'page' => 2,\n 'limit' => 10,\n ];\n $this->call('GET', '/companies', $params);\n\n $this->seeStatusCode(200);\n $this->seeJsonContains([\n \"from\" => 11,\n \"current_page\" => 2,\n \"per_page\" => 10,\n ]);\n }", "public function companies(): Collection\n {\n return Company::all();\n }", "public function getProdCompany()\n {\n return $this->prod_company;\n }", "function getCostAccountCompany(){\n\treturn campo('config_system','id','1','cost_account_company');\n}", "function getCostAccountCompany(){\n\treturn campo('config_system','id','1','cost_account_company');\n}", "public function getCompaniesCrmSearchUrl()\n {\n $type = 'company' ;\n return $this->getEntitiesCrmSearchUrl( $type ) ;\n }", "public function companyInfo()\n {\n $this->startBrokerSession();\n $user = null;\n\n// $userId = $this->getSessionData('sso_user');\n $companyId = $this->getSessionData('sso_company');\n\n if ($companyId) {\n $company = $this->getCompanyInfo($companyId);\n if (!$company) return $this->fail(\"company not found\", 500); // Shouldn't happen\n }\n\n header('Content-type: application/json; charset=UTF-8');\n echo json_encode($company);\n }", "private function add_company()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator();\n \t$company = $serviceManager->get('PM/Model/Companies');\n \t\n \t$result = $company->getCompanyById($this->pk);\t\n \tif($result)\n \t{\n \t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['id']));\n \t\t$this->add_breadcrumb($company_url, $result['name'], TRUE);\n \t} \t\n }", "public function is_needed() {\n\t\treturn $this->context->site_represents === 'company';\n\t}", "public function testIsApplicable()\n {\n $paymentMethod = $this->createMock(\\Magento\\Payment\\Model\\MethodInterface::class);\n $quote = $this->createPartialMock(\\Magento\\Quote\\Model\\Quote::class, ['getCustomerId']);\n $quote->expects($this->once())->method('getCustomerId')->willReturn(1);\n $paymentMethod->expects($this->once())->method('getCode')->willReturn('paymentCode');\n $this->assertTrue($this->hasCompanyPermission->isApplicable($paymentMethod, $quote));\n }", "public function byCompanyId($companyId);", "public function show(Companies $companies)\n {\n //\n }", "public function company()\n {\n return $this->belongsTo(CompanyProxy::modelClass(), 'company_id');\n }", "function index() {\n if($this->request->isApiCall()) {\n $this->serveData(Companies::findByIds($this->logged_user->visibleCompanyIds()), 'companies');\n } else {\n $page = (integer) $this->request->get('page');\n if($page < 1) {\n $page = 1;\n } // if\n \n list($companies, $pagination) = Companies::paginateActive($this->logged_user, $page, 30);\n \n $this->smarty->assign(array(\n 'companies' => $companies,\n 'pagination' => $pagination,\n ));\n } // if\n }", "public function getCompanyEmployees();", "static function lookupOwner()\n {\n static $cache = false;\n if ($cache !== false) {\n return clone($cache); // no updating this object..\n }\n \n $enum = DB_DataObject::Factory('core_enum')->lookup('COMPTYPE', 'OWNER' );\n $companies = DB_DataObject::factory('core_company');\n $companies->comptype_id = $enum;\n if ($companies->find(true)) {\n $cache = clone($companies);\n return $companies;\n }\n return false;\n }", "public function getYomiCompany()\n {\n return $this->getProperty(\"YomiCompany\");\n }", "public function testCompanyConfigurationsStatusesGet()\n {\n\n }", "public function testGetCoreCompany()\n {\n $responseEmpty = new Canddi\\Service\\Lookup\\Response\\Company([]);\n $this->assertNull($responseEmpty->getCoreCompany());\n\n // Now lets test that all the data gets into the core properly\n $testData = $this->_getTestData();\n $response = new Canddi\\Service\\Lookup\\Response\\Company($testData);\n $coreCompany = $response->getCoreCompany();\n\n $testDataSocial = $testData['SocialMedia'];\n $testDataAddress = $testData['Location']['Address'];\n $this->assertInstanceOf(Canddi_Core_Company::class, $coreCompany);\n $this->assertEquals($testData['CompanyName'], $coreCompany->getCompanyName());\n $this->assertEquals($testData['Description'], $coreCompany->getCompanyDescription());\n $this->assertEquals($testDataSocial['Facebook']['url'], $coreCompany->getCompanyFacebook());\n $this->assertEquals($testDataSocial['Twitter']['url'], $coreCompany->getCompanyTwitter());\n $this->assertEquals($testDataSocial['LinkedIn']['url'], $coreCompany->getCompanyLinkedIn());\n $this->assertEquals($testData['Logo'], $coreCompany->getCompanyLogo());\n $this->assertEquals($testData['Industry'], $coreCompany->getCompanyIndustry());\n $this->assertEquals($testData['WebsiteURL'], $coreCompany->getCompanyWebsite());\n $this->assertEquals($testData['PhoneNumbers'], $coreCompany->getCompanyPhones());\n $this->assertEquals($testData['EmailAddresses'], $coreCompany->getCompanyEmails());\n $this->assertEquals($testDataAddress['Line1'], $coreCompany->getCompanyAddrLine1());\n $this->assertEquals($testDataAddress['Line2'], $coreCompany->getCompanyAddrLine2());\n $this->assertEquals($testDataAddress['City'], $coreCompany->getCompanyAddrCity());\n $this->assertEquals($testDataAddress['PostalCode'], $coreCompany->getCompanyAddrPostalCode());\n $this->assertEquals($testData['IndustrySector'], $coreCompany->getIndustrySector());\n $this->assertEquals($testData['IndustryGroup'], $coreCompany->getIndustryGroup());\n $this->assertEquals($testData['IndustrySIC'], $coreCompany->getIndustrySIC());\n $this->assertEquals($testData['IndustryNAICS'], $coreCompany->getIndustryNAICS());\n $this->assertEquals($testData['Tags'], $coreCompany->getTags());\n $this->assertEquals($testData['AlexaRank'], $coreCompany->getAlexaRank());\n $this->assertEquals($testData['Employees'], $coreCompany->getNoEmployees());\n $this->assertEquals($testData['EmployeeRange'], $coreCompany->getEmployeeRange());\n $this->assertEquals($testData['MarketCap'], $coreCompany->getMarketCap());\n $this->assertEquals($testData['Raised'], $coreCompany->getRaised());\n $this->assertEquals($testData['Revenue'], $coreCompany->getRevenue());\n $this->assertEquals($testData['RevenueEstimated'], $coreCompany->getRevenueRange());\n }", "protected function setOrganization() {}", "public function indexCompany()\n {\n return TimelineResource::collection(\n $this->user->company->timeline()\n ->with(['pictures', 'videos', 'geo', 'links'])\n ->paginate(request()->get('per_page') ?? 15)->appends(request()->all())\n );\n }", "public function showListCompanyPage()\n {\n $company = new Company();\n if ($this->checkSession()) {\n $data[] = array();\n $data['navbar'] = view('includes.navbar');\n\n $data['listCompany'] = $company->showListCompany(Session::get('univID'), \"\", \"asc\", \"\", \"\");\n $data['listCompanyIndustry'] = $company->showIndustry(Session::get('univID'));\n // $data['totalCompany'] = $company->GetTotalCompany();\n return view('pages.companylist')->with('data', $data);\n }\n return redirect(\"/login\");\n }", "function company()\n{\n return auth()->user()->company;\n}", "public function testUsingApi_GettingData()\n\t{\n\t\t/** @var BrexSdk\\API\\Team\\Client $oTeamClient; */\n\t\t$oSdkHost=new BrexSdk\\SDKHost;\n\t\t$oSdkHost->addHttpPlugin($this->oHostPlugin);\n\n\t\t$oTeamClient=$oSdkHost->setAuthKey($this->BREX_TOKEN)\n\t\t\t\t->setupTeamClient();\n\n\n\t\t/** @var BrexSdk\\API\\Team\\Model\\CompanyResponse */\n\t\t$aCompanyDetails=$oTeamClient->getCompany();\n\n\t\t$sCompanyName=$aCompanyDetails->getLegalName();\n\t\tcodecept_debug($sCompanyName);\n\t\t$this->assertStringContainsString('Nxs Systems Staging 01', $sCompanyName);\n\t}", "public function __construct(Company $company)\n {\n $this->company = $company;\n }", "public function sitemapCompanies(){\n $links = array();\n $models = ORM::factory('CatalogCompany')->where('enable','=','1')->find_all();\n foreach($models as $model)\n $links[] = $model->getUri();\n return $links;\n }", "public function allCompanies()\n {\n\n $companies = $this->core_companies;\n\n $items = [];\n foreach ($companies as $company) {\n\n $companyItem = new CompanyCardItem();\n $companyItem->id = $company->id;\n $companyItem->name = $company->name;\n //$companyItem->amount = $catalog->amount;\n $companyItem->title = $company->title;\n if (\\Dash\\count($company->photo))\n $companyItem->image = '/uploaz/eyuf/UserCompany/photo/' . $company->id . '/' . $company->photo[0];\n $companyItem->url = ZUrl::to([\n 'customer/markets/show',\n 'id' => $company->id\n ]);\n $companyItem->distence = \"12km\";\n //$companyItem->image = $catalog->price;\n //$companyItem->price = $catalog->price_old;\n //$companyItem->currency = \"$\";\n //$companyItem->cart_amount = 0;\n\n $items[] = $companyItem;\n }\n return $items;\n }", "public function company(Request $request)\n {\n $company_customer = Company::find($request->id);\n return response()->json($company_customer);\n }", "private function isCompanyRequired()\n {\n return $this->eavConfig->getAttribute('customer_address', 'company')->getIsRequired();\n }", "private function getCompanyCredits ()\n {\n $content = Utils::getContent($this->_strUrl . \"companycredits\");\n\n // get the uls order\n $order = [];\n foreach ($content->find(\"#company_credits_content h4\") as $title) {\n $order[] = $title->attr(\"id\");\n }\n\n $ulList = $content->find(\"#company_credits_content ul\");\n\n // get the uls order\n foreach ($order as $pos => $type)\n {\n foreach ($ulList[$pos]->find(\"li\") as $company)\n {\n $a = $company->find(\"a\")[0];\n\n preg_match(\"/\\/company\\/co([0-9]+)\\?/\", $a->attr(\"href\"), $matches);\n\n if (isset($matches[1]) && !empty($matches[1]))\n {\n $basicData = [\n \"id\" => $matches[1],\n \"name\" => $a->text(),\n ];\n\n if ($type == \"distributors\")\n {\n // Hispano Foxfilms S.A.E. (2009) (Spain) (theatrical) => (2009) (Spain) (theatrical)\n $remainingText = str_replace($basicData[\"name\"], \"\", $company->text());\n\n preg_match(\"/\\(([0-9]{4})-?\\) \\(([A-Za-z0-9_.]+)\\) \\((?:theatrical|TV)\\)/\", $remainingText, $matches);\n\n if (!empty($matches)) {\n $basicData[\"year\"] = (int)$matches[1];\n $basicData[\"country\"] = $matches[2];\n $this->{$type}[] = $basicData;\n }\n } else {\n $this->{$type}[] = $basicData;\n }\n }\n }\n }\n }", "function __construct() {\n\t\t//upon initialize, also instaintiate new Company object\n \t$this->Company = new Company();\n }", "public function company() \n\t{\n\t\treturn $this->belongsTo('Company', 'object_id')->where('soft_deleted', 0);\n\t}", "public function company()\n {\n return $this->belongsTo(\\Fleetbase\\Models\\Company::class);\n }", "public function company()\n {\n return $this->belongsTo('App\\Company', 'comp_id');\n }", "public function company()\n {\n return $this->belongsTo('App\\Company', 'comp_id');\n }", "public function company()\n {\n return $this->belongsTo('App\\Company', 'comp_id');\n }", "public function companylist() {\r\n $companies = $this->model->getCompanies();\r\n return $this->view('company/companylist', $companies);\r\n }", "public function Company_Info_List(){\n /*\n $user = session('USER_ID'); // 获取已登录用户\n */\n // $user = 'c4b19072a79e4a6e81f06761f1e6bd2b';\n // $where = array('USER_ID' => $user);\n // if(!empty($keywords)){\n // $where['COMPANY_NAME'] = array('like',\"%$keywords%\");\n // }\n // if (!empty($start_date)) {\n // $where['CREATE_TIME'] = array('gt',$start_date);\n // }\n // if (!empty($end_date)) {\n // $where['CREATE_TIME'] = array('lt',$end_date);\n // }\n // $count = M('a_sys_user_attr_company_info')\n // -> where($where)\n // -> count();\n\n // $Page = new \\Think\\Page($count, $pagenum);// 实例化分页类 传入总记录数和每页显示的记录数($pagenum)\n\n // $show = $Page->show();// 分页显示输出\n\n // $list = M('a_sys_user_attr_company_info as info') // 查询公司信息表\n \t\t// -> field('COMPANYINFO_ID,COMPANY_NAME,CERT,COMPANY_AUTHENTICATION,SERVICE_LEVEL,COMPANY_NUM') // 需求字段\n \t\t// -> join('a_service_level as level on info.SERVICE_ID = level.SERVICE_ID') // 两表联查\n // ->limit($Page->firstRow.','.$Page->listRows) // 分页查询\n \t\t// -> where($where) \t\t// 查询条件\n \t\t// -> select();\n\n // // var_dump($list);die;\n \n // $this -> assign('show' , $show);\n // $this -> assign('list' , $list);\n $this -> display('list');\n }", "public function company()\n {\n return $this->belongsTo('App\\Rolesentry_company', 'rolesentry_companies_id');\n }", "public function getCompany()\n\t{\n\t\tif (!isset($this->_r_company)) {\n\t\t\t$filters = [];\n\t\t\tif(!is_null($v = $this->getCompanyId())){\n\t\t\t\t$filters['company_id'] = $v;\n\t\t\t}\n\t\t\tif (empty($filters)){\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t$m = new DYCompaniesControllerRealR();\n\t\t\t$this->_r_company = $m->getItem($filters);\n\t\t}\n\n\t\treturn $this->_r_company;\n\t}", "public function company()\n {\n \treturn $this->belongsTo(Company::class, 'company_id');\n }", "public function getCompanyId()\n {\n return $this->company_id;\n }", "public function getCompanyId()\n {\n return $this->company_id;\n }", "function getCompany($details) {\n $companyCtrl = new CompanyController();\n if(!isset($details['_id'])) {\n $companyCtrl->respond(true, 'Please set a valid college _id');\n } else {\n $companyCtrl->retrieve($details['_id']);\n }\n}", "public function show(Company $company)\n { \n $legalRep = LegalRepresentative::Join('company_representatives','company_representatives.representative_id','legal_representatives.id')\n ->where('company_representatives.company_id',$company->id)\n ->select('legal_representatives.name','legal_representatives.dui')->first(); \n\n /* $operators = new User();\n $operators->getUsers($company); */\n \n return Inertia::render('Company/Show',[\n 'company' => $company, \n 'legalRep' => $legalRep \n ]);\n }", "public function index()\n {\n $company = $this->repository->all();\n return $company;\n }", "public function actionGetCompanyInfo()\n {\n if (Yii::app()->request->isAjaxRequest && isset($_POST['comId'])) {\n $comId = intval($_POST['comId']);\n if ($comId > 0) {\n $company = Companies::model()->with('adreses', 'client')->findByPk($comId);\n $client = $company->client;\n $adress = $company->adreses[0];\n\n $condition = UsersClientList::getClientAdminCondition($client->Client_ID);\n $clientAdmins = UsersClientList::model()->find($condition);\n\n $adminPerson = '';\n if ($clientAdmins) {\n $clientAdmin = Users::model()->with('person')->findByPk($clientAdmins->User_ID);\n $adminPerson = $clientAdmin->person;\n }\n\n $lastDocument = W9::getCompanyW9Doc($client->Client_ID);\n\n $this->renderPartial('company_info_block', array(\n 'company' => $company,\n 'adress' => $adress,\n 'adminPerson' => $adminPerson,\n 'lastDocument' => $lastDocument,\n ));\n }\n }\n }", "public function setCompany($company)\n {\n $this->company = $company;\n }", "public function index()\n {\n return Company::all();\n }", "public function index()\n {\n return Company::all();\n }", "public function getCompanyAlias() \n\t{\n\t return $this->companyAlias;\n\t}", "function administercompany(){\n $this->auth(SUPPORT_ADM_LEVEL);\n $company_id = $this->uri->segment(3);\n if($company_id > 0){\n $session_data = array('administer_company_id' => $company_id);\n $this->session->set_userdata($session_data);\n $this->companyadmin();\n }else{\n //todo nice error\n echo \"error, company id = $company_id\";\n }\n }", "public function getUserLimiter(empresa $company);", "public function companyOfUser(){\n\n $company = Auth::user()->companies;\n $location = Location::where('id', Auth::user()->company_location)->get();\n \n foreach($company as $c){\n $c['locations'] = $location;\n }\n\n return $company;\n }", "public function show(Corporate $corporate)\n {\n //\n }", "public function list() {\n \n $companies = Companies::all();\n $companies->load('hasUserCompany'); \n // return response()->json($companies);\n\n return response()->json(['companies' => $companies]);\n }", "public function getAvailableCompanies()\n {\n return $this->createQuery('c')\n ->select('c.*')\n ->addSelect(\n \"(SELECT ROUND(AVG(r.rating), 2)\n FROM Companies_Model_Review r\n WHERE r.status = '\" . Companies_Model_Review::STATUS_PUBLISHED . \"'\n AND r.company_id = c.id) as rating\"\n )\n ->addSelect(\"(SELECT COUNT(rc.id)\n FROM Companies_Model_Review rc\n WHERE rc.status = '\" . Companies_Model_Review::STATUS_PUBLISHED . \"'\n AND rc.company_id = c.id) as review_count\")\n ->whereIn('c.status', Companies_Model_Company::getActiveStatuses())\n ->orderBy('rating DESC')\n ->execute();\n }", "public function get_company() {\n\t\t\treturn $this->belongsTo(Company::class);\n\t}" ]
[ "0.727157", "0.71387345", "0.65532583", "0.6453889", "0.63706774", "0.62487245", "0.61803764", "0.6175887", "0.6136584", "0.61032826", "0.60942334", "0.6091797", "0.60026443", "0.59647334", "0.5949286", "0.5944328", "0.591779", "0.5888538", "0.5877522", "0.5866599", "0.5848905", "0.5811094", "0.57891494", "0.57857996", "0.5781577", "0.57753", "0.57692146", "0.5757162", "0.5748128", "0.5748128", "0.57472146", "0.5740723", "0.5713432", "0.5713432", "0.5713432", "0.5713432", "0.5713432", "0.5713432", "0.5713432", "0.5711511", "0.5673368", "0.56708074", "0.5665447", "0.5625858", "0.56176186", "0.56081575", "0.56081575", "0.5607347", "0.56055176", "0.5594879", "0.557577", "0.5571867", "0.5567538", "0.55659735", "0.5564677", "0.5557227", "0.5534017", "0.5520347", "0.5507372", "0.5492091", "0.5486713", "0.5485198", "0.5480568", "0.546488", "0.5459546", "0.54504156", "0.54472077", "0.5444367", "0.5443661", "0.5442101", "0.5440889", "0.54329044", "0.5429674", "0.5427709", "0.5422633", "0.54198164", "0.54198164", "0.54198164", "0.54193324", "0.5410061", "0.5403002", "0.5400171", "0.53994435", "0.53958535", "0.53958535", "0.5393785", "0.53912365", "0.5385982", "0.5385213", "0.5380701", "0.53743285", "0.53743285", "0.53559446", "0.53533095", "0.534893", "0.5342435", "0.5339433", "0.53382677", "0.53305954", "0.5324428" ]
0.53404325
96
special search for company list. Main model:CcxgCompanyXGroup
public function searchForList($criteria = null) { if (is_null($criteria)) { $criteria = new CDbCriteria; } $criteria->select = "t.*,ccgr_name,ccxg_ccgr_id"; $criteria->compare('ccmp_id', $this->ccmp_id); $criteria->compare('ccmp_name', $this->ccmp_name, true); $criteria->compare('ccmp_ccnt_id', $this->ccmp_ccnt_id); $criteria->compare('ccmp_registrtion_no', $this->ccmp_registrtion_no, true); $criteria->compare('ccmp_vat_registrtion_no', $this->ccmp_vat_registrtion_no, true); $criteria->compare('ccmp_registration_date', $this->ccmp_registration_date); $criteria->compare('ccmp_registration_address', $this->ccmp_registration_address, true); $criteria->compare('ccmp_official_ccit_id', $this->ccmp_official_ccit_id); $criteria->compare('ccmp_official_address', $this->ccmp_official_address, true); $criteria->compare('ccmp_official_zip_code', $this->ccmp_official_zip_code, true); $criteria->compare('ccmp_office_ccit_id', $this->ccmp_office_ccit_id); $criteria->compare('ccmp_office_address', $this->ccmp_office_address, true); $criteria->compare('ccmp_office_zip_code', $this->ccmp_office_zip_code, true); $criteria->compare('ccmp_statuss', $this->ccmp_statuss); $criteria->compare('ccmp_description', $this->ccmp_description, true); $criteria->compare('ccmp_office_phone', $this->ccmp_office_phone, true); $criteria->compare('ccmp_office_email', $this->ccmp_office_email, true); $criteria->compare('ccmp_agreement_nr', $this->ccmp_agreement_nr, true); $criteria->compare('ccmp_agreement_date', $this->ccmp_agreement_date); $criteria->compare('ccmp_sys_ccmp_id', $this->ccmp_sys_ccmp_id); $criteria->compare('ccxg_ccgr_id', $this->ccxg_ccgr_id); $criteria->join = " LEFT OUTER JOIN ccxg_company_x_group ON ccxg_ccmp_id = ccmp_id LEFT OUTER JOIN ccgr_group ON ccxg_ccgr_id = ccgr_id "; return new CActiveDataProvider('CcmpCompany', array( 'criteria' => $criteria, 'sort'=>array('defaultOrder'=>'ccmp_name'), 'pagination'=>array('pageSize'=>50), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findcompanys() {\n $this->auth(SUPPORT_ADM_LEVEL);\n $search_word = $this->input->post('search');\n if($search_word == '-1'){ //initial listing\n $data['records'] = $this->m_company->getAll(40);\n } else { //regular search\n $data['records'] = $this->m_company->getByWildcard($search_word);\n }\n $data['search_word'] = $search_word;\n $this->load->view('/admin/support/v_companys_search_result', $data);\n }", "public function getCompaniesCrmSearchUrl()\n {\n $type = 'company' ;\n return $this->getEntitiesCrmSearchUrl( $type ) ;\n }", "function companys() {\n $this->auth(SUPPORT_ADM_LEVEL);\n $this->load->view('admin/support/v_list_companys');\n $data['records'] = $this->m_company->getAll();\n $data['search_word'] = -1;\n //$this->load->view('/admin/support/v_companys_search_result', $data);\n }", "private function _getCompanySelector()\n {\n $sSearch = getValue('q');\n if(empty($sSearch))\n return json_encode(array());\n\n $oDB = CDependency::getComponentByName('database');\n\n $sQuery = 'SELECT * FROM company WHERE status = 1 AND lower(company_name) LIKE '.$oDB->dbEscapeString('%'.strtolower($sSearch).'%').' ORDER BY company_name desc';\n $oDbResult = $oDB->ExecuteQuery($sQuery);\n $bRead = $oDbResult->readFirst();\n if(!$bRead)\n return json_encode(array());\n\n $asJsonData = array();\n while($bRead)\n {\n $asData['name'] = $oDbResult->getFieldValue('company_name');\n $asJsonData[] = json_encode($asData);\n $bRead = $oDbResult->readNext();\n }\n echo '['.implode(',', $asJsonData).']';\n }", "function searchCompanyCustomer($keyword='',$company='1',$type ='name',$sort = 'ASC',$orderby = 'id')\n {\n //profiling::\n $this->debug_methods_trail[] = __function__;\n\t\t$current_partner_branch = $this->session->userdata['partner_branch'];\n\t\t\n\t\t\n\t\t$additional_sql = '';\n\t\t//declare\n\t\tif($type == 'name'){\n\t\t\t\n\t\t\t\t$conditional_sql = \" AND a_customer.firstname LIKE '%{$keyword}%' OR a_customer.lastname LIKE '%{$keyword}%'\" ;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$additional_sql .= \" ,CONCAT(IFNULL(a_customer.firstname,''),' ',IFNULL(a_customer.lastname,''),' (',IFNULL(p.number,''),')') AS name\";\n\t\t\t\t$tbl = \"a_customer\";\n\t\t\t\t\n\t\t}\n\t\telse{\n\t $conditional_sql = \" AND p.number LIKE '%{$keyword}%'\" ;\n\t\t}\n\t\t\n\t\tif($company != '')\n\t\t{\n\t\t\t $conditional_sql = \" AND cc.company = '\".$company.\"'\" ;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\n\t\n\t //check if any specifi ordering was passed\n if (! $this->db->field_exists($orderby, 'a_customer')) {\n $orderby = 'firstname';\n }\n //check if sorting type was passed\n $sort = ($sort == 'asc' || $sort == 'desc') ? $sort : 'ASC';\n //----------sql & benchmarking start----------\n $this->benchmark->mark('code_start');\n\t\t\n\t\t\n\t\t\n //_____SQL QUERY_______\n $query = $this->db->query(\"SELECT a_customer.id $additional_sql,p.number,e.email\n FROM a_company_customer as cc,a_customer\n\t\t\t\t\t\t\t\t\t\t LEFT JOIN a_phone as p ON p.customer = a_customer.id AND p.main ='1' AND p.status='1'\n\t\t\t\t\t\t\t\t\t\t LEFT JOIN a_email as e ON e.customer = a_customer.id AND e.main ='1' AND e.status='1'\n\t\t\t\t\t\t\t\t\t\t WHERE 1=1 \n\t\t\t\t\t\t\t\t\t\t AND a_customer.id = cc.customer AND cc.status='1'\n\t\t\t\t\t\t\t\t\t\t $conditional_sql \n ORDER BY $orderby $sort\");\n\t\t\t\t\t\t\t\t\t\t \n\t\t\n\t\t/*echo \"SELECT a_customer.id, $additional_sql ,p.number,e.email\n FROM a_company_customer as cc,a_customer\n\t\t\t\t\t\t\t\t\t\t LEFT JOIN a_phone as p ON p.customer = a_customer.id AND p.main ='1' AND p.status='1'\n\t\t\t\t\t\t\t\t\t\t LEFT JOIN a_email as e ON e.customer = a_customer.id AND e.main ='1' AND e.status='1'\n\t\t\t\t\t\t\t\t\t\t WHERE 1=1 $conditional_sql\n\t\t\t\t\t\t\t\t\t\t AND cc.company = $company AND a_customer.id = cc.customer AND cc.status='1'\n ORDER BY $orderby $sort\";\t*/\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t \t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t \n $results = $query->result_array(); //multi row array\n //benchmark/debug\n $this->benchmark->mark('code_end');\n $execution_time = $this->benchmark->elapsed_time('code_start', 'code_end');\n //debugging data\n $this->__debugging(__line__, __function__, $execution_time, __class__, $results);\n //----------sql & benchmarking end----------\n //return results\n return $results;\n }", "function GetAllDataCompany($param = [])\n {\n if (isset($param['search_value']) && $param['search_value'] != '') {\n $this->db->group_start();\n $i = 0;\n foreach ($param['search_field'] as $row => $val) {\n if ($val['searchable'] == 'true') {\n if ($i == 0) {\n $this->db->like('LCASE(`'.$val['data'].'`)', strtolower($param['search_value']));\n } else {\n $this->db->or_like('LCASE(`'.$val['data'].'`)', strtolower($param['search_value']));\n }\n $i++;\n }\n }\n $this->db->group_end();\n }\n if (isset($param['row_from']) && isset($param['length'])) {\n $this->db->limit($param['length'], $param['row_from']);\n }\n if (isset($param['order_field'])) {\n if (isset($param['order_sort'])) {\n $this->db->order_by($param['order_field'], $param['order_sort']);\n } else {\n $this->db->order_by($param['order_field'], 'desc');\n }\n } else {\n $this->db->order_by('id', 'desc');\n }\n $data = $this->db\n ->select('*')\n ->where('is_delete',0)\n ->get('master_company')\n ->result_array();\n\n return $data;\n }", "public function companylist() {\r\n $companies = $this->model->getCompanies();\r\n return $this->view('company/companylist', $companies);\r\n }", "function get_contacts_by_company($id) {\n return get_view_data_where('org_contact_list', $id);\n}", "public function list(Request $request) {\n $section = $this->section;\n $input_all = collect($request->all());\n $filters = $this->parseFilters($input_all);\n\n $companies = $this->model::search( $filters );\n if ( !$companies ) {\n return CDataGrid::getResponse( [], 0, 0 );\n }\n\n $data = [];\n foreach ( $companies['result'] as $i => $company) {\n $checked = $company->status ? ' checked=\"\"' : \"\";\n $data[] = [\n $company->name,\n $company->phone,\n $company->status ? '<div class=\"badge badge-success\">Active</div>' : '<div class=\"badge badge-danger\">Inactive</div>',\n $this->components->groupButton(\n [\n [\n 'title' => 'View',\n 'url' => route($section->slug.'.show', $company->id),\n 'icon' => 'fa fa-eye',\n 'permission' => 'view-company',\n 'attributes' => [\n 'class' => 'btn-success'\n ]\n ],[\n 'title' => 'Edit',\n 'url' => route($section->slug.'.edit', $company->id),\n 'icon' => 'fa fa-pencil',\n 'permission' => 'edit-company',\n 'attributes' => [\n 'class' => 'btn-info'\n ]\n ],[\n 'title' => 'Trash',\n 'url' => route($section->slug.'.destroy', $company->id),\n 'icon' => 'fa fa-trash',\n 'permission' => 'delete-company',\n 'attributes' => [\n 'class' => ' grid-action-archive btn-danger',\n 'data-id' => $company->id,\n 'data-name' => $company->name\n ]\n ],\n ]\n )\n ];\n }\n\n return CDataGrid::getResponse( $data, $companies['total'] );\n }", "public function searchMyContacts() {\n $criteria = new CDbCriteria;\n\n $accessLevel = Yii::app()->user->checkAccess('ContactsView') ? 1 : 0;\n $conditions = $this->getAccessConditions($accessLevel);\n foreach ($conditions as $arr) {\n $criteria->addCondition($arr['condition'], $arr['operator']);\n $criteria->params = array_merge($criteria->params, $arr['params']);\n }\n\n // $condition = 'assignedTo=\"'.Yii::app()->user->getName().'\"';\n // $parameters=array('limit'=>ceil(Profile::getResultsPerPage()));\n // $parameters['condition']=$condition;\n // $criteria->scopes=array('findAll'=>array($parameters));\n\n return $this->searchBase($criteria);\n }", "public function getCompany();", "protected function beforeFind()\n {\n $uc = false;\n \n //get defined user positions in companies\n $sql = \" \n SELECT DISTINCT \n cucp_id \n FROM\n AuthItem ai \n INNER JOIN cucp_user_company_position \n ON ai.name = cucp_role \n INNER JOIN AuthAssignment aa \n ON ai.name = aa.itemname \n WHERE aa.userid = \".Yii::app()->user->id.\" \n \";\n $user_def_company_positions = Yii::app()->db->createCommand($sql)->queryAll();\n \n $criteria = false;\n if($user_def_company_positions){\n \n $udcp = array();\n foreach($user_def_company_positions as $v){\n $udcp[] = $v['cucp_id'];\n }\n //get companies, where is user positions\n $sql = \" \n SELECT DISTINCT \n ccuc_ccmp_id \n FROM\n ccuc_user_company \n WHERE ccuc_cucp_id in (\".implode(',',$udcp).\") \n AND ccuc_person_id = \".Yii::app()->getModule('user')->user()->profile->person_id.\" \n AND ccuc_status = '\".CcucUserCompany::CCUC_STATUS_PERSON.\"'\n \";\n $user_companies = Yii::app()->db->createCommand($sql)->queryAll(); \n\n //add to criteria user companies\n $uc = array();\n $uc[] = 0; //for avoiding error if empty user company list\n foreach($user_companies as $v){\n $uc[] = $v['ccuc_ccmp_id'];\n } \n\n }\n \n if(Yii::app()->getModule('d2company')->access){\n \n $user_roles = Authassignment::model()->getUserRoles(Yii::app()->user->id);\n foreach(Yii::app()->getModule('d2company')->access as $access){\n \n //validate roles\n $intersect = array_intersect($user_roles,$access['roles']);\n if(empty($intersect)){\n continue;\n } \n \n //get group companies\n $sql = \" \n SELECT \n ccxg_ccmp_id \n FROM \n ccxg_company_x_group \n WHERE \n ccxg_ccgr_id IN (\".implode(',',$access['ccgr_id']).\")\";\n \n $ccmp_id_list = Yii::app()->db->createCommand($sql)->queryAll(); \n if(!empty($ccmp_id_list)){\n if($uc === false){\n $uc = array();\n $uc[] = 0; //for avoiding error if empty user company list\n } \n foreach($ccmp_id_list as $row){\n $uc[] = $row['ccxg_ccmp_id'];\n }\n }\n }\n \n \n }\n \n if($uc !== false){\n if(!$criteria){\n $criteria = new CDbCriteria;\n } \n $criteria->compare('ccmp_id', $uc);\n }\n \n //filter by syscomapny\n \n if( Yii::app()->hasComponent('sysCompany') && Yii::app()->sysCompany->getActiveCompany()){\n if(!$criteria){\n $criteria = new CDbCriteria;\n }\n $criteria->compare('ccmp_sys_ccmp_id', Yii::app()->sysCompany->getActiveCompany());\n }\n \n if($criteria){\n $this->dbCriteria->mergeWith($criteria);\n }\n \n parent::beforeFind();\n }", "public function Company_Info_List(){\n /*\n $user = session('USER_ID'); // 获取已登录用户\n */\n // $user = 'c4b19072a79e4a6e81f06761f1e6bd2b';\n // $where = array('USER_ID' => $user);\n // if(!empty($keywords)){\n // $where['COMPANY_NAME'] = array('like',\"%$keywords%\");\n // }\n // if (!empty($start_date)) {\n // $where['CREATE_TIME'] = array('gt',$start_date);\n // }\n // if (!empty($end_date)) {\n // $where['CREATE_TIME'] = array('lt',$end_date);\n // }\n // $count = M('a_sys_user_attr_company_info')\n // -> where($where)\n // -> count();\n\n // $Page = new \\Think\\Page($count, $pagenum);// 实例化分页类 传入总记录数和每页显示的记录数($pagenum)\n\n // $show = $Page->show();// 分页显示输出\n\n // $list = M('a_sys_user_attr_company_info as info') // 查询公司信息表\n \t\t// -> field('COMPANYINFO_ID,COMPANY_NAME,CERT,COMPANY_AUTHENTICATION,SERVICE_LEVEL,COMPANY_NUM') // 需求字段\n \t\t// -> join('a_service_level as level on info.SERVICE_ID = level.SERVICE_ID') // 两表联查\n // ->limit($Page->firstRow.','.$Page->listRows) // 分页查询\n \t\t// -> where($where) \t\t// 查询条件\n \t\t// -> select();\n\n // // var_dump($list);die;\n \n // $this -> assign('show' , $show);\n // $this -> assign('list' , $list);\n $this -> display('list');\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\t\t$criteria->compare('category_id', $this->category_id);\n\t\t$criteria->compare('title', $this->title, true);\n\t\t$criteria->compare('contact', $this->contact, true);\n\t\t$criteria->compare('audit', $this->audit);\n\t\t$criteria->compare('comment', $this->comment, true);\n// ICE 上面的逻辑也是去employeebranchrelation查数字branch_id 但是findbypk有可能报错,所以完善方法。\n//\t\t$employee = Employee::model()->findByPk(Yii::app()->user->id);\n\t\t// 选择的组织架构ID\n\t\tif (!empty($this->branch))\n\t\t $criteria->addInCondition('branch_id', $this->branch->getChildrenIdsAndSelf());\n\t\telse //自己的组织架构的ID\n//\t\t $criteria->addInCondition('branch_id', $employee->getBranchIds());\n// ICE 上面的逻辑也是去employeebranchrelation查数字branch_id 但是findbypk有可能报错,所以完善方法。\n\t\t $criteria->addInCondition('branch_id', Employee::ICEgetOldBranchIds());\n\n\t\t// if (!empty($this->community)) {//如果有小区\n\t\t// $criteria->distinct = true;\n\t\t// $criteria->join = 'inner join notify_community_relation n on n.notify_id=t.id';\n\t\t// $criteria->addInCondition('n.community_id', $this->community);\n\t\t// } else if ($this->region != '') {//如果有地区\n\t\t// $criteria->distinct = true;\n\t\t// $criteria->join = 'inner join notify_community_relation n on n.notify_id=t.id';\n\t\t// $criteria->addInCondition('n.community_id', Region::model()->getRegionCommunity($this->region, 'id'));\n\t\t// }\n\n\t\t$community_ids = array();\n\t\tif (!empty($this->communityIds)) {//如果有小区\n\t\t\t$community_ids = $this->communityIds;\n\t\t} else if ($this->province_id) { //如果有地区\n\t\t\tif ($this->district_id) {\n\t\t\t\t$regionId = $this->district_id;\n\t\t\t} else if ($this->city_id) {\n\t\t\t\t$regionId = $this->city_id;\n\t\t\t} else if ($this->province_id) {\n\t\t\t\t$regionId = $this->province_id;\n\t\t\t} else {\n\t\t\t\t$regionId = 0;\n\t\t\t}\n\t\t\t$community_ids = ICERegion::model()->getRegionCommunity(\n\t\t\t\t$regionId,\n\t\t\t\t'id'\n\t\t\t);\n\t\t}\n\n\t\tif ($community_ids) {\n\t\t\t$criteria->distinct = true;\n\t\t\t$criteria->join = 'inner join notify_community_relation n on n.notify_id=t.id';\n\t\t\t$criteria->addInCondition('n.community_id', $community_ids);\n\t\t}\n\n\t\treturn new ActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t\t'sort' => array(\n\t\t\t\t'defaultOrder' => 't.id desc',\n\t\t\t)\n\t\t));\n\t}", "public function search($company_id)\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\t\t$criteria->compare('company_id',$company_id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('category',$this->category,true);\n\t\t$criteria->compare('capacity',$this->capacity);\n\t\t$criteria->compare('price',$this->price);\n\t\t$criteria->compare('status',$this->status,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "function get_companies_list() {\n return get_view_data('org_list');\n}", "public function actionIndex()\n\t{\t\t\n\t$model=new Company('search');\n\t\t$model->unsetAttributes(); // clear any default values\n\t\tif(isset($_GET['Company']))\n\t\t\t$model->attributes=$_GET['Company'];\n\n\t\t$this->render('managecompany',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function getCompanyWithUsers();", "public function sitemapCompanies(){\n $links = array();\n $models = ORM::factory('CatalogCompany')->where('enable','=','1')->find_all();\n foreach($models as $model)\n $links[] = $model->getUri();\n return $links;\n }", "public function getCompany() {}", "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('co_plan_cpra',$this->co_plan_cpra);\n\t\t$criteria->compare('co_ppto',$this->co_ppto);\n\t\t$criteria->compare('actv_plan_cpra',$this->actv_plan_cpra,true);\n\t\t$criteria->compare('nb_und_mdda',$this->nb_und_mdda,true);\n\t\t$criteria->compare('nb_fmla',$this->nb_fmla,true);\n\t\t$criteria->compare('nb_cod_sap',$this->nb_cod_sap,true);\n\t\t$criteria->compare('cntd_1',$this->cntd_1);\n\t\t$criteria->compare('cntd_2',$this->cntd_2);\n\t\t$criteria->compare('cntd_3',$this->cntd_3);\n\t\t$criteria->compare('cntd_4',$this->cntd_4);\n\t\t$criteria->compare('cntd_5',$this->cntd_5);\n\t\t$criteria->compare('cntd_6',$this->cntd_6);\n\t\t$criteria->compare('cntd_7',$this->cntd_7);\n\t\t$criteria->compare('cntd_8',$this->cntd_8);\n\t\t$criteria->compare('cntd_9',$this->cntd_9);\n\t\t$criteria->compare('cntd_10',$this->cntd_10);\n\t\t$criteria->compare('cntd_11',$this->cntd_11);\n\t\t$criteria->compare('cntd_12',$this->cntd_12);\n\t\t$criteria->compare('cntd_ttl',$this->cntd_ttl);\n\t\t$criteria->compare('vrsn',$this->vrsn);\n\t\t$criteria->compare('nb_resp',$this->nb_resp,true);\n\t\t$criteria->compare('tlf_resp',$this->tlf_resp,true);\n\t\t$criteria->compare('email_resp',$this->email_resp,true);\n\t\t$criteria->compare('fe_crea',$this->fe_crea,true);\n\t\t$criteria->compare('fe_modf',$this->fe_modf,true);\n\t\t$criteria->compare('usr_crea',$this->usr_crea,true);\n\t\t$criteria->compare('usr_modf',$this->usr_modf,true);\n\t\t$criteria->compare('in_stat',$this->in_stat,true);\n\t\t$criteria->compare('tx_desc',$this->tx_desc,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\t\t\n\t\t//查询用户 \n\t\t$criteria = new CDbCriteria;\n\t\t$community_ids = array();\n\t\t\n\t\t$employee = Employee::model()->findByPk(Yii::app()->user->id);\n\t\t$branchIds = $employee->mergeBranch;\n\t\t//判断小区权限\n\t\tif (!empty($employee->branch)) {\n\t\t\tforeach ($branchIds as $branchId) {\n\t\t\t\t$data = Branch::model()->findByPk($branchId)->getBranchAllIds('Community');\n\t\t\t\t$community_ids = array_unique(array_merge($community_ids, $data));\n\t\t\t}\n\t\t\t$criteria->addInCondition('community_id', $community_ids);\n\t\t}\n\t\tif ($this->branch_id != '') {\n\t\t\t$community_ids = Branch::model()->findByPk($this->branch_id)->getBranchAllIds('Community');\n\t\t\n\t\t\t$criteria->addInCondition('community_id', $community_ids);\n\t\t} else if ($this->region != '') //如果有地区\n {\n $community_ids = Region::model()->getRegionCommunity($this->region, 'id');\n $criteria->addInCondition('community_id', $community_ids);\n } \n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('community_id', $this->community_id);\n\t\t$criteria->compare('lucky_act_id',$this->lucky_act_id);\n\t\t$criteria->compare('cust_name',$this->cust_name,true);\n\t\t$criteria->compare('receive_name',$this->receive_name,true);\n\t\t$criteria->compare('cust_id',$this->cust_id);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('moblie',$this->moblie,true);\n\t\t$criteria->compare('prize_id',$this->prize_id);\n\t\t$criteria->compare('lucky_date',$this->lucky_date,true);\n\t\t$criteria->compare('isget',$this->isget);\n\t\t$criteria->compare('isgivered',$this->isgivered);\n\t\t$criteria->compare('isred',$this->isred);\n\t\tif($this->isgivered===\"0\" ||$this->isgivered===\"1\" ){\n\t\t\t$criteria->compare('isred',1);\n\t\t}\n\t\t$criteria->compare('get_date',$this->get_date,true);\n\t\t$criteria->compare('comment',$this->comment,true);\n\t\t$criteria->compare('deal_state',$this->deal_state);\n\t\t$criteria->compare('deal_userid',$this->deal_userid);\n\t\t$criteria->compare('deal_username',$this->deal_username,true);\n\t\t$criteria->compare('deal_date',$this->deal_date,true);\n\t\t$criteria->compare('express_company',$this->express_company,true);\n\t\t$criteria->compare('express_number',$this->express_number,true);\n\t\t$criteria->compare('deal_remark',$this->deal_remark,true);\n\t\t$criteria->compare('deal_remark_log',$this->deal_remark_log,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'sort' => array(\n\t\t\t\t\t'defaultOrder' => 'id DESC',\n\t\t\t)\n\t\t));\n\t}", "function _vendorCompanyList(){\n $this->resetResponse();\n if ($this->ci->session->userdata('user_id') != null) {\n $archived = $this->ci->input->post('archived', true);\n\n $result = $this->model->getVendorCompany('*', array(\"person_type\" => Globals::PERSON_TYPE_VENDOR))->result();\n if ($result) {\n $this->_status = true;\n $this->_message = '';\n $this->_rdata = $result;\n\n } else {\n $this->_status = false;\n $this->_message = $this->ci->lang->line('no_records_found');\n }\n \n } else {\n $this->_status = false;\n $this->_message = $this->ci->lang->line('invalid_user');\n \n }\n\n return $this->getResponse();\n }", "public function index()\n {\n $search = \\Request::get('search'); //<-- we use global request to get the param of URI\n \n if($search){\n\n $allCompanies = Company::whereRaw('store_name = ?', [$search])\n ->orderBy('id', 'desc')\n ->paginate(5); \n\n }else{\n\n $allCompanies = Company::orderBy('id', 'desc')->paginate(5); \n }\n \n \n return view('company.index', [\n 'companies' => $allCompanies,\n ]);\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,true);\n\t\t$criteria->compare('cust_name',$this->cust_name,true);\n\t\t$criteria->compare('shop_name',$this->shop_name,true);\n\t\t$criteria->compare('corp_name',$this->corp_name,true);\n\t\t$criteria->compare('shop_url',$this->shop_url,true);\n\t\t$criteria->compare('shop_addr',$this->shop_addr,true);\n\t\t//$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('qq',$this->qq,true);\n\t\t$criteria->compare('mail',$this->mail,true);\n\t\t$criteria->compare('datafrom',$this->datafrom,true);\n\t\t$criteria->compare('category',$this->category);\n\t\t$criteria->compare('cust_type',$this->cust_type);\n\t\t$criteria->compare('eno',$this->eno,true);\n\t\t$criteria->compare('iskey',$this->iskey,true);\n\t\t$criteria->compare('assign_eno',$this->assign_eno,true);\n\t\t$criteria->compare('assign_time',$this->assign_time);\n\t\t$criteria->compare('next_time',$this->next_time);\n\t\t$criteria->compare('memo',$this->memo,true);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('creator',$this->creator);\n\t\t$criteria->addCondition(\"`status`=0 and cust_type<>30\"); \n\t\tif($this->customerId){\n\t\t\t$criteria->addCondition(\"id in({$this->customerId})\"); //查询条件 \n\t\t}\n\t\t//只看到自己的客户,及下属客户\n $user_arr = Userinfo::getAllChildUsersId(Yii::app()->user->id);\n $user_arr[]=Yii::app()->user->id;\n if(!empty($user_arr)&&count($user_arr)>0){\n $wherestr = Utils::genUserCondition($user_arr);\n if(!empty($wherestr)){\n $criteria->addCondition(\" exists (select 1 from {{users}} where eno=t.eno and $wherestr)\") ; \n } \n }\n\t\tif (isset($this->keyword)) {\n\t\t\tswitch ($this->searchtype) {\n\t\t\t\tcase 1:\n\t\t\t\t\t$criteria->addCondition(\"cust_name like :keyword\");\n\t\t\t\t\t$criteria->params[':keyword'] = \"%{$this->keyword}%\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t$criteria->addCondition(\"shop_name like :keyword\");\n\t\t\t\t\t$criteria->params[':keyword'] = \"%{$this->keyword}%\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t$criteria->addCondition(\"corp_name like :keyword\");\n\t\t\t\t\t$criteria->params[':keyword'] = \"%{$this->keyword}%\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\t//$criteria->compare('phone', $this->keyword, true);\n\t\t\t\t\t$phones = $this->keyword;\n\t\t\t\t\t$criteria->addCondition(\" phone like '%$phones%' or phone2 like '%$phones%' or phone3 like '%$phones%' or phone4 like '%$phones%' or phone5 like '%$phones%'\"); //查询条件 \n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\t$criteria->compare('qq', $this->keyword, true);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\t$criteria->compare('cust_type', $this->keyword);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\n return new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\t\t$criteria->alias = 'i';\n\t\t$criteria->join= 'LEFT JOIN city c ON (c.cityID=i.city) LEFT JOIN country co ON (co.code=i.country)';\n\t\t\n\t\tif($this->customerID!=\"\")\n\t\t\t$criteria->compare('i.customerID',$this->customerID-$this->getParams(\"dealercustomerplus\"));\n\t\t$criteria->compare('i.name',$this->name,true);\n\t\t$criteria->compare('i.email',$this->email,true);\n\t\t$criteria->compare('i.phone',$this->phone,true);\n\t\t$criteria->compare('i.cphone',$this->cphone,true);\n\t\t$criteria->compare('i.fax',$this->cphone,true);\n\t\t$criteria->compare('i.county',$this->county);\n\t\t$criteria->compare('c.name',$this->city,true);\n\t\t$criteria->compare('co.name',$this->country,true);\n\t\t$criteria->compare('co.code',$this->country2);\n\t\t$criteria->compare('i.adress',$this->adress,true);\n\t\n\t\t$criteria->compare('i.deleted',$this->deleted);\n\t\t$criteria->compare('i.dateAdd >',$this->dateAdd);\n\t\t$criteria->compare('i.opportunity',$this->opportunity);\n\t\t$criteria->compare('i.addEmployeesID',$this->addEmployeesID);\n\t\t$criteria->compare('i.worldID',$this->worldID);\n\t\t$criteria->compare('i.companyID',$this->companyID);\n\t\t$criteria->compare('i.cgID',$this->cgID);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination' => array(\n 'pageSize' => 15,\n ),\n\t\t\t\n\t\t));\n\t}", "public function listcuspoboxAction(Request $request)\n {\n /*\n if (!$request->isXmlHttpRequest()) {\n throw new NotFoundHttpException();\n }\n */\n $pattern = $request->query->get('pattern');\n \n $em = $this->getDoctrine()->getManager();\n $maincompany = $this->getUser()->getMaincompany();\n \n $result=array();\n $counter = 0;\n $entities = $em->getRepository('NvCargaBundle:Customer')->createQueryBuilder('o')\n ->where('o.name LIKE :name OR o.lastname LIKE :lastname OR o.email LIKE :email' )\n //->setParameter('name', '%'.$name.'%')\n ->andWhere('o.maincompany = :maincompany')\n ->andWhere('o.active = :active')\n ->setParameters(['name'=>$pattern.'%','lastname'=>$pattern.'%', 'email'=>$pattern, 'maincompany'=>$maincompany, 'active'=> true])\n ->setFirstResult(0)\n ->setMaxResults(25)\n ->getQuery()\n ->getResult();\n \n foreach ($entities as $entity) {\n if ($entity->getAdrdefault()) {\n $dir = $entity->getAdrdefault();\n $city = $dir->getCity();\n if ($city) { \n $result[$counter]['name'] = $entity->getName();\n $result[$counter]['lastname'] = $entity->getLastname();\n if ($entity->getPobox()) {\n $result[$counter]['pobox'] = $entity->getPobox()->getNumber();\n } else {\n $result[$counter]['pobox'] = '';\n }\n $result[$counter]['email'] = $entity->getEmail();\n\n $result[$counter]['docid'] = $dir->getDocid();\n $result[$counter]['address'] = $dir->getAddress();\n \n $result[$counter]['customerid'] = $entity->getId();\n \n $result[$counter]['cityid'] = $city->getId();\n $result[$counter]['cityname'] = $city->getName();\n $result[$counter]['state'] = $city->getState()->getName();\n $result[$counter]['country'] = $city->getState()->getCountry()->getName();\n $result[$counter]['phone'] = $dir->getPhone();\n $result[$counter]['mobile'] = $dir->getMobile();\n \n $result[$counter]['barrio'] = $dir->getBarrio();\n $result[$counter]['zip'] = $dir->getZip();\n if ($dir->getCustomer()->getType()) {\n $result[$counter]['type'] = $dir->getCustomer()->getType()->getName();\n } else {\n $result[$counter]['type'] = 'Persona';\n }\n $counter++;\n }\n }\n }\n return new JsonResponse($result); \n }", "function get_customer_list_search($terms)\n {\n $this->company_db->select(\"c.*, CONCAT(c.tele_country_code, ' ', c.telephone_number) as telephone_number, CONCAT(c.cell_country_code , ' ', c.cellphone_number) as cellphone_number, CONCAT(c.fname, ' ', c.lname) as name\");\n $this->company_db->from('tbl_customer c');\n //$this->company_db->where('c.void', 'No');\n $column_search = array(\"c.address_line1\", \"CONCAT(c.tele_country_code, ' ', c.telephone_number)\", \"CONCAT(c.cell_country_code , ' ', c.cellphone_number)\", \"CONCAT(c.fname, ' ', c.lname)\");\n\n if(isset($terms) && !empty($terms)) // if datatable send POST for search\n {\n $i = 0;\n foreach ($column_search as $item) // loop column \n { \n if($i===0) // first loop\n {\n $this->company_db->group_start(); // open bracket. query Where with OR clause better with bracket. because maybe can combine with other WHERE with AND.\n $this->company_db->like($item, $terms);\n }\n else\n {\n $this->company_db->or_like($item, $terms);\n }\n \n if(count($column_search) - 1 == $i) //last loop\n $this->company_db->group_end(); //close bracket\n \n $i++;\n }\n }\n\n $query = $this->company_db->get();\n\n if($query->num_rows() >= 1)\n {\n return $query->result_array();\n }\n else\n {\n return array();\n }\n }", "public function searchComp()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t\n\t\t$criteria=new CDbCriteria;\n\t\t\n\t\t$criteria->distinct = true;\n\t\t$criteria->join = 'LEFT JOIN '.CompetitorCompetitions::tableName().' ON '.CompetitorCompetitions::tableName().'.COMPETITOR_ID = t.COMPETITOR_ID';\n\t\t$criteria->compare('COMPETITOR_ID',$this->COMPETITOR_ID);\n\t\t$criteria->compare('WSDC_NO',$this->WSDC_NO);\n\t\t$criteria->compare('FIRST_NAME',$this->FIRST_NAME,true);\n\t\t$criteria->compare('LAST_NAME',$this->LAST_NAME,true);\n\t\t$criteria->compare('COMPETITOR_LEVEL',$this->COMPETITOR_LEVEL);\n\t\t$criteria->compare('REMOVED',$this->REMOVED);\n\t\t$criteria->compare('ADDRESS',$this->ADDRESS,true);\n\t\t$criteria->compare('CITY',$this->CITY,true);\n\t\t$criteria->compare('STATE',$this->STATE,true);\n\t\t$criteria->compare('POSTCODE',$this->POSTCODE);\n\t\t$criteria->compare('COUNTRY',$this->COUNTRY,true);\n\t\t$criteria->compare('PHONE',$this->PHONE,true);\n\t\t$criteria->compare('MOBILE',$this->MOBILE,true);\n\t\t$criteria->compare('EMAIL',$this->EMAIL,true);\n\t\t$criteria->compare('LEADER',$this->LEADER);\n\t\t$criteria->compare('REGISTERED',$this->REGISTERED);\n\t\t$criteria->compare('BIB_STATUS',$this->BIB_STATUS);\n\t\t$criteria->compare('BIB_NUMBER',$this->BIB_NUMBER);\n\t\t$criteria->compare(CompetitorCompetitions::tableName().'.COMPETITION_ID',Yii::app()->session['comp']);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "function findCompanyWebsite($company_name) \n {\n \n }", "public function search(Request $request)\n {\n $filters = $request->except('_token');\n $companies = $this->repository->search($request->filter);\n\n return view('company.index', compact('companies', 'filters'));\n }", "public function actionGetFilteredClientsList()\n {\n if (Yii::app()->request->isAjaxRequest && isset($_POST['companyName'])) {\n $companyName = $_POST['companyName'];\n\n $clientsList = array();\n $criteria=new CDbCriteria;\n $criteria->condition='t.Client_Number!=0';\n if (trim($_POST['companyName']) != '') {\n $criteria->compare('company.Company_Name',$companyName,true);\n }\n $criteria->order = \"company.Company_Name ASC\";\n $clients = Clients::model()->with('company')->findAll($criteria);\n foreach ($clients as $client) {\n if ($client && $client->company) {\n $clientsList[$client->Client_ID] = $client->company->Company_Name;\n }\n }\n\n $this->renderPartial('filtered_clients_list' , array(\n 'clientsList' => $clientsList,\n ));\n }\n }", "public function allCompanies()\n {\n\n $companies = $this->core_companies;\n\n $items = [];\n foreach ($companies as $company) {\n\n $companyItem = new CompanyCardItem();\n $companyItem->id = $company->id;\n $companyItem->name = $company->name;\n //$companyItem->amount = $catalog->amount;\n $companyItem->title = $company->title;\n if (\\Dash\\count($company->photo))\n $companyItem->image = '/uploaz/eyuf/UserCompany/photo/' . $company->id . '/' . $company->photo[0];\n $companyItem->url = ZUrl::to([\n 'customer/markets/show',\n 'id' => $company->id\n ]);\n $companyItem->distence = \"12km\";\n //$companyItem->image = $catalog->price;\n //$companyItem->price = $catalog->price_old;\n //$companyItem->currency = \"$\";\n //$companyItem->cart_amount = 0;\n\n $items[] = $companyItem;\n }\n return $items;\n }", "public function actionGetFilteredEmptyCompaniesList()\n {\n if (Yii::app()->request->isAjaxRequest && isset($_POST['companyName'])) {\n $companyName = $_POST['companyName'];\n\n $companies = Companies::getEmptyCompanies($companyName);\n\n $this->renderPartial('empty_companies_list' , array(\n 'companies' => $companies,\n ));\n }\n }", "public function get_company_all_invoice() \n {\n $matches = array();\n $query_string = htmlspecialchars($_POST['q'], ENT_QUOTES, 'UTF-8');\n $company = $this->input->post('company');\n $paid = $this->input->post('paid');\n $result = $this->classtraineemodel->get_company_based_pay_invoice($this->tenant_id, $query_string, $company, 0, 1, $paid);\n\n if ($result) \n {\n foreach ($result as $row) \n {\n $matches[] = array(\n 'key' => $row->invoice_id,//Course: ' . $row->crse_name . ', \n 'label' => $row->invoice_id . ' (Class: ' . $row->class_name . ')',\n 'value' => $row->invoice_id,\n );\n }\n }\n echo json_encode($matches);\n exit();\n }", "public function getCompaniesForSelectField($partOfCompName) {\r\n\t\t$selectCond = '*';\r\n\t\t$whereCond = \" CompanyName LIKE '\" . $partOfCompName . \"%' \";\r\n\t\t$allComp = $this->select($selectCond, self::$_tableName, $whereCond);\r\n\t\treturn $allComp;\r\n\t}", "public function getAllCompanyByPage($filter, $page = 1, $page_size = 20, $orderby = '') {\n $regulatorToCompanyModel = new Model_Jiafuyun_RegulatorToCustomer();\n// $companyModel = new Model_Zhianbao_Company();\n $companyModel = new Model_Jiafuyun_Company();\n $rs = $regulatorToCompanyModel->getAll ( '*', $filter, $page, $page_size, $orderby );\n foreach ( $rs as $key => $value){\n $rs[$key]['create_time'] = strtotime($value['create_time']) == 0 ? '-': $value['create_time'];\n $rs[$key]['last_modify'] = strtotime($value['last_modify']) == 0 ? '-': $value['last_modify'];\n $companyInfo = $companyModel->get($value['company_id']);\n $rs[$key]['company_info'] = $companyInfo;\n }\n return $rs;\n }", "public function byCompany($company)\n {\n $company = trim(preg_replace('|\\s+|', ' ', preg_replace('|&nbsp;|', ' ', $company)));\n // remove all non alphanumeric and non space characters\n $company = preg_replace('/[^a-zA-Z0-9\\s]+/', '', $company);\n\n $params = array(\n 'excludet2' => 1,\n 'excludeDetails' => 1,\n 'matchRequest' => \"<Company><Name>$company</Name><Ticker /><Address1 /><Address2 /><City /><State /><Zip /><URL /><Phone /><ContactFirstName /><ContactLastName /></Company>\",\n 'has_stories' => 1,\n );\n \n return $this->getClient()->post($params);\n }", "public function getCompanyList($company_name = null)\n {\n //gen query\n $query = $this->db->getQuery(true)\n ->select(\"name,id FROM #__companies\");\n\n if ($company_name) {\n $company_name = ucwords($company_name);\n $query->where(\"LOWER(name) LIKE '%\".$company_name.\"%'\");\n }\n\n $query->where(\"published=\".$this->published);\n\n return $this->db->setQuery($query)->loadAssocList();\n }", "function get_companies_linked_to_group_of_company() {\n\tglobal $post;\n\t/**\n\t * Check if there are companies linked to the post:\n\t */\n\tif (get_post_meta($post->ID, 'company_checkbox_meta', true)) {\n\t\t/**\n\t\t * Arguments for get posts:\n\t\t */\n\t\t$args = array(\n\t\t\t'orderby'\t\t =>\t'title',\n\t\t\t'order'\t\t\t =>\t'ASC',\n\t\t\t'post_type' => 'companies',\n\t\t\t'post_status' => 'publish',\n\t\t\t'posts_per_page' => -1\n\t\t);\n\t\t$companies = get_posts($args);\n\t\t$linked_companies_ids = get_post_meta($post->ID, 'company_checkbox_meta', true);\n\t\t?>\n\t\t<div class=\"company-isotope\">\n\t\t\t<?php\n\t\t\t/**\n\t\t\t * Go through all the posts:\n\t\t\t */\n\t\t\tforeach ($companies as $company) {\n\t\t\t\t/**\n\t\t\t\t * Go through all the linked id's\n\t\t\t\t */\n\t\t\t\tforeach ($linked_companies_ids as $linked_company_id) {\n\t\t\t\t\t/**\n\t\t\t\t\t * if linked company id == company id, then generate company card.\n\t\t\t\t\t */\n\t\t\t\t\tif ($linked_company_id == $company->ID) {\n\t\t\t\t\t\t$company_url = get_permalink($company->ID);\n\t\t\t\t\t\t$company_title = $company->post_title;\n\t\t\t\t\t\t$company_logo_url = get_field('company_logo', $company->ID);\n\t\t\t\t\t\t$company_title_length = strlen($company_title);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<a href=\"<?php echo $company_url ?>\" class=\"company-box col-xs-12 col-sm-6 col-md-4\">\n\t\t\t\t\t\t\t<div class=\"item-card\">\n\t\t\t\t\t\t\t\t<div class=\"item-card-thumbnail\">\n\t\t\t\t\t\t\t\t\t<img src=\"<?php echo $company_logo_url; ?>\" class=\"item-card-image\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"item-card-title white-bg\">\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\tif ($company_title_length <= 32) {\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t<span class=\"item-title black-text\"><?php echo $company_title; ?></span>\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t<span class=\"item-title black-text\" style=\"font-size:16px!important\"><?php echo $company_title; ?></span>\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// do nothing.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t?>\n\t\t</div>\n\t\t<?php\n\t}\n\t/**\n\t * If there are no linked companies\n\t */\n\telse {\n\t\t// do nothing.\n\t}\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,true);\n\t\t$criteria->compare('company_id',$this->company_id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('validator',$this->validator,true);\n\t\t$criteria->compare('position',$this->position);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "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('receiving_time',$this->receiving_time,true);\n\t\t$criteria->compare('suplier_id',$this->suplier_id);\n\t\t$criteria->compare('user',$this->user,true);\n\t\t$criteria->compare('comment',$this->comment,true);\n $criteria->with = array('suplier');\n $criteria->compare('suplier.company_name',$this->company_name_search,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'sort'=>array(\n 'attributes'=>array(\n 'company_name_search'=>array(\n 'asc'=>'suplier.company_name',\n 'desc'=>'suplier.company_name DESC',\n ),\n '*',\n ),\n ),\n\t\t));\n\t}", "function ve_get_group_of_companies_navigation() {\n\n\t/**\n\t * Arguments for get posts:\n\t */\n\t\n\t$args = array(\n\t\t'orderby'\t\t\t=>\t'title',\n\t\t'order'\t\t\t\t=>\t'ASC',\n\t\t'post_type'\t\t\t=>\t'group_of_companies',\n\t\t'post_status'\t\t=>\t'publish',\n\t\t'posts_per_page'\t=>\t-1\n\t\t);\n\t$companies = get_posts( $args );\n\n\tforeach ( $companies as $company ) {\n\t\t$company_url = get_permalink($company->ID);\n\t\t$company_title = $company->post_title;\n\t\t?>\n\t\t<li>\n\t\t\t<a class=\"purple-hover\" href=\"<?php echo $company_url; ?>\"><?php echo $company_title ?></a>\n\t\t</li>\n\t<?php\n\t}\n}", "public static function getAllGroupCompanies($ccgr_id) {\n $sql = \"\n SELECT \n ccmp_id,\n ccmp_name \n FROM\n ccxg_company_x_group \n INNER JOIN ccmp_company \n ON ccxg_ccmp_id = ccmp_id \n WHERE ccxg_ccgr_id = :ccgr_id\n ORDER BY ccmp_name\n \";\n return Yii::app()->db\n ->createCommand($sql)\n ->bindParam(\":ccgr_id\", $ccgr_id, PDO::PARAM_INT)\n ->queryAll();\n }", "public function get_customers_for_dropdown($company){\r\n\t\theader(\"Access-Control-Allow-Origin: \". base_url());\r\n\t\terror_log(\"get_customers_for_dropdown($company)\");\r\n\r\n\t\t$cid = intval($company);\r\n\t\tif($cid>0){\r\n\t\t\t$cs = $this->customer_model->get_companys_customers($cid);\r\n\t\t}\r\n\t\telse if($cid == 0){\r\n\t\t\t$cs = $this->customer_model->get_customers();\r\n\t\t}\r\n\t\telse{\r\n\t\t\techo \"0\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$data = array();\r\n\t\tforeach($cs as $c){\r\n\t\t\t$id = $c[\"id\"];\r\n\t\t\t$name = $c[\"namn\"];\r\n\t\t\t$data[] = array($id => $name);\r\n\t\t}\r\n\t\terror_log(print_r($data, true));\r\n\t\techo json_encode($data);\r\n\t}", "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,true);\n\t\t$criteria->compare('FINANCIAL_YEAR_ID_FK',$this->FINANCIAL_YEAR_ID_FK,true);\n\t\t$criteria->compare('EMPLOYEE_ID',$this->EMPLOYEE_ID,true);\n\t\t$criteria->compare('HRA',$this->HRA,true);\n\t\t$criteria->compare('MEDICAL_INSURANCE',$this->MEDICAL_INSURANCE,true);\n\t\t$criteria->compare('DONATION',$this->DONATION,true);\n\t\t$criteria->compare('DISABILITY_MED_EXP',$this->DISABILITY_MED_EXP,true);\n\t\t$criteria->compare('EDU_LOAD_INT',$this->EDU_LOAD_INT,true);\n\t\t$criteria->compare('SELF_DISABILITY',$this->SELF_DISABILITY,true);\n\t\t$criteria->compare('HOME_LOAN_INT',$this->HOME_LOAN_INT,true);\n\t\t$criteria->compare('HOME_LOAD_EXCESS_2013_14',$this->HOME_LOAD_EXCESS_2013_14,true);\n\t\t$criteria->compare('INSURANCE_LIC_OTHER',$this->INSURANCE_LIC_OTHER,true);\n\t\t$criteria->compare('TUITION_FESS_EXEMPTION',$this->TUITION_FESS_EXEMPTION,true);\n\t\t$criteria->compare('PPF_NSC',$this->PPF_NSC,true);\n\t\t$criteria->compare('HOME_LOAN_PR',$this->HOME_LOAN_PR,true);\n\t\t$criteria->compare('PLI_ULIP',$this->PLI_ULIP,true);\n\t\t$criteria->compare('TERM_DEPOSIT_ABOVE_5',$this->TERM_DEPOSIT_ABOVE_5,true);\n\t\t$criteria->compare('MUTUAL_FUND',$this->MUTUAL_FUND,true);\n\t\t$criteria->compare('PENSION_FUND',$this->PENSION_FUND,true);\n\t\t$criteria->compare('CPF',$this->CPF,true);\n\t\t$criteria->compare('REGISTRY_STAMP',$this->REGISTRY_STAMP,true);\n\t\t$criteria->compare('DA_TA_ARREAR',$this->DA_TA_ARREAR,true);\n\t\t$criteria->compare('OTA_HONORANIUM',$this->OTA_HONORANIUM,true);\n\t\t$criteria->compare('UNIFORM',$this->UNIFORM,true);\n\t\t$criteria->compare('DA_TA_ARREAR_CPF',$this->DA_TA_ARREAR_CPF,true);\n\t\t$criteria->compare('EL_ENCASH',$this->DA_TA_ARREAR_CPF,true);\n\t\t$criteria->compare('LTC_HTC',$this->DA_TA_ARREAR_CPF,true);\n\t\t$criteria->compare('CEA_TUITION',$this->CEA_TUITION,true);\n\t\t$criteria->compare('BONUS',$this->BONUS,true);\n\t\t$criteria->compare('OTHER_INCOME',$this->OTHER_INCOME,true);\n\t\t$criteria->compare('HOUSE_INCOME',$this->HOUSE_INCOME,true);\n\t\t$criteria->compare('NPS_UNDER_80CCD_1B',$this->NPS_UNDER_80CCD_1B,true);\n\t\t$criteria->compare('BANK_INTEREST_DED_80TTA',$this->BANK_INTEREST_DED_80TTA,true);\n\t\t$criteria->compare('MEDICAL_INSURANCE_PARENTS',$this->MEDICAL_INSURANCE_PARENTS,true);\n\t\t$criteria->compare('LOAN_YEAR',$this->LOAN_YEAR,true);\n\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function allCompanies()\n {\n return Company::all();\n }", "function applyFilters($q, $au, $roo)\n {\n \n $tn = $this->tableName();\n $this->selectAdd(\"i18n_translate('c' , {$tn}.country, 'en') as country_display_name \");\n \n $tn = $this->tableName();\n //DB_DataObject::debugLevel(1);\n $x = DB_DataObject::factory('core_company');\n $x->comptype= 'OWNER';\n $x->find(true);\n\n if (!empty($q['query']['company_project_id'])) {\n $add = '';\n if (!empty($q['query']['company_include_self'])) {\n $add = \" OR {$tn}.id = {$x->id}\";\n }\n if (!empty($q['query']['company_not_self'])) {\n $add = \" AND {$tn}.id != {$x->id}\";\n }\n \n $pids = array();\n $pid = $q['query']['company_project_id'];\n if (strpos($pid, ',')) {\n $bits = explode(',', $pid);\n foreach($bits as $b) {\n $pids[] = (int)$b;\n }\n } else {\n $pids = array($pid);\n }\n \n \n $pids = implode(',', $pids);\n $this->whereAdd(\"{$tn}.id IN (\n SELECT distinct(company_id) FROM ProjectDirectory where project_id IN ($pids)\n ) $add\" );\n \n }\n if (!empty($q['query']['comptype'])) {\n \n $this->whereAddIn($tn.'.comptype', explode(',', $q['query']['comptype']), 'string');\n \n }\n \n // depricated - should be moved to module specific (texon afair)\n \n if (!empty($q['query']['province'])) {\n $prov = $this->escape($q['query']['province']);\n $this->whereAdd(\"province LIKE '$prov%'\");\n \n \n }\n // ADD comptype_display name.. = for combos..\n $this->selectAdd(\"\n (SELECT display_name\n FROM\n core_enum\n WHERE\n etype='comptype'\n AND\n name={$tn}.comptype\n LIMIT 1\n ) as comptype_display_name\n \");\n \n if(!empty($q['query']['name']) || !empty($q['search']['name'])){\n \n $s = (!empty($q['query']['name'])) ? $this->escape($q['query']['name']) : $this->escape($q['search']['name']);\n \n $this->whereAdd(\"\n {$tn}.name LIKE '%$s%'\n \");\n }\n \n if(!empty($q['query']['name_starts']) || !empty($q['search']['name_starts'])){\n \n $s = (!empty($q['query']['name_starts'])) ? $this->escape($q['query']['name_starts']) : $this->escape($q['search']['name_starts']);\n \n $this->whereAdd(\"\n {$tn}.name LIKE '$s%'\n \");\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\t\t$criteria->alias = 'i';\n\t\t$criteria->join= 'LEFT JOIN city c ON (c.cityID=i.city) LEFT JOIN country co ON (co.Code=i.country)';\n\t\t\n\t\tif($this->dealersID!=\"\")\n\t\t\t$criteria->compare('i.dealersID',$this->dealersID-$this->getParams(\"dealerplus\"));\n\t\t$criteria->compare('i.name',$this->name,true);\n\t\t$criteria->compare('i.title',$this->title,true);\n\t\t$criteria->compare('i.phone',$this->phone,true);\n\t\t$criteria->compare('i.cphone',$this->cphone,true);\n\t\t$criteria->compare('i.fax',$this->fax,true);\n\t\t$criteria->compare('i.email',$this->email,true);\n\t\t$criteria->compare('i.adres',$this->adres,true);\n\t\t$criteria->compare('i.deleted',$this->deleted);\n\t\t$criteria->compare('i.dateAdd >',$this->dateAdd);\n\t\t$criteria->compare('i.companyID',$this->companyID);\n\t\t$criteria->compare('i.worldID',$this->worldID,true);\n\t\t$criteria->compare('co.name',$this->country,true);\n\t\t$criteria->compare('c.name',$this->city,true);\n\t\t$criteria->compare('i.county',$this->county,true);\n\t\t$criteria->compare('i.addEmployeesID',$this->addEmployeesID);\n\t\t\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination' => array(\n 'pageSize' => 15,\n ),\n\t\t\t\n\t\t));\n\t}", "public function byCompanyId($companyId);", "public function search()\r\n\t{\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('account_name',$this->account_name,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('mer_name',$this->mer_name,true);\n\t\t$criteria->compare('mer_company',$this->mer_company,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('pro',$this->pro,true);\n\t\t$criteria->compare('area',$this->area,true);\n\t\t$criteria->compare('business_area',$this->business_area,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('lat',$this->lat);\n\t\t$criteria->compare('long',$this->long);\n\t\t$criteria->compare('hasWiff',$this->hasWiff);\n\t\t$criteria->compare('wiff_name',$this->wiff_name,true);\n\t\t$criteria->compare('wiff_psw',$this->wiff_psw,true);\n\t\t$criteria->compare('connection_user',$this->connection_user,true);\n\t\t$criteria->compare('connection_user_position',$this->connection_user_position,true);\n\t\t$criteria->compare('connection_call',$this->connection_call,true);\n\t\t$criteria->compare('connection_phone',$this->connection_phone,true);\n\t\t$criteria->compare('ID_card',$this->ID_card,true);\n\t\t$criteria->compare('ID_card_before_image',$this->ID_card_before_image,true);\n\t\t$criteria->compare('ID_card_after_image',$this->ID_card_after_image,true);\n\t\t$criteria->compare('business_license_No',$this->business_license_No,true);\n\t\t$criteria->compare('business_license_No_image',$this->business_license_No_image,true);\n\t\t$criteria->compare('tax_registry_No',$this->tax_registry_No,true);\n\t\t$criteria->compare('tax_registry_No_image',$this->tax_registry_No_image,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('add_time',$this->add_time);\n\t\t$criteria->compare('add_user_id',$this->add_user_id);\n\t\t$criteria->compare('up_time',$this->up_time);\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public static function fetch_all_in_a_list()\n\t{\n\t return Company::orderBy( 'name' )->lists( 'name' , 'id' );\n\n\t}", "public function basicSearch(){\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t$SearchNameOrganisme = $this->_getParam('Basicseacrhname');\n\t\t\t\t\t\t\tif(strlen(trim($SearchNameOrganisme))>0){\n\t\t\t\t\t\t\t\tif(get_magic_quotes_gpc()){\n\t\t\t\t\t\t\t\t\t$SearchNameOrganisme = stripslashes($SearchNameOrganisme);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$SearchNameOrganisme = mysql_real_escape_string($SearchNameOrganisme);\n\t\t\t\t\t\t\t\t$ShowingBasicSearch = $this->GetModelOrganize->searchbasic($SearchNameOrganisme);\n\t\t\t\t\t\t\t\t$this->view->getfivetable = $ShowingBasicSearch;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$getAllDataToview = $this->GetModelOrganize->selectAllDataForOrganismeMenu ();\n\t\t\t\t\t\t\t\t$this->view->getfivetable = $getAllDataToview;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}catch (ErrorException $ex){\n\t\t\t\t\t\t\techo \"Message:\".$ex->getMessage();\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "public function index(){\n return Responser::ok('Projects available',Auth::user()->companies->reduce(function($carry,$company){\n $company->projects->each(function($project) use(&$carry){\n $project->load('company');\n $carry[] = $project;\n });\n\n return $carry;\n },[]));\n }", "protected function applySearchQuery($c)\n {\n $request = $this->getRequest();\n $user = $this->getUser();\n \n if($request->hasParameter('query'))\n {\n $q = $request->getParameter('query');\n $user->setAttribute('type', 'all', 'project/list');\n $user->setAttribute('page', 1, 'project/list');\n \n \n $c->addJoin(ProjectPeer::ID, ProjectCompanyPeer::PROJECT_ID);\n $c->addJoin(ProjectCompanyPeer::COMPANY_ID, CompanyPeer::ID);\n $c->addJoin(ProjectPeer::ID, ProjectEmployeePeer::PROJECT_ID);\n $c->addJoin(ProjectEmployeePeer::EMPLOYEE_ID, EmployeePeer::ID);\n \n // Perform OR search on Project Title, Project Type and compagny Name\n $critSearch1 = $c->getNewCriterion(CompanyPeer::NAME, '%'.$q.'%', Criteria::LIKE);\n $critSearch1->addOr($c->getNewCriterion(ProjectPeer::TITLE, '%'.$q.'%', Criteria::LIKE));\n $critSearch1->addOr($c->getNewCriterion(ProjectPeer::NUMBER, '%'.$q.'%', Criteria::LIKE)); \n $critSearch1->addOr($c->getNewCriterion(ProjectPeer::TYPE_PROJECT, '%'.$q.'%', Criteria::LIKE)); // is it working ?\n $critSearch1->addOr($c->getNewCriterion(EmployeePeer::FIRSTNAME, '%'.$q.'%', Criteria::LIKE)); // is it working ? \n \n $c->add($critSearch1);\n \n $c->setIgnoreCase(true);\n $c->setDistinct(true);\n }\n\n }", "public function search()\n {\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('pid',$this->pid);\n $criteria->compare('article',$this->article,true);\n $criteria->compare('group_1',$this->group_1,true);\n $criteria->compare('key_group_1',$this->key_group_1);\n $criteria->compare('group_2',$this->group_2,true);\n $criteria->compare('key_group_2',$this->key_group_2);\n $criteria->compare('group_3',$this->group_3,true);\n $criteria->compare('key_group_3',$this->key_group_3);\n $criteria->compare('f_brand',$this->f_brand,true);\n $criteria->compare('f_s_brand',$this->f_s_brand);\n $criteria->compare('f_country',$this->f_country,true);\n $criteria->compare('f_s_country',$this->f_s_country);\n $criteria->compare('f_region',$this->f_region,true);\n $criteria->compare('f_s_region',$this->f_s_region);\n $criteria->compare('f_alcohol',$this->f_alcohol,true);\n $criteria->compare('f_s_alcohol',$this->f_s_alcohol);\n $criteria->compare('f_taste',$this->f_taste,true);\n $criteria->compare('f_s_taste',$this->f_s_taste);\n $criteria->compare('f_sugar',$this->f_sugar,true);\n $criteria->compare('f_s_sugar',$this->f_s_sugar);\n $criteria->compare('f_grape_sort',$this->f_grape_sort,true);\n $criteria->compare('f_s_grape_sort',$this->f_s_grape_sort);\n $criteria->compare('f_vintage_year',$this->f_vintage_year,true);\n $criteria->compare('f_s_vintage_year',$this->f_s_vintage_year);\n $criteria->compare('f_color',$this->f_color,true);\n $criteria->compare('f_s_color',$this->f_s_color);\n $criteria->compare('f_excerpt',$this->f_excerpt,true);\n $criteria->compare('f_s_excerpt',$this->f_s_excerpt);\n $criteria->compare('f_fortress',$this->f_fortress);\n $criteria->compare('f_volume',$this->f_volume,true);\n $criteria->compare('f_packaging',$this->f_packaging,true);\n $criteria->compare('i_name_sku',$this->i_name_sku,true);\n $criteria->compare('i_availability',$this->i_availability);\n $criteria->compare('i_popular',$this->i_popular);\n $criteria->compare('i_limitedly',$this->i_limitedly);\n $criteria->compare('i_old_price',$this->i_old_price,true);\n $criteria->compare('i_price',$this->i_price,true);\n $criteria->compare('i_manufacturer_importer',$this->i_manufacturer_importer,true);\n $criteria->compare('i_supplier',$this->i_supplier,true);\n $criteria->compare('d_desc_product',$this->d_desc_product,true);\n $criteria->compare('d_photo_small',$this->d_photo_small,true);\n $criteria->compare('d_photo_middle',$this->d_photo_middle,true);\n $criteria->compare('d_photo_high',$this->d_photo_high,true);\n $criteria->compare('d_link_manuf',$this->d_link_manuf,true);\n $criteria->compare('d_logo_manuf',$this->d_logo_manuf,true);\n $criteria->compare('t_url',$this->t_url,true);\n $criteria->compare('t_meta_title',$this->t_meta_title,true);\n $criteria->compare('t_meta_keyword',$this->t_meta_keyword,true);\n $criteria->compare('t_meta_description',$this->t_meta_description,true);\n \n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination'=>array(\n 'pageSize' => 50,\n )));\n }", "public function companies(): Collection\n {\n return Company::all();\n }", "public function index()\n {\n return Company::all();\n }", "public function index()\n {\n return Company::all();\n }", "public function search()\n {\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id,true);\n $criteria->compare('name',$this->name,true);\n $criteria->compare('title',$this->title,true);\n $criteria->compare('identifier',$this->identifier,true);\n $criteria->compare('langue_id',$this->langue_id,true);\n $criteria->compare('tax',$this->tax,true);\n $criteria->compare('taux',$this->taux,true);\n $criteria->compare('show_langs',$this->show_langs);\n $criteria->compare('env',$this->env,true);\n $criteria->compare('gmaps_key',$this->gmaps_key,true);\n $criteria->compare('jetlag',$this->jetlag);\n $criteria->compare('issuetickets',$this->issuetickets);\n $criteria->compare('sendmailtickets',$this->sendmailtickets);\n $criteria->compare('smsactivitation',$this->smsactivitation,true);\n $criteria->compare('smsreservation',$this->smsreservation,true);\n $criteria->compare('openingdays',$this->openingdays,true);\n $criteria->compare('openinghours',$this->openinghours,true);\n $criteria->compare('closinghours',$this->closinghours,true);\n $criteria->compare('fashion',$this->fashion);\n $criteria->compare('adminip',$this->adminip,true);\n $criteria->compare('wsuser',$this->wsuser,true);\n $criteria->compare('wspass',$this->wspass,true);\n $criteria->compare('theme',$this->theme,true);\n $criteria->compare('display_phone',$this->display_phone);\n $criteria->compare('phonecallcenter',$this->phonecallcenter,true);\n $criteria->compare('sav_portable',$this->sav_portable,true);\n $criteria->compare('email',$this->email,true);\n $criteria->compare('logo',$this->logo,true);\n $criteria->compare('pos_h',$this->pos_h);\n $criteria->compare('down',$this->down);\n $criteria->compare('decalage',$this->decalage);\n $criteria->compare('currency',$this->currency,true);\n $criteria->compare('symbole',$this->symbole,true);\n $criteria->compare('show_journey',$this->show_journey);\n $criteria->compare('application_type_id',$this->application_type_id,true);\n $criteria->compare('google_analytics',$this->google_analytics,true);\n $criteria->compare('escales',$this->escales);\n $criteria->compare('session_resa',$this->session_resa);\n $criteria->compare('meta_title',$this->meta_title,true);\n $criteria->compare('meta_description',$this->meta_description,true);\n $criteria->compare('meta_keywords',$this->meta_keywords,true);\n $criteria->compare('service',$this->service,true);\n $criteria->compare('account_id',$this->account_id,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function findCompanies(){\n $data = SCompany::select('id_company', 'name')\n ->get();\n return response()->json($data);\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\t\t$criteria->compare('company_id', $this->company_id);\n\t\t$criteria->compare('productId', $this->productId);\n\t\t$criteria->compare('upTo', $this->upTo);\n\t\t$criteria->compare('fixPrice', $this->fixPrice);\n\t\t$criteria->compare('isActive', $this->isActive);\n\t\t$criteria->order = 'company_id';\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t));\n\t}", "public function showListCompanyPage()\n {\n $company = new Company();\n if ($this->checkSession()) {\n $data[] = array();\n $data['navbar'] = view('includes.navbar');\n\n $data['listCompany'] = $company->showListCompany(Session::get('univID'), \"\", \"asc\", \"\", \"\");\n $data['listCompanyIndustry'] = $company->showIndustry(Session::get('univID'));\n // $data['totalCompany'] = $company->GetTotalCompany();\n return view('pages.companylist')->with('data', $data);\n }\n return redirect(\"/login\");\n }", "public function getCpnyToCombobox() {\n return $this->db->selectObjList('SELECT company_id, shortname, longname FROM company ORDER BY shortname;', $array = array(), \"Company\");\n }", "public function search_()\n\t{\n\t\t\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ptopartida',$this->ptopartida,true);\n\t\t$criteria->compare('distpartida',$this->distpartida,true);\n\t\t$criteria->compare('provpartida',$this->provpartida,true);\n\t\t$criteria->compare('dptopartida',$this->dptopartida,true);\n\t\t$criteria->compare('ptollegada',$this->ptollegada,true);\n\t\t$criteria->compare('distllegada',$this->distllegada,true);\n\t\t$criteria->compare('provllegada',$this->provllegada,true);\n\t\t$criteria->compare('dptollegada',$this->dptollegada,true);\n\t\t$criteria->compare('direccionformaldes',$this->direccionformaldes,true);\n\t\t$criteria->compare('direcciontransportista',$this->direcciontransportista,true);\n\t\t$criteria->compare('c_numgui',$this->c_numgui,true);\n\t\t$criteria->compare('c_coclig',$this->c_coclig,true);\n\t\t$criteria->compare('d_fecgui',$this->d_fecgui,true);\n\t\t$criteria->compare('c_estgui',$this->c_estgui,true);\n\t\t$criteria->compare('c_rsguia',$this->c_rsguia,true);\n\t\t$criteria->compare('c_codtra',$this->c_codtra,true);\n\t\t$criteria->compare('c_trans',$this->c_trans,true);\n\t\t$criteria->compare('c_motivo',$this->c_motivo,true);\n\t\t$criteria->compare('c_placa',$this->c_placa,true);\n\t\t$criteria->compare('c_licon',$this->c_licon,true);\n\t//\t$criteria->compare('d_fectra',$this->d_fectra,true);\n\t\t//$criteria->compare('c_descri',$this->c_descri,true);\n\n\t\t$criteria->compare('n_guia',$this->n_guia,true);\n\t\t$criteria->compare('c_texto',$this->c_texto,true);\n\t\t$criteria->compare('c_dirsoc',$this->c_dirsoc,true);\n\t\t$criteria->compare('c_serie',$this->c_serie,true);\n\t\t//$criteria->compare('c_salida',$this->c_salida,true);\n\t\t$criteria->compare('razondestinatario',$this->razondestinatario,true);\n\t\t$criteria->compare('rucdestinatario',$this->rucdestinatario,true);\n\t\t$criteria->compare('ructrans',$this->ructrans,true);\n\t\t$criteria->compare('razontransportista',$this->razontransportista,true);\n\t\t$criteria->compare('c_estado',$this->c_estado,true);\n\t\t$criteria->compare('n_direc',$this->n_direc);\n\t\t$criteria->compare('n_direcformaldes',$this->n_direcformaldes);\n\t\t$criteria->compare('n_directran',$this->n_directran);\n\t\t$criteria->compare('n_dirsoc',$this->n_dirsoc);\n\t\t$criteria->compare('creadopor',$this->creadopor,true);\n\t\t$criteria->compare('modificadopor',$this->modificadopor,true);\n\t\t$criteria->compare('creadoel',$this->creadoel,true);\n\t\t$criteria->compare('modificadoel',$this->modificadoel,true);\n\t\t$criteria->compare('rucsoc',$this->rucsoc,true);\n\t\t$criteria->compare('estado',$this->estado,true);\n\t\t$criteria->compare('n_hguia',$this->n_hguia,true);\n\t\t$criteria->compare('c_itguia',$this->c_itguia,true);\n\t\t$criteria->compare('n_cangui',$this->n_cangui);\n\t\t$criteria->compare('c_codgui',$this->c_codgui,true);\n\t\t$criteria->compare('c_edgui',$this->c_edgui,true);\n\t\t$criteria->compare('c_descri',$this->c_descri,true);\n\t\t$criteria->compare('m_obs',$this->m_obs,true);\n\t\t$criteria->compare('c_codactivo',$this->c_codactivo,true);\n\t\t$criteria->compare('c_um',$this->c_um,true);\n\t\t$criteria->compare('c_codep',$this->c_codep,true);\n\t\t$criteria->compare('n_detgui',$this->n_detgui,true);\n\t\t$criteria->compare('l_libre',$this->l_libre,true);\n\t\t$criteria->compare('nomep',$this->nomep,true);\n\t\t$criteria->compare('motivo',$this->motivo,true);\n\t\t$criteria->compare('estadodetalle',$this->estadodetalle,true);\n\t\t$criteria->compare('c_af',$this->c_af,true);\n\t\t$criteria->compare('cod_cen',$this->cod_cen,true);\n\t\t$criteria->compare('c_codsap',$this->c_codsap,true);\n\t\t$criteria->compare('hidref',$this->hidref,true);\n\t\t$criteria->compare('docref',$this->docref,true);\n\t\t$criteria->compare('codocu',$this->codocu,true);\n\t\t$case=$this->d_fectra;\n\t\t//$criteria->compare('d_fectra',trim(\" \".$case.\" \"),false);\n\t\t$case2=$this->d_fectra1;\n\t\t\n\t\t//$criteria->compare('d_fectra1',trim(\" \".$case2.\" \"),false);\n\t\t$criteria->compare('codocu',$this->codocu,true);\n\t\t if((isset($this->d_fectra) && trim($this->d_fectra) != \"\") && (isset($this->d_fectra1) && trim($this->d_fectra1) != \"\")) {\n\t\t // $limite1=date(\"Y-m-d\",strotime($this->d_fectra)-24*60*60); //UN DIA MENOS \n\t\t\t\t\t // $limite2=date(\"Y-m-d\",strotime($this->d_fectra)+24*60*60); //UN DIA mas \n\t\t \n $criteria->addBetweenCondition('d_fectra', ''.$this->d_fectra.'', ''.$this->d_fectra1.''); \n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\n\t\t//$fechaactual = date(\"Y-m-d\");\n\t\t//$criteria->addCondition(\"d_fectra = '\".$fechaactual.\"'\");\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "private function add_company()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator();\n \t$company = $serviceManager->get('PM/Model/Companies');\n \t\n \t$result = $company->getCompanyById($this->pk);\t\n \tif($result)\n \t{\n \t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['id']));\n \t\t$this->add_breadcrumb($company_url, $result['name'], TRUE);\n \t} \t\n }", "public function index()\n {\n $company = Company::latest();\n\n if (request('search')) {\n $company->where('name', 'like', '%' . request('search') . '%')\n ->orwhere('email', 'like', '%' . request('search') . '%')\n ->orwhere('website', 'like', '%' . request('search') . '%');\n }\n\n return view('dashboard.company', [\n \"title\" => \"Company\",\n \"active\" => \"company\",\n \"company\" => $company->paginate(5)\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,false);\n\n\t\t$criteria->compare('name',$this->name,true);\n\n\t\t$criteria->compare('telephone',$this->telephone,true);\n\n\t\t$criteria->compare('fax',$this->fax,true);\n\n\t\t$criteria->compare('email',$this->email,true);\n\n\t\t$criteria->compare('town',$this->town,true);\n\n\t\t$criteria->compare('street',$this->street,true);\n\n\t\t$criteria->compare('plot_no',$this->plot_no,true);\n\n\t\t$criteria->compare('share_capital',$this->share_capital,true);\n\n\t\t$criteria->compare('contact_person',$this->contact_person,true);\n\n\t\t$criteria->compare('location',$this->location,true);\n\n\t\t$criteria->compare('address',$this->address,true);\n\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\n\t\t$criteria->compare('type_name_business',$this->type_name_business,true);\n\n\t\t$criteria->compare('business_registration_number',$this->business_registration_number,true);\n\n\t\t$criteria->compare('registration_place',$this->registration_place,true);\n\n\t\t$criteria->compare('registration_date',$this->registration_date,true);\n\n\t\t$criteria->compare('tin',$this->tin,true);\n\n\t\t$criteria->compare('certificate_incorporation',$this->certificate_incorporation,true);\n\n\t\t$criteria->compare('certificate_place',$this->certificate_place,true);\n\n\t\t$criteria->compare('certificate_date',$this->certificate_date,true);\n\n\t\t$criteria->compare('customer_code',$this->customer_code,true);\n\n\t\t$criteria->compare('country',$this->country,true);\n\n\t\t$criteria->compare('operator_type_id',$this->operator_type_id,true);\n\n\t\t$criteria->compare('occupation',$this->occupation,true);\n\n\t\t$criteria->compare('contact_person_2',$this->contact_person_2,true);\n\n\t\t$criteria->compare('postal_code',$this->postal_code);\n\t\tif (Yii::app()->controller->action->id=='licenceeList'){\n\t\t\t$criteria->addCondition(\"id in (select distinct operator_id from licence_application where is_licence=1)\", 'AND');\n\t\t}\n\t\treturn new CActiveDataProvider('Operator', array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function suggestCompanyEmailSearch()\n\t{\n\t\t$emails = array();\n\n\t\t$sql = \" select email,name from company where active = 1 and email > '' and email is not null\";\n\t\t$sql .= \" and (email like '%\" . $this->emailCompany->Text . \"%' \";\n\t\t$sql .= \" or name like '%\" . $this->emailCompany->Text . \"%' )\";\n\n\t\t$result = Dao::getResultsNative($sql);\n\t\tif($result)\n\t\t{\n\t\t\tforeach($result as $rows)\n\t\t\t{\n\t\t\t\t$emails[] = array('id'=> $rows[0], 'email'=> $rows[1].\" - \".$rows[0]);\n\t\t\t}\n\t\t}\n\t\tif(count($emails)==0)\n\t\t{\n\t\t\t$emails[] = array('id'=> 0, 'email'=> 'No emails Found!');\n\t\t}\n\n\t\treturn $emails;\n\t}", "public function search()\n {\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('marketing_id',$this->marketing_id);\n $criteria->compare('no_quotation',$this->no_quotation,true);\n $criteria->compare('customer_id',$this->customer_id);\n $criteria->compare('customer_name',$this->customer_name,true);\n $criteria->compare('phone',$this->phone,true);\n $criteria->compare('contact_person',$this->contact_person,true);\n $criteria->compare('note',$this->note,true);\n $criteria->compare('name_of_employer',$this->name_of_employer);\n $criteria->compare('include_driver',$this->include_driver);\n $criteria->compare('include_ppn',$this->include_ppn);\n $criteria->compare('date',$this->date,true);\n $criteria->compare('address',$this->address,true);\n $criteria->compare('fax',$this->fax,true);\n $criteria->compare('handphone_customer',$this->handphone_customer,true);\n $criteria->compare('office_boss',$this->office_boss,true);\n $criteria->compare('hanphone',$this->hanphone,true);\n $criteria->compare('email',$this->email,true);\n $criteria->compare('create_user',$this->create_user);\n $criteria->compare('create_date',$this->create_date,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function query(Company $model)\n {\n return $model->newQuery();\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('cdos',$this->cdos,true);\n\t\t$criteria->compare('cus',$this->cus,true);\n\t\t$criteria->compare('nam',$this->nam,true);\n\t\t$criteria->compare('sur',$this->sur,true);\n\t\t$criteria->compare('mid',$this->mid,true);\n\t\t$criteria->compare('otn',$this->otn,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('telephone',$this->telephone,true);\n\t\t$criteria->compare('dbir',$this->dbir,true);\n\t\t$criteria->compare('mna',$this->mna,true);\n\t\t$criteria->compare('fna',$this->fna,true);\n\t\t$criteria->compare('sex',$this->sex,true);\n\t\t$criteria->compare('res',$this->res,true);\n\t\t$criteria->compare('tcus',$this->tcus,true);\n\t\t$criteria->compare('resnam',$this->resnam,true);\n\t\t$criteria->compare('rso',$this->rso,true);\n\t\t$criteria->compare('breg',$this->breg,true);\n\t\t$criteria->compare('tpc',$this->tpc,true);\n\t\t$criteria->compare('qua',$this->qua,true);\n\t\t$criteria->compare('sal',$this->sal);\n\t\t$criteria->compare('ca',$this->ca);\n\t\t$criteria->compare('town',$this->town,true);\n\t\t$criteria->compare('tbir',$this->tbir,true);\n\t\t$criteria->compare('pro',$this->pro,true);\n\t\t$criteria->compare('sec',$this->sec,true);\n\t\t$criteria->compare('sta',$this->sta,true);\n\t\t$criteria->compare('proc',$this->proc,true);\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('idis',$this->idis,true);\n\t\t$criteria->compare('idid',$this->idid,true);\n\t\t$criteria->compare('ided',$this->ided,true);\n\t\t$criteria->compare('psp',$this->psp,true);\n\t\t$criteria->compare('pspis',$this->pspis,true);\n\t\t$criteria->compare('pspid',$this->pspid,true);\n\t\t$criteria->compare('psped',$this->psped,true);\n\t\t$criteria->compare('dcre',$this->dcre,true);\n\t\t$criteria->compare('uti',$this->uti,true);\n\t\t$criteria->compare('utimo',$this->utimo,true);\n\t\t$criteria->compare('dou',$this->dou,true);\n\t\t$criteria->compare('dmo',$this->dmo,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function contact_company()\n {\n }", "function getChildCompanies_1($company_id, $company_list=\"\") {\n if (empty($company_list))\n $company_list = $company_id;\n else\n $company_list.=\",\" . $company_id;\n\n $query = \"SELECT company_id FROM company WHERE parent_id in ($company_id)\";\n $res = $this->getDBRecords($query);\n\n if (count($res) > 0) {\n $str = \"\";\n for ($i = 0; $i < count($res); $i++) {\n if (!empty($str))\n $str.=\",\";\n $str.=$res[$i]['company_id'];\n }\n $company_list = $this->getChildCompanies_1($str, $company_list);\n }\n $company_list = explode(\",\", $company_list);\n $company_list = array_unique($company_list);\n sort($company_list);\n\n $list = implode(\",\", $company_list);\n return $list;\n }", "public function index()\n {\n $query = Company::query();\n\n $parameters = $parameters = request()->query->all();\n\n $this->sortBy(Company::class, $query, $parameters);\n\n $this->filterBy(Company::class, $query, $parameters);\n \n return CompanyResource::collection($query->paginate(10));\n }", "public function index()\n {\n return Company::paginate(10);\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 \n\t\t$criteria->compare('ESUB_ID',$this->ESUB_ID);\n\t\t$criteria->compare('ESUB_EMP_ID',$this->ESUB_EMP_ID);\n//\t\t$criteria->compare('ESUB_SUBSCRS_ID',$this->ESUB_SUBSCRS_ID);\n// $criteria->together=true;\n\t\t\n//\t\t$criteria->compare('ESUB_PAYMENT_ID',$this->ESUB_PAYMENT_ID);\n $criteria->with = array( 'eSUBSUBSCRS' );\n $criteria->compare('eSUBSUBSCRS.SUBSCR_RATE', $this->ESUB_PAYMENT_ID,true);\n $criteria->compare('eSUBSUBSCRS.SUBSCR_DESC', $this->ESUB_SUBSCRS_ID,true);\n\t\t$criteria->compare('ESUB_STATUS',$this->ESUB_STATUS,true);\n $criteria->compare('ESUB_PURCHASE_DATE',$this->ESUB_PURCHASE_DATE,true);\n\t\t$criteria->compare('ESUB_EXPIRY_DATE',$this->ESUB_EXPIRY_DATE,true);\n\t\t$criteria->compare('ESUB_UTILIZED_COUNT',$this->ESUB_UTILIZED_COUNT,true);\n\t\t$criteria->compare('ESUB_REMAIN_COUNT',$this->ESUB_REMAIN_COUNT,true);\n// $criteria->compare('date(ESUB_PURCHASE_DATE)',$this->ESUB_PURCHASE_DATE,true);\n////\n// $criteria->compare('date(ESUB_EXPIRY_DATE)',$this->ESUB_EXPIRY_DATE,true);\n// $criteria->compare(\"DATE_FORMAT(date,'%yy-%mm-%dd')\",$this->ESUB_PURCHASE_DATE,true);\n// $criteria->compare(\"DATE_FORMAT(date,'%yy-%mm-%dd')\",$this->ESUB_EXPIRY_DATE,true);\n// if($this->ESUB_SUBSCRS_ID)\n// {\n// $criteria->together = true;\n// $criteria->with = ( 'eSUBSUBSCRS' );\n// $criteria->compare('eSUBSUBSCRS.SUBSCR_DESC', $model->ESUB_SUBSCRS_ID,true);\n// }\n// if(strlen($this->ESUB_PURCHASE_DATE) && strlen($this->ESUB_EXPIRY_DATE)) {\n// $criteria->params[':ESUB_PURCHASE_DATE'] = date('Y-m-d', strtotime($this->ESUB_PURCHASE_DATE));\n// \n// $criteria->params[':ESUB_EXPIRY_DATE'] = date('Y-m-d', strtotime($this->ESUB_EXPIRY_DATE));\n//// (strlen($this->ESUB_EXPIRY_DATE)) ? date('Y-m-d', strtotime($this->ESUB_EXPIRY_DATE)) : $criteria->params[':post_date'];\n// $criteria->addCondition('DATE(ESUB_PURCHASE_DATE) BETWEEN :ESUB_PURCHASE_DATE AND :ESUB_EXPIRY_DATE');\n// }\n \n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n \n\t\t));\n\t}", "public function search()\n {\n $criteria = new CDbCriteria;\n// if ($this->customer_name != '') {\n// $criteria->with[] = 'customer';\n// $criteria->compare('customer.name', $this->customer_name, true);\n// }\n if($this->customer_name){\n $criteria->with=array( \n 'customer', \n );\n $criteria->compare('customer.name', $this->customer_name, true);\n }\n// if($this->red_packet_pay){\n// $criteria->with=array( \n// 'thirdFees', \n// );\n// $criteria->compare('thirdFees.red_packet_pay', $this->red_packet_pay, true);\n// }\n\n $criteria->compare('t.sn', $this->sn, true);\n $criteria->compare('t.mobile', $this->mobile, true);\n $criteria->compare('t.charge_mobile', $this->charge_mobile, true);\n// $criteria->compare('customer_id', $this->customer_id);\n// $criteria->compare('create_time', $this->create_time);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function actionSearch() {\n $this->is_ajax_request();\n $_limit = Yii::app()->request->getPost('itemCount');\n $_ledgerHead = Yii::app()->request->getPost('ledger_head');\n $_type = Yii::app()->request->getPost('type');\n $_from = Yii::app()->request->getPost('from_date');\n $_to = Yii::app()->request->getPost('to_date');\n $dateForm = date(\"Y-m-d\", strtotime($_from));\n $dateTo = !empty($_to) ? date(\"Y-m-d\", strtotime($_to)) : date(\"Y-m-d\");\n $_search = Yii::app()->request->getPost('q');\n $_sortBy = Yii::app()->request->getPost('sort_by');\n $_sortType = Yii::app()->request->getPost('sort_type');\n\n $_model = new CashAccount();\n $criteria = new CDbCriteria();\n if ($_type != \"All\") {\n $criteria->condition = \"type=:type\";\n $criteria->params = array(\":type\" => $_type);\n } else {\n $criteria->addInCondition(\"type\", array('D', 'W'));\n }\n $criteria->addCondition(\"debit IS NOT NULL OR credit IS NOT NULL\");\n if (!empty($_ledgerHead)) {\n $criteria->addCondition(\"ledger_head_id={$_ledgerHead\n }\");\n }\n if (!empty($_from) || !empty($_to)) {\n $criteria->addBetweenCondition('pay_date', $dateForm, $dateTo);\n }\n if (!empty($_search)) {\n $criteria->addCondition(\"purpose like '%\" . trim($_search) . \"%'\");\n }\n if (!empty($_sortBy)) {\n $criteria->order = \"{$_sortBy} {$_sortType\n }\";\n } else {\n $criteria->order = \"pay_date DESC\";\n }\n $count = $_model->count($criteria);\n $pages = new CPagination($count);\n $pages->pageSize = !empty($_limit) ? $_limit : $this->page_size;\n\n\n $pages->applyLimit($criteria);\n $_dataset = $_model->findAll($criteria);\n\n $this->model['dataset'] = $_dataset;\n $this->model['pages'] = $pages;\n $this->renderPartial('_list', $this->model);\n }", "public function index(Request $request)\n {\n\n $perPage = 10;\n $currentPage = $request->input('page') ?: 1;\n $counter = (isset($currentPage) && $currentPage> 1) ? ($currentPage-1)*$perPage+1:1;\n $slice_init = ($currentPage == 1) ? 0 : (($currentPage*$perPage)-$perPage);\n\n\n $search_key = '';\n DB::enableQueryLog();\n $company_class = $request->input('company_class');\n $year = $request->input('year');\n $params['company_class'] = $request->input('company_class');\n $params['year'] = $request->input('year');\n if($request->input('sort') !='' && $request->input('direction') !='')\n {\n $search_key .= \" order by \".$request->input('sort').\" \".$request->input('direction').\" \";\n $params['sort'] = $request->input('sort');\n $params['direction'] = $request->input('direction');\n }\n if($request->input('LISTED_FLAG') !='')\n {\n $search_key .= \" AND LISTED_FLAG LIKE '%\".$request->input('LISTED_FLAG').\"%'\";\n $params['LISTED_FLAG'] = $request->input('LISTED_FLAG');\n }\n if($request->input('LISTED_FLAG') !='')\n {\n $search_key .= \" AND LISTED_FLAG LIKE '%\".$request->input('LISTED_FLAG').\"%'\";\n $params['LISTED_FLAG'] = $request->input('LISTED_FLAG');\n }\n if($request->input('COMPANY_STATUS') !='')\n {\n $search_key .= \" AND COMPANY_STATUS LIKE '%\".$request->input('COMPANY_STATUS').\"%'\";\n $params['COMPANY_STATUS'] = $request->input('COMPANY_STATUS');\n }\n if($request->input('COMPANY_CLASS') !='')\n {\n $search_key .= \" AND COMPANY_CLASS LIKE '%\".$request->input('COMPANY_CLASS').\"%'\";\n $params['COMPANY_CLASS'] = $request->input('COMPANY_CLASS');\n }\n if($request->input('COMPANY_SUBCAT') !='')\n {\n $search_key .= \" AND COMPANY_SUBCAT LIKE '%\".$request->input('COMPANY_SUBCAT').\"%'\";\n $params['COMPANY_SUBCAT'] = $request->input('COMPANY_SUBCAT');\n }\n if($request->input('compname') !='')\n {\n $search_key .= \" AND (compname LIKE '%\".$request->input('compname').\"%' OR cin = '\".$request->input('compname').\"')\";\n $params['compname'] = $request->input('compname');\n }\n if($request->input('searchKey') !='')\n {\n $search_key .= \" AND (compname LIKE '%\".$request->input('searchKey').\"%' OR cin = '\".$request->input('searchKey').\"')\";\n $params['searchKey'] = $request->input('searchKey');\n }\n\n $query = \"SELECT CIN, compname, ADDR_LINE1,ADDR_LINE2\n FROM master_companies_distinct_all\n where COMPANY_CLASS like '%\".$company_class.\"%' $search_key LIMIT $slice_init, $perPage\";\n\n $pagedData = Company::hydrate(DB::select($query)); ;\n\n $query = \"SELECT count(*) as _count\n FROM master_companies_distinct_all\n where COMPANY_CLASS like '%\".$company_class.\"%' $search_key\";\n $count_data = DB::select($query);\n $total = $count_data[0]->_count;\n\n $notice_data = new \\Illuminate\\Pagination\\LengthAwarePaginator($pagedData, $total, $perPage, $currentPage);\n\n $notice_data->setPath(url('company/list'))->appends($params);\n\n // $query = DB::getQueryLog();\n\n // echo \"<pre>\";\n // print_r($query);\n // die;\n return view('company.index',['notice_data'=>$notice_data,'total'=>$total, 'counter'=>$counter,'searchKey' => $request->input('searchKey')]);\n }", "function listCompaniesByType ( $type ) {\n\t\tglobal $AppUI;\n\t\t$q = new DBQuery;\n\t\t$q->addQuery('company_id, company_name');\n\t\t$q->addTable('companies');\n\t\tforeach ($type as $t) { \n\t\t\t$q->addWhere('company_type ='. $t);\n\t\t}\n\t\t$this->setAllowedSQL($AppUI->user_id, $q);\n\t\t$q->addOrder('company_name');\n\n\t\treturn $q->loadHashList();\n\t}", "public function executeSearch_contact(sfWebRequest $request)\n{\n //por ahora solo x el email\n \n $name_or_email = $request->getParameter('data');\n $group_id = $request->getParameter('workGroup');\n $current_user = $this->getUser()->getAttribute(sfConfig::get('app_session_current_user'), null);\n //reviso si la session existe\n if($current_user!=null){\n $criterio_user = new Criteria();\n $criterio_user->add(DetalleGrupoTrabajoScPeer::EMAIL,'%'.$name_or_email.'%',Criteria::LIKE);\n $criterio_user->add(GrupoTrabajoScPeer::OWNER_ID,$current_user->getId());\n $criterio_user->add(GrupoTrabajoScPeer::ID,$group_id);\n $criterio_user->addJoin(DetalleGrupoTrabajoScPeer::GRUPO_ID,GrupoTrabajoScPeer::ID);\n $list_results = DetalleGrupoTrabajoScPeer::doSelect($criterio_user);\n $this->results = $list_results;\n return sfView::SUCCESS; \n }else{\n return sfView::ERROR;\n } \n\n \n }", "function Companies(){\n\t\t\t\treturn $this->companies;\n\t\t\t}", "public function filterCompany($companys)\n {\n $programsid = Auth::user()->programs_id;\n //filter alumni by company\n $alumni = Alumni::where('programs_id', '=', $programsid)->where('company', '=', $companys)->orderBy('company', 'asc')->get();\n \n $industry = Alumni::whereNotNull('industry')->orderBy('industry', 'asc')->pluck('industry')->unique();\n $gradYear = Alumni::whereNotNull('gradYear')->orderBy('gradYear', 'asc')->pluck('gradYear')->unique();\n $company = Alumni::whereNotNull('company')->orderBy('company', 'asc')->pluck('company')->unique();\n \n return view('Coach/alumSearch', compact('alumni', 'industry', 'gradYear', 'company'));\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('groupID',$this->groupID);\n\t\t$criteria->compare('categoryID',$this->categoryID);\n\t\t$criteria->compare('groupName',$this->groupName,true);\n\t\t$criteria->compare('iconID',$this->iconID);\n\t\t$criteria->compare('useBasePrice',$this->useBasePrice);\n\t\t$criteria->compare('anchored',$this->anchored);\n\t\t$criteria->compare('anchorable',$this->anchorable);\n\t\t$criteria->compare('fittableNonSingleton',$this->fittableNonSingleton);\n\t\t$criteria->compare('published',$this->published);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "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 $criteria=new CDbCriteria(array('with'=>array('rcampaign')));\n /*\n if ($this->client_id) {\n\t\t $criteria=new CDbCriteria(array('with'=>array('rcampaign')));\n } else {\n\t\t $criteria=new CDbCriteria;\n }\n */\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('inventory_id',$this->inventory_id);\n if ($this->duty_campaign_ids && empty($this->campaign_id)) {\n\t\t $criteria->compare('campaign_id',$this->duty_campaign_ids);\n } else {\n if (is_numeric($this->campaign_id) || is_array($this->campaign_id)) {\n $criteria->compare('campaign_id',$this->campaign_id);\n } else {\n $criteria->compare('rcampaign.name',$this->campaign_id, true);\n }\n }\n\t\t$criteria->compare('domain',$this->domain,true);\n\t\t$criteria->compare('domain_id',$this->domain_id,true);\n\t\t$criteria->compare('anchortext',$this->anchortext,true);\n\t\t$criteria->compare('targeturl',$this->targeturl,true);\n\t\t$criteria->compare('sourceurl',$this->sourceurl,true);\n\t\t$criteria->compare('sourcedomain',$this->sourcedomain,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('tasktype',$this->tasktype);\n\t\t$criteria->compare('taskstatus',$this->taskstatus);\n\t\t$criteria->compare('iostatus',$this->iostatus);\n\t\t$criteria->compare('assignee',$this->assignee);\n\t\t$criteria->compare('optional_keywords',$this->optional_keywords,true);\n\t\t$criteria->compare('mapping_id',$this->mapping_id,true);\n\t\t$criteria->compare('notes',$this->notes,true);\n\t\t$criteria->compare('t.duedate',$this->duedate);\n\t\t$criteria->compare('content_article_id',$this->content_article_id);\n\t\t$criteria->compare('content_campaign_id',$this->content_campaign_id);\n\t\t$criteria->compare('content_category_id',$this->content_category_id);\n\t\t$criteria->compare('send2cpdate',$this->send2cpdate);\n\t\t$criteria->compare('checkouted',$this->checkouted);\n\t\t$criteria->compare('created',$this->created,true);\n\t\t$criteria->compare('created_by',$this->created_by);\n\t\t$criteria->compare('modified',$this->modified,true);\n\t\t$criteria->compare('modified_by',$this->modified_by);\n\n\t\t$criteria->compare('iodate',$this->iodate,true);\n\t\t//$criteria->compare('livedate',$this->livedate,true);\n\n if(!empty($this->livedate) && !empty($this->livedate_end)) {\n $criteria->addBetweenCondition('livedate', $this->livedate, $this->livedate_end, \"AND\");\n //$criteria->params[':lstart'] = $this->livedate;\n //$criteria->params[':lend'] = $this->livedate_end;\n //$criteria->addCondition('livedate BETWEEN :lstart AND :lend');\n //$criteria->addCondition('(livedate >= :lstart AND livedate <= :lend)');\n } else {\n\t\t $criteria->compare('livedate',$this->livedate,true);\n }\n\n\t\t$criteria->compare('tierlevel',$this->tierlevel);\n\t\t$criteria->compare('qa_comments',$this->qa_comments,true);\n\t\t$criteria->compare('channel_id',$this->channel_id);\n if (is_numeric($this->desired_domain_id)) {\n\t\t $criteria->compare('desired_domain_id',$this->desired_domain_id);\n } else {\n\t\t $criteria->compare('desired_domain',$this->desired_domain_id, true);\n }\n\t\t$criteria->compare('desired_domain',$this->desired_domain,true);\n\t\t$criteria->compare('rewritten_title',$this->rewritten_title,true);\n\t\t$criteria->compare('blog_title',$this->blog_title,true);\n\t\t$criteria->compare('blog_url',$this->blog_url,true);\n\t\t$criteria->compare('progressstatus',$this->progressstatus);\n\n if ($this->client_id) {\n\t\t $criteria->compare('rcampaign.client_id',$this->client_id);\n }\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "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('ClientId',$this->ClientId,true);\n\t\t$criteria->compare('CompanyName',$this->CompanyName,true);\n\t\t$criteria->compare('Address',$this->Address,true);\n\t\t$criteria->compare('Email',$this->Email,true);\n\t\t$criteria->compare('Landline',$this->Landline,true);\n\t\t$criteria->compare('Status',$this->Status,true);\n\t\t$criteria->compare('DateCreated',$this->DateCreated,true);\n\t\t$criteria->compare('CreatedBy',$this->CreatedBy);\n\t\t$criteria->compare('DateUpdated',$this->DateUpdated,true);\n\t\t$criteria->compare('UpdatedBy',$this->UpdatedBy);\n\t\t//$criteria->compare('ApiToken',$this->ApiToken);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function actionIndex()\n {\n $searchModel = new CompanySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new CompanySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n \t// $company=Company::find()->where(['IsDelete'=>1])->all();\n $searchModel = new CompanySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n // 'company' => $company,\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\t\t$criteria->compare('owner_id',$this->company_id);\n\t\t$criteria->compare('position',$this->position,true);\n\t\t$criteria->compare('fname',$this->fname,true);\n\t\t$criteria->compare('sname',$this->sname,true);\n\t\t$criteria->compare('lname',$this->lname,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('image',$this->image,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "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('jsemp_id',$this->jsemp_id);\n\t\t$criteria->compare('ref_js_id',$this->ref_js_id);\n\t\t$criteria->compare('ref_industry_id',$this->ref_industry_id);\n\t\t$criteria->compare('ref_category_id',$this->ref_category_id);\n\t\t$criteria->compare('ref_sub_category_id',$this->ref_sub_category_id);\n\t\t$criteria->compare('ref_designation_id',$this->ref_designation_id);\n\t\t$criteria->compare('jsemp_expected_ref_industry_id',$this->jsemp_expected_ref_industry_id);\n\t\t$criteria->compare('jsemp_expected_ref_category_id',$this->jsemp_expected_ref_category_id);\n\t\t$criteria->compare('jsemp_expected_sub_category_id',$this->jsemp_expected_sub_category_id);\n\t\t$criteria->compare('jsemp_expected_designation_id',$this->jsemp_expected_designation_id);\n\t\t$criteria->compare('jsemp_expected_salary',$this->jsemp_expected_salary,true);\n\t\t$criteria->compare('jsemp_no_of_experience_years',$this->jsemp_no_of_experience_years,true);\n\t\t$criteria->compare('jsemp_no_of_experience_months',$this->jsemp_no_of_experience_months,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function actionGetcompany($search = null, $id = null) \n {\n $out = ['more' => false];\n if (!is_null($search)) {\n $query = new Query;\n $query->select('company_id As id, company_name AS text')\n ->from('mup_company')\n ->where('company_name LIKE \"%' . $search .'%\"')\n ->limit(50);\n $command = $query->createCommand();\n $data = $command->queryAll();\n $out['results'] = array_values($data);\n }\n elseif ($id > 0) {\n $out['results'] = ['id' => $id, 'text' => Company::find($id)->company_name];\n }\n else {\n $out['results'] = ['id' => 0, 'text' => 'No matching records found'];\n }\n echo Json::encode($out);\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$criteria->compare('hidturno',$this->hidturno);\n\t\t$criteria->compare('codocu',$this->codocu,true);\n\t\t$criteria->compare('codestado',$this->codestado,true);\n\t\t$criteria->compare('codigo',$this->codigo,true);\n\t\t$criteria->compare('numero',$this->numero,true);\n\t\t$criteria->compare('dispo',$this->dispo,true);\n\t\t$criteria->compare('util',$this->util,true);\n\t\t$criteria->compare('descripcion',$this->descripcion);\n\t\t$criteria->compare('np',$this->np);\n\t\t$criteria->compare('ns',$this->ns);\n\t\t$criteria->compare('htt',$this->htt,true);\n\t\t$criteria->compare('ntt',$this->ntt);\n\t\t$criteria->compare('textocorto',$this->textocorto,true);\n\t\t$criteria->compare('codcen',$this->codcen,true);\n\t\t$criteria->compare('codtipo',$this->codtipo,true);\n\t\t$criteria->compare('ap',$this->ap,true);\n\t\t$criteria->compare('nombres',$this->nombres,true);\n\t\t$criteria->compare('nombreobjeto',$this->nombreobjeto,true);\n\n\t\tif(isset($_SESSION['sesion_Trabajadores'])) {\n\t\t\t$criteria->addInCondition('codresponsable', $_SESSION['sesion_Trabajadores'], 'OR');\n\t\t} ELSE {\n\t\t\t$criteria->compare('codresponsable',$this->codresponsable,true);\n\t\t}\n if(isset($_SESSION['sesion_Ot'])) {\n\t\t\t$criteria->addInCondition('codproyecto', $_SESSION['sesion_Ot'], 'AND');\n\t\t} ELSE {\n\t\t\t$criteria->compare('codproyecto',$this->codproyecto,true);\n\t\t}\n if(isset($_SESSION['sesion_Inventario'])) {\n\t\t\t$criteria->addInCondition('codigoaf', $_SESSION['sesion_Inventario'], 'AND');\n\t\t} ELSE {\n\t\t\t$criteria->compare('codigoaf',$this->codigoaf,true);\n\t\t}\n \n \n \n\t\tif((isset($this->fecha) && trim($this->fecha) != \"\") && (isset($this->fecha1) && trim($this->fecha1) != \"\")) {\n\t\t\t\t$criteria->addBetweenCondition('fecha', ''.$this->fecha.'', ''.$this->fecha1.'');\n\t\t}\n \n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function get_client($data)\n {\n \t$query = $this->db->query(\"SELECT * FROM ibt_client_details WHERE Company_Name LIKE '%\".$data.\"%' LIMIT 10\"); \n \treturn $query->result_array();\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('company_id',$this->company_id);\n\t\t$criteria->compare('skill_id',$this->skill_id);\n\t\t$criteria->compare('contract_name',$this->contract_name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('billing_calculation',$this->billing_calculation,true);\n\t\t$criteria->compare('fulfillment_type',$this->fulfillment_type,true);\n\t\t$criteria->compare('is_subsidy',$this->is_subsidy);\n\t\t$criteria->compare('is_fee_start_activate',$this->is_fee_start_activate);\n\t\t$criteria->compare('start_fee_amount',$this->start_fee_amount);\n\t\t$criteria->compare('start_fee_day',$this->start_fee_day);\n\t\t$criteria->compare('start_fee_billing_cycle',$this->start_fee_billing_cycle);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('is_deleted',$this->is_deleted);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_updated',$this->date_updated,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n\t\t\t\t'pageSize'=>100,\n\t\t\t),\n\t\t));\n\t}", "public function getCompanyEmployees();", "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('clvcodigo',$this->clvcodigo);\n\t\t$criteria->compare('clvmunicipio',$this->clvmunicipio);\n\t\t$criteria->compare('strid',$this->strid,true);\n\t\t$criteria->compare('clvparroquia_sunacoop',$this->clvparroquia_sunacoop);\n\t\t$criteria->compare('strdescripcion',$this->strdescripcion,true);\n\t\t$criteria->compare('intsuperficie',$this->intsuperficie,true);\n\t\t$criteria->compare('strlatitud',$this->strlatitud,true);\n\t\t$criteria->compare('strlongitud',$this->strlongitud,true);\n\t\t$criteria->compare('strlimite_norte',$this->strlimite_norte,true);\n\t\t$criteria->compare('strlimite_sur',$this->strlimite_sur,true);\n\t\t$criteria->compare('strlimite_este',$this->strlimite_este,true);\n\t\t$criteria->compare('strlimite_oeste',$this->strlimite_oeste,true);\n\t\t$criteria->compare('strobservaciones',$this->strobservaciones,true);\n\t\t$criteria->compare('blnprefijo',$this->blnprefijo);\n\t\t$criteria->compare('blncapital',$this->blncapital);\n\t\t$criteria->compare('blnurbana',$this->blnurbana);\n\t\t$criteria->compare('blnborrado',$this->blnborrado);\n\t\t$criteria->compare('dtmregistro',$this->dtmregistro,true);\n\t\t$criteria->compare('dtmmodificado',$this->dtmmodificado,true);\n\t\t$criteria->compare('clvusuario',$this->clvusuario);\n\t\t$criteria->compare('geometrico',$this->geometrico,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "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 $entity_id=Yii::app()->session['P_Eu_Orgn_Code'];\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('CALENDAR_NAME',$this->CALENDAR_NAME,true);\n\t\t$criteria->compare('ENTITY_ID',$this->ENTITY_ID);\n $criteria->addInCondition('ENTITY_ID', array(null),'AND');\n $criteria->addInCondition('ENTITY_ID', array($entity_id),'OR');\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination'=>array(\n 'pageSize'=>'10',\n ), \n\t\t));\n\t}", "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('debtorno',$this->debtorno,true);\n\t\t$criteria->compare('branchcode',$this->branchcode,true);\n\t\t$criteria->compare('lead_id',$this->lead_id);\n\t\t$criteria->compare('folio',$this->folio,true);\n\t\t$criteria->compare('nombre',$this->nombre,true);\n\t\t$criteria->compare('apellido',$this->apellido,true);\n\t\t$criteria->compare('initial_contact',$this->initial_contact);\n\t\t$criteria->compare('estatus',$this->estatus,true);\n\t\t$criteria->compare('ocupacion',$this->ocupacion,true);\n\t\t$criteria->compare('calle',$this->calle,true);\n\t\t$criteria->compare('colonia',$this->colonia,true);\n\t\t$criteria->compare('entrecalles',$this->entrecalles,true);\n\t\t$criteria->compare('municipio',$this->municipio,true);\n\t\t$criteria->compare('cp',$this->cp);\n\t\t$criteria->compare('telefono',$this->telefono,true);\n\t\t$criteria->compare('telefono2',$this->telefono2,true);\n\t\t$criteria->compare('fax',$this->fax,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('referidopor',$this->referidopor,true);\n\t\t$criteria->compare('nombre_empresa',$this->nombre_empresa,true);\n\t\t$criteria->compare('razon_social',$this->razon_social,true);\n\t\t$criteria->compare('clasificacion',$this->clasificacion,true);\n\t\t$criteria->compare('nempleados',$this->nempleados);\n\t\t$criteria->compare('turnos',$this->turnos,true);\n\t\t$criteria->compare('medico_planta',$this->medico_planta,true);\n\t\t$criteria->compare('visitantes',$this->visitantes,true);\n\t\t$criteria->compare('tiempo_permanencia',$this->tiempo_permanencia,true);\n\t\t$criteria->compare('dias_publico',$this->dias_publico,true);\n\t\t$criteria->compare('plan_cotizado',$this->plan_cotizado,true);\n\t\t$criteria->compare('socios',$this->socios);\n\t\t$criteria->compare('forma_pago',$this->forma_pago,true);\n\t\t$criteria->compare('frecuencia_pago',$this->frecuencia_pago,true);\n\t\t$criteria->compare('convenio_empresa',$this->convenio_empresa,true);\n\t\t$criteria->compare('inscripcion_pmes',$this->inscripcion_pmes,true);\n\t\t$criteria->compare('segundo_mes',$this->segundo_mes,true);\n\t\t$criteria->compare('sales_stage',$this->sales_stage,true);\n\t\t$criteria->compare('probabilidad',$this->probabilidad,true);\n\t\t$criteria->compare('monto',$this->monto,true);\n\t\t$criteria->compare('asignada_a',$this->asignada_a);\n\t\t$criteria->compare('campania',$this->campania);\n\t\t$criteria->compare('lead_source',$this->lead_source);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}" ]
[ "0.70867807", "0.68736047", "0.66601723", "0.64698815", "0.6277668", "0.6247567", "0.61872554", "0.6094019", "0.60720736", "0.6040432", "0.6025865", "0.601708", "0.5978145", "0.59753317", "0.5970454", "0.5945595", "0.59134316", "0.58738345", "0.58536434", "0.5843092", "0.58369917", "0.58208174", "0.58017737", "0.5796415", "0.5788304", "0.5777983", "0.57722133", "0.57623225", "0.57588524", "0.57584226", "0.57582957", "0.5734883", "0.57270026", "0.57154703", "0.5709659", "0.57055724", "0.5684838", "0.5675312", "0.5666679", "0.56515557", "0.5638199", "0.5636241", "0.56261885", "0.5624298", "0.5620009", "0.56099796", "0.5606242", "0.560177", "0.56004953", "0.5599803", "0.5594869", "0.5594006", "0.55893207", "0.5588317", "0.55664515", "0.5559828", "0.55586433", "0.55537546", "0.55537546", "0.5553286", "0.5548803", "0.55436057", "0.553634", "0.55333585", "0.5530213", "0.55293727", "0.5528951", "0.5528424", "0.5524914", "0.5523509", "0.5522908", "0.55173767", "0.5514995", "0.5513999", "0.55050164", "0.55041194", "0.54992056", "0.54984754", "0.54924995", "0.54901326", "0.54884535", "0.54759675", "0.5473098", "0.54703164", "0.54654783", "0.54612625", "0.5458041", "0.54513615", "0.54513615", "0.5449899", "0.5448716", "0.54469395", "0.5444842", "0.54414743", "0.54206026", "0.54203796", "0.5417135", "0.54146886", "0.5414468", "0.541209" ]
0.5616861
45
get all syscomanies array without access control
public static function getAllGroupCompanies($ccgr_id) { $sql = " SELECT ccmp_id, ccmp_name FROM ccxg_company_x_group INNER JOIN ccmp_company ON ccxg_ccmp_id = ccmp_id WHERE ccxg_ccgr_id = :ccgr_id ORDER BY ccmp_name "; return Yii::app()->db ->createCommand($sql) ->bindParam(":ccgr_id", $ccgr_id, PDO::PARAM_INT) ->queryAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSysInfo() : array;", "public function getSystemUserPrograms()\n {\n $system_user_programs = array();\n return $system_user_programs;\n }", "private function getSysInfo(){\r\n $array = array('version' => phpversion(),\r\n 'system info' =>array('server name' => $_SERVER['SERVER_NAME'],\r\n 'server software' => $_SERVER['SERVER_SOFTWARE'],\r\n 'browser' => $_SERVER['HTTP_USER_AGENT']\r\n )\r\n \r\n );\r\n return $array;\r\n }", "function get_collector_array( $sy_id )\n{\n\tglobal $g_dbac;\n\t$g_dbac->connect();\n\t$cmd = \"SELECT tblauth.user_id,tblauth.fullname FROM tblpayment,tblauth\"\n\t\t. \" WHERE sy_id=$sy_id\"\n\t\t. \" AND tblpayment.user_id=tblauth.user_id\"\n\t\t. \" GROUP BY tblauth.user_id\";\n\t$ar = array();\n\t$res = $g_dbac->query( $cmd );\n\tif( $res==false ) return $ar;\n\tfor( $n=0; $n<$res->numRows(); $n++ ) {\n\t\t$dat = $res->fetchRow(DB_FETCHMODE_ARRAY,$n);\n\t\t$ar[$dat[0]] = $dat[1];\n\t}\n\treturn $ar;\n}", "public function getRequiredSystems()\n {\n return array();\n\n }", "public function getRequiredSystems()\n {\n return array();\n\n }", "private function all_consoles_for_select() {\n $consoles = Console::all();\n\n return array_combine(\n array_pluck($consoles, 'id'),\n array_pluck($consoles, 'name')\n );\n }", "public function getSysuserOptions()\n {\n $users = Sysuser::all();\n $options = [];\n $options[''] = 'Select a user';\n\n foreach ($users as $user) {\n $options[$user->api_id] = $user->server->name.' > '.$user->name;\n }\n\n return $options;\n }", "function get_sp_sysuser_list() {\n\ttry {\n\t\treturn sp()->sysuser_list()->data;\n\t} catch ( \\ServerPilotException $e ) {\n\t\treturn new \\WP_Error( $e->getCode(), $e->getMessage() );\n\t}\n}", "public function get_procs_array(){\n return array();\n }", "public function get_system_tables()\n\t{\n\t\treturn $this->driver_query('system_table_list');\n\t}", "public function getSystemUserGroups()\n {\n $system_user_groups = array();\n \n // load the related System_user_group objects\n //Busca grupo para professor\n $system_user_system_user_groups = SystemGroup::where('name','like','%- Professor%')->load();\n if (isset($system_user_system_user_groups[0]))\n {\n $group_id = $system_user_system_user_groups[0];\n }\n $system_user_groups[] = new SystemGroup( $group_id->id );\n //var_dump($system_user_groups);\n return $system_user_groups;\n \n }", "public static function getSystemCollections()\n {\n return [\n static::COLLECTION_ACTIVITY,\n static::COLLECTION_COLLECTIONS,\n static::COLLECTION_COLLECTION_PRESETS,\n static::COLLECTION_FIELDS,\n static::COLLECTION_FILES,\n static::COLLECTION_FOLDERS,\n static::COLLECTION_MIGRATIONS,\n static::COLLECTION_ROLES,\n static::COLLECTION_PERMISSIONS,\n static::COLLECTION_RELATIONS,\n static::COLLECTION_REVISIONS,\n static::COLLECTION_SETTINGS,\n static::COLLECTION_USERS,\n static::COLLECTION_WEBHOOKS,\n static::COLLECTION_USER_SESSIONS\n ];\n }", "public function allNamed(): array;", "public function get_procs_array();", "function _getAvailableSystemaccounts($scenario_id){\r\n // remove all model associations except Systemuser \r\n $this->Scenario->unbindModel(\r\n array(\r\n 'hasMany'=>array('Resource', 'Script', 'Parameter', 'Parameterset'),\r\n 'hasAndBelongsToMany' => array('Skill')\r\n )\r\n );\r\n $this->Scenario->id = $scenario_id;\r\n $this->Scenario->recursive = 1;\r\n $maxPlayers = $this->Scenario->read(null, $scenario_id);\r\n// $maxPlayers = Set::combine($maxPlayers['Systemaccount'], '{n}.id', '{n}.player_id');\r\n $available = array();\r\n foreach($maxPlayers['Systemaccount'] as $precompiled){\r\n if ($precompiled['player_id'] == 0){ // this one is currently not used by a player\r\n $info = array(\r\n 'user' => $precompiled['name'],\r\n 'passwd' => $precompiled['passwd_clear'],\r\n 'id' => $precompiled['id']\r\n );\r\n array_push($available, $info); // add its id to list of possible systemaccounts\r\n }\r\n }\r\n return ($available);\r\n\r\n }", "public function getListArray(){\n static $list;\n if (isset($list)) {\n return $list;\n }\n $package = new Hosh_Manager_Db_Package_Hosh_Class();\n $listall = $package->getList();\n $list = array();\n foreach ($listall as $val){\n $list[strtolower($val['sname'])] = $val;\n }\n return $list;\n }", "function getUsernames(){\n $arr = array();\n for($x=0;$x<count($this->names);$x++){\n array_push($arr,$this->names[$x]);\n }\n return $arr;\n }", "public function getUsers(){\n\t\t\n\t\t$ar = array();\n\t\t\n\t\t$result = $this->adapter->query(\"select * from vemplist order by ctct_name\")->execute();\n\t\t\n\t\tforeach ($result as $row) \n\t\t\t{\n\t\t\t\t$ar[$row['emp_id']]=$row['ctct_name'];\n\t\t\t}\n\t\t\n\t\treturn $ar;\n\t}", "public function listAllAvailableServices()\n {\n\t\t$data = $this->call(array(), \"GET\", \"sensors/services/available.json\");\n\t\t$data = $data->{'services'};\n\t\t$serviceArray = new ArrayObject();\n\t\tfor($i = 0; $i<count($data);$i++){\n\t\t\t$serviceArray->append(new Service($data[$i], $this));\n\t\t}\n\t\treturn $serviceArray;\n }", "public function getRequiredSystems()\n {\n return array(\n dirname(__FILE__).'/TestSystems/MergeSys1',\n );\n\n }", "public function getPrograms()\n {\n $programs = array();\n \n \n foreach( $this->getSystemUserGroups() as $group )\n {\n foreach( $group->getSystemPrograms() as $prog )\n {\n $programs[$prog->controller] = true;\n }\n }\n \n foreach( $this->getSystemUserPrograms() as $prog )\n {\n $programs[$prog->controller] = true;\n }\n \n return $programs;\n }", "function users_list_raw($offlim=NULL){\n $res = array();\n if(!is_null($offlim) and count($this->domains)>1) qz();\n foreach($this->domains as $ck=>$cd){\n $tmp = array();\n foreach((array)$cd->user_list($offlim) as $vdn)\n\t$tmp[$vdn] = $vdn;\n $res[$ck] = $tmp;\n }\n return $res;\n }", "public function getRequiredSystems()\n {\n return array(\n dirname(dirname(dirname(__FILE__))).'/Channels/Tests/TestSystems/TestSys2',\n dirname(dirname(dirname(__FILE__))).'/Channels/Tests/TestSystems/TestSys1',\n );\n\n }", "function GetCompanies()\n{\n\t$CompArr=array();\n\t$Query = \"SELECT * FROM \".PFX.\"_tracker_client ORDER BY NAME ASC\";\n\t$Sql = new Query($Query);\n\twhile ($Row=$Sql->Row()) {\n\t\t$CompArr[$Sql->Position]['Name']=htmlspecialchars(stripslashes($Row->NAME));\n\t\t$CompArr[$Sql->Position]['Value']=$Row->ID;\n\t}\n\treturn $CompArr;\n}", "public function getSubusers()\n\t{\n\t\treturn $this->getObjectArray('subusers', null, 'user', array());\n\t}", "function users_list($how=0,$offlim=NULL){\n $res = array();\n if(!is_null($offlim) and count($this->domains)>1) qz();\n foreach($this->domains as $ck=>$cd){\n $tmp = array();\n foreach((array)$cd->user_list($offlim) as $vdn)\n\t$tmp[$vdn] = $this->user_disp($vdn);\n if(empty($tmp)) continue;\n if($how==1) $res[$ck] = $tmp; \n else $res = array_merge($res,$tmp);\n }\n return $res;\n }", "public static function getAllOwners():array\n {\n // We call getInstance here because this is a static function\n $db = Database::getInstance(self::$dbName);\n return $db->fetchAll(\n 'SELECT id,first_name,last_name FROM user where user_type=0;'\n );\n \n }", "public function getOSList()\n {\n $data = $this->doGet('compute/list/os');\n return collect($data['__data']);\n }", "public function getProfitSystem() {\n\t\t\n\t\t$profit = $this->entityManager->getRepository(Profit::class)\n\t\t->findAll();\n\t\t\n\t\t$profitarray = [];\n\t\t\n\t\t// transform the object into an array for the select form\n\t\tforeach ($profit as $object)\n\t\t{\n\t\t\t$profitarray[$object->getId()] = $object->getProfitName();\n\t\t}\n\t\t\n\t\treturn $profitarray;\n\t}", "function system_get_all_unames()\n{\n\t$retv[id1]=100;\n\t$retv[uname1]=\"tt\";\n\treturn($retv);\n}", "public function get_users()\r\n\t\t{\r\n\t\t\t$retArr = array();\r\n\r\n\t\t\tif(is_array($this->obj))\r\n\t\t\t{\r\n\t\t\t\treturn $this->obj;\r\n\t\t\t}\r\n\t\t}", "public static function all(){\n //Method inherited from \\Illuminate\\Foundation\\Console\\Kernel \n return \\App\\Console\\Kernel::all();\n }", "public static function getAll(): array;", "function getAllUsedServices()\n {\n $ret = array();\n foreach ($this->plugins as $name => $obj) {\n if ($obj->is_account) {\n if (isset($obj->DisplayName)) {\n $ret[$name] = $obj->DisplayName;\n } else {\n $ret[$name] = $name;\n }\n }\n }\n return $ret;\n }", "public function findServices(): array;", "function get_list() {\n\t\t$query = \"select pr_id, pr_cu_id from \".$this->_db_table;\n\t\t$cloudprofile_name_array = array();\n\t\t$cloudprofile_name_array = htvcenter_db_get_result_double ($query);\n\t\treturn $cloudprofile_name_array;\n\t}", "public function getSchedules() {\n $result = DB::select(\"SELECT * FROM schedular,unnest(string_to_array(user_id, ',')) AS s_user_id WHERE s_user_id = ANY ( string_to_array('\".session('user-id').\"', ',') ) AND is_active = true order by created_date desc\" );\n if (count($result) > 0) {\n return $result;\n }\n return array();\n }", "public function getServices(): array;", "public function getAllForCustonObj() {\n $query = $this->db->query(\"SELECT * FROM $this->table ORDER BY shortname;\");\n $this->allcpny = $query->custom_result_object('entity\\Company');\n // print \"<pre>\";\n // print_r($this->cpny);\n // print \"</pre>\";\n // exit();\n return $this->allcpny;\n }", "public function getScopes() {\n //sql to return all user objects\n $sql = \"select * from scope\";\n $result = mysqli_query($this->plink, $sql);\n $scopes = array();\n while ($rows = mysqli_fetch_assoc($result)) {\n $scopes[] = $this->scope($rows);\n }\n return $scopes;\n }", "public function getSystemRoleNames() {\n if (!isset($this->cache['roleNames']))\n return $this->cache['roleNames'];\n\n $roles = Environment::getConfig()->roles;\n $roleNames = array(\n 'administrator' => $this->getRole($roles->administrator)->name,\n 'employee' => $this->getRole($roles->employee)->name,\n 'student' => $this->getRole($roles->student)->name,\n );\n\n $this->cache->save('roleNames', $roleNames);\n return $roleNames;\n }", "public static function userdept(){\n $rolelist = [];\n $db = Db::getInstance(); \t \n $req = $db->query('SELECT * FROM user_department'); \n foreach($req->fetchAll() as $row) {\n $rolelist[] = $row;\n }\n return $rolelist;\n \n }", "public function modules(){\n $userID = Auth::user()->USER_ID;\n $users = USER::where('USER_ID',$userID)->with('authModules')->first();\n $res['USERNAME'] = $users->USERNAME;\n $userModules = $users->authModules;\n foreach($userModules as $userModule){\n $userModuleID = $userModule->MODULE_ID;\n $modules = SystemModule::where('MODULE_ID', $userModuleID)->get();\n foreach($modules as $module){\n array_push($res,$module->MODULE_NAME);\n }\n }\n return $res;\n }", "function olc_get_system_information() {\n\n\t$db_query = olc_db_query(SELECT.\"now() as datetime\");\n\t$db = olc_db_fetch_array($db_query);\n\n\tlist($system, $host, $kernel) = preg_split('/[\\s,]+/', @exec('uname -a'), 5);\n\n\treturn array('date' => olc_datetime_short(date('Y-m-d H:i:s')),\n\t'system' => $system,\n\t'kernel' => $kernel,\n\t'host' => $host,\n\t'ip' => gethostbyname($host),\n\t'uptime' => @exec('uptime'),\n\t'http_server' => $_SERVER['SERVER_SOFTWARE'],\n\t'php' => PHP_VERSION,\n\t'zend' => (function_exists('zend_version') ? zend_version() : EMPTY_STRING),\n\t'db_server' => DB_SERVER,\n\t'db_ip' => gethostbyname(DB_SERVER),\n\t'db_version' => 'MySQL ' . (function_exists('mysql_get_server_info') ? mysql_get_server_info() : EMPTY_STRING),\n\t'db_date' => olc_datetime_short($db['datetime']));\n}", "function get_cyberlux_clientes($co_cli=''){\n\t\t$sQuery=\"SELECT cli_des,co_cli FROM clientes WHERE 1 = 1 \";\n\t\tif($co_cli) {\t$sQuery.=\"AND co_cli = '$co_cli' \";\t}\n\t\t\n\t//\tdie($sQuery);\n\t\t$result=mssql_query($sQuery) or die(mssql_min_error_severity());\n\t\t$i=0;\n\t\twhile($row=mssql_fetch_array($result)){\n\t\t\tforeach($row as $key=>$value){\n\t\t\t\t$res_array[$i][$key]=$value;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn($res_array);\n\t\t\t\n\t}", "static function getUserInfo(){\n $result = Array();\n return $result;\n }", "public function getDriverNames(): array;", "public function getUsers()\n {\n return Security::getUserList();\n }", "function d4os_io_db_070_os_user_load_all() {\n $users = array();\n d4os_io_db_070_set_active('os_robust');\n $result = db_query(\"SELECT *, ua.FirstName AS username, ua.LastName AS lastname, ua.PrincipalID AS UUID, ua.Email AS email, CONCAT_WS(' ', FirstName, LastName) AS name FROM {UserAccounts} AS ua\");\n while ($user = db_fetch_object($result)) {\n $users[] = $user;\n }\n d4os_io_db_070_set_active('default');\n return $users;\n}", "function getAllActiveRasInfos()\n{\n $ras_infos=array();\n $ras_ips_request=new GetActiveRasIPs();\n list($success,$ras_ips)=$ras_ips_request->send();\n if(!$success)\n return array(FALSE,$ras_ips);\n $ras_info_request=new GetRasInfo(\"\");\n foreach($ras_ips as $ras_ip)\n {\n $ras_info_request->changeParam(\"ras_ip\",$ras_ip);\n list($success,$ras_info)=$ras_info_request->send();\n if(!$success)\n return array(FALSE,$ras_info);\n $ras_infos[]=$ras_info;\n }\n return array(TRUE,$ras_infos);\n}", "public function findServicesDowntimesForNonAdminUser(): array;", "function getAllData() {\n \n $sql = \"call spGetAllsecUserOptHide(@out_status);\";\n $rs = $this->db->Execute($sql);\n \t$data = $rs->getArray();\n\t\t$rs->Close();\n \treturn $data; \n \n }", "function users(): array { return $this->users; }", "function getAllInfo(){\n //Creamos la consulta\n $sql = \"SELECT * FROM usuarios;\";\n //obtenemos el array con toda la información\n return $this->getArraySQL($sql);\n }", "public function findServicesDowntimesForAdminUser(): array;", "public static function all(){\n\t\t$bdd = new DBcnx();\n\t\t\treturn $bdd->allClient();\n\t}", "function Companies(){\n\t\t\t\treturn $this->companies;\n\t\t\t}", "public function get_all_registered()\n {\n }", "public function get_all_registered()\n {\n }", "function get_all_online_contacts() {\n //get the table and select everything.\n $task = Doctrine_Query::create()\n ->from('Zim_Model_User user')\n ->where('user.status != 0')\n ->andWhere('user.status != 3')\n ->andWhere('user.timedout != 1');\n $exec = $task->execute();\n $contacts = $exec->toArray();\n\n foreach ($contacts as $key => $contact) {\n //if the contacts username is not set then get it from Zikula\n if (!isset($contact['uname']) || empty($contact['uname'])) {\n $contacts[$key]['uname'] = UserUtil::getVar('uname', $contact['uid']);\n }\n }\n\n //return the array of contacts\n return $contacts;\n }", "public function __toArray()\n {\n if ($this->getStatus()->isFree()) {\n return array(\n 'name' => $this->name,\n 'status' => (string)$this->status,\n 'peopleUnderControl' => $this->peopleUnderControl->__toArray()\n );\n } else {\n return null;\n }\n }", "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 static function mntList()\n{\nreturn array_keys(self::$phk_tab);\n}", "public function findAllOfficialDistributions() {}", "public static function getBusinessUsers()\n\t{\n\t\t$users = [];\n\t\t$option = Main\\Config\\Option::get('bitrix24', 'business_tools_unlim_users', false);\n\t\tif ($option)\n\t\t{\n\t\t\t$users = array_map('intVal', explode(\",\", $option));\n\t\t}\n\n\t\treturn $users;\n\t}", "function get_users()\n {\n //Unimplemented\n }", "public function get_subDevices(): array\n {\n return $this->get_subDevices_internal();\n }", "public function allUser(){\n\n\t\t\t$data=$this->all('oops');\n\t\t\treturn $data;\n\t\t}", "public function getProgramsList()\n {\n $programs = array();\n \n foreach( $this->getSystemUserGroups() as $group )\n {\n foreach( $group->getSystemPrograms() as $prog )\n {\n $programs[$prog->controller] = $prog->name;\n }\n }\n \n foreach( $this->getSystemUserPrograms() as $prog )\n {\n $programs[$prog->controller] = $prog->name;\n }\n \n asort($programs);\n return $programs;\n }", "public static function getEnterpriseCompanies(){\n $result = db::get(\"SELECT uid_empresa FROM \". TABLE_EMPRESA .\" WHERE is_enterprise = 1 ORDER BY nombre\", \"*\", 0, \"empresa\");\n return new ArrayObjectList($result);\n }", "public function getArray($aname){\n\t\tif(isset($this->id)){\n\t\t\t$this->name = $this->GetName();\n\t\t\t//5.3\n\t\t\t$module = call_user_func(array($this->name.\"ServerModule\",'getInstance'));\n\t\t\t//should be changed to direct call later (?)\n\t\t\tswitch($aname){\n\t\t\t\tcase 'Operate':\n\t\t\t\t\treturn $module->OperateRequirements();\n\t\t\t\tbreak;\n\t\t\t\tcase 'Create':\n\t\t\t\t\treturn $module->CreateOptions();\n\t\t\t\tbreak;\n\t\t\t\tcase 'Client':\n\t\t\t\t\treturn $module->ClientOptions();\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Exception(\"Unknown server module method\");\n\t\t\t}\n\t\t}\n\t}", "public function getInformation(): array;", "public function get_servicios(){\n\t\t$query = $this->db->get('servicios');\n\t\treturn $query->result_array();\n\t}", "function get_all_contacts() {\n //get all the users\n $task = Doctrine_Query::create()\n ->from('Zim_Model_User');\n $exec = $task->execute();\n $contacts = $exec->toArray();\n //return the array of contacts\n return $contacts;\n\n }", "abstract protected function getPlatforms(): array;", "function allAdmin(){\n \t$con = new mysqli('localhost','heng','@powell135','200ok');\n \tif ($con -> connect_errno){\n \t\treturn CONNECTION_FAIL;\n \t}\n\t$permission = ADMIN;\n \t$query = \"select lastLogin, username, email, suspended, lastUpdate from jnjn_user where permission = '$permission'\";\n \t$result = $con -> query($query);\n \t$users = array();\n \twhile($row = mysqli_fetch_array($result)){\n\t\t$users[] = new User($row['username'],$row['email'],$row['lastLogin'],$row['suspended'],$row['lastUpdate']);\n \t}\n \t$result -> close();\n \treturn $users;\n }", "function querytoarray ($channel, $schname, $schowner, $wuser){\n\t\tglobal $mysqli, $uname;\n\t\t$result = $mysqli->query(\"SELECT $schname, $schowner FROM $channel \n\t\t\t\tWHERE $wuser = \\\"$uname\\\";\");\n\t\t$rows = array();\n\t\twhile($r = mysqli_fetch_assoc($result)){\n\t\t\t$rows[] = array('name'=>$r[$schname],'owner' => $r[$schowner]);\n\t\t}\n\t\treturn $rows;\n\t}", "public function getApplications()\n\t{\n\t}", "public function get_catalogos() {\n $this->db->flush_cache();\n $this->db->reset_query();\n $resutado = $this->db->get('catalogos.programas_proyecto');\n return $resutado->result_array();\n }", "function getAllData() {\n \n $sql = \"call spGetAllUsuarios(@out_status);\";\n $rs = $this->db->Execute($sql);\n \t$data = $rs->getArray();\n\t\t$rs->Close();\n \treturn $data; \n \n }", "public static function getAdministratorsFromDB(){\r\n include_once './db_functions.php';\r\n $db = new DB_Functions();\r\n $query = \"SELECT *\r\n FROM \t AMMINISTRATORE;\";\r\n $resQuery = $db->executeQuery($query);\r\n\r\n $i=0;\r\n $amministratori= array();\r\n foreach($resQuery[\"response\"] as $row ){\r\n $utente_registrato = Utente_registrato::getRecordInDB($row[0]);\r\n $amministratori[$i] = $utente_registrato;\r\n $i++;\r\n }\r\n return $amministratori;\r\n }", "function odbcadmin_list(){\n\t$sql = \"SELECT * FROM odbcadmin\";\n\t$results= sql($sql, \"getAll\", DB_FETCHMODE_ASSOC);\n\n\tforeach($results as $result){\n\t\t$odbc_records[] = array($result['id'],$result['dsname'],$result['username'],$result['password'],$result['dbtype']);\n\t}\n\treturn isset($odbc_records)?$odbc_records:null;\n}", "public function getAllSupervisors()\n {\n return $this->getMineListSupervisors();\n }", "function get_all_accounts() {\n\t\t$status = status();\n\t\t$command = \"\";\n\t\t\n\t\tif($status) {\n\t\t\tif($status === 2) {\n\t\t\t\t$command = \"SELECT username, first_name, last_name, admin FROM accounts;\";\n\t\t\t} else {\n\t\t\t\t$command = \"SELECT username, first_name, last_name FROM accounts;\";\n\t\t\t}\n\t\t} else {\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t$connection = new mysqli(IP, USER, PASSWORD, DATABASE);\n\t\tif ($connection->connect_errno)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\t\n\t\t$results = $connection->query($command);\n\t\t$connection->close();\n\t\t\t\n\t\t$users = array();\n\t\t\t\n\t\tfor($i = 0; $i < $results->num_rows; $i++)\n\t\t{\n\t\t\t$results->data_seek($i);\n\t\t\t$users[$i] = $results->fetch_assoc();\n\t\t}\n\t\treturn $users;\n\t}", "public static function getAvailableOperatingSystems(): array\n {\n return self::$operatingSystems;\n }" ]
[ "0.7029212", "0.6512348", "0.6151811", "0.6080549", "0.5967255", "0.5967255", "0.5855667", "0.5854226", "0.5796701", "0.57454294", "0.5728627", "0.5709563", "0.5691331", "0.5683252", "0.56320244", "0.5610608", "0.55917513", "0.5575032", "0.55454046", "0.55115396", "0.55098903", "0.5507462", "0.550702", "0.5493616", "0.54904604", "0.54792327", "0.54632396", "0.54621375", "0.5460279", "0.54461354", "0.5444366", "0.5444328", "0.5439757", "0.54359555", "0.5434418", "0.54270095", "0.5425993", "0.541878", "0.54020286", "0.5340255", "0.5329649", "0.53237736", "0.53234416", "0.532314", "0.53169", "0.53137416", "0.5301854", "0.5293089", "0.52921325", "0.5291701", "0.52747595", "0.5265526", "0.5262876", "0.5260753", "0.52586406", "0.5233677", "0.5228204", "0.5227714", "0.52244985", "0.5223826", "0.5221738", "0.5219273", "0.5214312", "0.5214312", "0.5214312", "0.5214312", "0.5214312", "0.5214312", "0.5214312", "0.5214312", "0.5214312", "0.5214312", "0.5214312", "0.5214312", "0.5214312", "0.5214312", "0.5214312", "0.5214312", "0.5207721", "0.52050775", "0.52039814", "0.51974833", "0.5191973", "0.51877195", "0.5175153", "0.51715976", "0.5168829", "0.5168452", "0.5166155", "0.5162589", "0.516122", "0.5158377", "0.51577044", "0.51540124", "0.51537174", "0.51508635", "0.5135393", "0.5134717", "0.5131828", "0.51308906", "0.51294583" ]
0.0
-1
Add rout for minify script
public function appendRoute($routes) { $routes['min/styles/{hash}'] = [ 'html' => ['\\lolita\\LolitaFramework\\Min\\Controllers\\ControllerAssets', 'styles'] ]; $routes['min/scripts/{hash}'] = [ 'html' => ['\\lolita\\LolitaFramework\\Min\\Controllers\\ControllerAssets', 'scripts'] ]; return $routes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function preRouter(){\n\t\t\n\t}", "function add_custom_admin_routes($app) {\n\n}", "function router_use_rewriting()\n{\n return framework_config('pretty_urls', false, true);\n}", "private function appendRoute($fileName){\n\n $contents = ' require_once \"Larastrapi/'.$this->appNamePath.'/'.$fileName.'\"; ';\n return Storage::disk('routes_append')->append(\"web.php\", $contents);\n\n }", "function attempt_add_custom_routes($target_url) {\n\n $target_segment = str_replace(BASE_URL, '', $target_url);\n\n\n foreach (CUSTOM_ROUTES as $key => $value) {\n\n if ($key == $target_segment) {\n $target_url = str_replace($key, $value, $target_url);\n }\n }\n\n return $target_url;\n}", "public function updateJsRouter()\n {\n if(! array_key_exists( 'js_router', $this->options['paths'] )) {\n return;\n }\n $target = base_path($this->options['paths']['js_router']);\n\n // set import\n $hook = '/* bread_js_router_import */';\n $file = base_path($this->options['paths']['stubs']) . '/resources/assets/js/components/router_import.js';\n $this->updateFileContent($target, $hook, $file);\n\n // set route\n $hook = '/* bread_js_router_route */';\n $file = base_path($this->options['paths']['stubs']) . '/resources/assets/js/components/router_route.js';\n $this->updateFileContent($target, $hook, $file);\n }", "public function addRoutes()\n {\n //Get the routes template content\n $content = \\File::get($this->package_path('Templates/routes.php'));\n //Append to the routes.php file\n $this->addToFile('routes.php', 'routes', \"\\n\\n\" . $content);\n }", "function beforeroute(){\n }", "function beforeroute(){\n }", "public function register_routes() {\n\n\t\t\\add_filter( 'do_parse_request', array( $this, 'handle_routing' ) );\n\n\t}", "public static function route();", "private static function createRootRoute()\n {\n self::$Router->map('GET|POST', '/', function(){\n Root::executeResponse();\n exit();\n });\n }", "public function map() {\n\t\tRoute::middleware( 'web' )->group( mantle_base_path( 'routes/web.php' ) );\n\t\tRoute::middleware( 'rest-api' )->group( mantle_base_path( 'routes/rest-api.php' ) );\n\t}", "function register_rest_routes() {\n\tif ( class_exists( '\\WP_REST_Controller' ) ) {\n\t\tinclude_once __DIR__ . '/wprest-shortcodes-controller.php';\n\t\t$controller = new rest\\WPREST_Shortcodes_Controller();\n\t\t$controller->register_routes();\n\t}\n}", "public function routerize(Router $router)\n\t{\n\t\t$router->middleware('admin','Mkny\\Cinimod\\Middleware\\Admin');\n\t\t$router->middleware('site','Mkny\\Cinimod\\Middleware\\Site');\n\n\t\t\n\n\t\t$router->group([\n 'namespace' => $this->namespace,\n // 'middleware' => 'web',\n ], function ($router) {\n require mkny_path('\\Cinimod\\Controllers\\routes.php');\n // require mkny_path('\\Cinimod\\Controllers\\routes.php');\n });\n\t\t\n\t\t\n\n\t\t// $this->routeResolver($router);\n\n\t\t\n\n\t}", "function defineRoutes(&$router) {\n /*\n * example routers\n * \n * \n */\n //$router->map('modulename', 'modulename', array('controller' => 'modulename', 'action' => 'index'));\n //$router->map('dashboard_modulename', 'dashboard/modulename', array('controller' => 'modulename', 'action' => 'index'));\n //$router->map('modulename_view_project', 'modulename/:project_id/view', array('controller' => 'modulename', 'action' => 'view'), array('project_id' => '\\d+'));\n }", "protected function preReRouting()\n {\n\n }", "public function map()\n {\n //默认web模块路由\n Route::namespace('App\\Http\\Controllers')->group(base_path('routes/web.php'));\n\n //main模块的路由\n Route::prefix('main')->namespace('App\\Http\\Controllers\\Main')->group(base_path('routes/main.php'));\n\n //builder模块的路由\n if(app()->environment() == 'local'){\n Route::prefix('builder')->namespace('Tools\\Builder') ->group(base_path('tools/Builder/router.php'));\n }\n }", "private function addRoute()\n {\n if (! $this->postType->rewrite) {\n return;\n }\n $postTypeSlug = $this->postType->rewrite['slug'];\n $this->cortexRoutes->addRoute(new QueryRoute(\n \"{$postTypeSlug}/{postName}/{singleChildName}\",\n function (array $matches) use ($postTypeSlug) {\n $queryPost = new QueryPost(\n $this->postType->name,\n $matches['postName']\n );\n if (! $queryPost->postExists()) {\n new TemplateRenderer('404');\n }\n $postSingle = $queryPost->getPost();\n new TemplateRenderer(\n $postTypeSlug,\n $matches['singleChildName'],\n $this->makeDataArray(\n $postSingle->ID,\n $matches['singleChildName']\n ),\n $this->templateRootDirectory\n );\n die();\n }\n ));\n }", "function klein_compile_route( $route ) {\n\tif ( preg_match_all( '`(/|\\.|)\\[([^:\\]]*+)(?::([^:\\]]*+))?\\](\\?|)`', $route, $matches, PREG_SET_ORDER ) ) {\n\t\t$match_types = array(\n\t\t\t'i' => '[0-9]++',\n\t\t\t'a' => '[0-9A-Za-z]++',\n\t\t\t'h' => '[0-9A-Fa-f]++',\n\t\t\t'*' => '.+?',\n\t\t\t'**' => '.++',\n\t\t\t'' => '[^/]+?',\n\t\t);\n\t\tforeach ( $matches as $match ) {\n\t\t\tlist( $block, $pre, $type, $param, $optional ) = $match;\n\n\t\t\tif ( isset( $match_types[ $type ] ) ) {\n\t\t\t\t$type = $match_types[ $type ];\n\t\t\t}\n\t\t\tif ( $pre === '.' ) {\n\t\t\t\t$pre = '\\.';\n\t\t\t}\n\t\t\t// Older versions of PCRE require the 'P' in (?P<named>)\n\t\t\t$pattern = '(?:' . ( $pre !== '' ? $pre : null ) . '(' . ( $param !== '' ? \"?P<$param>\" : null ) . $type . '))' . ( $optional !== '' ? '?' : null );\n\n\t\t\t$route = str_replace( $block, $pattern, $route );\n\t\t}\n\t}\n\n\treturn \"`^$route$`\";\n}", "public function action_init_register_rewrites() {\n add_rewrite_endpoint( 'ics', EP_PERMALINK );\n }", "function add_routes_to_json($jsonData){\n\n // Get the name of the category base. Default to \"categories\"\n $category_base = get_option('category_base');\n\t\tif( empty($category_base) ){\n\t\t\t$category_base = 'category';\n\t\t}\n\n // build out router table to be used with Vue\n $programmed_routes = array(\n\n // Per-site\n // '/path' => 'VueComponent',\n // '/path/:var' => 'ComponentWithVar'\n // '/path/*/:var' => 'WildcardAndVar'\n // path_from_dev_id('dev-id') \t\t=> 'DefinedByDevId',\n\t\t // path_from_dev_id('dev-id', '/append-me') => 'DevIdPathPlusAppendedString',\n\n\t\t\t/*\n\t\t\t// Common Funkhaus setups\n\t\t\t// Directors - redirect to first child\n\t\t\tpath_from_dev_id('directors') => array(\n\t\t\t\t'redirect'\t=> get_child_of_dev_id_path('directors')\n\t\t\t),\n\t\t\t// Director detail\n\t\t\tpath_from_dev_id('directors', '/:director')\t\t\t\t\t=> 'DirectorDetail',\n\t\t\t// Reel grid\n\t\t\tpath_from_dev_id('directors', '/:director/:reel')\t\t\t=> 'ReelGrid',\n\t\t\t// Video detail\n\t\t\tpath_from_dev_id('directors', '/:director/:reel/:video')\t=> 'VideoDetail',\n\t\t\t// About\n\t\t\tpath_from_dev_id('about')\t=> 'About',\n\t\t\t// Contact\n\t\t\tpath_from_dev_id('contact')\t=> 'Contact',\n\t\t\t// Contact region - redirect to parent\n\t\t\tpath_from_dev_id('contact', '/:region')\t=> array(\n\t\t\t\t'redirect'\t=> path_from_dev_id('contact')\n\t\t\t),\n\t\t\t*/\n\n // Probably unchanging\n '' => 'FrontPage',\n '/' . $category_base => 'Archive',\n '/(\\\\d+)/:slug' => array(\n\t\t\t\t'name'\t\t=> 'SinglePost',\n\t\t\t\t'component'\t=> 'Default'\n\t\t\t), // If Permalinks set to \"/%post_id%/%postname%/\" then this will be a single Blog post\n '*' \t\t=> array(\n\t\t\t\t'name'\t\t=> 'Fallback',\n\t\t\t\t'component'\t=> 'Default'\n\t\t\t)\n\n );\n\n\t\t$jsonData['routes'] = array_merge( get_custom_template_routes(), $programmed_routes );\n\n\t\treturn $jsonData;\n\t}", "public static function add_rewrite_rule()\n {\n }", "private function mapAdminRoutes()\n {\n $this->name('backups.')\n ->prefix($this->config()->get('arcanesoft.backups.route.prefix', 'backups'))\n ->group(function () {\n Routes\\StatusesRoutes::register();\n });\n }", "function add_rewrite_endpoint($name, $places, $query_var = \\true)\n {\n }", "function defineRoutes() {\n Router::map('homepage', '', array('controller' => DEFAULT_CONTROLLER, 'action' => DEFAULT_ACTION, 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('admin', 'admin', array('controller' => 'admin', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('public', 'public', array('controller' => 'public', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n Router::map('wireframe_updates', 'wireframe-updates', array('controller' => 'backend', 'action' => 'wireframe_updates', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n Router::map('menu_refresh_url', 'refresh-menu', array('controller' => 'backend', 'action' => 'refresh_menu', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('quick_add', 'quick-add', array('controller' => 'backend', 'action' => 'quick_add', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n // API\n Router::map('info', 'info', array('controller' => 'api', 'action' => 'info', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n // Disk Space\n Router::map('disk_space_admin', 'admin/disk-space', array('controller' => 'disk_space_admin', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_usage', 'admin/disk-space/usage', array('controller' => 'disk_space_admin', 'action' => 'usage', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_admin_settings', 'admin/disk-space/settings', array('controller' => 'disk_space_admin', 'action' => 'settings', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_remove_application_cache', 'admin/disk-space/tools/remove-application-cache', array('controller' => 'disk_space_admin', 'action' => 'remove_application_cache', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_remove_logs', 'admin/disk-space/tools/remove-logs', array('controller' => 'disk_space_admin', 'action' => 'remove_logs', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_remove_old_application_versions', 'admin/disk-space/tools/remove-old-application-versions', array('controller' => 'disk_space_admin', 'action' => 'remove_old_application_versions', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n // Appearance\n Router::map('appearance_admin', 'admin/appearance', array('controller' => 'appearance', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_add_scheme', 'admin/appearance/add-scheme', array('controller' => 'appearance', 'action' => 'add', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_edit_scheme', 'admin/appearance/:scheme_id/edit', array('controller' => 'appearance', 'action' => 'edit', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_rename_scheme', 'admin/appearance/:scheme_id/rename', array('controller' => 'appearance', 'action' => 'rename', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_delete_scheme', 'admin/appearance/:scheme_id/delete', array('controller' => 'appearance', 'action' => 'delete', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_set_as_default_scheme', 'admin/appearance/:scheme_id/set-as-default', array('controller' => 'appearance', 'action' => 'set_as_default', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n // Scheduled Tasks Admin\n Router::map('scheduled_tasks_admin', 'admin/scheduled-tasks', array('controller' => 'scheduled_tasks_admin', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n // Network settings\n Router::map('network_settings', 'admin/network', array('controller' => 'network_admin', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n // Indices admin\n Router::map('indices_admin', 'admin/indices', array('controller' => 'indices_admin', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('indices_admin_rebuild', 'admin/indices/rebuild', array('controller' => 'indices_admin', 'action' => 'rebuild', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('indices_admin_rebuild_finish', 'admin/indices/rebuild/finish', array('controller' => 'indices_admin', 'action' => 'rebuild_finish', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n Router::map('object_contexts_admin_rebuild', 'admin/indices/object-contexts/rebuild', array('controller' => 'object_contexts_admin', 'action' => 'rebuild', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('object_contexts_admin_clean', 'admin/indices/object-contexts/clean', array('controller' => 'object_contexts_admin', 'action' => 'clean', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n // Scheduled tasks\n Router::map('frequently', 'frequently', array('controller' => 'scheduled_tasks', 'action' => 'frequently', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('hourly', 'hourly', array('controller' => 'scheduled_tasks', 'action' => 'hourly', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('daily', 'daily', array('controller' => 'scheduled_tasks', 'action' => 'daily', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n // trash related\n Router::map('trash', 'trash', array('controller' => 'trash', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('trash_section', 'trash/:section_name', array('controller' => 'trash', 'action' => 'section', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('trash_empty', 'trash/empty', array('controller' => 'trash', 'action' => 'empty_trash', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n Router::map('object_untrash', 'trash/untrash-object', array('controller' => 'trash', 'action' => 'untrash_object', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO), array('object_id' => Router::MATCH_ID));\n Router::map('object_delete', 'trash/delete-object', array('controller' => 'trash', 'action' => 'delete_object', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO), array('object_id' => Router::MATCH_ID));\n\n // Control Tower\n Router::map('control_tower', 'control-tower', array('controller' => 'control_tower', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('control_tower_empty_cache', 'control-tower/empty-cache', array('controller' => 'control_tower', 'action' => 'empty_cache', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('control_tower_delete_compiled_templates', 'control-tower/delete-compiled-templates', array('controller' => 'control_tower', 'action' => 'delete_compiled_templates', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('control_tower_rebuild_images', 'control-tower/rebuild-images', array('controller' => 'control_tower', 'action' => 'rebuild_images', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('control_tower_rebuild_localization', 'control-tower/rebuild-localization', array('controller' => 'control_tower', 'action' => 'rebuild_localization', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n Router::map('control_tower_settings', 'admin/control-tower', array('controller' => 'control_tower', 'action' => 'settings', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n\t // Firewall\n\t Router::map('firewall', 'admin/firewall', array('controller' => 'firewall', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n }", "public function get_router();", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "function beforeroute() {\r\n \r\n }", "public function map()\n {\n //wap端路由为了防止和web端路由冲突一定要放到前面\n $this->mapWapRoutes();\n //web端路由\n $this->mapWebRoutes();\n //api路由\n $this->mapApiRoutes();\n //Backend路由\n $this->mapBackendRoutes();\n }", "public function add_endpoint() {\r\n add_rewrite_rule('^api/films/?(\\w+)?/?','index.php?__api=1&films=$matches[1]','top');\r\n }", "public static function assetsMinification()\n {\n $config = \\Phalcon\\DI::getDefault()->getShared('config');\n\n foreach (array('Css', 'Js') as $asset) {\n $get = 'get' . $asset;\n $filter = '\\Phalcon\\Assets\\Filters\\\\' . $asset . 'min';\n\n foreach (\\Phalcon\\DI::getDefault()->getShared('assets')->$get() as $resource) {\n $min = new $filter();\n $resource->setSourcePath(ROOT_PATH . '/public/' . $resource->getPath());\n $resource->setTargetUri('min/' . $resource->getPath());\n\n if ($config->app->env != 'production') {\n if (!is_dir(dirname(ROOT_PATH . '/public/min/' . $resource->getPath()))) {\n $old = umask(0);\n mkdir(dirname(ROOT_PATH . '/public/min/' . $resource->getPath()), 0777, true);\n umask($old);\n }\n\n if ($config->app->env == 'development' || !file_exists(ROOT_PATH . '/public/min/' . $resource->getPath())) {\n file_put_contents(ROOT_PATH . '/public/min/' . $resource->getPath(), $min->filter($resource->getContent()));\n } elseif (md5($min->filter($resource->getContent())) != md5_file(ROOT_PATH . '/public/min/' . $resource->getPath())) {\n file_put_contents(ROOT_PATH . '/public/min/' . $resource->getPath(), $min->filter($resource->getContent()));\n }\n }\n }\n }\n }", "public function compile() {\n\t\t\n\t\t$path = $this -> _front ->getApp() ->getConfig() ->controller ->module ->path;\n\t\t$path .= $this -> _front ->getApp() ->getConfig() ->subdomain ? $this -> _front ->getApp() ->getConfig() ->subdomain . DIRECTORY_SEPARATOR : '';\n\t\t$path .= \\FMW\\Utilities\\File\\Util::rslash( $this -> _front ->getRouter() ->getModule() ) . 'cache';\n\t\t\n\t\t$fcache = new FileCache(array(\n\t\t\t\t'path' \t=> $path,\n\t\t\t\t'ext' \t=> 'js'\n\t\t\t)\n\t\t);\n\t\t\n\t\tif ( $fcache->contains( $this -> _front ->getRouter() ->getController() ) === false ) {\n\t\t\t\n\t\t\t$js = '';\n\t\t\t\n\t\t\tforeach ($this->_javascriptCache as $value) {\n\t\t\t\t$js .= file_get_contents( $value );\n\t\t\t}\n\t\t\t\n\t\t\t$js = \\FMW\\Utilities\\Minify\\JSMin::minify($js);\n\t\t\t$fcache->save( $this -> _front ->getRouter() ->getController(), $js, $this->_cachetime );\n\t\t\t\n\t\t}\n\n\t\t$fcache = new FileCache(array(\n\t\t\t\t'path' \t=> $path,\n\t\t\t\t'ext' \t=> 'css'\n\t\t\t)\n\t\t);\n\t\t\n\t\tunset($js);\n\t\t\n\t\tif ( $fcache->contains( $this -> _front ->getRouter() ->getController() ) === false ) {\n\t\t\t\n\t\t\t$css = \\FMW\\Utilities\\Minify\\CSSMin::minify( $this->_cssCache, $this->_front->getApp()->getConfig() );\n\t\t\t\n\t\t\t$fcache->save( $this -> _front ->getRouter() ->getController(), $css, $this->_cachetime );\n\t\t\t\t\n\t\t}\n\t\t\n\t\tunset($css);\n\t}", "public static function routes(): void\n {\n //\n }", "public function addRoutes(): void\n {\n $router = $this->config['router'] ?? Router::class;\n $router::$DELIMITER = $this->delimiter;\n foreach (static::$routes as [$url, $func, $method]) {\n $router::add($url, [$this, $func], $method);\n }\n }", "protected function loadRoute()\n {\n $this->post('/task', 'task.controller:saveAction');\n\n // Url for update task\n $this->put('/task/{id}', 'task.controller:updateAction');\n\n // Url for see one task\n $this->get('/task/{id}', 'task.controller:getAction');\n\n // Url for delete task\n $this->delete('/task/{id}', 'task.controller:deleteAction');\n\n // Url for list of tasks\n $this->get('/task', 'task.controller:listAction');\n\n //Get Tag list\n $this->get('/tags', 'tag.controller:listAction');\n\n //Add tag to task\n $this->post('/addTag', 'tag.controller:setTagAction');\n\n //Add tag to tag list\n $this->post('/tag', 'tag.controller:saveAction');\n\n //Search by tag\n $this->get('/search/tag', 'tag.controller:searchAction'); \n\n // Url for delete tag in tag list\n $this->delete('/tag', 'tag.controller:deleteAction');\n \n // Url for auth github\n $this->post('/github', 'github.controller:authAction'); \n }", "public function add_rewrite_rules()\n {\n }", "public function add_rewrite_rules()\n {\n }", "private function uri_reroute()\n {\n $match = false;\n\n $uri = parse_url($_SERVER['REQUEST_URI']);\n if (isset($uri['path']) && $uri['path'] !== \"/\") {\n $_ = preg_split(\"|/|\", $uri['path'], -1, PREG_SPLIT_NO_EMPTY);\n\n $i = 0;\n $route = null;\n $router = null;\n // while ($match === false) {\n // $path = $_[$i];\n\n // if (isset($this->configuration['ROUTES']['/' . $path])) {\n // $match = true;\n // $route = \"/$path\";\n // $router = $this->configuration['ROUTES']['/' . $path];\n // $this->route_map = $route;\n // }\n\n // if (isset($this->configuration['ROUTES'][$path])) {\n // $match = true;\n // $route = \"$path\";\n // $router = $this->configuration['ROUTES'][$path];\n // $this->route_map = $route;\n // }\n\n // ++$i;\n // }\n\n // unset($_);\n // unset($i);\n // unset($uri);\n // unset($path);\n\n if (isset($_) && is_array($_) && count($_) > 0) {\n $path = \"\";\n foreach ($_ as $k => $v) {\n $path .= \"/\" . $v;\n\n if (isset($this->configuration['ROUTES'][$path])) {\n $match = true;\n $route = \"$path\";\n $router = $this->configuration['ROUTES'][$path];\n $this->route_map = $route;\n\n // if(is_array($router['params'])){\n\n // }elseif($router['params'] == \"*\"){\n // break;\n // }\n\n break;\n }\n }\n }\n\n if (isset($router['controller'])) {\n $this->controller = $router['controller'];\n } else {\n $this->controller = \"main\";\n }\n\n if (isset($router['method'])) {\n $this->method = $router['method'];\n } else {\n $this->method = \"index\";\n }\n\n if (isset($router['action']) && isset($this->http)) {\n if (trim(strtolower($router['action'])) != strtolower($this->http->action)) {\n $this->http->http_error(403);\n }\n }\n \n if (isset($router['type']) && isset($router['type'])){\n if (trim(strtolower($router['type'])) == \"json\" && $this->http->type != \"json\"){\n $this->http->http_error(406, \"Form \" . $this->http->action . \" data is not json\");\n }\n }\n\n if (isset($router['params'])) {\n if (is_array($router['params'])) {\n $uri = preg_split(\"|/|\", str_replace($route, \"\", $_SERVER['REQUEST_URI']), -1, PREG_SPLIT_NO_EMPTY);\n\n if (is_array($router['params'])) {\n $_ = $router['params'];\n unset($router['params']);\n\n $router['params'][] = $_;\n unset($_);\n }\n\n $nums_params = count($router['params'][0]);\n\n if ($nums_params > 0) {\n foreach ($router['params'][0] as $k => $v) {\n $this->params[$v] = trim(urldecode($uri[$k]));\n }\n }\n\n $i = 0;\n $x = 0;\n while ($nums_params < $i) {\n if (isset($uri[$x]) && is_value($uri[$x])) {\n $this->params[$router['params'][$i]] = trim(urldecode($uri[$x]));\n ++$i;\n }\n ++$x;\n }\n\n } elseif ($router['params'] != \"*\") {\n return $this->http->http_error(404);\n }\n } else {\n $uri = preg_split(\"|/|\", str_replace($route, \"\", $_SERVER['REQUEST_URI']), -1, PREG_SPLIT_NO_EMPTY);\n\n if (count($uri) > 0) {\n return $this->http->http_error(404);\n }\n }\n\n unset($uri);\n unset($i);\n unset($x);\n unset($route);\n unset($router);\n }\n\n return $match;\n }", "public function hookDefineRoutes($args)\n {\n if (is_admin_theme() && !get_option('clean_url_use_admin')) {\n return;\n }\n\n $router = $args['router'];\n\n $mainPath = get_option('clean_url_main_path');\n $collectionGeneric = get_option('clean_url_collection_generic');\n $itemGeneric = get_option('clean_url_item_generic');\n $fileGeneric = get_option('clean_url_file_generic');\n\n $allowedForItems = unserialize(get_option('clean_url_item_alloweds'));\n $allowedForFiles = unserialize(get_option('clean_url_file_alloweds'));\n\n // Note: order of routes is important: Zend checks from the last one\n // (most specific) to the first one (most generic).\n\n // Get all collections identifiers with one query.\n $collectionsIdentifiers = get_view()->getRecordTypeIdentifiers('Collection', false);\n\n if (!empty($collectionsIdentifiers)) {\n // Use one regex for all collections. Default is case insensitve.\n $collectionsRegex = array_map('preg_quote', $collectionsIdentifiers);\n // To avoid a bug with identifiers that contain a \"/\", that is not\n // escaped with preg_quote().\n $collectionsRegex = '(' . str_replace('/', '\\/', implode('|', $collectionsRegex)) . ')';\n\n // Add a collection route.\n $route = $mainPath . $collectionGeneric;\n $router->addRoute('cleanUrl_collections', new Zend_Controller_Router_Route(\n $route . ':record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'collection-show',\n ),\n array(\n 'record_identifier' => $collectionsRegex,\n )));\n\n // Add a collection route for files.\n if (in_array('collection', $allowedForFiles)) {\n $router->addRoute('cleanUrl_collections_file', new Zend_Controller_Router_Route(\n $route . ':collection_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-collection-file',\n ),\n array(\n 'collection_identifier' => $collectionsRegex,\n )));\n }\n\n // Add a collection / item route for files.\n if (in_array('collection_item', $allowedForFiles)) {\n $router->addRoute('cleanUrl_collections_item_file', new Zend_Controller_Router_Route(\n $route . ':collection_identifier/:item_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-collection-item-file',\n ),\n array(\n 'collection_identifier' => $collectionsRegex,\n )));\n }\n\n // Add a collection route for items.\n if (in_array('collection', $allowedForItems)) {\n $router->addRoute('cleanUrl_collections_item', new Zend_Controller_Router_Route(\n $route . ':collection_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-collection-item',\n ),\n array(\n 'collection_identifier' => $collectionsRegex,\n )));\n }\n }\n\n // Add a generic route for files.\n if (in_array('generic', $allowedForFiles)) {\n $route = $mainPath . $fileGeneric;\n $router->addRoute('cleanUrl_generic_file', new Zend_Controller_Router_Route(\n $route . ':record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-file',\n 'collection_id' => NULL,\n )));\n }\n\n // Add a generic / item route for files.\n if (in_array('generic_item', $allowedForFiles)) {\n $route = $mainPath . $itemGeneric;\n $router->addRoute('cleanUrl_generic_item_file', new Zend_Controller_Router_Route(\n $route . ':item_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-item-file',\n 'collection_id' => NULL,\n )));\n }\n\n // Add a generic route for items.\n if (in_array('generic', $allowedForItems)) {\n $route = $mainPath . trim($itemGeneric, '/');\n $router->addRoute('cleanUrl_generic_items_browse', new Zend_Controller_Router_Route(\n $route,\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'items-browse',\n )));\n $router->addRoute('cleanUrl_generic_item', new Zend_Controller_Router_Route(\n $route . '/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-item',\n 'collection_id' => NULL,\n )));\n }\n }", "public function add_rewrite_rule() {\n\t\t\tadd_rewrite_rule(\n\t\t\t\t'photo/([a-z0-9-_]+)/?', // ([^/]+)\n\t\t\t\t'index.php?attachment=$matches[1]',\n\t\t\t\t'top'\n\t\t\t);\n\t\t}", "private function _mapRequest()\n {\n $request = $this->app()->request();\n $request_uri = $request->requestURI();\n $script_name = $request->scriptName();\n $rewritten_query_string = \"\";\n\n // If there is no request uri (ie: we are on the command line) we do\n // not rewrite\n if (empty($request_uri)) {\n return;\n }\n\n // Get path to script\n $path = substr($script_name, 0, (strrpos($script_name, '/')+1));\n\n // Remove path from request uri.\n // This gives us the slug plus any query params\n if ($path != \"/\") {\n $params = str_replace($path, \"\", $request_uri);\n } else {\n // If app is in web root we simply remove preceding slash\n $params = substr($request_uri, 1);\n }\n\n $array = explode(\"?\", $params);\n $slug = $array[0];\n if (isset($array[1])) {\n $query_string = $array[1];\n } else {\n $query_string = \"\";\n }\n\n if ($request->method() == \"POST\" && $request->param(\"slug\")) {\n $slug = $request->param(\"slug\");\n }\n\n if (empty($slug) || $slug == \"index.php\") {\n $slug = \"home\";\n }\n\n // Remove trailing slash from slug if present\n if ($slug[(strlen($slug)-1)] == \"/\") {\n $slug = substr($slug, 0, (strlen($slug)-1));\n }\n\n $request->param(\"slug\", $slug);\n\n // Do not build tree if API call\n if (preg_match(\"/^api\\/([a-zA-Z0-9_]*)/\", $slug, $matches)) {\n $request->controllerName(\"api\");\n $request->action($matches[1]);\n return;\n }\n\n $id_obj = $this->_mapper->getIdObject();\n if (!$this->app()->session()->isAuth() || $this->app()->user()->id() > 2) {\n $id_obj->where(\"c.status\", \"=\", 1);\n }\n if ($slug != \"admin/content\") {\n $id_obj->where(\"c.type <> 'PostContent'\", \"OR\", \"c.slug = '\".$slug.\"'\");\n }\n $id_obj->orderby(\"c.pub_date\", \"DESC\");\n\n $collection = $this->_mapper->find($id_obj);\n $this->_buildTree(iterator_to_array($collection));\n\n // If script name doesn't appear in the request URI we need to rewrite\n if (strpos($request_uri, $script_name) === false\n && $request_uri != $path\n && $request_uri != $path.\"index.php\"\n ) {\n $controller = $request->controllerName();\n if ($controller != \"content\") {\n $array = explode(\"/\", $slug);\n $request->controllerName($array[0]);\n $rewritten_query_string = \"controller=\".$array[0];\n if (isset($array[1])) {\n $request->action($array[1]);\n $rewritten_query_string .= \"&action=\".$array[1];\n }\n }\n }\n\n if (!empty($_SERVER['QUERY_STRING'])) {\n $rewritten_query_string .= \"&\".$_SERVER['QUERY_STRING'];\n }\n\n $_SERVER['QUERY_STRING'] = $rewritten_query_string;\n\n // Update request uri\n $_SERVER['REQUEST_URI'] = $path.\"index.php?\";\n $_SERVER['REQUEST_URI'] .= $_SERVER['QUERY_STRING'];\n }", "public function rewriteRules()\n {\n add_rewrite_rule('janrain/(.*?)/?$', 'index.php?janrain=$matches[1]', 'top');\n add_rewrite_tag('%janrain%', '([^&]+)');\n }", "protected function buildRoute()\n {\n $module = $this->module;\n\n $this->route = [\n 'name' => $module->name,\n '--controller' => $this->class,\n '--view' => $module->showPermission->name,\n '--create' => $module->createPermission->name,\n '--edit' => $module->editPermission->name,\n '--delete' => $module->deletePermission->name,\n '--module' => $module->id,\n ];\n }", "protected function mapMobileRoutes()\n {\n Route::prefix('api/v1')\n ->namespace($this->namespace)\n ->group(base_path('Modules/Post/routes/mobile.php'));\n }", "private function route() {\n\n// if (!in_array($_GET['page'], $pages)) {\n// echo \"bad\";\n// exit;\n// }\n\n if (!empty($_GET['page']) && file_exists( __ROOT__.'controller/'.$_GET['page'].'.php')) {\n include __ROOT__.'controller/'.$_GET['page'].'.php';\n } else {\n include __ROOT__.'controller/home.php';\n }\n include __ROOT__.'public/footer.html';\n }", "private static function createVersionRoute()\n {\n self::$Router->map('GET|POST', '/[a:version]', function(string $version){\n if(isset(Handler::$MainConfiguration->VersionConfigurations[$version]) == false)\n {\n UnsupportedVersion::executeResponse();\n exit();\n }\n else\n {\n /** @var VersionConfiguration $VersionConfiguration */\n $VersionConfiguration = Handler::$MainConfiguration->VersionConfigurations[$version];\n\n $Modules = array();\n\n /** @var ModuleConfiguration $module */\n foreach($VersionConfiguration->Modules as $module)\n {\n $ModuleObject = self::getModuleObject($version, $module);\n\n $Modules['/' . $module->Path] = array(\n 'name' => $ModuleObject->name,\n 'version' => $ModuleObject->version,\n 'description' => $ModuleObject->description\n );\n }\n\n ModuleListingResponse::executeResponse($Modules);\n exit();\n }\n });\n }", "function custom_rewrite_rule() {\n\n}", "protected function makeRoute()\n {\n new MakeRoute($this, $this->files);\n }", "public static function router(){\n if(iRouter::callMade()) {\n viewManager::registerComponent(iRouter::$route);\n }\n }", "function smarty_function_route(array $params, URLBuilder $builder)\n{\n $name = $params['route'];\n unset($params['route']);\n\n return $builder->toRoute($name, $params);\n}", "function routes_install()\r\n{\r\n\tregister_hook('init_1', 'addon/routes/routes.php', 'routes_init_1');\r\n\tregister_hook('post_local', 'addon/routes/routes.php', 'routes_post_local_end_hook');\r\n\tregister_hook('profile_tabs', 'addon/routes/routes.php', 'routes_profile_tabs_hook');\r\n}", "public function map()\n {\n //panel\n $this->mapPanelRoutes();\n //auth\n $this->mapAuthRoutes();\n //almacen\n $this->mapInventoryRoutes();\n //contabilidad\n $this->mapAccountingRoutes();\n //Recursos Humanos\n $this->mapHumanResourceRoutes();\n //ventas\n $this->mapSaleRoutes();\n\n $this->mapApiRoutes();\n\n //\n }", "function rest_api_register_rewrites() {\n\tadd_rewrite_rule( '^' . rest_get_url_prefix() . '/?$','index.php?rest_route=/','top' );\n\tadd_rewrite_rule( '^' . rest_get_url_prefix() . '/(.*)?','index.php?rest_route=/$matches[1]','top' );\n}", "private static function createModuleRoute()\n {\n self::$Router->map('GET|POST', '/[a:version]/[**:path]', function(string $version, string $path){\n $version = strtolower($version);\n $path = strtolower($path);\n\n if(isset(self::$PathRoutes[$version][$path]))\n {\n /** @var VersionConfiguration $VersionConfiguration */\n $VersionConfiguration = self::$MainConfiguration->VersionConfigurations[$version];\n\n /** @var ModuleConfiguration $ModuleConfiguration */\n $ModuleConfiguration = $VersionConfiguration->Modules[self::$PathRoutes[$version][$path]];\n\n if($VersionConfiguration->Available == false)\n {\n ResourceNotAvailable::executeResponse($VersionConfiguration->UnavailableMessage);\n exit();\n }\n\n if($ModuleConfiguration->Available == false)\n {\n ResourceNotAvailable::executeResponse($ModuleConfiguration->UnavailableMessage);\n exit();\n }\n\n self::verifyRequest();\n\n $AccessRecord = new AccessRecord();\n $AccessRecord->ID = 0;\n $AccessRecord->ApplicationID = 0;\n\n if($ModuleConfiguration->AuthenticationRequired)\n {\n $AccessRecord = self::authenticateUser();\n }\n\n /** @var Module $ModuleObject */\n $ModuleObject = self::getModuleObject($version, $ModuleConfiguration);\n $ModuleObject->access_record = $AccessRecord;\n\n // Process the request\n self::startTimer();\n\n $ModuleException = null;\n\n try\n {\n $ModuleObject->processRequest();\n\n header('Content-Type: ' . $ModuleObject->getContentType());\n header('Content-Size: ' . $ModuleObject->getContentLength());\n http_response_code($ModuleObject->getResponseCode());\n\n // Create the response\n if($ModuleObject->isFile())\n {\n header(\"Content-disposition: attachment; filename=\\\"\" . basename($ModuleObject->getFileName()) . \"\\\"\");\n }\n }\n catch(Exception $exception)\n {\n $ModuleException = $exception;\n //InternalServerError::executeResponse($exception);\n //exit();\n }\n\n $ExecutionTime = self::stopTimer();\n self::logRequest($AccessRecord, $version, $ModuleObject, $ExecutionTime);\n self::setHeaders();;\n\n // Update the last used state\n $AccessRecord->LastActivity = (int)time();\n $IntellivoidAPI = self::getIntellivoidAPI();\n $IntellivoidAPI->getAccessKeyManager()->updateAccessRecord($AccessRecord);\n\n if($ModuleException == null)\n {\n print($ModuleObject->getBodyContent());\n }\n else\n {\n $RequestRecordObject = $IntellivoidAPI->getRequestRecordManager()->getRequestRecord(\n RequestRecordSearchMethod::byReferenceId, self::$ReferenceCode\n );\n\n $IntellivoidAPI->getExceptionRecordManager()->recordException(\n $RequestRecordObject->ID, $AccessRecord, $ModuleException\n );\n\n InternalServerError::executeResponse($ModuleException);\n }\n\n exit();\n }\n else\n {\n ResourceNotFound::executeResponse();\n exit();\n }\n\n });\n }", "public function add_rewrite_tags() {\n\t\tadd_rewrite_tag( '%' . $this->user_rid . '%', '([^/]+)' );\n\t\tadd_rewrite_tag( '%' . $this->user_comments_rid . '%', '([1]{1,})' );\n\t\tadd_rewrite_tag( '%' . $this->user_rates_rid . '%', '([1]{1,})' );\n\t\tadd_rewrite_tag( '%' . $this->user_to_rate_rid . '%', '([1]{1,})' );\n\t\tadd_rewrite_tag( '%' . $this->user_talks_rid . '%', '([1]{1,})' );\n\t\tadd_rewrite_tag( '%' . $this->cpage_rid . '%', '([^/]+)' );\n\t\tadd_rewrite_tag( '%' . $this->action_rid . '%', '([^/]+)' );\n\t\tadd_rewrite_tag( '%' . $this->search_rid . '%', '([^/]+)' );\n\t}", "function wp_oembed_register_route()\n {\n }", "public function routerRebuilding() {\n $this->rebuilding = TRUE;\n }", "function add_listing_routes()\n {\n $this->add_route('GET', '/routes', function(){\n print \"<h1>Routes</h1>\";\n foreach($this->routes as $method => $routes) {\n print \"<h3>\".$method.\"</h3>\";\n print \"<ul>\";\n foreach ($routes as $route) {\n print \"<li>\".$route->path.\"</li>\";\n }\n print \"</ul>\";\n }\n });\n }", "function iis7_add_rewrite_rule($filename, $rewrite_rule)\n {\n }", "function custom_rewrite_rule(){\n $page_id = $this->page_id;\n $slugs = $this->slugs;\n foreach ($slugs as $key => $value){\n if($value['slug']){\n add_rewrite_rule($key.'/([a-z0-9-]+)[/]?$','index.php?page_id='.$page_id.'&'.$key.'=$matches[1]','top');\n }else{\n add_rewrite_rule($key.'[/]?$','index.php?page_id='.$page_id.'&'.$key.'=$matches[1]','top');\n }\n }\n /// end rewrite\n flush_rewrite_rules();\n }", "function defineRoutes(&$router) {\n \n // Main\n $router->map('mobile_access', 'm', array('controller' => 'mobile_access', 'action' => 'index'));\n \n $router->map('mobile_access_login', 'm/login', array('controller' => 'mobile_access_auth', 'action' => 'login'));\n $router->map('mobile_access_logout', 'm/logout', array('controller' => 'mobile_access_auth', 'action' => 'logout'));\n $router->map('mobile_access_forgot_password', 'm/forgot-password', array('controller' => 'mobile_access_auth', 'action' => 'forgot_password'));\n \n // Quick Add\n $router->map('mobile_access_quick_add', 'm/starred', array('controller' => 'mobile_access', 'action' => 'quick_add'));\n \n // Assignments\n $router->map('mobile_access_assignments', 'm/assignments', array('controller' => 'mobile_access', 'action' => 'assignments'));\n \n // Starred\n $router->map('mobile_access_starred', 'm/starred', array('controller' => 'mobile_access', 'action' => 'starred'));\n \n // People\n $router->map('mobile_access_people', 'm/people', array('controller' => 'mobile_access_people', 'action' => 'index'));\n $router->map('mobile_access_view_company', 'm/people/:object_id', array('controller' => 'mobile_access_people', 'action' => 'company'), array('object_id' => '\\d+'));\n $router->map('mobile_access_view_user', 'm/people/users/:object_id', array('controller' => 'mobile_access_people', 'action' => 'user'), array('object_id' => '\\d+'));\n \n \n // Projects\n $router->map('mobile_access_projects', 'm/projects', array('controller' => 'mobile_access_projects', 'action' => 'index'));\n \n // Project\n $router->map('mobile_access_view_project', 'm/project/:project_id', array('controller' => 'mobile_access_project', 'action' => 'index'), array('project_id' => '\\d+'));\n \n // Project discusions\n $router->map('mobile_access_view_discussions', 'm/project/:project_id/discussions', array('controller' => 'mobile_access_project_discussions', 'action' => 'index'), array('project_id' => '\\d+'));\n $router->map('mobile_access_view_discussion', 'm/project/:project_id/discussions/:object_id', array('controller' => 'mobile_access_project_discussions', 'action' => 'view'), array('project_id' => '\\d+', 'object_id' => '\\d+'));\n \n // Project milestones\n $router->map('mobile_access_view_milestones', 'm/project/:project_id/milestones', array('controller' => 'mobile_access_project_milestones', 'action' => 'index'), array('project_id' => '\\d+'));\n $router->map('mobile_access_view_milestone', 'm/project/:project_id/milestones/:object_id', array('controller' => 'mobile_access_project_milestones', 'action' => 'view'), array('project_id' => '\\d+', 'object_id' => '\\d+'));\n \n // Project files\n $router->map('mobile_access_view_files', 'm/project/:project_id/files', array('controller' => 'mobile_access_project_files', 'action' => 'index'), array('project_id' => '\\d+'));\n $router->map('mobile_access_view_file', 'm/project/:project_id/files/:object_id', array('controller' => 'mobile_access_project_files', 'action' => 'view'), array('project_id' => '\\d+', 'object_id' => '\\d+')); \n \n // Project checklists\n $router->map('mobile_access_view_checklists', 'm/project/:project_id/checklists', array('controller' => 'mobile_access_project_checklists', 'action' => 'index'), array('project_id' => '\\d+'));\n $router->map('mobile_access_view_checklist', 'm/project/:project_id/checklists/:object_id', array('controller' => 'mobile_access_project_checklists', 'action' => 'view'), array('project_id' => '\\d+', 'object_id' => '\\d+')); \n \n // Project pages\n $router->map('mobile_access_view_pages', 'm/project/:project_id/pages', array('controller' => 'mobile_access_project_pages', 'action' => 'index'), array('project_id' => '\\d+'));\n $router->map('mobile_access_view_page', 'm/project/:project_id/pages/:object_id', array('controller' => 'mobile_access_project_pages', 'action' => 'view'), array('project_id' => '\\d+', 'object_id' => '\\d+'));\n $router->map('mobile_access_view_page_version', 'm/project/:project_id/pages/:object_id/version/:version', array('controller' => 'mobile_access_project_pages', 'action' => 'version'), array('project_id' => '\\d+', 'object_id' => '\\d+', 'version' => '\\d+'));\n \n // Project tickets\n $router->map('mobile_access_view_tickets', 'm/project/:project_id/tickets', array('controller' => 'mobile_access_project_tickets', 'action' => 'index'), array('project_id' => '\\d+'));\n $router->map('mobile_access_view_ticket', 'm/project/:project_id/tickets/:object_id', array('controller' => 'mobile_access_project_tickets', 'action' => 'view'), array('project_id' => '\\d+', 'object_id' => '\\d+'));\n \n // Project timerecords\n $router->map('mobile_access_view_timerecords', 'm/project/:project_id/timerecords', array('controller' => 'mobile_access_project_timetracking', 'action' => 'index'), array('project_id' => '\\d+'));\n $router->map('mobile_access_view_timerecord', 'm/project/:project_id/timerecords/:object_id', array('controller' => 'mobile_access_project_timetracking', 'action' => 'index'), array('project_id' => '\\d+', 'object_id' => '\\d+'));\n \n // Project subobjects\n $router->map('mobile_access_view_task', 'm/project/:project_id/task/:object_id', array('controller' => 'mobile_access', 'action' => 'view_parent_object'), array('project_id' => '\\d+', 'object_id' => '\\d+'));\n $router->map('mobile_access_view_comment', 'm/project/:project_id/comment/:object_id', array('controller' => 'mobile_access', 'action' => 'view_parent_object'), array('project_id' => '\\d+', 'object_id' => '\\d+'));\n $router->map('mobile_access_add_comment', 'm/project/:project_id/comment/add', array('controller' => 'mobile_access_project', 'action' => 'add_comment'));\n \n // Common\n $router->map('mobile_access_view_category', 'm/category/:object_id', array('controller' => 'mobile_access', 'action' => 'view_category', array('object_id' => '\\d+')));\n $router->map('mobile_access_toggle_object_completed_status', 'm/project/:project_id/toggle-completed/:object_id', array('controller' => 'mobile_access', 'action' => 'toggle_completed', array('project_id' => '\\d+', 'object_id' => '\\d+')));\n }", "function create_initial_rest_routes()\n {\n }", "function add_route($route, $function, $method='GET') {\n array_push($this->routers, Array(\n 'expression' => $route,\n 'function' => $function,\n 'method' => $method\n ));\n }", "function rest_api_register_rewrites()\n {\n }", "public function declare_routes(){\n\n $this->routes = \\Chocolatine\\get_configuration( 'routes' );\n $view_manager = \\Chocolatine\\get_manager('view');\n\n /**\n * Declare all route\n */\n foreach ( $this->routes as $key => $current_route) {\n\n $this->router->map(['GET', 'POST'], $current_route['route'] ,function ($request, $response, $args) {\n\n $router = \\Chocolatine\\get_service( 'Router' );\n return $router->controller( $request, $response, $args );\n\n });\n\n }\n\n }", "function endpoints() {\r\n\t\tadd_rewrite_endpoint( 'backers', EP_PERMALINK | EP_PAGES );\r\n\t}", "public function route()\n\t{\n\t\t/* [http|https]/[Ajax|]/[Get|Post|Delete|Put]/uri */\n\t\t$this->route = $this->route_raw = ($this->c->Request->is_https ? 'https' : 'http').'/'.($this->c->Request->is_ajax ? 'Ajax' : '').'/'.$this->c->Request->request.'/'.$this->c->Request->uri;\n\n\t\t/* call dispatch event */\n\t\t$this->c->Event->preRouter();\n\n\t\t/* rewrite dispatch route */\n\t\tforeach ($this->c->router['routes'] as $regexpath => $switchto) {\n\t\t\tif (preg_match($regexpath, $this->route)) {\n\t\t\t\t/* we got a match */\n\t\t\t\t$this->route = preg_replace($regexpath, $switchto, $this->route);\n\t\t\t\t$this->route_matched = $regexpath;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t/* call dispatch event */\n\t\t$this->c->Event->postRouter();\n\n\t}" ]
[ "0.56354386", "0.5633989", "0.5544774", "0.54873633", "0.54611015", "0.54521126", "0.53734714", "0.52911496", "0.52911496", "0.5282028", "0.52715504", "0.5270991", "0.52519816", "0.5222281", "0.5201205", "0.52005714", "0.5191865", "0.5182189", "0.5174693", "0.5169876", "0.51530147", "0.5146841", "0.5142531", "0.51197404", "0.5114421", "0.51096064", "0.5108334", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.51042205", "0.5102414", "0.50985014", "0.50967896", "0.5095662", "0.5093373", "0.5091537", "0.5087268", "0.50815666", "0.5039587", "0.5018931", "0.5017994", "0.5010766", "0.5009807", "0.5008988", "0.4992676", "0.49713552", "0.49633196", "0.49556366", "0.49428585", "0.49346545", "0.4933349", "0.4931031", "0.49158794", "0.49137178", "0.49110386", "0.48909366", "0.4889767", "0.48879114", "0.4877216", "0.4870096", "0.48581073", "0.48532888", "0.48453888", "0.4841424", "0.48321143", "0.48308176", "0.4822566", "0.4818097", "0.4817951", "0.48156697", "0.48063785" ]
0.49641243
75
Bootstrap the application events.
public function boot(DispatcherContract $events) { parent::boot($events); $events->listen('ynievesdotnet.fourstream.messageArrived', array([ 'YnievesDotNet\Fourstream\Listeners\messageArrived', ])); $this->publishes([ base_path('vendor/ynievesdotnet/fourstream/config/config.php') => config_path('fourstream.php'), base_path('vendor/ynievesdotnet/fourstream/migrations') => base_path('database/migrations'), ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function boot()\n {\n\n Event::listen('pages.menuitem.listTypes', function () {\n return [\n 'portfolio-item' => 'depcore.portfolio::lang.portfolioitem.label' ,\n 'all-portfolio-items' => 'depcore.portfolio::lang.portfolioitems.menu_label',\n ];\n });\n\n Event::listen('pages.menuitem.getTypeInfo', function ($type) {\n if ($type === 'portfolio-item' or $type == 'all-portfolio-items') {\n return PortfolioItem::getMenuTypeInfo($type);\n }\n });\n\n Event::listen('pages.menuitem.resolveItem', function ($type, $item, $url, $theme) {\n if ($type === 'portfolio-item' or $type == 'all-portfolio-items') {\n return PortfolioItem::resolveMenuItem($item, $url, $theme);\n }\n });\n\n }", "public function boot()\n {\n Event::listen(\n AppointmentConfirmed::class,\n [SendConfirmMail::class, 'handle']\n );\n\n Event::listen(\n DoctorAccepted::class,\n [SendDoctorAcceptanceMail::class, 'handle']\n );\n\n Event::listen(\n ClinicAccepted::class,\n [SendClinicAcceptanceMail::class, 'handle']\n );\n \n Event::listen(\n NewRegistered::class,\n [SendCodeMail::class, 'handle']\n );\n }", "public function boot()\n {\n // Observe event\n // For example:\n // User::observe( new UserObserver );\n }", "public function boot()\n {\n Schema::defaultStringLength(191);\n\n Paginator::useBootstrap();\n\n SiteMenu::observe(SiteMenuObserver::class);\n Art::observe(ArtObserver::class);\n }", "public function boot()\n {\n Event::listen(ServingNova::class, function () {\n Nova::script('awesome-nova-tool-actions', dirname(__DIR__) . '/dist/js/actions.js');\n });\n }", "public function boot(): void\n {\n $this->publishAndLoadPackageComponents();\n\n $this->registerAndScheduleCommands();\n\n $this->setPaginatorStyling();\n }", "public function boot()\n {\n $this->bootModulesMenu();\n $this->bootSkinComposer();\n $this->bootCustomBladeDirectives();\n }", "protected function boot()\n {\n //Nothing to do here, but you can override this function in child classes.\n }", "public function boot()\n {\n $this->configuration();\n $this->assets();\n $this->fonts();\n $this->views();\n }", "public function boot()\n {\n $this->setupListeners();\n }", "public function boot()\n\t{\n\t\t$this->setupLogging();\n\t}", "public function boot()\n {\n BelongsTo::setEventDispatcher($this->app['events']);\n HasMany::setEventDispatcher($this->app['events']);\n HasOne::setEventDispatcher($this->app['events']);\n MorphMany::setEventDispatcher($this->app['events']);\n MorphOne::setEventDispatcher($this->app['events']);\n MorphTo::setEventDispatcher($this->app['events']);\n }", "public function boot()\n {\n $this->handleConfig();\n }", "public function boot(): void\n {\n $this->registerEvents();\n $this->registerQueueConnectors();\n }", "public function boot()\n {\n // Event Listeners\n $this->eventListeners($this->events);\n\n // Event Subscriptions\n $this->eventSubscriptions($this->eventSubscribers);\n\n // Observers\n $this->addObservers($this->observers);\n\n // Extensions\n $this->registerExtensions($this->extensions);\n\n // Features\n $this->registerFeatures($this->features);\n\n // Permissions\n $this->registerPermissions($this->permissions);\n }", "public function boot()\n {\n //\n // View::share('assetDir', env('APP_ENV') == 'production' ? 'build/' : '');\n // View::share('assetPath', env('APP_ENV') == 'production' ? 'mix' : 'asset');\n\n // TODO: Model Observer\n// Change::observe(ChangeObserver::class);\n }", "protected static function boot()\n {\n static::addGlobalScope(new EventScope);\n static::addGlobalScope(new ApprovedEventScope);\n parent::boot();\n }", "protected static function boot()\n {\n }", "public function boot()\n {\n Book::observe(BookObserver::class);\n }", "public function boot()\n {\n $this->setupConfig();\n }", "public function boot()\n {\n $this->setupConfig();\n }", "public function boot()\n {\n $this->setupConfig();\n }", "public function boot()\n {\n $this->setupConfig();\n }", "public function boot()\n {\n $this->setupConfig();\n }", "public function boot()\n {\n $this->setupConfig();\n }", "public function boot()\n {\n $this->setupConfig();\n }", "public function boot()\n {\n $this->setupConfig();\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 $this->setupConfig($this->app);\n }", "public function boot()\n {\n Senha::observe(new SenhaObserver());\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()\n {\n // Load the user's events, tasks, plugins, and configurations\n $this->credentials->syncConnectionCredentials();\n $this->tasks->registerConfiguredEvents();\n }", "public function boot()\n {\n\t\t//\n }", "public function boot(): void\n {\n foreach ($this->observers as $model => $observer) {\n foreach ($observer as $item) {\n $model::observe($item);\n }\n }\n\n foreach ($this->listen as $event => $listeners) {\n foreach (array_unique($listeners, SORT_REGULAR) as $listener) {\n Event::listen($event, $listener);\n }\n }\n }", "public function boot()\n {\n Transaction::observe(TransactionObserver::class);\n Offer::observe(OfferObserver::class);\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\t{\n\t\t$this->package('tlr/l4-cms');\n\n\t\t$this->reassignDefaultViews();\n\n\t\t$this->routes( $this->app['router'], $this->app['events'] );\n\n\t\t$this->adminMenu();\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n $this->composeNavigation();\n $this->composeTags();\n $this->composeRecent();\n $this->composeProducts();\n $this->composeListGroup();\n $this->composeAdsIndex();\n }", "public function boot()\n {\n //Send Menu to wordpress actions hook\n if (is_admin()) {\n $this->app['wp.admin.menu']->send();\n }\n }", "public function boot() {\n \n }", "protected static function boot()\n\t{\n\t\tparent::boot();\n\t}", "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 // Bootstrap handles\n //$this->routeHandle();\n $this->configHandle();\n $this->langHandle();\n $this->viewHandle();\n $this->assetHandle();\n $this->migrationHandle();\n $this->pulishControllerStub();\n $this->pulishRouteStub();\n \n }", "public function boot()\n {\n View::composer('includes.nav', function ($view) {\n $menus = $this->app->make('App\\Services\\MenuService');\n $view->with('menus',$menus->buildSideMenu());\n });\n // automatically create production after purchase order saved\n SaleOrder::observe(SaleOrderObserver::class);\n }", "public function boot() {\n\n\t\t$this->register_cli_commands();\n\n\t\t$this->register_routes();\n\n\t\t$this->apply_sitemap_optimisations();\n\n\t}", "public function boot()\n {\n Exchange::observe(ExchangeObserver::class);\n Withdrawal::observe(WithdrawalObserver::class);\n Topup::observe(TopupObserver::class);\n }", "public function boot()\n {\n $this->bootSetTimeLocale();\n $this->bootBladeHotelRole();\n $this->bootBladeHotelGuest();\n $this->bootBladeIcon();\n }", "public function boot()\n {\n Event::listen('eloquent.created: *', function($data,$data2) {\n $this->save_event('crear',$data2);\n });\n\n Event::listen('eloquent.updated: *', function($data,$data2) {\n $this->save_event('actualizar',$data2);\n });\n\n Event::listen('eloquent.deleting: *', function($data,$data2) {\n $this->save_event('borrar',$data2);\n });\n }", "public function boot()\n {\n Banner::observe(BannerObserver::class);\n Booking::observe(BookingObserver::class);\n Coupon::observe(CouponObserver::class);\n Customer::observe(CustomerObserver::class);\n Restaurant::observe(RestaurantObserver::class);\n Facility::observe(FacilityObserver::class);\n Gallery::observe(GalleryObserver::class);\n Menu::observe(MenuObserver::class);\n User::observe(UserObserver::class);\n RoomType::observe(RoomTypeObserver::class);\n Paginator::useBootstrap();\n }", "public function boot()\n {\n Schema::defaultStringLength(191);\n\n $this->loadTranslationsFrom(__DIR__ .'/resources/lang', __NAMESPACE__);\n\n Blade::directive('module', function ($modules) {\n return \"<?php if(\\EmilMoe\\Base\\Module::loaded($modules)): ?>\";\n });\n\n Blade::directive('endmodule', function () {\n return '<?php endif; ?>';\n });\n\n $this->app->booted(function () {\n $schedule = $this->app->make(Schedule::class);\n $schedule->command('cleanup')->hourly();\n });\n }", "public function boot()\r\n {\r\n //\r\n }", "public function boot()\r\n {\r\n //\r\n }", "public function boot()\r\n {\r\n //\r\n }", "public function boot()\r\n {\r\n //\r\n }", "protected static function boot()\n {\n parent::boot();\n\t\n\t\tHomeSection::observe(HomeSectionObserver::class);\n\t\t\n static::addGlobalScope(new ActiveScope());\n }", "public function boot() : void\n {\n $eventBus = $this->app->make(EventBus::class);\n\n // The projections config contains a list of class names or projectors.\n // Each of these projectors will be subscribed to the given event bus.\n $projectors = $this->app->config->get('event_sourcing.projectors');\n\n foreach ($projectors as $projector) {\n $eventBus->subscribe(\n $this->app->make($projector)\n );\n }\n\n Reconstitution::reconstituteUsing(\n new ReconstituteUsingInstantiatorAndHydrator(\n new Instantiator(),\n new HydrateUsingReflection()\n )\n );\n }", "public function boot()\n {\n Dictionary::observe(DictionaryObserver::class);\n HouseLevy::observe(HouseLevyObserver::class);\n LandLevy::observe(LandLevyObserver::class);\n Period::observe(PeriodObserver::class);\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 }", "public function boot() {\n //\n }", "public function boot() {\n //\n }", "public function boot()\n {\n Stripe::setApiKey(env('STRIPE_SECRET'));\n Cashier::useCurrency('eur', '€');\n \n View::composer('front.layout', function (\\Illuminate\\Contracts\\View\\View $view) {\n $view->with('menu_games', $this->getPlatformsWithGames());\n });\n \n User::observe(UploadablesObserver::class);\n Team::observe(UploadablesObserver::class);\n Platform::observe(UploadablesObserver::class);\n Game::observe(UploadablesObserver::class);\n Network::observe(UploadablesObserver::class);\n Map::observe(UploadablesObserver::class);\n }", "public function boot()\n {\n\t $this->composeHubs();//hub list\n\t $this->composeTopMenuDefault();// top menu for default main page\n\t $this->composeTopHubMenu();//top menu for default(overall) hub wise\n\t $this->composeTopmenu();//top menu for hub/country/\n\t \n\t $this->composeSidemenuDefault();\n\t $this->composeSidemenuHub();\n\t $this->composeSidemenu();\n\t $this->composePagemenu();\n }", "public static function boot ()\n {\n parent::boot();\n self::observe(new UIActionObserver());\n }", "public function boot()\n {\n $this->bootViews();\n\n $this->bootPublishedFiles();\n }", "public function boot()\n\t{\n\t\tif(!Menu::instance('sidebar'))\n\t\t{\n\t\t\tMenu::create('sidebar-menu', function ($menu) {\n\t\t\t\t$menu->setPresenter('App\\Presenters\\SidebarMenuPresenter');\n\t\t\t\t$menu->enableOrdering(); // enable ordering\n\t\t\t});\n\t\t}\n\t}", "public static function boot()\n {\n Session::start();\n\n Env::load();\n \n require_once __DIR__ . '/../../app/Routes/routes.php';\n\n require_once __DIR__ . '/globals.php';\n\n Request::setCurrent();\n\n Router::run();\n }", "public function boot()\n {\n parent::boot();\n\n User::observe($this->app->make(UserObserver::class));\n AnalyticsEvent::observe($this->app->make(AnalyticsEventObserver::class));\n }", "public function boot(Dispatcher $events)\n {\n \\URL::forceScheme(parse_url(config('app.url'))['scheme']);\n JetstrapFacade::useAdminLte3();\n\n $this->menu_build($events);\n }", "public function boot()\n {\n Image::observe(ImageObserver::class);\n Section::observe(SectionObserver::class);\n Post::observe(PostObserver::class);\n Virtual_Book::observe(VirtualBookObserver::class);\n Book::observe(BookObserver::class);\n }", "public function boot()\n {\n if ($this->app->isLocal()) {\n Redis::enableEvents();\n }\n\n Image::observe(ImageObserver::class);\n Domain::observe(DomainObserver::class);\n }", "public function boot()\n\t{\n\t\t$ext_translate = new Classes\\Translate();\n\t\t$ext_translate->menu();\n\t}", "public function boot()\n {\n $this->registerResources();\n $this->registerTab();\n $this->registerViewComposer();\n // $this->publishFiles();\n //$this->registerListener();\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 }", "public static function boot() \n\t{\n parent::boot();\n \n // AuthorizedEmployee::observe(new AuthorizedEmployeeObserver());\n }", "protected function bootstrap()\n {\n }", "public function boot()\n {\n parent::boot();\n User::observe(UserObserver::class);\n Lead::observe(LeadObserver::class);\n Contact::observe(ContactObserver::class);\n Business::observe(BusinessObserver::class);\n Lender::observe(LenderObserver::class);\n Application::observe(ApplicationObserver::class);\n }", "public function boot()\n\t{\n\t\t\n\t}", "public function boot()\n\t{\n\t\t\n\t}", "public function boot(Dispatcher $events)\n {\n parent::boot($events);\n\n //\n require app_path('Events.php');\n }", "public function boot() {\n\t\t//\n\t}", "public function boot() {\n\t\t//\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->publishConfig();\n\t\t\n\t\t$this->publishMigration();\n\n $this->registerBladeExtensions();\n }", "public function boot() {\n\t\t// TODO: Implement boot() method.\n\t}", "public function boot()\n {\n //Register Observers\n Employee::observe(EmployeeObserver::class);\n Lead::observe(LeadObserver::class);\n }", "public function boot()\n {\n //\n ChatConversation::observe(ChatConversationsObserver::class); // 호미차감\n }" ]
[ "0.74753386", "0.74493223", "0.7439741", "0.74258", "0.73784643", "0.7333372", "0.7289559", "0.727908", "0.72720927", "0.7254705", "0.7239023", "0.7202616", "0.7202278", "0.7192641", "0.7188342", "0.7178829", "0.717757", "0.7174152", "0.71665907", "0.71626914", "0.71626914", "0.71626914", "0.71626914", "0.71626914", "0.71626914", "0.71626914", "0.71626914", "0.7162092", "0.7161799", "0.715996", "0.71554875", "0.715137", "0.71492493", "0.71487224", "0.71447337", "0.71424985", "0.71411306", "0.7140546", "0.7140546", "0.7140546", "0.7140546", "0.7140546", "0.7140546", "0.7140546", "0.7140546", "0.7140546", "0.7140546", "0.7140546", "0.7140546", "0.7140546", "0.7140546", "0.7137858", "0.71377885", "0.7135799", "0.71286947", "0.7126621", "0.71234244", "0.7123238", "0.71184385", "0.7114821", "0.71131045", "0.7107703", "0.7100264", "0.70983064", "0.7094573", "0.7094573", "0.7094573", "0.7094573", "0.70892966", "0.7086606", "0.70858955", "0.708295", "0.7081195", "0.7081195", "0.7081195", "0.7078028", "0.7074964", "0.7070054", "0.7069931", "0.70667976", "0.7063619", "0.7063616", "0.70616955", "0.7058382", "0.70564735", "0.70559686", "0.70524204", "0.705013", "0.70501125", "0.70475346", "0.7043782", "0.70391405", "0.70391405", "0.7037584", "0.70375365", "0.70375365", "0.7034081", "0.7032853", "0.70304453", "0.70301706", "0.70281225" ]
0.0
-1
Register the service provider.
public function register() { $this->app->singleton('fs.router', 'YnievesDotNet\FourStream\FourStreamRouter'); $this->app['command.fourstream:start'] = $this->app->share(function ($app) { return new FourStreamStartCommand(); }); $this->commands('command.fourstream:start'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\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\n $this->registerBinding();\n }", "public function register()\n\t{\n\t\t$this->registerCommands();\n\t\t$this->registerHybridAuth();\n\t}", "public function register()\n {\n $this->registerAuthenticator();\n }", "public function register()\n {\n $this->loadHelpers();\n \n $this->passportSetting();\n }", "public function register()\n {\n //Bind service in IoC container\n $this->app->singleton('tenancy', function(){\n return new TenantManager();\n });\n }", "public function register()\n {\n\n $this->app->register(HookProvider::class);\n $this->app->register(RouteProvider::class);\n// $this->app->register(InstallModuleProvider::class);\n }", "public function register()\n\t{\n\t\t\n\t\t$this->registerViewManager();\n\t\t$this->registerResponseHandler();\n\t\t$this->registerHttpMethods();\n\t}", "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 // ...\n }", "public function register()\n {\n // ...\n }", "public function register() {\n $this->registerProviders();\n $this->registerFacades();\n }", "public function register()\n {\n $this->registerServiceProvider();\n\n $this->addAssetNamespaceHint();\n $this->addStreamsNamespaceHint();\n }", "public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }", "public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }", "public function register(){\n $this->registerDependencies();\n $this->registerAlias();\n $this->registerServiceCommands();\n }", "public function register()\n {\n $this->registerContracts();\n }", "public function register()\n\t{\n $this->registerApi();\n\t}", "public function register()\n {\n \n $this->registerLoader();\n $this->registerTranslator();\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 }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\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->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 $this->registerFinite();\n }", "public function register()\n {\n $this->setupConfig();\n\n $this->bindServices();\n }", "public function register()\n {\n $this->registerServices();\n $this->setupStubPath();\n $this->registerProviders();\n }", "public function register()\n {\n $this->app['cache'] = $this->app->share(function($app)\n {\n return new CacheManagerMaster($app);\n });\n\n $this->app['memcached.connector'] = $this->app->share(function()\n {\n return new MemcachedConnector;\n });\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerBrowser();\n\n $this->registerViewFinder();\n }", "public function register()\n {\n $this->registerCacheManager();\n $this->registerCourier();\n }", "public function register()\n {\n $this->app->singleton(Adapter::class, function () {\n\n return new Adapter(config('services.sso.id'), config('services.sso.secret'));\n\n });\n }", "public function register()\n {\n $this->registerRollbar();\n }", "public function register()\n {\n $this->configure();\n }", "public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n }", "public function register(): void\n {\n parent::register();\n\n $this->singleton(RouteViewerContract::class, RouteViewer::class);\n }", "public function register() {\n\n }", "public function register()\n {\n $this->registerFlareFacade();\n $this->registerServiceProviders();\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerBindings();\n $this->registerEventListeners();\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->app->singleton(Service\\TagsSynchronizer::class, function ($app) {\n return new Service\\TagsSynchronizer();\n });\n }", "public function register() {\n }", "public function register() {\n }", "public function register() {\n }", "public function register() {\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }" ]
[ "0.71774215", "0.7054453", "0.6968271", "0.69677705", "0.6952019", "0.6931252", "0.6926226", "0.6918423", "0.6899592", "0.6895726", "0.6894278", "0.68906504", "0.68906504", "0.6883112", "0.6872877", "0.6865099", "0.68640506", "0.68627584", "0.68624485", "0.68491566", "0.6823619", "0.68196595", "0.681956", "0.681956", "0.681956", "0.681956", "0.681956", "0.681956", "0.681956", "0.681956", "0.68090034", "0.68089324", "0.6807419", "0.6803942", "0.6802752", "0.679191", "0.67904466", "0.67874974", "0.6785141", "0.6785141", "0.6785141", "0.6780175", "0.67768264", "0.6776666", "0.6770326", "0.6762759", "0.67627436", "0.67611307", "0.6757141", "0.67570823", "0.67548144", "0.6753397", "0.6753232", "0.67504245", "0.67504245", "0.67504245", "0.67504245", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705" ]
0.0
-1
Get the services provided by the provider.
public function provides() { return array('command.fourstream:start'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public function getServices()\n {\n if (is_null($this->serviceProviders)) {\n $this->serviceProviders = $this->getServiceProviders();\n }\n\n return $this->serviceProviders;\n }", "protected function getServices()\n {\n return $this->services;\n }", "protected static function getServiceProviders()\n {\n return [];\n }", "public static function get_service_providers(): array {\n\t\treturn self::$service_providers;\n\t}", "public function getServices();", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "public function services()\n {\n return $this->belongstomany(Service::class);\n }", "public function getServices() {\n return $this->services;\n }", "public function getServices() {\n return $this->services;\n }", "public function getServiceProviders();", "public function getServices() {\n\n return $this->services;\n\n }", "public function getServices()\n {\n return $this->pantonoServices;\n }", "public static function getServices(): array\n {\n return static::$services;\n }", "public static function get_services() {\n return [ \n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\SettingsLinks::class,\n Base\\JsObjectsManager::class,\n Base\\ShortCodesManager::class\n ];\n }", "private function get_services() {\n\t\treturn [\n\t\t\tServices\\Language_Loader::class,\n\t\t\tServices\\Setup_Database::class,\n\t\t\tServices\\Scripts_And_Templates::class,\n\t\t\tServices\\Admin_Pages::class,\n\t\t\tServices\\Setup_Settings_Page::class,\n\t\t\tServices\\Loggers_Loader::class,\n\t\t\tServices\\Dropins_Loader::class,\n\t\t\tServices\\Setup_Log_Filters::class,\n\t\t\tServices\\Setup_Pause_Resume_Actions::class,\n\t\t\tServices\\Setup_Purge_DB_Cron::class,\n\t\t\tServices\\API::class,\n\t\t\tServices\\Dashboard_Widget::class,\n\t\t\tServices\\Network_Menu_Items::class,\n\t\t\tServices\\Plugin_List_Link::class,\n\t\t];\n\t}", "public static function get_services()\n {\n return [\n Pages\\Dashboard::class,\n Base\\Enqueue::class,\n Base\\SettingsLink::class,\n Base\\CustomPostTypeController::class,\n ];\n }", "public static function get_services()\n {\n return [\n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\CustomPostType::class,\n Base\\CustomMetaBox::class,\n Base\\Shortcode::class,\n Base\\Cron::class,\n ];\n }", "public function &getServices(): array {\n return $this->services;\n }", "public function getServiceLocator()\n {\n return $this->services;\n }", "public function getServiceProviderList()\n {\n return $this->providers;\n }", "public function services()\n {\n return $this->getAngularLocation($this->service_path);\n }", "public function provides()\n {\n return [Client::class, Services\\OAuth::class];\n }", "public function getServices(): array;", "public function getServiceProvider();", "public static function get_services()\n {\n\n //підключаємо всі необхідні класи для активації через масив\n return [\n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\SettingsLinks::class\n ];\n }", "public function provides()\n {\n return [\n SerasaService::class\n ];\n }", "public function serviceProviders(): ?Collection;", "public function getServices()\r\n {\r\n if (is_null($this->_services)) {\r\n if ($this->getConfig('auto')) {\r\n $this->_services = array();\r\n $config = Mage::app()->getConfig();\r\n foreach (array('cache', 'full_page_cache', 'fpc') as $cacheType) {\r\n $node = $config->getXpath('global/' . $cacheType . '[1]');\r\n if (isset($node[0]->backend) && in_array((string)$node[0]->backend, array(\r\n 'Cm_Cache_Backend_Redis',\r\n 'Mage_Cache_Backend_Redis'\r\n ))) {\r\n $this->_services[] = $this->_buildServiceArray(\r\n $this->__(str_replace('_', ' ', uc_words($cacheType))),\r\n $node[0]->backend_options->server,\r\n $node[0]->backend_options->port,\r\n $node[0]->backend_options->password,\r\n $node[0]->backend_options->database\r\n );\r\n }\r\n }\r\n // get session\r\n $node = $config->getXpath('global/redis_session');\r\n if ($node) {\r\n $this->_services[] = $this->_buildServiceArray(\r\n $this->__('Session'),\r\n $node[0]->host,\r\n $node[0]->port,\r\n $node[0]->password,\r\n $node[0]->db\r\n );\r\n }\r\n } else {\r\n $this->_services = unserialize($this->getConfig('manual'));\r\n }\r\n }\r\n return $this->_services;\r\n }", "public function loadServices($providers);", "public static function get_services(): array\n {\n return [\n Base\\SettingsLinks::class,\n Pages\\Admin::class,\n Base\\Enqueue::class,\n CPT\\EmailCpt::class,\n ];\n }", "public function services(): array\n {\n return \\array_merge(\n \\array_keys($this->_services),\n \\array_keys($this->aliases)\n );\n }", "public function get_services() {\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/services.json\");\n }", "public function getRequestedServices();", "public function getProviders();", "public function getProviders();", "protected function getUserServices()\n\t{\n\t\treturn $this->userServices = new UsersService();\n\t}", "protected function getServices() {\n\t\treturn [\n\t\t\tMessagesService::class,\n\t\t];\n\t}", "public static function get_providers() {\n\t\treturn self::$providers;\n\t}", "public function getRequiredServices();", "public function getModulesServiceProviders()\n {\n $modulesNamespace = ModulesConfig::getModulesNamespace();\n\n foreach (ModulesConfig::getModulesNames() as $moduleName) {\n // get the Module extra service providers (extra service providers are defined in the modules config file)\n foreach (ModulesConfig::getModulesExtraServiceProviders($moduleName) as $provider) {\n $allServiceProviders[] = $provider;\n }\n // append the Module main service provider\n $allServiceProviders[] = ModulesConfig::buildMainServiceProvider($modulesNamespace, $moduleName);\n }\n\n return array_unique($allServiceProviders) ? : [];\n }", "public function provides()\n {\n return [\n RouteServiceProvider::class,\n MenuServiceProvider::class,\n ];\n }", "public function getUsersServices()\r\n {\r\n return $this->usersServices = new UsersService();\r\n }", "public function getServices()\n\t{\n\t\treturn ['card', 'topup_mobile', 'topup_mobile_post', 'topup_game'];\n\t}", "public function providerGet()\n {\n $getList = $this->getMethodsName('get');\n $provider = [];\n\n foreach ($getList as $name) {\n $provider[$name] = [\n 'name' => $name,\n 'arguments' => $this->getArgumentsForMethod($name),\n ];\n }\n\n return $provider;\n }", "public function findServices(): array;", "public static function get_services()\n {\n $ServicesObj = new Services();\n $Services = array();\n try {\n $stmt = $ServicesObj->read();\n $count = $stmt->rowCount();\n if ($count > 0) {\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n extract($row);\n $p = (object) array(\n \"ServiceID\" => (int) $ServiceID,\n \"ServiceName\" => $ServiceName,\n );\n\n array_push($Services, $p);\n }\n }\n return $Services;\n } catch (Exception $e) {\n throw $e;\n }\n }", "protected function otherServiceProviders()\n {\n $providers = [\n \\Collective\\Html\\HtmlServiceProvider::class,\n \\Intervention\\Image\\ImageServiceProvider::class,\n \\Acacha\\AdminLTETemplateLaravel\\Providers\\AdminLTETemplateServiceProvider::class,\n \\Serff\\Cms\\Core\\Providers\\InstallationServiceProvider::class,\n \\Serff\\Cms\\Core\\Providers\\AdminServiceProvider::class,\n ];\n\n $manifestPath = app()->getCachedServicesPath();\n\n (new ProviderRepository(app(), new Filesystem, $manifestPath))\n ->load($providers);\n }", "protected function getProviders() {\n\n\t\treturn $this->providers;\n\t}", "public function provides()\n {\n return [\n 'sm.callback.factory',\n 'sm.event.dispatcher',\n 'sm.factory',\n Debug::class,\n ];\n }", "public function get_providers()\n {\n }", "public function provides()\n {\n return [\n 'freshdesk.factory',\n 'freshdesk',\n 'freshdesk.connection',\n ];\n }", "public function provides()\n {\n return [\\App\\Services\\ApiPlatformProductFactoryService::class];\n }", "public function getServiceProvider($provider);", "public static function getListServices () {\n return self::findByStatus(self::STATUS_ACTIVE);\n }", "protected function registerServiceProviders()\n {\n if ($this->active()->has('providers')) {\n $providers = $this->active()->get('providers');\n\n foreach ($providers as $provider) {\n App::register($provider);\n }\n }\n }", "public function provides()\n\t{\n\t\treturn array(\n\t\t\t'mosms',\n\t\t\t'moclient',\n\t\t\t);\n\t}", "public function provides() {\n $providers = array();\n foreach ($this->providers as $key => $value) {\n $providers[] = $key;\n }\n return $providers;\n }", "public function getLoadedProviders(): array\n {\n return $this->loadServiceProviders;\n }", "public function provides()\n {\n AchieveLogger::info(\"Deferred true and I am here in provides()\");\n return['App\\Services\\Utility\\AchieveLoggerService'];\n }", "public function getModuleServiceProvider()\n {\n return isset($this->config['module']['providers']) ? $this->config['module']['providers'] : [];\n }", "public function provides()\n {\n return [\n CreateService::class,\n CreateInterface::class,\n CreateProvider::class,\n ];\n }", "public function setProviders()\n {\n $services = $this->container['services']??null;\n\n if (is_array($services)) {\n foreach ($services as $service) {\n $service::register($this->container);\n $service::boot($this->container);\n }\n }\n }", "public function provides()\n {\n return [\n ZhyuInfoServiceProvider::class,\n ];\n }", "public function getProviders()\n {\n return $this->providers;\n }", "public function getProviders()\n {\n return $this->providers;\n }", "public function services($ignore_cache = false) {\n if ($this->services === null || $ignore_cache) {\n $this->services = StatusBoard_Service::allForSite($this);\n }\n \n return $this->services;\n }", "public function getProviders(): array\n {\n return $this->providers;\n }", "public function getProviders(): array\n {\n return $this->providers;\n }", "public function get_service() {\n\n\t\treturn $this->provider_instance;\n\t}", "public function provides()\n {\n return [\n 'digitalocean.adapterfactory',\n 'digitalocean.factory',\n 'digitalocean',\n 'digitalocean.connection',\n ];\n }", "public function provides()\n {\n return [\n 'dubbo_cli',\n 'dubbo_cli.factory',\n ];\n }", "public static function getSubscribedServices()\r\n {\r\n return [\r\n MDHelper::class,\r\n LoggerInterface::class\r\n ];\r\n }", "public function getDependencies()\n {\n return array(\n MongoServiceProvider::SERVICE_NAME\n );\n }", "protected function getAuth_Provider_Oauth_ServiceCollectionService()\n {\n $this->services['auth.provider.oauth.service_collection'] = $instance = new \\phpbb\\di\\service_collection($this);\n\n $instance->add('auth.provider.oauth.service.bitly');\n $instance->add('auth.provider.oauth.service.facebook');\n $instance->add('auth.provider.oauth.service.google');\n $instance->add('auth.provider.oauth.service.twitter');\n\n return $instance;\n }", "public function provides()\n {\n return [CardService::class];\n }", "public function getServices()\n {\n $services = InvoiceService::where('office_id', request('office_id'))->where('name', 'like', '%' . request('q') . '%')->get();\n\n return $services;\n }", "public function provides()\n {\n return [\n 'auth',\n 'Permit\\CurrentUser\\ContainerInterface',\n 'Permit\\Access\\CheckerInterface',\n 'Permit\\CurrentUser\\LoginValidatorInterface'\n ];\n }", "public function getProviders($provider)\n {\n $name = is_string($provider) ? $provider : getClass($provider, true);\n \n return Arr::where($this->serviceProviders, function ($value) use ($name) {\n return $value instanceof $name;\n });\n }", "public function getServiceCheckProviders(): array\n {\n return $this->serviceCheckProviders;\n }", "public static function getDeferredServices(){\n return \\Illuminate\\Foundation\\Application::getDeferredServices();\n }", "abstract public function getProviders();", "private function providers()\n {\n $this->register(new CorsServiceProvider());\n $this->register(new HmacServiceProvider());\n }", "public function getDeferredServices(): array\n {\n return $this->deferredServices;\n }", "public function services(){\n\n $facades = Array(\n 'Cache' => 'Disco\\classes\\Cache',\n 'Crypt' => 'Disco\\classes\\Crypt',\n 'Data' => 'Disco\\classes\\Data',\n 'DB' => 'Disco\\classes\\DB',\n 'Email' => 'Disco\\classes\\Email',\n 'Event' => 'Disco\\classes\\Event',\n 'Html' => 'Disco\\classes\\Html',\n 'Form' => 'Disco\\classes\\Form',\n 'Model' => 'Disco\\classes\\ModelFactory',\n 'Queue' => 'Disco\\classes\\Queue',\n 'Session' => 'Disco\\classes\\Session',\n 'Template' => 'Disco\\classes\\Template',\n 'View' => 'Disco\\classes\\View'\n );\n\n foreach($facades as $facade=>$v){\n $this->make($facade,$v);\n }//foreach\n\n $this->as_factory('Router',function(){\n return new \\Disco\\classes\\Router::$base;\n });\n\n }", "public function provides()\n {\n return [\n EventDispatcher::class,\n Repository::class,\n ];\n }", "public function getServiceProvider(): Provider\n {\n return $this->serviceProvider;\n }", "protected function getPuntoAtencionServices()\n {\n return $this->container->get('snc.services.puntoatencion');\n }", "public function get_services($settings = FALSE)\n\t{\t\n\t\treturn parent::get_objects(array(\n\t\t\t'settings' => $settings\n\t\t));\n\t}", "public function provides()\n {\n return [\n Factory::class,\n 'flipbox.sdk',\n ];\n }", "public function provides()\n {\n return array(\n 'icsconfig',\n 'icsview',\n 'icsmessage',\n 'icspdf'\n );\n }", "public function getAvailableServices();", "public function provides()\n {\n return [\n ZhyuAuthServiceProvider::class,\n ];\n }", "public function getServices() {\n $serviceNames = $this->getServiceNames($this->serviceFolderPaths);\n $ret = $ret1 = array();\n// require_once AMFPHP_ROOTPATH.'Plugins/AmfphpDiscovery/CReflection.php';\n foreach ($serviceNames as $serviceName) {\n/* $methods = array();\n $objC = new CReflection(APP_PATH.'/app/controllers/'.$serviceName.'.php');\n $objComment = $objC->getDocComment();\n $arrMethod = $objC->getMethods();\n foreach ($arrMethod as $objMethods)\n {\n $methodComment = $objMethods->getDocComment();\n $parsedMethodComment = $this->parseMethodComment($methodComment);\n $arrParamenter = $objMethods->getParameters();\n foreach ($arrParamenter as $Paramenter)\n {\n $parameterInfo = new AmfphpDiscovery_ParameterDescriptor($Paramenter, '');\n $parameters[] = $parameterInfo;\n }\n $methods[$objMethods->_name] = new AmfphpDiscovery_MethodDescriptor($objMethods->_name, $parameters, $methodComment, $parsedMethodComment['return']);\n }\n\n $ret[$serviceName] = new AmfphpDiscovery_ServiceDescriptor($serviceName, $methods, $objComment); */\n $ret1[] = array('label'=>$serviceName,'date'=>'');\n }\n// var_dump($ret);exit();\n //note : filtering must be done at the end, as for example excluding a Vo class needed by another creates issues\n foreach ($ret as $serviceName => $serviceObj) {\n foreach (self::$excludePaths as $excludePath) {\n if (strpos($serviceName, $excludePath) !== false) {\n unset($ret[$serviceName]);\n break;\n }\n }\n }\n return $ret1;\n }", "public function providers()\n {\n return $this->request('get', '/api/teams/'.Helpers::config('team').'/providers');\n }", "public function get_registered_services() {\n\t\t$data = [];\n\t\t$res = self::$dbo->query( 'SELECT storage_service FROM snapshot_storage_credentials' );\n\t\twhile ( $row = $res->fetchArray() ) {\n\t\t\t$data[] = $row['storage_service'];\n\t\t}\n\n\t\treturn $data;\n\t}", "protected function getPayrollServices()\n\t{\n\t\treturn $this->payrollServices = new PayrollServices();\n\t}", "public function provides()\n {\n return ['shppcart_service'];\n }", "public function provides()\n {\n return ['vk_service'];\n }", "public function provides() {\n\t\treturn array();\n\t}" ]
[ "0.79039633", "0.7667588", "0.76229626", "0.75573224", "0.7470691", "0.7423859", "0.7423859", "0.7423859", "0.7409516", "0.736475", "0.736475", "0.7363987", "0.7322196", "0.71889", "0.7162814", "0.71509963", "0.7137116", "0.70622355", "0.7047945", "0.70362085", "0.70213807", "0.69303095", "0.6916005", "0.689161", "0.6809766", "0.6804473", "0.6777694", "0.67695314", "0.67489713", "0.6727971", "0.6722673", "0.6699434", "0.66944385", "0.6651968", "0.6645622", "0.66324407", "0.66324407", "0.6616089", "0.6613961", "0.6610317", "0.66008735", "0.6567814", "0.6562319", "0.6529889", "0.6500722", "0.6480351", "0.64535", "0.645232", "0.6418372", "0.6416018", "0.6413331", "0.6397339", "0.63955915", "0.63899195", "0.6379133", "0.63766354", "0.63379693", "0.63369566", "0.63356155", "0.6335485", "0.6318311", "0.6316751", "0.63084865", "0.62963986", "0.6278965", "0.6264424", "0.6264424", "0.62581587", "0.6252555", "0.6252555", "0.62434787", "0.62404764", "0.623751", "0.62194616", "0.6210146", "0.6203944", "0.62002736", "0.6197869", "0.61938506", "0.6188146", "0.61726904", "0.6170289", "0.6163297", "0.61600006", "0.61570746", "0.6152867", "0.6147815", "0.6147383", "0.61295825", "0.6126574", "0.6124758", "0.61204225", "0.6100293", "0.60957974", "0.6073751", "0.6072919", "0.60692966", "0.6069216", "0.60561067", "0.604959", "0.60481" ]
0.0
-1
Set the keys for a save update query.
protected function setKeysForSaveQuery(\Illuminate\Database\Eloquent\Builder $query) { $keys = $this->getKeyName(); if(!is_array($keys)){ return parent::setKeysForSaveQuery($query); } foreach($keys as $keyName){ $query->where($keyName, '=', $this->getKeyForSaveQuery($keyName)); } return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addKeysToUpdates()\n\t{\n\t\t$keys = $this->database->getNewKeys();\n\n\t\tif (!empty($keys)) {\n\t\t\t$this->addToUpdates($keys);\n\t\t}\n\t}", "protected function setKeysForSaveQuery($query)\n {\n $keys = $this->getKeyName();\n if (!is_array($keys)) {\n return parent::setKeysForSaveQuery($query);\n }\n\n foreach ($keys as $keyName) {\n $query->where($keyName, '=', $this->getKeyForSaveQuery($keyName));\n }\n\n return $query;\n }", "protected function setKeysForSaveQuery(Builder $query)\n {\n $keys = $this->getKeyName();\n if (!is_array($keys)) {\n return parent::setKeysForSaveQuery($query);\n }\n\n foreach ($keys as $keyName) {\n $query->where($keyName, '=', $this->getKeyForSaveQuery($keyName));\n }\n\n return $query;\n }", "protected function setKeysForSaveQuery(\\Illuminate\\Database\\Eloquent\\Builder $query)\n {\n $keys = $this->getKeyName();\n if(!is_array($keys)){\n return parent::setKeysForSaveQuery($query);\n }\n\n foreach($keys as $keyName){\n $query->where($keyName, '=', $this->getKeyForSaveQuery($keyName));\n }\n\n return $query;\n }", "protected function setKeysForSaveQuery(\\Illuminate\\Database\\Eloquent\\Builder $query)\n {\n $keys = $this->getKeyName();\n if(!is_array($keys)){\n return parent::setKeysForSaveQuery($query);\n }\n\n foreach($keys as $keyName){\n $query->where($keyName, '=', $this->getKeyForSaveQuery($keyName));\n }\n\n return $query;\n }", "protected function setKeysForSaveQuery(\\Illuminate\\Database\\Eloquent\\Builder $query) {\n if (is_array($this->primaryKey)) {\n foreach ($this->primaryKey as $pk) {\n $query->where($pk, '=', $this->original[$pk]);\n }\n return $query;\n }else{\n return parent::setKeysForSaveQuery($query);\n }\n }", "protected function setKeysForSaveQuery(Builder $query)\n {\n $query\n //Put appropriate values for your keys here:\n ->where('username', '=', $this->username)\n ->where('story_id', '=', $this->story_id);\n return $query;\n }", "public function testUpdateKey()\n {\n }", "protected function setKeysForSaveQuery(\\Illuminate\\Database\\Eloquent\\Builder $query)\n {\n $query\n //Put appropriate values for your keys here:\n ->where('idPlayer', '=', $this->idPlayer)\n ->where('idLevel', '=', $this->idLevel);\n\n return $query;\n }", "public function save(){\n\t\t$v = get_object_vars($this);\n\t\tunset($v['TABLE']);\n\t\tunset($v['IS_UPDATING']);\n\t\t$key_s = \"\";\n\t\t$key_v = \"\";\n\t\tforeach($v as $key => $val){\n\t\t\t$key_s .= \"$key, \";\n\t\t\t$key_v .= \"'$val', \";\n\t\t}\n\t\t$key_s = substr_replace($key_s, '', strlen($key_s)-2);\n\t\t$key_v = substr_replace($key_v, '', strlen($key_v)-2);\n\t\tif($this->IS_UPDATING){\n\t\t\t$str = \"\";\n\t\t\tunset($v['id']);\n\t\t\tforeach($v as $key => $val){\n\t\t\t\t$str .= $key . \"='$val', \";\n\t\t\t}\n\t\t\t$str = substr_replace($str, '', strlen($str)-2);\n\t\t\t$query = \"UPDATE {$this->TABLE} SET $str WHERE id = {$this->id}\";\n\t\t} else {\n\t\t\t$query = \"INSERT INTO {$this->TABLE} ($key_s) VALUES ($key_v)\";\n\t\t}\n\t\t$q = parent::query($query);\n\t\treturn $q;\n\t}", "public function setKeysFromInserted()\n\t{\n\t\t$keys = $this->database->getNewKeys();\n\n\t\t$this->data = Arr::mergeDeep($this->data, $keys);\n\n\t\t$this->key = $keys[$this->primaryKey] ?? null;\n\t}", "protected function setKeysForSaveQuery(Builder $query){\n\t\t$query->where($this->getKeyForSaveQuery());\n\n\t\treturn $query;\n\t}", "protected function setKeysForSaveQuery(Builder $query) {\n\t\treturn $query->where([\n\t\t\t'group_id' => $this->getAttribute('group_id'),\n\t\t\t'access_id' => $this->getAttribute('access_id'),\n\t\t]);\n\t}", "protected function setUpdateArray() {\n $column_names = getColumnNames($this->table_name);\n foreach ($column_names as $column_name) {\n if (isset($_POST[$column_name])) {\n $this->update[$column_name] = Mysql::SQLValue($_POST[$column_name]);\n } else if (isset($_GET[$column_name])) {\n $this->update[$column_name] = Mysql::SQLValue($_GET[$column_name]);\n }\n }\n }", "protected function setKeysForSaveQuery(Builder $query)\n {\n $query\n //Put appropriate values for your keys here:\n ->where('locatieCode', '=', $this->locatieCode)\n ->where('productCode', '=', $this->productCode);\n\n return $query;\n }", "public function update(){\n static::setConnection();\n $table = static::$table;\n $keyColumn = static::$keyColumn;\n $sql = \"UPDATE \".$table.\" SET \";\n foreach($this as $k=>$v){\n $sql .= $k.\" = '\".$v.\"',\";\n }\n $sql = trim($sql, ',');\n $sql .= \" WHERE \".$keyColumn.\" = \".$this->keyColumn;\n mysqli_query(static::$conn, $sql);\n }", "protected function setKeysForSaveQuery(Builder $query)\n {\n $query\n ->where('entity_id', '=', $this->getAttribute('entity_id'))\n ->where('user_id', '=', $this->getAttribute('user_id'));\n return $query;\n }", "public function _getUpdateKeys() {\n return array(Model_Fields_PracticeFieldCoordinatorDB::DB_COLUMN_ID => $this->{Model_Fields_PracticeFieldCoordinatorDB::DB_COLUMN_ID});\n }", "function save($keys=null,$extra_where=null)\n\t{\n\t\tif (is_array($keys) && count($keys) && !isset($keys[0]))\t// allow to use an etag, eg array('etag=etag+1')\n\t\t{\n\t\t\t$this->data_merge($keys);\n\t\t\t$keys = null;\n\t\t}\n\t\t$ret = parent::save($keys,$extra_where);\n\n\t\tif ($ret == 0 && $this->customfields)\n\t\t{\n\t\t\t$this->save_customfields($this->data);\n\t\t}\n\t\treturn $ret;\n\t}", "protected function setKeysForSaveQuery($query): Builder\n {\n $key = $this->getKey();\n\n $query->key(...array_values($key));\n\n return $query;\n }", "protected static function setKeys($options, $keys, $cmdname, \\BaseObject $propelitem) {\r\n foreach ($keys as $key => $data) {\r\n if (!isset($data['colname']) || !isset($data['actions']) || !isset($data['actions'][$cmdname]))\r\n continue;\r\n if ($data['actions'][$cmdname] == 'required' || $data['actions'][$cmdname] == 'internal')\r\n $propelitem->{\"set\" . $data['colname']}($options[$key]);\r\n else if ($data['actions'][$cmdname] == 'optional' && isset($options[$key]))\r\n $propelitem->{\"set\" . $data['colname']}($options[$key]);\r\n }\r\n }", "public function _getUpdateKeys() {\n return array(Model_Fields_FieldDB::DB_COLUMN_ID => $this->{Model_Fields_FieldDB::DB_COLUMN_ID});\n }", "public function actionSetKeys()\n {\n $this->setKeys($this->generateKeysPaths);\n }", "private function update(){\n\t\t$q = Queries::update($this->authkey);\n\t\t$this->internalQuery($q);\n\t}", "public function setAll($values) {\n\t\tif (isset($values[self::$primaryKey[$this->table]])) {\n\t\t\t$this->originalData = $values;\n\t\t}\n\t\telse {\n\t\t\t$this->modifiedData = $values;\n\t\t}\n\t}", "public function saveAll() {\n if (isset($this::$has)) {\n foreach ($this::$has as $key => $value) {\n if(isset($this->$key)) {\n foreach ($this->$key as $item) {\n $item->saveAll();\n }\n }\n }\n }\n $this->save();\n }", "protected function setupUpdateOperation()\n {\n CRUD::setValidation(SettingRequest::class);\n\n $readonly = [];\n if (User::min('id') !== backpack_user()->id) {\n $readonly = ['readonly' => 'readonly'];\n }\n\n CRUD::field('key')->type('text')->label('ID key')->attributes($readonly);\n CRUD::field('name')->type('text')->label('Nom');\n CRUD::field('value')->type(CRUD::getCurrentEntry()->type)->label('Contenu');\n }", "protected function setKeysForSaveQuery(Builder $query)\n {\n return $this->scopeFromTo(\n $query,\n $this->currency_from,\n $this->currency_to\n );\n }", "public function _getUpdateKeys() {\r\n return array(Model_Fields_LeagueDB::DB_COLUMN_ID => $this->{Model_Fields_LeagueDB::DB_COLUMN_ID});\r\n }", "public function setKeysForSaveQuery(Builder $query)\n {\n $query\n ->where('id_ciudad', '=', $this->getAttribute('id_ciudad'))\n ->where('nombre', '=', $this->getAttribute('nombre'));\n return $query;\n }", "public function setPrimaryKey($keys)\n {\n $this->setSekolahId($keys[0]);\n $this->setSemesterId($keys[1]);\n }", "public function editSaveQuery() {\n\t\t$this->expiredStatusToQuery('expired', 'expiration');\n\t}", "public function setPrimaryKey($keys)\n {\n $this->setSessionid($keys[0]);\n $this->setRecno($keys[1]);\n $this->setOrderno($keys[2]);\n }", "public function save()\n {\n $pdo = $this->getDbConnection();\n $valuesRow = $this->prepareValuesRow();\n\n $pdo->exec(\"REPLACE INTO {$this->dbTable} (`key`, `value`) VALUES {$valuesRow}\");\n }", "function save($keys=null,$extra_where=null)\n\t{\n\t\tif (is_array($keys) && count($keys)) $this->data_merge($keys);\n\n\t\t// check if data contains user timezone during read AND user changed timezone since then\n\t\t// --> load old timezone for the rest of this request\n\t\t// this only a grude hack, better handle this situation in app code:\n\t\t// history logging eg. depends on old data read before calling save, which is then in new timezone!\n\t\t// anyway it's better fixing it here then not fixing it at all ;-)\n\t\tif (isset($this->data[self::USER_TIMEZONE_READ]) && $this->data[self::USER_TIMEZONE_READ] != egw_time::$user_timezone->getName())\n\t\t{\n\t\t\t//echo \"<p>\".__METHOD__.\"() User change TZ since read! tz-read=\".$this->data[self::USER_TIMEZONE_READ].' != current-tz='.egw_time::$user_timezone->getName().\" --> fixing</p>\\n\";\n\t\t\terror_log(__METHOD__.\"() User changed TZ since read! tz-read=\".$this->data[self::USER_TIMEZONE_READ].' != current-tz='.egw_time::$user_timezone->getName().\" --> fixing</p>\");\n\t\t\t$GLOBALS['egw_info']['user']['preferences']['common']['tz'] = $this->data[self::USER_TIMEZONE_READ];\n\t\t\tegw_time::setUserPrefs($this->data[self::USER_TIMEZONE_READ]);\n\t\t\t$this->set_times();\n\t\t}\n\t\t$this->data2db();\n\n\t\tif ((int) $this->debug >= 4) { echo \"so_sql::save(\".print_r($keys,true).\") autoinc_id='$this->autoinc_id', data=\"; _debug_array($this->data); }\n\n\t\tif ($this->autoinc_id && !$this->data[$this->db_key_cols[$this->autoinc_id]])\t// insert with auto id\n\t\t{\n\t\t\tforeach($this->db_cols as $db_col => $col)\n\t\t\t{\n\t\t\t\tif (!$this->autoinc_id || $db_col != $this->autoinc_id)\t// not write auto-inc-id\n\t\t\t\t{\n\t\t\t\t\tif (!array_key_exists($col,$this->data) && \t// handling of unset columns in $this->data\n\t\t\t\t\t\t(isset($this->table_def['fd'][$db_col]['default']) ||\t// we have a default value\n\t\t\t\t\t\t !isset($this->table_def['fd'][$db_col]['nullable']) || $this->table_def['fd'][$db_col]['nullable']))\t// column is nullable\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\t// no need to write that (unset) column\n\t\t\t\t\t}\n\t\t\t\t\tif ($this->table_def['fd'][$db_col]['type'] == 'varchar' &&\n\t\t\t\t\t\tstrlen($this->data[$col]) > $this->table_def['fd'][$db_col]['precision'])\n\t\t\t\t\t{\n\t\t\t\t\t\t// truncate the field to mamimum length, if upper layers didn't care\n\t\t\t\t\t\t$data[$db_col] = substr($this->data[$col],0,$this->table_def['fd'][$db_col]['precision']);\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$data[$db_col] = (string) $this->data[$col] === '' && $this->empty_on_write == 'NULL' ? null : $this->data[$col];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->db->insert($this->table_name,$data,false,__LINE__,__FILE__,$this->app);\n\n\t\t\tif ($this->autoinc_id)\n\t\t\t{\n\t\t\t\t$this->data[$this->db_key_cols[$this->autoinc_id]] = $this->db->get_last_insert_id($this->table_name,$this->autoinc_id);\n\t\t\t}\n\t\t}\n\t\telse // insert in table without auto id or update of existing row, dont write colums unset in $this->data\n\t\t{\n\t\t\tforeach($this->db_data_cols as $db_col => $col)\n\t\t\t{\n\t\t\t\t// we need to update columns set to null: after a $this->data[$col]=null:\n\t\t\t\t// - array_key_exits($col,$this->data) === true\n\t\t\t\t// - isset($this->data[$col]) === false\n\t\t\t\tif (!array_key_exists($col,$this->data) &&\t// handling of unset columns in $this->data\n\t\t\t\t\t($this->autoinc_id ||\t\t\t// update of table with auto id or\n\t\t\t\t\t isset($this->table_def['fd'][$db_col]['default']) ||\t// we have a default value or\n\t\t\t\t\t !isset($this->table_def['fd'][$db_col]['nullable']) || $this->table_def['fd'][$db_col]['nullable']))\t// column is nullable\n\t\t\t\t{\n\t\t\t\t\tcontinue;\t// no need to write that (unset) column\n\t\t\t\t}\n\t\t\t\t$data[$db_col] = !is_object($this->data[$col]) && (string) $this->data[$col] === '' && $this->empty_on_write == 'NULL' ? null : $this->data[$col];\n\t\t\t}\n\t\t\t// allow to add direct sql updates, eg. \"etag=etag+1\" with int keys\n\t\t\tif (is_array($keys) && isset($keys[0]))\n\t\t\t{\n\t\t\t\tfor($n=0; isset($keys[$n]); ++$n)\n\t\t\t\t{\n\t\t\t\t\t$data[] = $keys[$n];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$keys = $extra_where;\n\t\t\tforeach($this->db_key_cols as $db_col => $col)\n\t\t\t{\n\t\t\t\t$keys[$db_col] = $this->data[$col];\n\t\t\t}\n\t\t\tif (!$data && !$this->autoinc_id)\t// happens if all columns are in the primary key\n\t\t\t{\n\t\t\t\t$data = $keys;\n\t\t\t\t$keys = False;\n\t\t\t}\n\t\t\tif ($this->autoinc_id)\n\t\t\t{\n\t\t\t\t$this->db->update($this->table_name,$data,$keys,__LINE__,__FILE__,$this->app);\n\t\t\t\tif (($nothing_affected = !$this->db->Errno && !$this->db->affected_rows()) && $extra_where)\n\t\t\t\t{\n\t\t\t\t\treturn true;\t// extra_where not met, eg. etag wrong\n\t\t\t\t}\n\t\t\t}\n\t\t\t// always try an insert if we have no autoinc_id, as we dont know if the data exists\n\t\t\tif (!$this->autoinc_id || $nothing_affected)\n\t\t\t{\n\t\t\t\t$this->db->insert($this->table_name,$data,$keys,__LINE__,__FILE__,$this->app);\n\t\t\t}\n\t\t}\n\t\t$this->db2data();\n\n\t\treturn $this->db->Errno;\n\t}", "public function setPrimaryKey($keys)\n {\n $this->setSekolahId($keys[0]);\n $this->setSemesterId($keys[1]);\n $this->setIdRuang($keys[2]);\n $this->setHari($keys[3]);\n }", "public function setUpdate(array $source_key) {\n $query = $this->connection->update($this->mapTable)\n ->fields(array('needs_update' => MigrateMap::STATUS_NEEDS_UPDATE));\n $count = 1;\n foreach ($source_key as $key_value) {\n $query->condition('sourceid' . $count++, $key_value);\n }\n $query->execute();\n }", "public function saveToDb()\n\t{\n\t\t$db = \\App\\Db::getInstance('admin');\n\t\t$tablesData = array_intersect_key($this->getData(), $this->changes);\n\t\tforeach ($tablesData as $key => $value) {\n\t\t\t$db->createCommand()->update($this->baseTable, ['value' => $value], ['type' => $this->type, 'name' => $key])->execute();\n\t\t}\n\t}", "public function setPrimaryKey($keys)\n {\n $this->setShnttype($keys[0]);\n $this->setShntseq($keys[1]);\n $this->setShntkey2($keys[2]);\n $this->setShntform($keys[3]);\n }", "protected function saveUpdate()\n {\n }", "function set_keys($keys)\n\t{\n\t\tif(!is_array($keys)) $keys = explode(',', $keys);\n\t\tforeach($keys as $key) $this->set_key($key);\n\t}", "protected static function command_update($options, $keys) {\r\n $propel_class = call_user_func(array(get_called_class(), 'getPropelClass')) . 'Query';\r\n $q = new $propel_class;\r\n\r\n $item = $q->findOneBy($keys['id']['colname'], $options['id']);\r\n if ($item == null) {\r\n trigger_error(sprintf(\"No contact found for id %d.\\n\", $options['id']), E_USER_ERROR);\r\n }\r\n\r\n foreach ($keys as $key => $data) {\r\n if ($key != 'id' && isset($data['colname']) && isset($options[$key]))\r\n $item->{\"set\" . $data['colname']}($options[$key]);\r\n }\r\n\r\n $lines = $item->save();\r\n printf(\"%d line(s) udpated.\\n\", $lines);\r\n }", "public function setKeys($keys)\n {\n $this->_keys = $keys;\n }", "function setExtraVarKeys($extra_keys)\n\t{\n\t\tif(!is_array($extra_keys) || count($extra_keys) < 1)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tforeach($extra_keys as $val)\n\t\t{\n\t\t\t$obj = new ExtraItem($val->module_srl, $val->idx, $val->name, $val->type, $val->default, $val->desc, $val->is_required, $val->search, $val->value, $val->eid);\n\t\t\t$this->keys[$val->idx] = $obj;\n\t\t}\n\t}", "public static function update()\n {\n $json = json_encode(self::get());\n $json = Utils::json_pretty_print($json);\n file_put_contents(CACHEDIR . \"filter-keys/filter_keys.json\", $json);\n }", "public function recUpdate($fillable,$key = null,$id) {\n $update = 'UPDATE '.static::getTable().' SET ';\n for($i=0;$i<count(static::getFillable())-1;$i++) {\n $set_num = $i+1;\n if($i==count($fillable)-2){\n $update .= \"$fillable[$set_num] = '$key[$set_num]' \";\n } else {\n $update .= \"$fillable[$set_num] = '$key[$set_num]', \";\n }\n }\n $update .= ' WHERE '.static::getColumn(). ' = '.$id;\n $query = self::getQuery($update);\n return $query;\n }", "public function afterUpdateEvent($self, $pkeys){\n }", "public function set_keys( $keys )\n\t{\n\t\t$this->keys = $keys;\n\t}", "public function update(){\n if(empty($this->attributes)){\n return;\n }\n if ($this->isAutoInc) {\n $fieldsList = \" SET \";\n foreach ($this->attributes as $column => $value) {\n $fieldsList.=$column.\"=\".'\\''.$value.'\\''.\", \";\n }\n $fieldsList = str_last_replace(\", \", \"\", $fieldsList);\n $sqlQuery = \"UPDATE \".$this->table.$fieldsList.\" WHERE \".$this->idName.\"=\".$this->attributes[$this->idName];\n\n Db::instance()->execute($sqlQuery,$this->attributes);\n }\n }", "public function setPrimaryKey($keys)\n {\n $this->setId($keys[0]);\n $this->setNickname($keys[1]);\n }", "public function maybe_update_meta_keys() {\n global $wpdb;\n\n // check, if the current version is greater than or equal 0.9.7\n if ( version_compare( $this->config->get( 'version' ), '0.9.7', '>=' ) ) {\n // map old values to new ones\n $meta_key_mapping = array(\n 'Teaser content' => 'laterpay_post_teaser',\n 'Pricing Post' => 'laterpay_post_pricing',\n 'Pricing Post Type' => 'laterpay_post_pricing_type',\n );\n\n $sql = 'UPDATE ' . $wpdb->postmeta . \" SET meta_key = '%s' WHERE meta_key = '%s'\";\n\n foreach ( $meta_key_mapping as $before => $after ) {\n $prepared_sql = $wpdb->prepare( $sql, array( $after, $before ) );\n $wpdb->query( $prepared_sql );\n }\n }\n }", "public function save()\r\n\t{\r\n\t \tglobal $ilDB;\r\n\t \t\r\n\t \t$this->delete();\r\n\t \t\r\n\t \tforeach($this->mapping_rules as $keyword => $options)\r\n\t \t{\r\n\t \t\t$query = \"INSERT INTO ldap_attribute_mapping (server_id,keyword,value,perform_update) \".\r\n\t\t\t\t\"VALUES( \".\r\n\t \t\t\t$this->db->quote($this->server_id,'integer').\", \".\r\n\t \t\t\t$this->db->quote($keyword,'text').\", \".\r\n\t \t\t\t$this->db->quote($options['value'],'text').\", \".\r\n\t \t\t\t$this->db->quote($options['performUpdate'],'integer').\r\n\t \t\t\t')';\r\n\t\t\t$res = $ilDB->manipulate($query);\r\n\t \t}\r\n\t}", "function update($table, $items, $field, $key)\n {\n\t\t$this->db->where($field, $key);\n $this->db->update($table, $items);\n }", "public function update(DataObject $updateObject, array $updateKeys, Database_Config $databaseConfig = NULL);", "public function set_key_names($keys) {\n\t\t$this->keys = $keys;\n\t}", "function setKeys($llsec, $dtls){\n\t\tprint_r($llsec);\n\t\tprint_r($dtls);\n\t\ttry{\n\t\t $db = getConnection();\n\n\t\t $sql = \"UPDATE network_keys SET network_key=? WHERE name='llsec'\";\n\t\t $stmt = $db->prepare($sql);\n\t\t $stmt->execute(array($llsec));\n\n\t\t $sql = \"UPDATE network_keys SET network_key=? WHERE name='dtls'\";\n\t\t $stmt = $db->prepare($sql);\n\t\t $stmt->execute(array($dtls));\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t echo $e->getMessage();\n\t }\n\t}", "abstract protected function prepareKeys($models);", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function db_update() {}", "public function updateRecord() \n {\n $str = \"Id = :Id\";\n array_walk($this->arrayKeysValues(), function ($value, $key) use (&$str) {\n $str .= \", $key = :$key\";\n });\n $sql = sprintf(\"UPDATE Cubans SET %s WHERE Id = :Id\", $str);\n $statement = $this->connect->prepare($sql);\n $statement->execute(array_merge([\":Id\" => $this->id], $this->arrayKeysValues()));\n }", "protected function getKeyForSaveQuery(){\n\t\treturn $this->getKey();\n\t}", "public function init_save_queries()\n {\n }", "function update() {\n\t\t\t$updateQuery = \"UPDATE \".$this->table.\" SET \";\n\n\t\t\t$keysAR = array_keys($this->activeRecord);\n\n\t\t\tfor ($loopUp = 0; $loopUp < count($this->activeRecord); $loopUp++) {\n\n $updateQuery .= $keysAR[$loopUp] . \" = ?, \";\n $paramArray[] = $this->activeRecord[$keysAR[$loopUp]];\n\n\t\t\t}\n\n\t\t\t$updateQuery = substr($updateQuery, 0, -2); // Haal de laatste komma weg.\n\n\t\t\t$updateQuery .= \" WHERE \";\n\n\t\t\t// Fetch de primary key van de tabel.\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n $updateQuery .= $kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\n\t\t\t$this->lastQuery = $updateQuery;\n\n $updateTable = $this->mysqlConnection->prepare($this->lastQuery);\n $updateTable->execute($paramArray);\n\n\t\t}", "private function _update() {\n\n $this->db->replace(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->attributes->save();\n\n }", "function update_all_keys($keys,$file){\n\t\t$this->delete_all_keys($file);\n\t\treturn $this->add_keys($keys,$file);\n\t}", "public function saveAll() {\n\t\t$originalCaret = $this->caret;\n\t\tforeach($this as $key => $row) {\n\t\t\t$this->save();\n\t\t}\n\t\t$this->caret = $originalCaret;\n\t}", "private function saveLastAnnotatorDictionaries() {\r\n\t\t$newValues=$this->lastAnnotatorDictionariesCache;\r\n\t\tif(is_null($newValues)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//set all dictionaries (that have a settings entry) to false\r\n\t\t//NOTE by NOT including the addNotInCondition the $updatedCount (below) gives correct values \r\n\t\t$criteria=new CDbCriteria();\r\n\t\t$criteria->compare('userId', $this->userId);\r\n\t\tUserSettingsDictionaries::model()->updateAll(array('annotator'=>0), $criteria);\r\n\t\t\r\n\t\t//set all selected dictionaries (that have a settings entry) to true\r\n\t\t$criteria=new CDbCriteria();\r\n\t\t$criteria->compare('userId', $this->userId);\r\n\t\t$criteria->addInCondition('dictionaryId', $newValues);\r\n\t\t$updatedCount=UserSettingsDictionaries::model()->updateAll(array('annotator'=>1), $criteria);\r\n\t\t\r\n\t\tif($updatedCount!=count($newValues)) {\r\n\t\t\t//not all selected dictionaries have an entry\r\n\t\t\t//we need to add these to the db\r\n\r\n\t\t\t//first get a list of those already updated values\r\n\t\t\t$updatedList=UserSettingsDictionaries::model()->findAll($criteria);\r\n\t\t\t$updatedList=CHtml::listData($updatedList ,'dictionaryId','dictionaryId'); //convert it to an array, whose keys are IDs\r\n\t\t\t\r\n\t\t\tforeach ($newValues as $toInsert) {\r\n\t\t\t\tif(!array_key_exists($toInsert, $updatedList)) {\r\n\t\t\t\t\t$newEntry=new UserSettingsDictionaries;\r\n\t\t\t\t\t$newEntry->userId=$this->userId;\r\n\t\t\t\t\t$newEntry->dictionaryId=$toInsert;\r\n\t\t\t\t\t$newEntry->annotator=1;\r\n\t\t\t\t\t$newEntry->save(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "public function setPrimaryKey($keys)\n {\n $this->setPhadtype($keys[0]);\n $this->setPhadid($keys[1]);\n $this->setPhadsubid($keys[2]);\n $this->setPhadsubidseq($keys[3]);\n $this->setPhadcont($keys[4]);\n }", "function set_row($keys,$sql_set) {\r\n $sql_where = '';\r\n if (count($keys) > 0) {\r\n $sql_wheres = array();\r\n foreach ($keys as $key=>$val) {\r\n if (is_array($val)) die('setrow: multi value does not supported');\r\n $sql_wheres[] = \"`$key`='\".myaddslashes($val).\"'\";\r\n }\r\n $sql_where = ' where '.join(' and ',$sql_wheres);\r\n }\r\n if (is_array($sql_set)) { # Note, if using array, I DONOT support mysql function/expression!! use string for that.\r\n $sql_sets = array();\r\n foreach ($sql_set as $key=>$val) {\r\n $sql_sets[] = '`'.$key.'` = \\''.addslashes($url).'\\'';\r\n }\r\n $sql_set = join(',',$sql_sets);\r\n }\r\n assert($sql_where != ''); # safeguard against setting all rows\r\n $sql = 'update `'.$this->db_table.'` set '.$sql_set.$sql_where;\r\n #~ echo $sql;exit;\r\n $res = mysql_query($sql) or die('<br>'.$sql.'<br>'.mysql_error()); #do to database\r\n }", "public function setKeyName($key)\n {\n $this->primaryKey = $key;\n }", "public function save($key, $data);", "public function copyAttributesToKey()\n\t{\n\t\t$primarykey = $this->factory->getPrimarykey ;\n\t\tforeach( $primarykey->fields as $n=>$field )\n\t\t{\n\t\t\t$this->key[$field] = $this->$field ;\n\t\t}\n\t}", "function Update()\n\t{\n\t\tglobal $dal_info;\n\t\t\n\t\t$tableinfo = &$dal_info[ $this->infoKey ];\n\t\t$updateParam = \"\";\n\t\t$updateValue = \"\";\n\t\t$blobs = array();\n\n\t\tforeach($tableinfo as $fieldname => $fld)\n\t\t{\n\t\t\t$command = 'if(isset($this->'.$fld['varname'].')) { ';\n\t\t\tif( $fld[\"key\"] )\n\t\t\t\t$command.= '$this->Param[\\''.escapesq($fieldname).'\\'] = $this->'.$fld['varname'].';';\n\t\t\telse\n\t\t\t\t$command.= '$this->Value[\\''.escapesq($fieldname).'\\'] = $this->'.$fld['varname'].';';\n\t\t\t$command.= ' }';\n\t\t\t\n\t\t\teval($command);\n\t\t\t\n\t\t\tif( !$fld[\"key\"] && !array_key_exists( strtoupper($fieldname), array_change_key_case($this->Param, CASE_UPPER) ) )\n\t\t\t{\n\t\t\t\tforeach($this->Value as $field => $value)\n\t\t\t\t{\n\t\t\t\t\tif( strtoupper($field) != strtoupper($fieldname) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t$updateValue.= $this->_connection->addFieldWrappers( $fieldname ).\"=\".$this->PrepareValue($value, $fld[\"type\"]) . \", \";\n\t\t\t\t\t\n\t\t\t\t\tif( $this->_connection->dbType == nDATABASE_Oracle || $this->_connection->dbType == nDATABASE_DB2 || $this->_connection->dbType == nDATABASE_Informix )\n\t\t\t\t\t{\n\t\t\t\t\t\tif( IsBinaryType( $fld[\"type\"] ) )\n\t\t\t\t\t\t\t$blobs[ $fieldname ] = $value;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tif( $this->_connection->dbType == nDATABASE_Informix && IsTextType( $fld[\"type\"] ) )\t\n\t\t\t\t\t\t\t$blobs[ $fieldname ] = $value;\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\telse\n\t\t\t{\n\t\t\t\tforeach($this->Param as $field=>$value)\n\t\t\t\t{\n\t\t\t\t\tif( strtoupper($field) != strtoupper($fieldname) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t$updateParam.= $this->_connection->addFieldWrappers( $fieldname ).\"=\".$this->PrepareValue($value, $fld[\"type\"]) . \" and \";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//\tconstruct SQL and do update\t\n\t\tif ($updateParam)\n\t\t\t$updateParam = substr($updateParam, 0, -5);\n\t\tif ($updateValue)\n\t\t\t$updateValue = substr($updateValue, 0, -2);\n\t\t\t\n\t\tif ($updateValue && $updateParam)\n\t\t{\n\t\t\t$dalSQL = \"update \".$this->_connection->addTableWrappers( $this->m_TableName ).\" set \".$updateValue.\" where \".$updateParam;\n\t\t\t$this->Execute_Query($blobs, $dalSQL, $tableinfo);\n\t\t}\n\n\t\t//\tcleanup\n\t\t$this->Reset();\n\t}", "public function update($table, $keyColumnName, $id, $update_values) {\n foreach($update_values as $key=>$value) {\n $sets[] = $key.'=\\''.$value.'\\'';\n }\n $sets = implode(',', $sets);\n $sql = \"UPDATE $table SET $sets WHERE $keyColumnName = '$id'\";\n mysql_query($sql);\n }", "public function forUpdate($set = TRUE);", "public function setUpdateParametersFromRequest($request)\n {\n if (!isset($request->from))\n {\n $this->from = '';\n }\n else\n {\n $this->from = $request->from;\n }\n\n if (!isset($request->until))\n {\n $this->until = '';\n }\n else\n {\n $this->until = $request->until;\n }\n\n if (!isset($request->set))\n {\n $this->set = '';\n }\n else\n {\n $this->set = $request->set;\n }\n\n if (!isset($request->metadataPrefix))\n {\n $this->metadataPrefix = 'oai_dc';\n }\n else\n {\n $this->metadataPrefix = $request->metadataPrefix;\n }\n\n // If cursor not supplied, define as 0\n if (!isset($request->cursor))\n {\n $this->cursor = 0;\n }\n else\n {\n $this->cursor = $request->cursor;\n }\n }", "private function tinydb_invalidate($key)\n {\n $this->tinydb_needing_update[] = $key;\n }", "private function setInfoKeys() {\n\t\tif (!empty(self::$s_aInfoKeys)) {\n\t\t\treturn;\n\t\t}\n\n\t\tself::$s_aInfoKeys = array(\n\t\t\t'ID', 'ProfileID', 'Nickname', 'Level', 'TempLevel',\n\t\t\t'IP', 'JoinTime', 'LogInTime',\n\t\t);\n\t}", "protected function saveMeta() {\n if (empty($this->_metaModified)) {\n // no dirty attributes, nothing to deal with\n return;\n }\n\n $owner = static::tableName();\n $owner_id = $this->{static::meta_id_field()};\n $metaBatchInsert = [];\n\n $mpLen = strlen(static::meta_prefix());\n\n foreach ($this->_metaModified as $key => $mode) {\n // get key without prefix\n $db_key = substr($key, $mpLen);\n\n switch ($mode) {\n case self::META_ADDED:\n $attrs = [\n 'owner' => $owner,\n 'owner_id' => $owner_id,\n 'meta_key' => $db_key,\n 'meta_value' => (string)$this->_meta->$key\n ];\n // the code below is very slow\n $um = new Meta($attrs);\n if ($um->validate()) {\n $metaBatchInsert[] = $attrs;\n } else {\n throw new Exception('Failed to save invalid meta key: ' . $db_key . ' ' . json_encode($um->getFirstErrors(),\n JSON_PRETTY_PRINT));\n }\n// $um->insert();\n break;\n case self::META_MODIFIED:\n Meta::updateAll(\n [\n 'meta_value' => (string)$this->_meta->$key\n ],\n [\n 'owner' => $owner,\n 'owner_id' => $owner_id,\n 'meta_key' => $db_key\n ]);\n break;\n case self::META_UNSET:\n Meta::deleteAll([\n 'owner' => $owner,\n 'owner_id' => $owner_id,\n 'meta_key' => $db_key\n ]);\n break;\n }\n }\n\n if (!empty($metaBatchInsert)) {\n Meta::getDb()->createCommand()->batchInsert(Meta::tableName(),\n ['owner', 'owner_id', 'meta_key', 'meta_value'], $metaBatchInsert)->execute();\n }\n\n $this->_metaModified = [];\n\n $this->trigger(self::EVENT_META_SAVE);\n }", "function update($table='', $keyandvalue, ...$wherekeys) { \n if ( ! is_array( $keyandvalue ) || ! isset($table) || $table=='' ) {\n\t\t\t$this->setParamaters();\n return false;\n }\n \n $sql=\"UPDATE $table SET \";\n \n foreach($keyandvalue as $key=>$val) {\n if(strtolower($val)=='null') {\n\t\t\t\t$sql.= \"$key = NULL, \";\n } elseif(in_array(strtolower($val), array( 'current_timestamp()', 'date()', 'now()' ))) {\n\t\t\t\t$sql.= \"$key = CURRENT_TIMESTAMP(), \";\n\t\t\t} else {\n\t\t\t\tif ($this->getPrepare()) {\n\t\t\t\t\t$sql.= \"$key = \"._TAG.\", \";\n\t\t\t\t\t$this->setParamaters($val);\n\t\t\t\t} else \n\t\t\t\t\t$sql.= \"$key = '\".$this->escape($val).\"', \";\n\t\t\t}\n }\n \n $where = $this->where(...$wherekeys);\n if (is_string($where)) { \n $sql = rtrim($sql, ', ') . $where;\n return (($this->getPrepare()) && !empty($this->getParamaters())) ? $this->query($sql, true) : $this->query($sql) ; \n } else {\n\t\t\t$this->setParamaters();\n return false;\n\t\t}\n }", "function SetKey( $i ) { $this->_key = $i; $this->SetValue('_key', $i ); }", "public function testStore_UpdateMultiple()\n {\n \t$this->conn->store('test', array('id', 'key', 'title', 'status'), array(1, 'one', 'updated row ONE', 'PASSIVE'), array(2, 'two', 'updated row TWO', 'ACTIVE'), array(null, 'new1', 'new row ONE', 'NEW'));\n \t\n \t$result = $this->conn->query(\"SELECT * FROM test\");\n \t$this->assertEquals(array(1, 'one', 'updated row ONE', 'PASSIVE'), $result->fetchOrdered());\n \t$this->assertEquals(array(2, 'two', 'updated row TWO', 'ACTIVE'), $result->fetchOrdered());\n \t$this->assertEquals(array(3, 'three', 'another row', 'PASSIVE'), $result->fetchOrdered());\n \t$this->assertEquals(array(4, 'new1', 'new row ONE', 'NEW'), $result->fetchOrdered());\n }", "private function executeExtraUpdates()\n {\n foreach ($this->extraUpdates as $oid => $update) {\n list ($entity, $changeset) = $update;\n $this->entityChangeSets[$oid] = $changeset;\n $this->getEntityPersister(get_class($entity))->update($entity);\n }\n $this->extraUpdates = [];\n }", "public function set_update_batch($key, $index = '', $escape = NULL)\n\t{\n\t\t$key = $this->_object_to_array_batch($key);\n\n\t\tif ( ! is_array($key))\n\t\t{\n\t\t\t// @todo error\n\t\t}\n\n\t\tis_bool($escape) OR $escape = $this->_protect_identifiers;\n\n\t\tforeach ($key as $k => $v)\n\t\t{\n\t\t\t$index_set = FALSE;\n\t\t\t$clean = array();\n\t\t\tforeach ($v as $k2 => $v2)\n\t\t\t{\n\t\t\t\tif ($k2 === $index)\n\t\t\t\t{\n\t\t\t\t\t$index_set = TRUE;\n\t\t\t\t}\n\n\t\t\t\t$clean[$k2] = array(\n\t\t\t\t\t'field' => $this->protect_identifiers($k2, FALSE, $escape),\n\t\t\t\t\t'value' => ($escape === FALSE ? $v2 : $this->escape($v2))\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ($index_set === FALSE)\n\t\t\t{\n\t\t\t\treturn $this->display_error('db_batch_missing_index');\n\t\t\t}\n\n\t\t\t$this->qb_set_ub[] = $clean;\n\t\t}\n\n\t\treturn $this;\n\t}", "function setParamsToSaveQuery()\n {\n \n \n if($this->form->getQuery())\n {\n $stringTmp=$this->form->getQuery()->getSqlQuery();\n $stringTmp=substr($stringTmp, strpos($stringTmp,' FROM ' ));\n $stringTmp=substr($stringTmp, 0, strpos($stringTmp,' LIMIT ' ));\n $this->getUser()->setAttribute('queryToSaveWhere', $stringTmp);\n }\n \n if($this->form->getQuery()->getParams())\n {\n $stringTmp=\"\";\n $arrayTmp=$this->form->getQuery()->getParams();\n if(isset($arrayTmp['where']))\n {\n foreach($arrayTmp['where'] as $key=>$value)\n {\n $stringTmp.=\";|\".$value.\"|\";\n }\n $this->getUser()->setAttribute('queryToSaveParams', $stringTmp);\n }\n }\n return;\n }", "public function updatesettings($key='',$value='')\r\n {\r\n $whrArray = array('key_text'=>$key);\r\n $updateArray = array('value_text'=>$value);\r\n\r\n $this->CI->DatabaseModel->access_database('ts_settings','update', $updateArray , $whrArray);\r\n }", "public function SQL_UPDATE() {\r\n\t}", "function update() {\n\n\t \t$sql = \"UPDATE evs_database.evs_key_component \n\t \t\t\tSET\tkcp_key_component_detail_en=?, kcp_key_component_detail_th=?, kcp_cpn_id=? \n\t \t\t\tWHERE kcp_id=?\";\n\t\t\n\t\t$this->db->query($sql, array( $this->kcp_key_component_detail_en, $this->kcp_key_component_detail_th, $this->kcp_cpn_id, $this->kcp_id));\n\t\t\n\t }", "private\tfunction\t_prepareSaveQuery()\n\t\t{\n\t\t\tif(!$this->_columns) {\n\t\t\t\tself::$_queries[$this->_class]['save']\t=\tNULL;\n\t\t\t} else {\n\t\t\t\tself::$_queries[$this->_class]['save']\t=\t'INSERT INTO `'.$this->_table.'`(`'.implode('`,`', array_keys($this->_columns)).'`)'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\t\"\\rVALUES(?\".str_repeat(',?', sizeof($this->_columns) - 1).')'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\t\"\\rON DUPLICATE KEY UPDATE \".trim(self::$_queries[$this->_class]['updates'],', ');\n\t\t\t}\n\t\t\tunset(self::$_queries[$this->_class]['updates']);\n\t\t\t\n\t\t\treturn\tself::$_queries[$this->_class]['save'];\n\t\t}", "protected function store()\n\t{\n\t\t// rebuild the keys table\n\t\t$this->reindex();\n\t\t//---------------------\n\t\t// Your code goes here\n\t\t// --------------------\n\t}" ]
[ "0.6659885", "0.6540267", "0.65106434", "0.6489765", "0.6489765", "0.63688564", "0.6330578", "0.6235332", "0.62120336", "0.6160813", "0.6140322", "0.6140256", "0.6083512", "0.60695255", "0.6012893", "0.6001872", "0.59882134", "0.59398645", "0.586974", "0.58557355", "0.58554447", "0.5837031", "0.5833458", "0.5799788", "0.5746041", "0.57303584", "0.5729006", "0.5709912", "0.57098925", "0.57030594", "0.5632469", "0.5585323", "0.55473715", "0.5541756", "0.5525446", "0.55071205", "0.54927945", "0.5473205", "0.5454935", "0.5449585", "0.5399803", "0.53980654", "0.5394411", "0.53866154", "0.5374009", "0.5363596", "0.5356214", "0.533545", "0.53200984", "0.5303773", "0.5302765", "0.52980727", "0.52955", "0.5290933", "0.5290487", "0.5283473", "0.5282179", "0.5275272", "0.5275272", "0.5275272", "0.5275272", "0.5275272", "0.5275272", "0.5275272", "0.5275272", "0.5275272", "0.5275272", "0.5275272", "0.5269728", "0.52670395", "0.52603614", "0.52491415", "0.52473646", "0.5243346", "0.52416044", "0.52373385", "0.52251536", "0.52049774", "0.5187271", "0.5181254", "0.51800877", "0.5177125", "0.51615345", "0.51498514", "0.5148616", "0.51174396", "0.5109065", "0.51078886", "0.5106359", "0.51020396", "0.509146", "0.509088", "0.5090564", "0.5086814", "0.50739795", "0.5067525", "0.5066581", "0.50556695", "0.5054882", "0.5051712" ]
0.6633894
1
Get the primary key value for a save query.
protected function getKeyForSaveQuery($keyName = null) { if(is_null($keyName)){ $keyName = $this->getKeyName(); } if (isset($this->original[$keyName])) { return $this->original[$keyName]; } return $this->getAttribute($keyName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getKeyForSaveQuery(){\n\t\treturn $this->getKey();\n\t}", "public static function getPk(){\n return static::$_primaryKey;\n }", "public function getPk()\n {\n return $this->{static::primaryKey()};\n }", "public static function getPrimaryKey()\n {\n return self::getRepo()->getPrimaryKey();\n }", "public function getPrimaryKey() {\n\t\treturn $this->_key_primary->name;\n\t}", "protected function _getPrimaryKeyValue(){\n $primaryKey = $this->_getPrimaryKey();\n return $this->{$primaryKey};\n }", "public function getPrimaryKey()\n {\n if ($this->_primaryKey === null) {\n $schema = $this->getSchema();\n $key = $schema->getPrimaryKey();\n if (count($key) === 1) {\n $key = $key[0];\n }\n $this->_primaryKey = $key;\n }\n\n return $this->_primaryKey;\n }", "protected function getPrimaryKey()\n {\n return $this->getSubject()->getLastEntityId();\n }", "protected function _getPrimaryKey(): string\n {\n if (!$this->_primaryKey) {\n $primaryKey = (array)$this->_table->getPrimaryKey();\n $this->_primaryKey = $primaryKey[0];\n }\n\n return $this->_primaryKey;\n }", "public function getPrimaryKey()\r\n\t{\r\n\t\treturn $this->primaryKey;\r\n\t}", "private function getPrimaryKey()\n {\n $result = database()->fetchResult('SHOW KEYS FROM ' . $this->table . ' WHERE Key_name = \"PRIMARY\"');\n\n return ($result['Column_name'] ?? null);\n }", "public function getPrimaryKey()\n {\n return $this->primaryKey;\n }", "protected function _getPrimaryId()\n {\n return $this->_getParam($this->_getPrimaryIdKey());\n }", "protected function _getPrimaryIdKey()\n {\n if ($this->_primaryIdKey == null) {\n $info = $this->_getTable()->info();\n\n $this->_primaryIdKey = (string) array_shift($info[Zend_Db_Table_Abstract::PRIMARY]);\n }\n\n return $this->_primaryIdKey;\n }", "public function getPrimaryKey()\n {\n return $this->getid();\n }", "public function getPrimaryKey();", "public function getPrimaryKey();", "public function getPrimaryKey();", "public function getPrimaryKeyField()\n\t{\n\t\treturn $this->primaryKey;\n\t}", "public function getPrimaryKey()\n {\n return $this->getOpPrimeId();\n }", "protected function getLastPrimaryKey()\n {\n return $this->getLastEntityId();\n }", "public function get_primary_row(){\r\n $result = $this->db->query(\"SHOW KEYS FROM \". $this->db->formatTableName($this->table). \"\r\n WHERE Key_name = %s\"\r\n , \"PRIMARY\");\r\n $pk = \"\";\r\n foreach ($result as $res){\r\n $pk = $res[\"Column_name\"];\r\n }\r\n return $pk;\r\n }", "function getPrimaryKey() {\n\n $count = $this->find('count');\n $primaryKey = $count + 1;\n\n if ($this->find('count', array('conditions' => array($this->name . '.' . $this->primaryKey => $primaryKey))) > 0) {\n\n $i = (int) $count;\n\n while ($i >= 1) {\n\n $i += 1;\n\n $primaryKey = $i;\n\n $returnValue = $this->find('count', array('conditions' => array($this->name . '.' . $this->primaryKey => $primaryKey)));\n\n if ($returnValue == 0) {\n\n break;\n }\n\n $i++;\n }\n\n return $primaryKey;\n } else {\n\n return $primaryKey;\n }\n }", "public function getPrimaryKey()\n {\n return $this->getSekolahId();\n }", "public function primary_key()\n\t{\n\t\treturn $this->primary_key;\n\t}", "public function primaryKey()\n {\n return $this->data[static::$primaryKey] ?? null;\n }", "public function getPk()\n {\n return $this->_pk;\n }", "public function getPkValue(){\n $pk = static::getPk();\n return (int) $this->$pk;\n }", "public function PrimaryKey() {\n\t\t\treturn $this->intId;\n\t\t}", "public function PrimaryKey() {\n\t\t\treturn $this->intId;\n\t\t}", "public function getKeyValue() {\n $primaryKey = $this->getKeyName();\n return $this->$primaryKey;\n }", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "public function getPrimaryKey()\n {\n return $this->getId();\n }", "public function getPrimaryKey()\n {\n return $this->getId();\n }", "public function getPrimaryKey()\n {\n return $this->getId();\n }", "public function getPrimaryKey()\n {\n return $this->getId();\n }", "public function getPrimaryKey()\n {\n return $this->getId();\n }", "public function getPrimaryKey() {\n return $this->_data->getDeepValue('indexes/primary/columns/0', null);\n }", "public function getPrimaryKey()\n\t{\n\t\treturn $this->_rowKey;\n\t}", "public function getPrimaryKey()\n\t{\n $indexes = $this->getIndexes();\n\n foreach ($indexes as $index){\n if ($index['Key_name'] == \"PRIMARY\"){\n return $index;\n }\n }\n\n \t\t\n\t}", "public function getPrimaryKey()\n {\n return $this->getPothnbr();\n }", "function getPrimaryKey () {\n\t\t\n\t\t$count = $this->find('count');\n\t\t\n\t\t$primaryKey = $count+1;\n\t\t\n\t\tif( $this->find('count',array('conditions'=>array($this->name . '.' . $this->primaryKey=>$primaryKey))) > 0) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t$i = (int) $count;\n\n while ( $i >= 1 ) {\n\n $i += 1;\n\t\t\t\t\t\n\t\t\t\t\t$primaryKey = $i;\n \n\t\t\t\t\t$returnValue = $this->find('count',array('conditions'=>array($this->name . '.' . $this->primaryKey=>$primaryKey)));\n\n if ($returnValue == 0) {\n \t\t\t\t\t\t\t\t\t\n break;\n }\n\t\t\t\t\t\n\t\t\t\t\t$i++;\n }\n\n return $primaryKey;\n\t\t\t\n\t\t} else {\n\t\t\n\t\t\treturn $primaryKey;\n\n\t\t}\t\n\t\n\t}", "abstract public function getPrimaryKey();", "abstract public function getPrimaryKey();", "public function id()\n {\n return $this->read($this->metadata['pk']->name);\n }", "public function getPrimaryKey($entity)\n\t{\n\t\treturn $entity->{$this->primaryKeyField};\n\t}", "function getPrimaryKey() {\n\t\treturn $this->_ID;\n\t}", "function getPrimaryKey() {\n\t\treturn $this->_ID;\n\t}", "function getPrimaryKey() {\n\t\treturn $this->_ID;\n\t}", "public function getPrimaryKey() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_result[0])) return (int) $this->_result[0];\n\t\t\telse parent::throwGetColException('PollTemplatesModel::getPrimaryKey', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('PollTemplatesModel::getPrimaryKey', __LINE__, __FILE__);\n\t}", "public function getPrimaryKey()\n {\n $cols = $this->info('cols');\n return $cols[0];\n }", "public function get_id()\n {\n $pkey = static::tinydb_get_table_info()->primary_key;\n if (is_array($pkey)) {\n $val = array();\n foreach ($pkey as $field) {\n $val[$field] = \\TinyDb\\Internal\\SqlDataAdapters::decode(static::tinydb_get_table_info()->field_info($field)->type,\n $this->tinydb_rowdata[$field]);\n }\n } else {\n $val = \\TinyDb\\Internal\\SqlDataAdapters::decode(static::tinydb_get_table_info()->field_info($pkey)->type,\n $this->tinydb_rowdata[$pkey]);\n }\n\n\n return $val;\n }", "protected function actionGetPrimaryKey()\n {\n return $this->_static_block->getPrimaryKey();\n }", "public function getPrimaryKey() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_result[0])) return (int) $this->_result[0];\n\t\t\telse parent::throwGetColException('CampaignDefinitionsModel::getPrimaryKey', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('CampaignDefinitionsModel::getPrimaryKey', __LINE__, __FILE__);\n\t}", "public function getPrimaryKey(phpDataMapper_Model_Row $row)\n\t{\n\t\t$pkField = $this->getPrimaryKeyField();\n\t\treturn $row->$pkField;\n\t}", "function getPk()\n {\n return $this->pk;\n }", "public function getPrimaryKey() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_result[0])) return (int) $this->_result[0];\n\t\t\telse parent::throwGetColException('ProjectsListingsModel::getPrimaryKey', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('ProjectsListingsModel::getPrimaryKey', __LINE__, __FILE__);\n\t}", "public function getKeyName()\n {\n if (!$this->primaryKey) {\n if ($key = $this->getPrimaryFromFields()) {\n $this->primaryKey = $key;\n } else {\n $this->primaryKey = 'id';\n }\n }\n\n return $this->primaryKey;\n }", "private function _fetch_primary_key()\n {\n if($this->primaryKey == NULl)\n {\n $this->primaryKey = $this->db->query(\"SHOW KEYS FROM `\".$this->_table.\"` WHERE Key_name = 'PRIMARY'\")->row()->Column_name;\n }\n }", "abstract function getPrimaryKey();", "public function getPrimaryKeyFieldName(){\n\t\treturn $this->primaryKey;\n\t}", "public function getPrimaryKeyName()\n {\n return self::$primary_key_name;\n }", "protected function getPrimaryKeyName(): string\n {\n return $this->query->getModel()->getKeyName();\n }", "public static function _getPK(){\n return (property_exists(get_called_class(), '_pk') ? static::$_pk : 'id');\n }", "public function getID()\n {\n return $this->getKey();\n }", "public function id()\n\t{\n\t\treturn $this->get($this->meta()->primary_key);\n\t}", "public function getKey()\n {\n return $this->id;\n }", "public function getPrimaryKeyField()\n\t{\n\t\tif ($this->primaryKeyField === null)\n\t\t{\n\t\t\tthrow new DataMapper_Exception('No primary key field set for ' . __CLASS__);\n\t\t}\n\t\treturn $this->primaryKeyField;\n\t}", "public function getPrimaryKeyName()\n {\n return $this->primaryKeyName;\n }", "public function getPrimaryKey()\n\t{\n\t\treturn $this->name;\n\t}", "public function getStoragePrimaryKey();", "public function getPKField() {\n return $this->_key_field;\n }", "public function getKey()\n {\n return $this->getId();\n }", "public function getPrimaryKey()\n {\n return $this->getIdmontacargas();\n }", "public function getPrimaryKey($value = FALSE) {\n\t\t$pK = self::$primaryKey[$this->table];\n\t\tif ($value)\t\n\t\t\treturn $this->$pK;\n\t\treturn $pK;\n\t}", "function get_primary_key_column()\n {\n return $this->object->_primary_key_column;\n }", "public function getPrimary(){\n return $this->primaryKey;\n }", "function getPrimary_key()\n {\n if (!isset($this->aPrimary_key)) {\n $this->aPrimary_key = array('id_dl' => $this->iid_dl);\n }\n return $this->aPrimary_key;\n }", "public function PK() {\n $returnvalue = '';\n $returnvalue .= $this->getDeterminationID();\n return $returnvalue;\n }", "public function getId()\n {\n return $this->{self::getPrimaryKey()};\n }", "public function getId() {\n\t\treturn $this->getData(static::$_primaryKey);\n\t}", "public function PK() {\n $returnvalue = '';\n $returnvalue .= $this->getDNASequencingRunID();\n return $returnvalue;\n }", "public function primaryKey($class = null) {\n\t\tif (!$class) {\n\t\t\t$class = $this->currentPathClass();\n\t\t}\n\t\t\n\t\t$model = ClassRegistry::init($class);\n\t\tif ($model) {\n\t\t\treturn $model->primaryKey;\n\t\t}\n\n\t\treturn $this->Form->primaryKey();\n\t}", "public function getKeyName()\n {\n return isset($this->primaryKey) ? $this->primaryKey : static::$defaultPrimaryKey;\n }", "public static function primaryKey() {\n return (new static)->getKeyName();\n }", "function getPrimary_key()\n {\n if (!isset($this->aPrimary_key)) {\n $this->aPrimary_key = array('id_ubi' => $this->iid_ubi, 'id_tarifa' => $this->iid_tarifa, 'year' => $this->iyear, 'id_serie' => $this->iid_serie);\n }\n return $this->aPrimary_key;\n }", "public function getId()\n {\n return $this->getKey();\n }", "function get_pk($key_id)\n\t{\n\t\t$key_id\t= $this->prepare_input($key_id, 42);\n\t\t$key\t= $this->call(\"{$this->context} --export $key_id\");\n\n\t\tif (false === $error = $this->get_error())\n\t\t{\n\t\t\treturn $key;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdie($error);\n\t\t}\n\t}", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getCoParticipante();\n\t}", "public function getKeyName()\n {\n return $this->primaryKey;\n }", "public function getKeyName()\n {\n return $this->primaryKey;\n }", "public function getPrimaryKey()\n {\n return $this->getArticleId();\n }", "public function getPrimaryKey() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_result[0])) return (int) $this->_result[0];\n\t\t\telse parent::throwGetColException('DiscussCategoriesModel::getPrimaryKey', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('DiscussCategoriesModel::getPrimaryKey', __LINE__, __FILE__);\n\t}", "public static function primaryKey()\n {\n return static::PRIMARY_KEY;\n }" ]
[ "0.82098943", "0.7570138", "0.7536554", "0.74932474", "0.74514025", "0.74208516", "0.7416689", "0.7402964", "0.736552", "0.7350424", "0.73088926", "0.728568", "0.724963", "0.72351557", "0.722091", "0.71946245", "0.71946245", "0.71946245", "0.717752", "0.7171154", "0.71633464", "0.71526164", "0.7126892", "0.7109675", "0.7107224", "0.7106878", "0.7043803", "0.7043295", "0.70237815", "0.70237815", "0.70139325", "0.70114756", "0.70114756", "0.70114756", "0.70114756", "0.70114756", "0.70114756", "0.70114756", "0.70114756", "0.6996879", "0.6996879", "0.6996879", "0.6996879", "0.6996879", "0.6973189", "0.6971078", "0.69493955", "0.6945334", "0.6919778", "0.6916012", "0.6916012", "0.69157827", "0.69073987", "0.69032294", "0.69032294", "0.69032294", "0.6888222", "0.68869734", "0.68764794", "0.6864046", "0.68577546", "0.6853573", "0.68531215", "0.68310827", "0.68280256", "0.6815935", "0.6815313", "0.68051314", "0.6798673", "0.6797373", "0.67884356", "0.67640173", "0.6752498", "0.6752434", "0.6751589", "0.6742693", "0.6737158", "0.67327666", "0.6730619", "0.6719898", "0.6707306", "0.66973513", "0.6694137", "0.6693335", "0.66913295", "0.66820365", "0.66738665", "0.6652092", "0.66393507", "0.6634423", "0.6631971", "0.6625605", "0.6615886", "0.6615055", "0.6614698", "0.6602678", "0.65861225", "0.65861225", "0.65859884", "0.6585274", "0.6577819" ]
0.0
-1
Get an article by searching for a matching 'title_alias' or 'title'
function plugin_peoplebook($database, $phrase, $partial_match = true) { global $mainframe; $result = null; if (file_exists("components/com_peoplebook/peoplebook.php")) { $where_clause = ($partial_match) ? "LIKE '%$phrase%'" : "= '$phrase'"; $database->setQuery("SELECT * FROM #__peoplebook WHERE published=1 AND name ". $where_clause); $my = null; $my = $database->loadObject(); if ($my) // found something? { $result[] = "index.php?option=com_peoplebook&func=fullview&staffid=".$my->id; $result[] = $my->name; $database->setQuery("SELECT id FROM #__menu WHERE published=1 AND link LIKE '%com_peoplebook'"); $my = null; $my = $database->loadObject(); if ($my) // found something? { $result[0] .= "&Itemid=".$my->id; } } } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchByTitle($title){\n $name = $title['search'];\n return db()->QUERY(\"SELECT * FROM posts WHERE title LIKE '%$name%' ORDER BY title\");\n }", "public function getArticleBySearch($search)\n {\n $query = \"SELECT posts.*, categories.category_name \n FROM posts\n INNER JOIN categories ON categories.id = posts.category_id \n WHERE title LIKE '%$search%' \n OR description LIKE '%$search%' \n OR categories.category_name LIKE '%$search%' \";\n \n $result = $this->db->select($query);\n return $result;\n }", "public function getByTitle()\n {\n }", "public static function getArticle($type = null, $value = null) {\n\t\t$allowedTypes = [ \"articleID\",\"articleTitle\" \n\t\t];\n\t\ttry {\n\t\t\tif (! is_null ( $type )) {\n\t\t\t\tif (! in_array ( $type, $allowedTypes ))\n\t\t\t\t\tthrow new PDOException ( \"$type not an allowed search criterion for articles\" );\n\t\t\t\t$db = Database::getDB ();\n\t\t\t\t$query = \"SELECT * FROM articles\";\n\t\t\t\tif (strcmp ( $type, \"articleID\" )) {\n\t\t\t\t\t$query = $query . \" WHERE :type = :value\";\n\t\t\t\t} elseif (strcmp ( $type, \"articleTitle\" )) {\n\t\t\t\t\techo \"searching for a title\";\n\t\t\t\t\t$query = $query . \" WHERE :type = :value\";\n\t\t\t\t}\n\t\t\t\t$statement = $db->prepare ( $query );\n\t\t\t\t$statement->bindValue ( \":type\", $type );\n\t\t\t\t$statement->bindValue ( \":value\", $value );\n\t\t\t\t$statement->execute ();\n\t\t\t\t$statement->closeCursor ();\n\t\t\t\t\n\t\t\t\t$articleResult = $statement->fetchAll ( PDO::FETCH_ASSOC );\n\t\t\t}\n\t\t} catch ( Exception $e ) { // Not permanent error handling\n\t\t\techo \"<p>Error getting aricles rows by $type </p>\";\n\t\t\tprint $e;\n\t\t}\n\t\t$article = new Article ( $articleResult );\n\t\treturn $article;\n\t}", "public function article($title)\n {\n $matchingFiles = glob(\"$this->dir/*?_{$title}_fin.md\");\n $file = ! empty($matchingFiles) ? $matchingFiles[0] : \"\";\n\n return new Article($file);\n }", "public function search($title)\n {\n return Posts::where('title', 'LIKE', '%' . $title . '%')->get();\n }", "public function getOfferByTitle(string $title)\n {\n $query = $this->createQueryBuilder('o')\n ->where('o.slug =:title')\n ->setParameter('title', $title)\n ->getQuery();\n\n return $query->getOneOrNullResult();\n }", "function test_field_specific_search_on_post_title() {\n\n\t\t// Single word. Two matching entries should be found.\n\t\t$search_string = \"Jamie's\";\n\t\t$field_key = 'yi6yvm';\n\t\t$items = self::generate_and_run_field_specific_query( 'create-a-post', $field_key, $search_string );\n\t\t$msg = 'A search for ' . $search_string . ' in post title field ' . $field_key;\n\t\tself::run_entries_found_tests( $msg, $items, 2, array( 'post-entry-1', 'post-entry-3' ) );\n\n\t\t// Single word. No entries should be found.\n\t\t$search_string = 'TextThatShouldNotBeFound';\n\t\t$items = self::generate_and_run_field_specific_query( 'create-a-post', $field_key, $search_string );\n\t\t$msg = 'A search for ' . $search_string . ' in post title field ' . $field_key;\n\t\tself::run_entries_not_found_tests( $msg, $items );\n\t}", "public function findByTitle($searchQuery) {\n\t\t if ($this->identityMap->hasIdentifier($searchQuery, $this->objectType)) {\n\t\t $object = $this->identityMap->getObjectByIdentifier($searchQuery, $this->objectType);\n\t\t } else {\n\t\t $query = $this->createQuery();\n\t\t $query->getQuerySettings()->setRespectSysLanguage(FALSE);\n\t\t $query->getQuerySettings()->setRespectStoragePage(FALSE);\n\t\t // Suchstring kann überall im Wort vorkommen, daher den String wrappen mit %\n\t\t $searchQuery = '%'.$searchQuery.'%';\n\t\t $object = $query->matching($query->like('product_title', $searchQuery))->execute();\n\t\t }\n\t\t return $object;\n\t}", "public function getArticle( $view_title, $section_title, $use_alias = FALSE )\n\t{\n\t\t$return = FALSE;\n\t\t$view_field = ( $use_alias ) ? \"alias\" : \"controller_name\";\n\t\t$view_id = $this->m_common->m_db->getIdFromTitle( $view_title, array( 'pk_name' => \"view_id\", 'table' => \"common_Views\", 'title_field' => $view_field ) );\n\t\t$section_id = $this->m_common->m_db->getIdFromTitle( $section_title, array( 'pk_name' => \"section_id\", 'table' => \"common_Sections\", 'title_field' => \"title\" ) );\n\t\t\n\t\tif( $view_id > 0 && $section_id > 0 )\n\t\t{\n\t\t\t$sql = \"\n\t\t\tSELECT \n\t\t\t\ta.article_id,\n\t\t\t\ta.post_timestamp\n\t\t\tFROM \n\t\t\t\tcommon_Articles a\n\t\t\tJOIN common_ArticleToView a2v ON \n\t\t\t\ta2v.article_id = a.article_id AND \n\t\t\t\ta2v.view_id = \" . $view_id . \"\n\t\t\tJOIN common_ArticleToSection a2s ON\n\t\t\t\ta2s.article_to_view_id = a2v.article_to_view_id AND\n\t\t\t\ta2s.section_id = \" . $section_id . \" \n\t\t\tWHERE\n\t\t\t\ta.active = 1\n\t\t\tGROUP BY\n\t\t\t\ta.article_id,\n\t\t\t\ta.post_timestamp\n\t\t\tORDER BY \n\t\t\t\ta.post_timestamp DESC\";\n\t\t\t\n\t\t\t$result = $this->m_common->m_db->query( $sql, __FILE__, __LINE__ );\n\t\t\t\n\t\t\twhile( $row = $this->m_common->m_db->fetchRow( $result ) )\n\t\t\t{\n\t\t\t\t$return[] = new Article( $row[0], TRUE ); \t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $return;\n\t\t\n\t}", "public static function search($title)\n {\n\n self::dbConnect();\n\n $query = \"select * from \" . self::$table . \" where title like :title\";\n\n $stmt = self::$dbc->prepare($query);\n\n\t\t$title = \"%\" . $title . \"%\";\n\n $stmt->bindValue(':title', $title, PDO::PARAM_STR);\n $stmt->execute();\n\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n\n return $results;\n\n\n }", "function titleSearch(&$searchObj, &$searchResObj) {\r\n\ttry {\r\n\t\t$pdo = new PDO(DBCONNSTRING, DBUSER,DBPASS);\r\n\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\r\n\t\t$sql = \"SELECT Title, Message, PostID FROM travelpost WHERE Title LIKE '%$searchObj->searchField%'\";\r\n\t\t\r\n\t\t$result = $pdo->query($sql);\r\n\t\t\r\n\t\t$count = 0;\r\n\t\twhile ($row = $result->fetch()) {\r\n\t\t\t$searchResObj[$count] = new searchResult();\r\n\t\t\t\r\n\t\t\t$searchResObj[$count]->searchTitle = $row['Title'];\r\n\t\t\t$searchResObj[$count]->searchMessage = $row['Message'];\r\n\t\t\t$searchResObj[$count]->searchPostID = $row['PostID'];\r\n\r\n\t\t\t$count++;\r\n\t\t}\r\n\t}\r\n\tcatch (PDOexception $e) {\r\n\t\tERROR_PAGE();\r\n\t}\r\n\t\r\n}", "function test_general_entries_search_on_post_title() {\n\t\t$search_string = \"Jamie's\";\n\t\t$items = self::generate_and_run_search_query( 'create-a-post', $search_string );\n\t\t$msg = 'A general search for ' . $search_string . ' in posts table';\n\t\tself::run_entries_found_tests( $msg, $items, 2, array( 'post-entry-1', 'post-entry-3' ) );\n\t}", "public function get_row_by_title($goods_title){\n $ar_filter = array('title' => trim($goods_title));\n return $this->get_row_by($ar_filter);\n }", "public function getRdfEntityByTitle($title, $reset = FALSE) {\n if ($reset) {\n \\Drupal::entityTypeManager()->getStorage('rdf_entity')->resetCache();\n }\n // Cast MarkupInterface objects to string.\n $title = (string) $title;\n $rdf_entities = \\Drupal::entityTypeManager()\n ->getStorage('rdf_entity')\n ->loadByProperties(['label' => $title]);\n // Load the first rdf entity returned from the database.\n $returned_entity = reset($rdf_entities);\n return $returned_entity;\n }", "function get_blog_by_title($db, $title)\n\t{\n\t\tif(is_string($title))\n\t\t{\n\t\t\t$sql = sprintf(\"SELECT * FROM articles WHERE title LIKE '%s'\", \n\t\t\t\t\t\t\t\tmysqli_real_escape_string($db, $title));\n\n\t\t\t$result = mysqli_query($db, $sql);\n\n\t\t\tif(!$result || mysqli_num_rows($result) === 0)\n\t\t\t\treturn NULL;\n\n\t\t\treturn $result;\n\t\t}\n\t\telse\n\t\t\tthrow new Exception(\"String parameter required.\");\n\t}", "public function byTitle($title)\n {\n return $this->andWhere(['category.title' => $title]);\n }", "public function searchByTitle($search)\n {\n $entityManager = $this->getEntityManager();\n $queryBuilder = $entityManager->createQueryBuilder();\n $queryBuilder\n ->select('bp')\n ->from('App:BlogPost', 'bp')\n ->where('bp.title LIKE :search OR bp.category LIKE :search OR bp.writer LIKE :search')->setParameter('search', '%'.$search.'%');\n\n return $queryBuilder->getQuery()->getResult();\n }", "function find_all_product_info_by_title($title){\n global $db;\n $sql = \"SELECT * FROM products \";\n $sql .= \" WHERE name ='{$title}'\";\n $sql .=\" LIMIT 1\";\n return find_by_sql($sql);\n }", "function search($query) {\n $query = Sanitize::escape($query);\n \t$fields = null;\n \t$titleResults = $this->find(\n\t\t\t'all',\n\t\t\tarray(\n\t\t\t\t'conditions' => \"{$this->name}.title LIKE '%$query%' and {$this->name}.draft=0\",\n\t\t\t\t'fields' => $fields\n\t\t\t)\n\t\t);\n \t$contentResults = array();\n \tif (empty($titleResults)) {\n \t\t$titleResults = array();\n\t\t\t$contentResults = $this->find(\n\t\t\t\t'all',\n\t\t\t\tarray(\n\t\t\t\t\t'conditions' => \"MATCH ({$this->name}.content) AGAINST ('$query')\",\n\t\t\t\t\t'fields' => $fields\n\t\t\t\t)\n\t\t\t);\n \t} else {\n \t\t$alredyFoundIds = join(', ', Set::extract($titleResults, '{n}.' . $this->name . '.id'));\n \t\t$notInQueryPart = '';\n \t\tif (!empty($alredyFoundIds)) {\n \t\t\t$notInQueryPart = \" AND {$this->name}.id NOT IN ($alredyFoundIds) AND {$this->name}.draft=0\";\n \t\t}\n \t\t$contentResults = $this->find(\n\t\t\t\t'all',\n\t\t\t\tarray(\n\t\t\t\t\t'conditions' => \"MATCH ({$this->name}.content) AGAINST ('$query')$notInQueryPart\",\n\t\t\t\t\t'fields' => $fields\n\t\t\t\t)\n\t\t\t);\n \t}\n \t\n \tif (!is_array(($contentResults))) {\n \t\t$contentResults = array();\n \t}\n \n \t$results = array_merge($titleResults, $contentResults);\n \treturn $results;\n }", "public static function getByTitle(string $title) : Sources\n {\n return self::findFirstOrFail([\n 'conditions' => 'title = :title: AND is_deleted = 0',\n 'bind' => [\n 'title' => $title\n ]\n ]);\n }", "public function getEntryByTitle($title, $entry_type, &$bibtex_key = null) // {{{\n {\n // A little manicure on the input title\n $title = Bibliography::replaceAccents($title);\n $title = Bibliography::unspace($title);\n $title = Bibliography::removeBraces($title);\n $title = Bibliography::removePunctuation($title);\n $title = strtolower($title);\n // Now search\n foreach ($this->m_entries as $key => $entry)\n {\n if ($entry_type !== \"\" && $entry[\"bibtex_type\"] !== $entry_type)\n continue; // Wrong type; skip\n if (!isset($entry[\"title\"]))\n \tcontinue; // No title; skip\n $e_title = $entry[\"title\"];\n $e_title = Bibliography::removeBraces($e_title);\n $e_title = Bibliography::removePunctuation($e_title);\n $e_title = strtolower($e_title);\n if ($e_title == $title)\n {\n $bibtex_key = $key;\n \treturn $entry;\n }\n }\n return null;\n }", "function searchByTitle($DocTitle)\n { \n $query = \"SELECT DocID, DocTitle, `Path`, `Blob`, Url, Description, CreatedDate, LastEditDate, SortOrder FROM Docs WHERE DocTitle like '%\".$DocTitle.\"%' ;\"; \n $stmt = $this->conn->prepare( $query );\n\n // execute query\n $stmt->execute();\n return $stmt;\n }", "function searchByTitle($title, $groupId=null, $parentId=null) {\n if(is_array($title)) {\n $where = ' i.title IN (\"'.implode('\", \"', array_map('db_es', $title)).'\")';\n } else {\n $where = ' i.title = '.$this->da->quoteSmart($title);\n }\n if($groupId !== null) {\n $where .= ' AND i.group_id = '.$this->da->escapeInt($groupId);\n }\n if($parentId !== null) {\n $where .= ' AND i.parent_id = '.$this->da->escapeInt($parentId);\n }\n\n $order = ' ORDER BY version_date DESC';\n return $this->_searchWithCurrentVersion($where, '', $order);\n }", "public function searchTitle($title) {\n try {\n // escape quotes\n $checkTitle = str_replace(\"'\", \"''\", $title);\n // search the database, using wildcards\n $sql = \"SELECT * FROM books WHERE title LIKE '%$checkTitle%' ORDER BY author\";\n $stmt = $this->conn->query($sql);\n \n // fetch results as numeric array\n $result = $stmt->setFetchMode(PDO::FETCH_NUM);\n // show results in a list of update forms\n echo \"<br /><div id='searchResult'><h3>Title: -$title-</h3><ul>\";\n while ($row = $stmt->fetch()) {\n // call result form function\n $this->echoResultForm($row);\n }\n echo \"</ul></div>\";\n }\n catch(PDOException $e) {\n echo $e->getMessage();\n }\n }", "function edan_search_set_title( $title )\n {\n $options = new esw_options_handler();\n $cache = new esw_cache_handler();\n\n /**\n * if in the loop and the title is cached (or if object group is retrieved successfully)\n * modify the page title on display.\n */\n if(in_the_loop() && edan_search_name_from_url() == $options->get_path() && $options->get_title() != '')\n {\n if(get_query_var('edanUrl'))\n {\n $object = $cache->get()['object'];\n\n if($object)\n {\n if(property_exists($object, 'content') && property_exists($object->{'content'}, 'descriptiveNonRepeating'))\n {\n if(property_exists($object->{'content'}->{'descriptiveNonRepeating'}, 'title'))\n {\n $title = $object->{'content'}->{'descriptiveNonRepeating'}->{'title'}->{'content'};\n }\n }\n elseif(property_exists($object, 'title'))\n {\n if(property_exists($object->{'title'}, 'content'))\n {\n $title = $this->object->{'title'}->{'content'};\n }\n else\n {\n $title = $this->object->{'title'};\n }\n }\n }\n }\n else\n {\n $title = $options->get_title();\n }\n }\n\n return $title;\n }", "public function findPublishedTitleAndSlug()\n {\n return $this->createPublishedSortedQueryBuilder()\n ->select('title', 'slug')\n ->getQuery()\n ->execute();\n }", "public function getByAlias($alias) {\n $select = $this->select();\n $select->where('alias = \"' . $alias . '\"');\n $item = $this->fetchRow($select);\n// if (is_numeric($item->urlAliasId) && $item->urlAliasId > 0) {\n if (is_numeric($item['urlAliasId']) && $item['urlAliasId'] > 0) {\n return $item;\n }\n return false;\n }", "protected function getRecordByTitle($title)\n {\n $record = null;\n $elementSetName = 'Dublin Core';\n $elementName = 'Title';\n $element = $this->db->getTable('Element')->findByElementSetNameAndElementName($elementSetName, $elementName);\n $elementTexts = $this->db->getTable('ElementText')->findBy(array('element_id' => $element->id, 'text' => $title), 1);\n $elementText = reset($elementTexts);\n if ($elementText) {\n $record = get_record_by_id($elementText->record_type, $elementText->record_id);\n }\n return $record;\n }", "public function search($keywords) {\n\n\t\t$sql = \"SELECT * FROM {$this->table_name} WHERE title LIKE '%{$keywords}%' OR overview LIKE '%{$keywords}%'\";\n\n\t\t$stmt = $this->conn->query($sql);\n\t\treturn $stmt->fetchAll();\n\t}", "public function search($params)\n {\n /** @var \\hubeiwei\\yii2tools\\extensions\\ActiveQuery $query */\n $query = self::find()\n ->alias('article')\n ->select([\n 'article.*',\n 'user.username',\n ])\n ->leftJoin(['user' => User::tableName()], 'user.id = article.created_by');\n\n if ($this->scenario == self::SCENARIO_INDEX) {\n $query->andWhere([\n 'visible' => Article::VISIBLE_YES,\n 'article.status' => Article::STATUS_ENABLE,\n ]);\n $query->andWhere(['<=', 'published_at', time()]);\n }\n\n if ($this->scenario == self::SCENARIO_MY_ARTICLE) {\n $query->andWhere(['created_by' => UserHelper::getUserId()]);\n }\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'sort' => ['defaultOrder' => ['created_at' => SORT_DESC]],\n ]);\n\n $this->load($params);\n\n if (!$this->validate()) {\n return $dataProvider;\n }\n\n $query->andFilterWhere([\n 'id' => $this->id,\n 'created_by' => $this->created_by,\n 'type' => $this->type,\n 'visible' => $this->visible,\n 'article.status' => $this->status,\n ]);\n\n $query->andFilterWhere(['like', 'title', $this->title])\n ->andFilterWhere(['like', 'content', $this->content])\n ->andFilterWhere(['like', 'user.username', $this->getAttribute('username')]);\n\n $query->timeRangeFilter('published_at', $this->published_at)\n ->timeRangeFilter('article.created_at', $this->created_at)\n ->timeRangeFilter('article.updated_at', $this->updated_at);\n\n return $dataProvider;\n }", "public function searchItem($title) {\n \n //Create Database conexion\n }", "public function series_title(string $title, array $params = array())\n {\n if ($series = $this->search_series($title, $params)) {\n return $series[0];\n }\n return false;\n }", "public function searchByTitle($title) \n {\n try {\n $data = VideoContent::where('title','LIKE','%'.$title.'%')->where('status', '=', true)->orderBy('ID', 'DESC')->paginate(10);\n if (!empty($data)) {\n $response = APIResponse('200', 'Success', $data);\n } else {\n $response = APIResponse('201', 'No data found.');\n }\n } catch (\\Throwable $e) {\n $response = APIResponse('201', $e->getMessage());\n }\n \n return $response;\n }", "function contentSearch(&$searchObj, &$searchResObj) {\r\n\ttry {\r\n\t\t$pdo = new PDO(DBCONNSTRING, DBUSER,DBPASS);\r\n\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\r\n\t\t$sql = \"SELECT Title, Message, PostID FROM travelpost WHERE Message LIKE '%$searchObj->searchField%'\";\r\n\t\t\r\n\t\t$result = $pdo->query($sql);\r\n\t\t\r\n\t\t$count = 0;\r\n\t\twhile ($row = $result->fetch()) {\r\n\t\t\t$searchResObj[$count] = new searchResult();\r\n\t\t\t\r\n\t\t\t$searchResObj[$count]->searchTitle = $row['Title'];\r\n\t\t\t$searchResObj[$count]->searchMessage = $row['Message'];\r\n\t\t\t$searchResObj[$count]->searchPostID = $row['PostID'];\r\n\r\n\t\t\t$count++;\r\n\t\t}\r\n\t}\r\n\tcatch (PDOexception $e) {\r\n\t\tERROR_PAGE();\r\n\t}\r\n\t\r\n}", "public static function search($params = array())\n {\n $connection = self::getConnection();\n\n $whereTitle = isset($params['Search']) && $params['Search']\n ? $params['Search']\n : null;\n\n $limit = isset($params['Limit']) ? \" LIMIT $params[Limit] \" : '';\n $offset = isset($params['Offset']) ? \" OFFSET $params[Offset] \" : '';\n $order = isset($params['SortField']) && isset($params['SortOrder']) ?\n \" ORDER BY $params[SortField] $params[SortOrder] \" : '';\n\n $where = $whereTitle\n ? ' WHERE '.self::TABLE_NAME.'.title LIKE \"%:title%\" '\n : '';\n\n $query = \"SELECT \".self::TABLE_NAME.\".* FROM \".self::TABLE_NAME.$where.$order.$limit.$offset;\n\n $statement = $connection->prepare($query);\n\n $statement->bindValue(':title', $whereTitle, \\PDO::PARAM_STR);\n\n $success = $statement->execute();\n\n if ($success) {\n return $statement->fetchAll();\n }\n\n return false;\n }", "public function searchRecipesTitle($query) {\n $query = '%'.$query.'%';\n $this->db->query('SELECT * FROM recipes WHERE ( title LIKE ? )');\n $this->db->bind(1, $query);\n return $this->db->resultSet();\n }", "public function titleId($title);", "function edan_search_set_doc_title( $title )\n {\n $options = new esw_options_handler();\n $cache = new esw_cache_handler();\n\n if(edan_search_name_from_url() == $options->get_path() && $options->get_title() != '')\n {\n if(get_query_var('edanUrl'))\n {\n $object = $cache->get()['object'];\n\n if($object)\n {\n if(property_exists($object, 'content') && property_exists($object->{'content'}, 'descriptiveNonRepeating'))\n {\n if(property_exists($object->{'content'}->{'descriptiveNonRepeating'}, 'title'))\n {\n $title = $object->{'content'}->{'descriptiveNonRepeating'}->{'title'}->{'content'};\n }\n }\n elseif(property_exists($object, 'title'))\n {\n if(property_exists($object->{'title'}, 'content'))\n {\n $title = $this->object->{'title'}->{'content'};\n }\n else\n {\n $title = $this->object->{'title'};\n }\n }\n }\n }\n else\n {\n $title = $options->get_title();\n }\n }\n\n $sitename = get_bloginfo('name');\n return $title . \" - $sitename\";\n }", "public static function LocatedAt($title) {\n return static::where(compact('title'))->firstOrFail();\n }", "public function getElementTitle(array $args){\r\n\t $args = Utility_Functions::argsToArray($args);\r\n\t $args = Utility_Functions::cleanArgsValue($args);\r\n\t \r\n\t $searchFor = $args[\"text\"];\r\n\t $typeArr = explode(\"-\", $args[\"type\"]);\r\n\t\r\n\t $type = trim($typeArr[0]);\r\n\t \r\n\t if($type == 1){\r\n\t $model = new Table_BlogArticles();\r\n\t }else{\r\n\t $model = new Table_Receipts();\r\n\t } \r\n\t\r\n\t $foundData = $model->selectAutocomplete(array(\"title\" => array(\" like \" => \"%$searchFor%\")), null);\r\n\t\r\n\t echo $this->_toJson($foundData->toArray());\r\n\t}", "function getBasicDetailsByTitle($sek_title)\r\n {\r\n $log = FezLog::get();\r\n $db = DB_API::get();\r\n\r\n $stmt = \"SELECT\r\n *\r\n FROM\r\n \" . APP_TABLE_PREFIX . \"search_key\r\n WHERE \";\r\n if (is_numeric(strpos(APP_SQL_DBTYPE, \"pgsql\"))) { //pgsql is case sensitive\r\n $stmt .= \" sek_title ILIKE \" . $db->quote($sek_title);\r\n } else {\r\n $stmt .= \" sek_title=\" . $db->quote($sek_title);\r\n }\r\n try {\r\n $res = $db->fetchRow($stmt, array(), Zend_Db::FETCH_ASSOC);\r\n }\r\n catch (Exception $ex) {\r\n $log->err($ex);\r\n return '';\r\n }\r\n $res['sek_title_db'] = Search_Key::makeSQLTableName($res['sek_title']);\r\n return $res;\r\n }", "public function articleBySlug(string $slug)\n {\n return Post::query()->where('slug', $slug)->related('author')->get_one();\n }", "function getTitleSEO($identifiant)\r\n{\r\n\tglobal $pdo;\r\n\t\r\n\t$SQL = \"SELECT * FROM pas_seo WHERE page = '$identifiant'\";\r\n\t$reponse = $pdo->query($SQL);\r\n\t$req = $reponse->fetch();\r\n\t\r\n\treturn $req['title'];\r\n}", "public function searchTitleActionGet()\n {\n $title = \"Search for a movie by title\";\n $searchTitle = $this->app->request->getGet(\"searchTitle\");\n\n $this->app->db->connect();\n\n if ($searchTitle) {\n $sql = \"SELECT * FROM movie WHERE title LIKE ?;\";\n $res = $this->app->db->executeFetchAll($sql, [$searchTitle]);\n }\n\n $this->app->page->add(\"movie/search-title\", [\n \"searchTitle\" => $searchTitle,\n ]);\n if (isset($res)) {\n $this->app->page->add(\"movie/show-all\", [\n \"res\" => $res,\n ]);\n }\n\n return $this->app->page->render([\n \"title\" => $title,\n ]);\n }", "function opdsByTitle($index = 0)\n{\n global $app, $globalSettings;\n\n // parameter checking\n if (!is_numeric($index)) {\n $app->getLog()->warn('opdsByTitle: invalid page id ' . $index);\n $app->halt(400, \"Bad parameter\");\n }\n\n $filter = getFilter();\n $search = $app->request()->get('search');\n if (isset($search)) {\n $tl = $app->calibre->titlesSlice($globalSettings['lang'], $index, $globalSettings[PAGE_SIZE], $filter, $search);\n } else {\n $tl = $app->calibre->titlesSlice($globalSettings['lang'], $index, $globalSettings[PAGE_SIZE], $filter);\n }\n $books1 = $app->calibre->titleDetailsFilteredOpds($tl['entries']);\n $books = array_map('checkThumbnailOpds', $books1);\n $gen = mkOpdsGenerator($app);\n $cat = $gen->titlesCatalog(\n null,\n $books,\n false,\n $tl['page'],\n getNextSearchPage($tl),\n getLastSearchPage($tl)\n );\n mkOpdsResponse($app, $cat, OpdsGenerator::OPDS_MIME_ACQ);\n}", "public function findBySlug($slug)\n\t{\n\t\treturn Article::where('slug', $slug)\n\t\t\t\t\t->active()\n\t\t\t\t\t->firstOrFail();\n\t}", "function find_post_by_title($title){\n global $c;\n $post_title = mysqli_real_escape_string($c, $title);\n \n $q = \"SELECT * FROM posts WHERE post_title = '$post_title'\";\n $r = mysqli_query($c, $q);\n confirm_query($r);\n \n if($post_set = mysqli_fetch_assoc($r)){\n return $post_set;\n } else {\n return null;\n }\n}", "public function find_article($article_id) {\n\t\t\t$result = $this->db->select(['article_title', 'article_body', 'id'])\n\t\t\t\t\t ->where('id', $article_id)\n\t\t\t\t\t ->get('articles');\n\t\t\treturn $result->row();\n\t\t}", "public function search_article($values,$con){\n\t\t\n\t\t$returned_thing = false;\n\t\t\n\t\t$stmt='';\n\n\t\t/*Ensure that only one array key-value pair exists*/\n\t\tif (count($values) != 1){\n\t\t\treturn $returned_thing;\n\t\t}\n\n\t\t/*Check the array key and create final statement*/\n\t\tif (array_key_exists('url',$values)){\n\t\t\t$stmt = $this->search_stmt.'ArticleHyperlink=:ArticleHyperlink';\n\t\t\t$values = array(':ArticleHyperlink' => $values['url']);\n\t\t\t$value_options = array(':ArticleHyperlink' => $this->prop_parameters[':ArticleHyperlink']);\n\t\t}elseif(array_key_exists('title', $values)){\n\t\t\t$stmt= $this->search_stmt.'ArticleTitle=:ArticleTitle';\n\t\t\t$values = array(':ArticleTitle' => $values['title']);\n\t\t\t$value_options = array(':ArticleTitle' => $this->prop_parameters[':ArticleTitle']);\n\t\t}\n\n\t\t/*Make select request*/\n\t\tif ($stmt){\n\t\t\t$results = $con->multi_query($stmt,$values,$value_options);\n\t\t\tif (!empty($results)){\n\n\t\t\t\tif ($this->api){\n\n\t\t\t\t\t$auth_stmt = 'Select PeroozAuthorId From Authors Where AuthorId=:AuthorId';\n\t\t\t\t\t$auth_val = array(':AuthorId' => $results[0]['AuthorId']);\n\t\t\t\t\t$auth_prop = array(':AuthorId' => PDO::PARAM_INT);\n\t\t\t\t\t$auth_result = $con->multi_query($auth_stmt,$auth_val,$auth_prop);\n\n\t\t\t\t\t$source_stmt = 'Select PeroozSourceId From Sources Where SourceId=:SourceId';\n\t\t\t\t\t$source_val = array(':SourceId' => $results[0]['SourceId']);\n\t\t\t\t\t$source_prop = array(':SourceId' => PDO::PARAM_INT);\n\t\t\t\t\t$source_result = $con->multi_query($source_stmt,$source_val,$source_prop);\n\n\t\t\t\t\tif (!empty($auth_result) && !empty($source_result)){\n\t\t\t\t\t\t$returned_thing = array('perooz_article_id' => $results[0]['PeroozArticleId'],\n\t\t\t\t\t\t\t\t\t\t 'article_title' => $results[0]['ArticleTitle'],\n\t\t\t\t\t\t\t\t\t\t 'perooz_author_id' => $auth_result[0]['PeroozAuthorId'],\n\t\t\t\t\t\t\t\t\t\t 'perooz_source_id' => $source_result[0]['PeroozSourceId'],\n\t\t\t\t\t\t\t\t\t\t 'source_hyperlink' => $results[0]['SourceHyperlink'],\n\t\t\t\t\t\t\t\t\t\t 'article_hyperlink' => $results[0]['ArticleHyperlink'],\n\t\t\t\t\t\t\t\t\t\t 'approved' => $results['Approved']);\n\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$returned_thing = array('perooz_article_id' => $results[0]['PeroozArticleId'],\n\t\t\t\t\t\t\t\t\t\t 'article_title' => $results[0]['ArticleTitle'],\n\t\t\t\t\t\t\t\t\t\t 'author_id' => $results[0]['AuthorId'],\n\t\t\t\t\t\t\t\t\t\t 'source_id' => $results[0]['SourceId'],\n\t\t\t\t\t\t\t\t\t\t 'source_hyperlink' => $results[0]['SourceHyperlink'],\n\t\t\t\t\t\t\t\t\t\t 'article_hyperlink' => $results[0]['ArticleHyperlink'],\n\t\t\t\t\t\t\t\t\t\t 'approved' => $results['Approved']);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\t \n\t\treturn $returned_thing;\n\t}", "public function searchArticle(Request $request){\n// $sqlResult = DB::select('SELECT * FROM articles WHERE title LIKE ?',['%'.$request->input('search_article').'%']);\n $sqlResult = DB::select('SELECT * FROM articles WHERE MATCH(title) AGAINST (?)',[$request->input('search_article')]);\n dd($sqlResult);\n }", "public function search($title=null)\n {\n\n // $products = QueryBuilder::for(Product::class)->allowedFilters(['title'])->get();\n\n $products = Product::where([\"title\"=>$title])->orWhere([\"description\"=>$title])->orWhere([\"type\"=>$title])->get();\n return view('show_products',['products'=>$products]);\n }", "function select_search($searchText)\n{\n $query =\n \"SELECT * FROM posts WHERE `title` LIKE '%$searchText' OR\n `information` LIKE '%$searchText'\";\n $result = DB::get()->query($query);\n return $result;\n}", "function get_post_title($post, $field, $post_id = 0, $is_search = 0)\n {\n }", "function get_post_title($post, $field, $post_id = 0, $is_search = 0)\n {\n }", "function get_post_title($post, $field, $post_id = 0, $is_search = 0)\n {\n }", "public function findByDescription($search_term) {\n\t\t$qb = $this->createQueryBuilder('n');\n\t\t$qb->where(\"TS_MATCH_OP(n.descr, plainto_tsquery('dutch', :term)) = TRUE\")\n\t\t\t->setParameter('term', $search_term);\n\t\treturn $qb->getQuery()->getResult();\n\t}", "static private function _getPageByTitle($title, $pageArr) {\n\t\tforeach($pageArr as $p) {\n\t\t\tif($p->title == $title)\n\t\t\t\treturn $p;\n\t\t}\n\t\treturn false;\n\t}", "public function get_article_by_keyword($keyword='', $page=1, $limit=10){\n\t\t$keyword=mysqli_real_escape_string($this->mysqli,$keyword);\n\t\t$calc = $limit * $page;\n\t\t$start = $calc - $limit;\n\t\t$q = $keyword;\n\t\t$query = \"select * from article where title like '%$q%' or content like '%$q%' or category like '%$q%' order by article.date DESC, article.time DESC Limit $start, $limit\";\n\t\t$rows = $this->fetch_multiple($query);\n\t\tforeach ($rows as $row){$data[]=$row;}\n\t\tif (empty($data)){header(\"location:\".APP_URL.\"/error-404\");exit();}\n\t\treturn $data;\n\t}", "public function searchTitles()\n\t{\n\t\t$this->connectToDatabase();\n\t\t$query = \"CALL albumTitlesSelect(\".\n\t\t\t$this->page->escapeSQL($this->mysqli).\",\".\n\t\t\t$this->listingsLength->escapeSQL($this->mysqli).\",\".\n\t\t\t$this->keyword->escapeSQL($this->mysqli).\",\".\n\t\t\t$this->contentProperties->id->escapeSQL($this->mysqli).\",\".\n\t\t\t\"@total_matches);SELECT CAST(@total_matches AS UNSIGNED) as `total_matches`\";\n\t\t$data = $this->fetchRecordsNonExhaustive($query);\n\t\tif (!$data) {\n\t\t\tthrow new ResourceNotFoundException(\"Error retrieving album titles.\");\n\t\t}\n\t\t/* get record count from sproc results */\n\t\t$this->getSprocPageCount();\n\t\treturn ($data);\n\t}", "function get_page_by_title($page_title, $output = \\OBJECT, $post_type = 'page')\n {\n }", "public function get($title)\n {\n return isset($this->collection[$title]) ? $this->collection[$title] : null;\n }", "protected static function get_article_id($title) {\n\n $cachekey = $title->mDbkeyform . '$#$' . $title->mNamespace;\n\n // If the $title is not in the cache, let's look for it.\n if (!isset(self::$articleids[$cachekey])) {\n wfDebugLog('RealUsernames', __METHOD__ . \": not cached articleid: \" . $cachekey);\n self::$articleids[$cachekey] = $title->getArticleID($title::GAID_FOR_UPDATE);\n } else {\n wfDebugLog('RealUsernames', __METHOD__ . \": cached articleid: \" . self::$articleids[$cachekey] . \" for \" . $cachekey);\n }\n wfDebugLog('RealUsernames', __METHOD__ . \": found articleid: \" . self::$articleids[$cachekey] . \" for \" . $cachekey);\n return self::$articleids[$cachekey];\n }", "function searchForAlias($alias, $array) {\n\n foreach ($array as $key => $val) {\n if (($val['alias'] === $alias) || ($val['name'] === $alias) ) {\n return $array[$key]['alias'].';'.'AKA '.$array[$key]['name'].';'.$array[$key]['biography'];\n }\n\t if($alias == ''){\n\t\t return 'All'.defaultreturn($array);\n\t }\n }\n return 'No Super Hero Found';\n}", "private function getSearch() {\n\t\tif( $_SESSION['privilege'] != 'anon' ) {\n\n\t\t\t// If NOT anon then IS logged in so set userID to SESSION['id'] \n\t\t\t$userID = $_SESSION['id'];\n\n\t\t} else {\n\t\t\t\n\t\t\t// For this function default $userID to non-exitent user # 0 \n\t\t\t$userID = 0;\n\n\t\t}\n\n\t\t// Set search term per input OR blank\n\n\t\tif( !isset($_POST['search'])) {\n\t\t\t$_POST['search'] = \"\";\n\t\t}\n\t\t\n\t\tif(strlen($_POST['search']) === 0) {\n\t\t\t$searchTerm = \"\";\n\n\t\t} else {\n\t\t\t$result = $_POST['search'];\n\t\t\t$searchTerm = strtolower($result);\n\t\t}\n\n\t\t$this->data['searchTerm'] = $searchTerm;\n\n\t\t$sql = \"SELECT posts.id, title AS score_title, intro AS score_intro, article AS score_article\n\t\t\tFROM posts\n\t\t\tWHERE\n\t\t\t\t(title LIKE '%$searchTerm%' OR \n\t\t\t\tintro LIKE '%$searchTerm%' OR\n\t\t\t\tarticle LIKE '%$searchTerm%')\";\n\n\t\tif( $_SESSION['privilege'] != 'admin' ) {\n\n\t\t\t$sql .= \" AND (user_id = $userID\n\t\t\t\t\tOR status = 'Approved')\t\n\t\t\t\t\tORDER BY score_title ASC\";\n\t\t\n\t\t} else {\n\n\t\t\t$sql .= \" ORDER BY score_title ASC\";\t\n\n\t\t}\t\t\n\t\n\t\t$result = $this->dbc->query($sql);\n\n\t\tif( !$result || $result->num_rows == 0) {\n\t\t\t$this->data['searchResults'] = \"No results\";\n\t\t} else {\n\t\t\t$this->data['searchResults'] = $result->fetch_all(MYSQLI_ASSOC);\n\t\t}\n\t}", "public function searchByTitle($title)\n {\n $searchUrl = $this->apiUrl.$this->apiKey.\"/search/movie/title/\".$title.\"/fuzzy\";\n $searchResponse = file_get_contents($searchUrl);\n $searchObj = json_decode($searchResponse, true);\n\n return $searchObj[\"results\"];\n }", "function getTitleArticle() {\n\t\treturn $this->titleArticle;\n\t}", "public function findById($id)\n\t{\n\t\treturn Article::findOrFail($id);\n\t}", "public function find($id) {\n $sql = \"select * from t_article where art_id=?\";\n $row = $this->getDb()->fetchAssoc($sql, array($id));\n\n if ($row)\n return $this->buildDomainObject($row);\n else\n throw new \\Exception(\"No article matching id \" . $id);\n }", "public function search(){\n\n $title = $_GET['searchinput'];\n \n\n $posts = News::where([ \n ['title', 'LIKE', '%' . $title . '%'],\n \n ])->get();\n\n return view('pages.Search', compact('posts'));\n\n }", "public function showByTitle($title)\n {\n return $this->showByAttr('title', $title);\n }", "public function article(){\n \treturn Mrmart::where('MRMART_AKTIF', '1')\n \t\t->where('MRMART_ARTICLEID', $this->PPRED_ART)\n \t\t\t->where('MRMART_GROUPID', $this->PPRED_GROUP)\n \t\t\t\t->first();\n }", "public function get_article_by_link($link_article=''){\n\t\t$link_article = mysqli_real_escape_string($this->mysqli,$link_article);\n\t\t$query = \"SELECT * FROM article where link='$link_article'\";\n $row = $this->fetch($query);\n\t\tif (empty($row)){header(\"location:\".APP_URL.\"/error-404\");exit();}\n return $row;\n\t}", "function postingSearchHandler() {\n global $inputs;\n\n $keyword = $inputs['keyword'];\n $res = getAll(\"SELECT a.*,c.name \n FROM posting a \n INNER JOIN member_posting b \n ON a.id = b.posting_id\n INNER JOIN member c \n ON c.id = b.member_id \n WHERE a.title LIKE '%$keyword%' OR a.content LIKE '%$keyword%'\");\n \n formatOutput(true, 'success',$res);\n}", "public function get_item() {\r\n\t\t\t//get feed content\r\n\t\t\t$content = $this->get_content();\r\n\r\n\t\t\t//content the same as description?\r\n\t\t\tif( $content == $this->get_description() ):\r\n\t\t\t\t$content = false;\r\n\t\t\tendif;\r\n\r\n\t\t\t//content links itself?\r\n\t\t\t$html = new simple_html_dom();\r\n\t\t\t$html->load( $content );\r\n\t\t\tforeach( $html->find( 'a' ) as $link )\r\n\t\t\t\tif( $link->src == $this->get_permalink() or is_numeric( strpos( $this->get_permalink(), $link->src ) ) )\r\n\t\t\t\t\t$content = false;\r\n\r\n\t\t\t//return mod feed article\r\n\t\t\treturn new mod_feed_article( $this->get_permalink(), $content );\r\n\t\t}", "public static function search($pattern)\n\t{\n\t\treturn self::where('title', 'LIKE', \"%$pattern%\")->orderBy('title')->get();\n\t}", "function getDocumentSrlByAlias($mid, $alias)\n\t{\n\t\tif(!$mid || !$alias) return null;\n\t\t$site_module_info = Context::get('site_module_info');\n\t\t$args = new stdClass;\n\t\t$args->mid = $mid;\n\t\t$args->alias_title = $alias;\n\t\t$args->site_srl = $site_module_info->site_srl;\n\t\t$output = executeQuery('document.getDocumentSrlByAlias', $args);\n\t\tif(!$output->data) return null;\n\t\telse return $output->data->document_srl;\n\t}", "public function show()\n {\n $articles = $this->getArticles();\n $selectedTitle=$_GET['title'];\n\n foreach ($articles as $article)\n if ($selectedTitle== $article->title){\n $articleDescription = $article->description;\n } \n\n require 'View/articles/show.php';\n\n }", "public function getArticle(string $entry)\n {\n return $this->article->find($entry);\n }", "function find_product_by_title($product_name){\n global $db;\n $p_name = remove_junk($db->escape($product_name));\n $sql = \"SELECT name FROM products WHERE name like '%$p_name%' LIMIT 5\";\n $result = find_by_sql($sql);\n return $result;\n }", "public function get( $abstract );", "function set_ac_search_args_title( $ep_formatted_args, $args ) {\n\t\n\tif( isset( $args['autocomplete'] ) && $args['autocomplete'] ) {\n\t\t$titleSearchTerm = '';\n\t\t\n\t\t\t$titleSearchTerm = strtolower($args['s']); \n\t\t\n\t\t\t$ep_formatted_args['query'] = array(\n\t\t\t\t\"match_phrase_prefix\" => array(\n\t\t\t\t\t\"post_title.suggest\" => array(\n\t\t\t\t\t\t\"query\" => $titleSearchTerm,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\t\t\t\n\t\t\t\n\t}\t\n\treturn $ep_formatted_args;\n}", "public function findBySearchTerm($searchterm = '') {\n\n\t\t\t// create the query object\n\t\t$query = $this->createQuery();\n\n\t\t\t// break up the searchterm into searchwords\n\t\t$searchwords = Tx_Catalogueraisonne_Utility_Search::wordSplit($searchterm);\n\n\t\t\t// create constraints if multiple searchwords\n\t\tif (count($searchwords) > 0) {\n\t\t\tforeach ($searchwords as $searchword) {\n\t\t\t\t$searchword = '%' . $searchword. '%';\n\t\t\t\t$autConstraints[] = $query->like('aut', $searchword);\n\t\t\t\t$titelConstraints[] = $query->like('titel', $searchword);\n\t\t\t\t$seriesConstraints[] = $query->like('series', $searchword);\n\t\t\t}\n\t\t\t$query->matching(\n\t\t\t\t$query-> logicalOr(\n\t\t\t\t\t$query->logicalAnd($autConstraints),\n\t\t\t\t\t$query->logicalAnd($titelConstraints),\n\t\t\t\t\t$query->logicalAnd($seriesConstraints)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t\t// result order\n\t\t$query->setOrderings(\n\t\t\tarray('aut' => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING),\n\t\t\tarray('titel' => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING)\n\t\t);\n\n\t\t\t// go\n\t\treturn $query->execute();\n\t}", "function simpleSearch($letter){\n\t\n\t\tglobal $sql;\n\n\t\t// Préparation de la requête\n\t\t$teste = $sql->prepare(\"SET NAMES 'utf8'\");\n\t\t$teste ->execute();\n\t\t\n\t\tif($letter == 'others'){\n\t\t\t$result = $sql->prepare(\"SELECT * FROM coogle.movie inner join coogle.region on movie.region_idregion=region.idregion order by coogle.movie.originalTitle desc limit 100\");\t\t\t\n\t\t} elseif($letter == 'num'){\n\t\t\t$result = $sql->prepare(\"SELECT * FROM coogle.movie inner join coogle.region on movie.region_idregion=region.idregion WHERE coogle.movie.enTitle REGEXP '^[0-9]'\");\n\t\t} else {\t\t\n\t\t\t$result = $sql->prepare(\"SELECT * FROM coogle.movie inner join coogle.region on movie.region_idregion=region.idregion where coogle.movie.originalTitle like ('\".$letter.\"%')\") ;\n\t\t}\n\t\t\n\t\t// Envoi de la requête\n\t\t$result->execute();\n\n\t\treturn $result;\t\n\t}", "public static function search($search){\n return empty($search) ? static::query()\n :static::where('id','like', '%'.$search.'%')\n ->orwhere('title','like', '%'.$search.'%')\n ->orwhere('body','like', '%'.$search.'%');\n }", "public function gettitle($title){\n $xpath = new DOMXpath(self::$xmldoc);\n $search = $xpath->query(\"channel/item[text()[contains('$title', g:title)] ]/g:title\");\n $DOMsearchnode = $search->item(0);\n echo $DOMsearchnode->nodeValue;\n }", "public function getAnAnimeByTitle($title) {\n\t\t$result = null;\n\n\t\tforeach ($this->getAnimes() as $anime) {\n\t\t\tif (strtoupper($anime->getTitle()) == strtoupper($title)) {\n\t\t\t\t$result = $anime;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "function get_info($title) {\n \n $this->db->where('title_url', $title);\n $query = $this->db->get('tech_section');\n return $query->row_array();\n }", "public function findOneArticle($id)\n {\n $article = $this->repo->findOneBy($id);\n return $article;\n }", "public function get($alias);", "public function get($alias);", "public function getRelated($alias, $arguments=null) {}", "function xmarticle_search($queryarray, $andor, $limit, $offset, $userid)\n{\n global $xoopsDB;\n\n $sql = \"SELECT article_id, article_cid, article_name, article_reference, article_description, article_date, article_userid FROM \" . $xoopsDB->prefix(\"xmarticle_article\") . \" WHERE article_status = 1\";\n\n\tif ( $userid != 0 ) {\n $sql .= \" AND article_userid=\" . intval($userid) . \" \";\n }\n\t\n if ( is_array($queryarray) && $count = count($queryarray) )\n {\n $sql .= \" AND ((article_name LIKE '%$queryarray[0]%' OR article_reference LIKE '%$queryarray[0]%' OR article_description LIKE '%$queryarray[0]%')\";\n\n for($i=1;$i<$count;$i++)\n {\n $sql .= \" $andor \";\n $sql .= \"(article_name LIKE '%$queryarray[$i]%' OR article_reference LIKE '%$queryarray[$i]%' OR article_description LIKE '%$queryarray[$i]%')\";\n }\n $sql .= \")\";\n }\n\n $sql .= \" ORDER BY article_date DESC\";\n $result = $xoopsDB->query($sql,$limit,$offset);\n $ret = array();\n $i = 0;\n while($myrow = $xoopsDB->fetchArray($result))\n {\n $ret[$i][\"image\"] = \"assets/images/xmarticle_search.png\";\n $ret[$i][\"link\"] = \"viewarticle.php?article_id=\" . $myrow[\"article_id\"] . '&category_id=' . $myrow[\"article_cid\"];\n $ret[$i][\"title\"] = $myrow[\"article_name\"] . '(' . $myrow[\"article_reference\"] . ')';\n $ret[$i][\"time\"] = $myrow[\"article_date\"];\n $ret[$i][\"uid\"] = $myrow[\"article_userid\"];\n $i++;\n }\n\n return $ret;\n}", "function descriptionSearch($conn, $keyword)\n {\n $query = \"SELECT DISTINCT whwp_Advert.advert_id FROM whwp_Advert \"\n . \"WHERE advert_description LIKE :keyword \"\n . \"ORDER BY whwp_Advert.advert_price DESC\";\n $conn->prepQuery($query);\n $conn->bind('keyword', \"%\".$keyword.\"%\");\n $advert = $conn->resultset();\n return $advert;\n }", "public function set_searchtitle($param)\n\t{\n\t\t$this->searchtitle = (string)$param;\n\t\treturn $this;\n\t}", "public static function find( $url )\n {\n try\n {\n // Prepare the necessary queries\n $article = Database::prepare( self::$SQL_FIND );\n\n // Execute the query\n $article->execute( array( $url ) );\n\n // Fetch according to the symantics of the database\n // and return a new article with this information\n if( $article->rowCount() == 0 ) return false;\n $article = $article->fetchAll( PDO::FETCH_ASSOC );\n return new Article( $article[0] );\n }\n catch( PDOException $e )\n {\n echo \"Error: \" . $e;\n return false;\n }\n }", "public function search($params) {\n\t\t$callUrl = \"https://en.wikipedia.org/w/api.php?action=query&list=search&utf8=&format=json&srlimit=5&srsearch=\".urlencode($params[\"q\"]);\n\n\t\t/**\n\t\t* Create curl request and send it\n\t\t*/\n\t\t$process = curl_init($callUrl);\n\t\tcurl_setopt($process, CURLOPT_HTTPHEADER, array('Accept: application/json'));\n\t\tcurl_setopt($process, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($process, CURLOPT_TIMEOUT, 5);\n\t\tcurl_setopt($process, CURLOPT_RETURNTRANSFER, TRUE);\n\t\t$text = curl_exec($process);\n\t\tcurl_close($process);\n\t\t$raw = json_decode($text);\n\n\t\t/**\n\t\t * return message, if we could not get any results\n\t\t */\n\t\tif( count($raw->query->search) <= 0 ) {\n\t\t\t$answer = new Answer();\n\t\t\t$answer->addText(\"Unfortunately I was not able to find anything for *\" . $params[\"q\"] . \"*.\");\n\t\t\treturn $answer;\n\t\t}\n\n\t\t/**\n\t\t * get results into list\n\t\t */\n\t\t$answer = new Answer();\n\t\t$answer->addText(\"Here are the top wikipedia articles for *\" . $params[\"q\"] . \"*: \");\n\n\t\tforeach($raw->query->search as $res) {\n\t\t\t$answer->addAttachment(\n\t\t\t\tnew Attachment(\n\t\t\t\t\t$res->title,\n\t\t\t\t\tstrip_tags($res->snippet),\n\t\t\t\t\t\"https://en.wikipedia.org/wiki/\" . rawurlencode($res->title)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\treturn $answer;\n\t}", "function getDetailsByTitle($sek_title)\r\n {\r\n $log = FezLog::get();\r\n $db = DB_API::get();\r\n\r\n $stmt = \"SELECT\r\n *\r\n FROM\r\n \" . APP_TABLE_PREFIX . \"search_key\r\n inner join \" . APP_TABLE_PREFIX . \"xsd_display_matchfields\r\n on xsdmf_sek_id=sek_id\r\n WHERE\r\n sek_title=\" . $db->quote($sek_title);\r\n try {\r\n $res = $db->fetchRow($stmt, array(), Zend_Db::FETCH_ASSOC);\r\n }\r\n catch (Exception $ex) {\r\n $log->err($ex);\r\n return '';\r\n }\r\n $res['sek_title_db'] = Search_Key::makeSQLTableName($res['sek_title']);\r\n return $res;\r\n }", "public function getRelated(string $alias, $arguments = null);", "public function searchByIndex($letter)\n {\n $entityManager = $this->getEntityManager();\n $queryBuilder = $entityManager->createQueryBuilder();\n $queryBuilder\n ->select('bp')\n ->from('App:BlogPost', 'bp')\n ->where('bp.title LIKE :letter')->setParameter('letter',$letter.'%');\n\n return $queryBuilder->getQuery()->getResult();\n }", "public function show($article)\n {\n $article = $this->repository->findWithJoin($article, ['articles.id', 'articles.title' ,'articles.body', 'categories.name','articles.created_at']);\n\n return $this->successResponse($article,'article has been returned successfully.');\n }" ]
[ "0.6686883", "0.6482616", "0.63009006", "0.62155455", "0.61292493", "0.6116177", "0.6022243", "0.6014953", "0.59790003", "0.5890566", "0.58699197", "0.5860393", "0.5856596", "0.5842274", "0.584195", "0.57830435", "0.57822496", "0.5772151", "0.57477784", "0.574359", "0.5742274", "0.5695309", "0.5667527", "0.56425583", "0.55923826", "0.5562493", "0.55610615", "0.5507574", "0.5490208", "0.5488301", "0.5471578", "0.5467493", "0.54477817", "0.5438428", "0.543799", "0.5425112", "0.54231733", "0.5410903", "0.54054904", "0.5399388", "0.539656", "0.5383159", "0.5370531", "0.53700274", "0.5366241", "0.53592026", "0.53569937", "0.53550845", "0.53467625", "0.53451556", "0.53391343", "0.53302264", "0.53220147", "0.53193736", "0.53193736", "0.53193736", "0.52896744", "0.5275721", "0.5262682", "0.5261623", "0.52555054", "0.5250745", "0.5244018", "0.52428955", "0.5241244", "0.5238513", "0.5235456", "0.52260804", "0.5224733", "0.52241045", "0.52228564", "0.5212171", "0.5211974", "0.52104217", "0.5209277", "0.52083105", "0.5203707", "0.51991504", "0.5196676", "0.51924074", "0.5192398", "0.51722157", "0.51704013", "0.51671946", "0.5164439", "0.51594275", "0.51396537", "0.51393795", "0.5133389", "0.51281184", "0.51281184", "0.5126592", "0.51252246", "0.5112936", "0.5103397", "0.5099338", "0.5093343", "0.5084873", "0.5082859", "0.508094", "0.50786483" ]
0.0
-1
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, $id) { $cartDbEntry = $this->retrieveCartDatabaseEntry($request); if ($cartDbEntry) { $cart = Cart::find($cartDbEntry->id); if (is_null($cart->items)) { $cartItems = (object)[]; } else { $cartItems = json_decode($cart->items); } } else { $cart = Cart::create([ 'token' => $request->session()->get('_token'), 'items' => null, 'total' => null ]); $cartItems = (object)[]; } if (array_key_exists($id, $cartItems)) { $cartItems->$id->amount++; $cartItems->$id->display_price = $this->formatDisplayPrice($cartItems->$id->price); } else { $product = DB::table('products')->where('sku', $id)->first(); $type = ($product->subscription == true) ? 'plan' : 'product'; $displayPrice = $this->formatDisplayPrice($product->price); $cartItems->$id = (object)['amount' => 1, 'type' => $type, 'name' => $product->full_name, 'description' => $product->description, 'price' => $product->price, 'display_price' => $displayPrice]; } $this->saveCart($cart, $cartItems); return redirect('/cart'); }
{ "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(Request $request)\n {\n $request->validate([\n 'name' => 'required',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n 'description' => 'nullable|string',\n ]);\n\n $resource = Resource::create($request->all());\n\n if ( $request->hasFile('file') ) {\n $resourceFile = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resourceFile);\n $resource->file = $resourceFile;\n $resource->save();\n }\n\n if ( $request->submit == 'Save' ) {\n return redirect()->route('admin.resources.index')->with('success','Resource Successfully Uploaded');\n } else {\n return redirect()->route('admin.resources.create')->with('success','Resource Successfully Uploaded');\n }\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}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\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.728708", "0.7144915", "0.7132209", "0.66401577", "0.66205436", "0.65682197", "0.6526531", "0.65085673", "0.6449452", "0.63749766", "0.63726056", "0.6364582", "0.6364582", "0.6364582", "0.6341498", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726" ]
0.0
-1
Display the specified resource.
public function show(Request $request) { $cartDbEntry = $this->retrieveCartDatabaseEntry($request); if ($cartDbEntry) { $cartItems = json_decode($cartDbEntry->items); $total = $cartDbEntry->total; } else { $cartItems = null; $total = 0; } return view('cart', ['cartItems' => $cartItems, 'total' => $total]); }
{ "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) { $updatedCartData = $request->input('cartData'); $cartDbEntry = $this->retrieveCartDatabaseEntry($request); $cart = Cart::find($cartDbEntry->id); $cartItems = json_decode($cart->items); foreach($updatedCartData as $item) { $productName = $item['productName']; $productAmount = intval($item['productAmount']); if ($productAmount <= 0) { unset($cartItems->$productName); } else { $cartItems->$productName->amount = intval($item['productAmount']); } } $this->saveCart($cart, $cartItems); return $updatedCartData; }
{ "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($id) { // }
{ "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
return $this>getDb()>selectQuery("EMPRESA", "", "");
public function selectEmpresas() { return $this->getDb()->query("SELECT E.ID_EMPRESA,E.NOMBRE,E.TELEFONO,E.DIRECCION,concat(U.NOMBRE,concat(' ',U.APELLIDO)) \"USUARIO ENCARGADO\" ,E.ESTADO FROM EMPRESA E LEFT JOIN USUARIO U ON(E.ID_PERSONA_ENCARGADA=U.IDENTIFICADOR)"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_empresas() {\n\t\t$query = $this -> db -> select() -> from('empresas') -> get();\n\n\t\tif ($query -> num_rows() > 0) {\n\t\t\treturn $query;\n\t\t}\n\t}", "public function select(){\n\t$sql=\"SELECT * FROM tipousuario\";\n\treturn ejecutarConsulta($sql);\n}", "public function listeEmployee(){\n\t\t\t\t\t $sql = \"SELECT * FROM employee\";\n\t\t\t\t\t if($this->db != null)\n\t\t\t\t\t {\n\t\t\t\t\t return $this->db->query($sql)->fetchAll();\n\t\t\t\t\t }else{\n\t\t\t\t\t return null;\n\t\t\t\t\t }\n\t\t\t\t\t }", "function getAllDept(){\r\n echo\r\n $query = \"SELECT dept_name,dept_id FROM department\";\r\n $result = $this->executeQuery($query); \r\n return $result;\r\n }", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM tbl_empleado';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "function afficherEmployes(){\n\t\t$sql=\"SElECT * From employe\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "public function select(){\n\t\t$sql=\"SELECT PROGRA_ID,PROGRA_CODIGO, PROGRA_NOMBRE, PROGRA_EMAIL, PROGRA_USUADIGI, PROGRA_FECHDIGI, PROGRA_HORADIGI\n\t\t FROM programa\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function select_all(string $query)\n{\n $this->strquery = $query;\n $result = $this->conexion->prepare($this->strquery);\n $result->execute();\n $data = $result->fetchall(PDO::FETCH_ASSOC);\n return $data; \n}", "public function consulta(){\n\n $this->db->select(\"*\");\n $this->db->from(\"empleados\");\n\n /*\n if( $this->session->userdata('perfil') != \"admin\"){\n $this->db->where( $where );\n }\n */\n\n // El get() se utiliza para ejecutar el query.\n $resultado = $this->db->get();\n\n // El result() se utiliza para enviar solamente los datos de la consulta.\n return $resultado->result();\n\n }", "public function select()\n {\n $sql = \"SELECT * FROM tipousuario\";\n return ejecutarConsulta($sql);\n }", "function selectQuery($query) \t{\n\t\tif($query != '')\t\t{\n\t $res = $this->execute($query);\n\t\t\treturn $this->fetchAll($res);\n\t\t}\n\t}", "public function get_datos_empresa($empresa){\n\t$conectar= parent::conexion();\n\tparent::set_names();\n\t$sql=\"select *from empresas where nombre=?\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$empresa);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}", "public function select(string $query)\n{\n // guardamos lo que venga como parametros en la funcion select\n $this->strquery = $query;\n // preparamos el query\n $result = $this->conexion->prepare($this->strquery);\n $result->execute();\n // se utiliza fetch porque solo devuelve un resultado\n $data = $result->fetch(PDO::FETCH_ASSOC);\n return $data;\n}", "public function select() \n { \n $this->load->database(); \n $query = $this->db->query(\"SELECT * FROM empresa p inner join persona c on p.Persona_idPersona = c.idPersona \");\n $this->db->close();\n return $query->result();\n }", "public function select(){\n\t\t$sql = \"SELECT * FROM equipo_tipo\n\t\t\t\twhere equi_tip_estado = 1\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function selectMedecin(){\n $bdd=Connexion::getInstance();\n $req=\" select * from utilisateur u ,specialite s,service ser \n WHERE u.idSpecialite=s.idSpecialite and s.idService=ser.idService\n AND idStatus=\".self::NIVEAU_1;\n $rep=$bdd->query($req);\n return $rep->fetchall();\n \n }", "public function selectAllactor() {\n\t\t$this->dbAdapter->dbOpen();\n\t\t$result = $this->dbAdapter->actorSelectAll();\n\t\t$this->dbAdapter->dbClose();\n\t\t$this->error = $this->dbAdapter->lastError();\n\t\t\n\t\treturn $result;\t\t\n\t}", "public function select(){\n\t\t$sql = \"SELECT * FROM producto\n\t\t\t\twhere prod_estado = 1\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "public abstract function get_query();", "public function queryselect() {\r\n // we should load the database (autoload)\r\n $this->load->database();\r\n $query = $this->db->query('SELECT * FROM crud');\r\n return $query->result_array();\r\n //$result = $query->result_array();\r\n //return $result;\r\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 consult(){\n\t\t\t$para = array(\"1\"=>1);\n\t\t\tif($this->tipodocum_id_tipodocum != null){\n\t\t\t\t$para[\"tipodocum_id_tipodocum\"] = $this->tipodocum_id_tipodocum;\n\t\t\t}\n\t\t\tif($this->documento != null){\n\t\t\t\t$para[\"documento\"] = $this->documento;\n\t\t\t}\n\t\t\t\n\t\t\t$query = $this->db->get_where(\"paciente\",$para);\n\t\t\treturn $query->result();\n\t\t}", "public function select(){\n\t\t$sql = \"SELECT * FROM cargo\n\t\t\t\twhere car_estado = 1\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "function listado() {\r\n return self::consulta('SELECT * FROM \".self::$nTabla.\"');\r\n }", "function consultarEstadoNomina(){\n \n $conexion = new conexion();\n $sql = \"select * from mod_nomina_estado\";\n $resulConsulta = $conexion->consultar($sql);\n return $resulConsulta; \n \n }", "function RellenaDatos()\n{\n $this->ConectarBD();\n $sql = \"select * from EMPLEADOS where EMP_USER = '\".$this->EMP_USER.\"'\";\n\n if (!($resultado = $this->mysqli->query($sql))){\n\treturn 'Error en la consulta sobre la base de datos';\n\t}\n else{\n\t$result = $resultado->fetch_array();\n\treturn $result;\n\t}\n}", "function dataSelect() {\n\t\t\t\t$koneksi = $this->koneksi;\n\t\t\t\t// SQL\n\t\t\t\t$query\t\t\t= \"SELECT * FROM pegawai ORDER BY id ASC\";\n\t\t\t\t\n\t\t\t\t$sql\t\t\t= mysqli_query($koneksi,$query);\n\t\t\t\t\n\t\t\t\treturn $sql;\n\t\t\t}", "function createQuery() ;", "function getIDEmployee($db, $code)\n{\n $strResult = \"\";\n if ($code != \"\") {\n $strSQL = \"SELECT id FROM hrd_employee WHERE employee_id = '$code' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strResult = $rowDb['id'];\n }\n }\n return $strResult;\n}", "public function ekonomi()\n {\n \n $this->db->select('*');\n $this->db->from('ekonomi');\n \n $query = $this->db->get();\n return $query;\n }", "public function consultarListado()\n {\n $sql = \"SELECT * FROM examen\";\n $execute = $this->con->query($sql);\n $request = $execute->fetchall(PDO::FETCH_ASSOC);\n return $request; \n }", "public function Query(){\r\n\t\treturn self::get_query();\r\n\t}", "function GetQueryV ( $cSQL )\n{\n $rows = $this->_db->getAll($cSQL,null,DB_FETCHMODE_ASSOC);\n if ( DB::isError($rows) ) {\n $this->_ERROR_(\"SQL('$cSQL') -> \".$rows->getMessage(),$this->_DebugMode);\n return null;\n }\n//!!echo \"<br/>GetQueryV('$cSQL')<br/>\"; var_dump($rows);\n return $rows;\n}", "function obtenerClientes(){\n $query = $this->connect()->query('SELECT * FROM cliente');\n return $query;\n }", "function consultarCliente (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM cliente');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "public function selectdata(){\n$this->autoRender=false;\n$data=$this->connection->execute(\"select * from users\")->fetchAll();\nprint_r($data);\n}", "public function getSystems()\r\n{\r\n $query_string = \"SELECT systemid, systemname \";\r\n $query_string .= \"FROM voting_system\";\r\n\r\n return $query_string;\r\n}", "private function query() {\n return ApplicationSql::query($this->_select, $this->_table, $this->_join, $this->_where, $this->_order, $this->_group, $this->_limit, $this->_offset);\n }", "public function ConsultarEmpleado(){\n\t\t$sql = \"CALL HAR_ConsultarEmpleado(?)\";\n\t\t$stm = $this->db->prepare($sql);\n\t\t$stm ->bindParam(1, $this->CedulaEmpleado);\n\t\t$stm->execute();\n\t\t//Fetch retorna solo un valor, el fetchall varios\n\t\treturn $stm->fetch();\n\n\t\t}", "function query_peminjam(){\n\t\t\t$query = $this->db->query (\"SELECT * FROM peminjam\");\n\t\t\t$query = $query->result();\n\t\t\treturn $query;\n\t\t}", "public function getConsulta(){\n\t\t\treturn $this -> resultado;\n\t\t}", "public function seleccionar(){\n //sql de la consulta\n $sql = \"SELECT * FROM especialidad E WHERE E.Estado = 1;\";\n //preparando la consulta\n $query = $this->conexion->prepare($sql);\n //ejecutandola\n $query->execute();\n //obteniendo el resultado en un arreglo asociativo\n $result = $query->fetchAll(PDO::FETCH_ASSOC);\n $this->conexion = null;\n return $result;\n }", "public function SelecionaTudo() {\n try {\n //Monta a Query\n $query = Doctrine_Query::create()\n ->select(\"ws.*, MONTHNAME(ws.data) mes, YEAR(ws.data) ano\")\n ->from($this->table_alias)\n ->orderBy(\"ws.data DESC\")\n ->offset(1)\n ->limit(6)\n ->execute()\n ->toArray();\n\n return $query;\n } catch (Doctrine_Exception $e) {\n echo $e->getMessage();\n }\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function analisa()\n {\n \n $this->db->select('*');\n $this->db->from('analisa');\n \n $query = $this->db->get();\n return $query;\n }", "public function Query(){\n\t}", "public function Query(){\n\t}", "public function Query(){\n\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_nomor_peserta';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM consultation_vp';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function findAll() {\r\n$sql = \"SELECT * FROM $this->tabela\";\r\n$stm = DB::prepare($sql);\r\n$stm->execute();\r\nreturn $stm->fetchAll();\r\n}", "private function __select() {\n $from_str = $this->getFromStr();\n $field = $this->field_str;\n if (empty($field)) {\n $field = '*';\n }\n $sql = \"SELECT {$field} FROM {$from_str}\";\n if (!empty($this->join_str_list)) {\n $temp = implode(' ', $this->join_str_list);\n $sql .= \" {$temp}\";\n }\n if (!empty($this->where_str)) {\n $sql .= \" WHERE {$this->where_str}\";\n }\n if (!empty($this->group_str)) {\n $sql .= \" GROUP BY {$this->group_str}\";\n }\n if (!empty($this->order_str)) {\n $sql .= \" ORDER BY {$this->order_str}\";\n }\n if (!empty($this->limit_str)) {\n $sql .= \" LIMIT {$this->limit_str}\";\n }\n $list = $this->query($sql);\n return $list;\n }", "public function listar(){\n //se consulta \n $consulta = $this->db->query(\"SELECT * FROM empleados\");\n //y se retorna el resultado\n return $consulta->result();\n }", "public function pertanyaan(){\r\n $sql = \"SELECT * FROM tbl_pertanyaan\";\r\n $query = mysql_query($sql);\r\n return $query;\r\n }", "public function get(){\n $this->query = \"SELECT \".$this->select.\" FROM $this->table WHERE \";\n $wheres = $this->mergeWhere().\" OR \".$this->mergeOrWhere();\n $query = $this->query.$wheres;\n $statement = $this->prepare($query);\n $statement->execute($this->bindings);\n return $statement->fetchAll();\n }", "public function _query()\n {\n }", "public function get(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n\t\t\t\t\t $condition = array(\"ide\" =>$this->ide);\n return $this->db->getRows(array(\"where\"=>$condition,\"return_type\"=>\"single\"));\n\t\t\t\t\t }", "function consultaUsuario($conexion){\n $resultado = $conexion->query(\"SELECT * FROM usuario\");\n return $resultado;\n}", "public function select()\n {\n\n }", "function consultarUna(){\n try {\n $IDREQ=$this->objRequerimiento->getIDREQ();\t\n $objControlConexion = new ControlConexion();\n $objControlConexion->abrirBd();\n $comandoSql = \"select FKAREA from Requerimiento where IDREQ = '\".$IDREQ.\"' \";\n $rs = $objControlConexion->ejecutarSelect($comandoSql);\n $registro = $rs->fetch_array(MYSQLI_BOTH);\n ($registro!=null)?$id = $registro[\"FKAREA\"]:$id = \"undefine\";\n $this->objRequerimiento->setID($id);\n $objControlConexion->cerrarBd();\n return $this->objRequerimiento;\n } catch(PDOException $e) {\n echo \"Error: \" . $e->getMessage();\n }\n }", "function oracle9_test_select() {\n\t $sSQL = \"SELECT MCIID,CODCODE,ITMNAME,ITMACTIVE, DFTID FROM STI WHERE CODCODE='70129'\";\n\t echo $sSQL,\"<br>\";\n\t \n\t $result = $this->ora_con->Execute($sSQL);\n\t \n\t //print_r($result);\n\t $i=0;\n\t while(!$result->EOF) {\n\t echo \"<br>\",$result->fields[2];\n\t\t $result->MoveNext();\n\t\t $i+=1;\n\t }\n\t echo '>>>',$this->ora_con->ErrorMsg();\n\t}", "public function get(){\n\n if(is_null($this->columns)) $this->columns = ['*'];\n $select_statement = $this->grammer->compileSelect($this);\n \n \n $result = $this->connection->get($select_statement); \n \n if(!empty($this->model)){\n \n return $this->return_results_objects($result);\n\n }else{\n \n return $this->return_result_as_array($result);\n }\n \n }", "function dbacha($sql, $retorno) {\r\n $qtemp = DBExecute($sql . \" LIMIT 0,1\");\r\n foreach ($qtemp as $r) {\r\n $campo = $r[$retorno];\r\n }\r\n return $campo;\r\n }", "function get_sql_combo() {\n try {\n $app = Slim\\Slim::getInstance();\n $table = $app->request->params('table_name');\n\n $gii = new easyuigii();\n $gii->set_db_setting();\n $model_combo = $gii->get_table_model_from_db($table);\n $data = $gii->get_sql_for_select($table, $model_combo);\n\n $app->render(200, ['success' => true, 'sql' => $data]);\n } catch (Exception $e) {\n $app->render(200, ['isError' => true, 'msg' => $e->getMessage()]);\n error_log(LogTime() . 'error - get sql for combo' . PHP_EOL, 3, 'logs/error.log');\n }\n}", "public function all(){ \n $arraytoret = array();\n $query='select *\n from Usuario';\n $results = $this->driver->exec($query);\n return $this->factory($results);\n}", "public function query($selection){\n $this->query = mysqli_query($this->connection, $selection);\n return $this->query;\n}", "public function getSystemId()\r\n{\r\n $query_string = \"SELECT systemid FROM voting_system \";\r\n $query_string .= \"WHERE systemname = :systemname\";\r\n\r\n return $query_string;\r\n\r\n}", "function getResult($select){\n // Connexion à la base de données\n $servername = \"localhost\";\n $username = \"root\";\n $password = \"\";\n\n try {\n $conn = new PDO(\"mysql:host=$servername;dbname=base_etudiants\", $username, $password);\n // set the PDO error mode to exception\n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n $conn->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n }\n catch (PDOException $e) {\n echo \"Connexion à la base impossible ! \" . $e->getMessage();\n }\n\n // Selection en base de données\n $sql = $conn->query($select);\n $reponse = $sql->fetchAll();\n\n return $reponse;\n}", "function dias_semana (){ \n $sql=\"SELECT nombre FROM dia\";\n return toba::db()->consultar($sql);\n }", "function getInscritos()\n{\n global $mysqli;\n $Query = new Query($mysqli, \"SELECT name,lastname,nombre_usuario,email,type from usuarios\");\n $parametros = array();\n $data = $Query->getresults();\n\n if (isset($data[0])) {\n return $data[0];\n } else {\n return null;\n }\n\n}", "function select($item,$table,$s_cul=0,$value=0){\r\n global $con;\r\n $query=$con->prepare(\"SELECT $item FROM $table where $s_cul=? \");\r\n $query->execute(array($value));\r\n $content=$query->fetchall();\r\n return $content;\r\n}", "function listQueryPajak() {\n $sql = \"select * from \" . static::table('ms_pajak');\n\n return $sql;\n }", "public function getAllUsers()\r\n{\r\n $query_string = \"SELECT userid, username \";\r\n $query_string .= \"FROM users \";\r\n\r\n return $query_string;\r\n}", "public function get_select() {\n return $this->db->get('ws_users'); \n }", "public function fetchAll(){\r\n$table=$this->getTable();\r\nreturn $this->fetch_array($this->query(\"SELECT * FROM {$table}\"));\r\n}", "public function query()\n\t{\n\t\t\n\t}", "function selectAll() {\r\n $sql = \"SELECT u.Id, u.Identification, u.Name1, u.Name2, u.Surname1, u.Surname2, u.dateBirth, u.Password, u.Address, \r\n u.ContacAddress, u.ContacAddress1, u.Email, u.State, w.Description 'UserGroup',\r\n case when u.State = 1 then 'ACTIVO' else 'INACTIVO' end 'State' \r\n FROM user u, workgroup w\r\n where u.UserGroup = w.Id \";\r\n return ejecutarConsulta($sql);\r\n }", "public function getSelect();", "public function getSelect();", "public function asignado() {\n \treturn $this->db\n \t\t->select(format_select(array(\n \t\t\t'cirugia.idCirugia' \t\t\t => 'idCirugia',\n \t\t\t'empleado.idEmpleado' \t\t => 'idEmpleado',\n \t\t\t'empleado.matricula'\t\t\t => 'matricula',\n \t\t\t'empleado.nombre' \t\t\t => 'nombre',\n \t\t\t'empleado.apellido_paterno' => 'a_paterno',\n \t\t\t'empleado.apellido_materno' => 'a_materno',\n \t\t\t'especialidad.nombre' \t\t => 'especialidad',\n \t\t\t'cirugia.fecha' \t\t\t\t => 'fecha',\n \t\t\t'quirofano.nombre'\t\t\t => 'quirofano'\n \t\t)))\n \t\t->join('usuario','tipo_usuario.idTipo_Usuario = usuario.idTipo_Usuario')\n \t\t->join('empleado','empleado.idEmpleado = usuario.idEmpleado')\n \t\t->join('departamento','departamento.idDepartamento = tipo_usuario.idDepartamento')\n \t\t->join('especialidad','especialidad.idEspecialidad = departamento.idEspecialidad')\n \t\t->join('proceso_tipo_usuario','proceso_tipo_usuario.idTipo_Usuario = tipo_usuario.idTipo_Usuario')\n \t\t->join('proceso','proceso.idProceso = proceso_tipo_usuario.idProceso')\n \t\t->join('cirugia','cirugia.idProceso = proceso.idProceso AND cirugia.idquirofano > 0 AND cirugia.status = \"1\"')\n \t\t->join('quirofano','cirugia.idQuirofano = quirofano.idQuirofano')\n \t\t->get('tipo_usuario')\n \t\t->result_array();\n }", "function selectAll()\r\n\t\t{\r\n\t\t\t$query = \"select * from prodi\";\r\n\t\t\treturn mysql_query($query);\r\n\t\t}", "function BDDselect($sql, $param){\n $bdd = BDDopen();\n $req = $bdd->prepare($sql);\n if($req->execute($param) === FALSE){\n echo 'Errore de la requette';\n print_r($param);\n }\n return $req;\n}", "function select_all_employee()\n{\n $name = null;\n $query = \" SELECT id, surname, name FROM angajati WHERE deleted=0 ORDER BY surname\";\n $result = Database::getInstance()->getConnection()->query($query);\n if (!$result) {\n $status_text = Database::getInstance()->getConnection()->error;\n ?>\n <p id=\"status_baloon\" class=\"bg-danger alert h3\"><?= $status_text ?></p> <?php\n die();\n }\n while ($row = $result->fetch_assoc()) {\n $id = $row['id'];\n $name[$id] = $row['surname'] . \" \" . $row['name'];\n }\n $result->free_result();\n return $name;\n}", "public function sql_examen(){\r\n $sql=\"SELECT * FROM texamen WHERE estatus='1' order by descripcion\";\r\n\t\t$cursor=parent::ejecuta_sql($sql);\t\r\n// verifica que la consulta arroje al menos 1 fila para poder enviar la sentencia sql\r\n\t\tif(parent::getNRegistro($cursor)<0)\r\n\t\t\treturn 1;//fallo la operacion\r\n\t\t\telse \r\n\t\t\treturn $sql;\t\t\r\n\t\t\t\r\n\t\t\tparent::cerrar_bd();\r\n }", "public function select()\n\t{\n\t\treturn call_user_func_array([$this->queryFactory->__invoke('select'), 'select'], func_get_args());\n\t}", "function afficherU(){\n $sql=\"SElECT * From client\";\n $db = config::getConnexion();\n try{\n $liste=$db->query($sql);\n return $liste;\n }\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n } \n }", "function findAgency($p_iva){\n global $dbH;\n $dbH->setTable(\"agencies\");\n\n $res = $dbH->read(\"p_iva = ?\",\" limit 1 \",array($p_iva) ,\"id\",$printQuery = false);\n if(Count($res)>0)\n return $res[0][\"id\"];\n else\n return 1;\n}", "public function test_executeQuery()\n\t{\n\t}", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM alojamientos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "function consultaLogin($conexion, $usuario){\n $resultado = $conexion->query(\"select * from usuario where usuario='$usuario'\");\n return $resultado;\n}", "function query(\\database $dbase){\n //\n //Get the sql string \n $sql=$this->to_str();\n //\n // Execute the $sql on columns to get the $result\n $dbase->query($sql);\n \n }", "public function query() {\n\n }" ]
[ "0.7358705", "0.7245504", "0.7015006", "0.6912601", "0.6788352", "0.6735739", "0.66542894", "0.66458684", "0.6630022", "0.6625393", "0.66175944", "0.6616625", "0.6613896", "0.6607662", "0.65646505", "0.6562973", "0.6557117", "0.65561765", "0.65211004", "0.65074104", "0.65068835", "0.6498602", "0.64978546", "0.6492851", "0.6443963", "0.64389825", "0.6438225", "0.64358443", "0.64228815", "0.6386976", "0.6386595", "0.6386051", "0.637277", "0.6370041", "0.63673264", "0.6362504", "0.63487715", "0.6320507", "0.631031", "0.62969506", "0.62967324", "0.6290137", "0.62879723", "0.62860286", "0.62860286", "0.62860286", "0.62860286", "0.62860286", "0.62860286", "0.62860286", "0.62860286", "0.62860286", "0.62823063", "0.62725776", "0.62725776", "0.62725776", "0.6267477", "0.62661946", "0.6256996", "0.62552273", "0.6255032", "0.62466955", "0.62405956", "0.6238669", "0.6234489", "0.62324524", "0.623042", "0.6224957", "0.62241644", "0.6218034", "0.6217631", "0.62056243", "0.61975116", "0.61952645", "0.6189721", "0.61890054", "0.6188707", "0.61850256", "0.61838853", "0.61827004", "0.61814183", "0.6179479", "0.6174771", "0.617266", "0.61695606", "0.6169528", "0.6169528", "0.6162936", "0.6162795", "0.6162089", "0.61593604", "0.61570144", "0.61542577", "0.6153287", "0.61464804", "0.6145348", "0.6139465", "0.6135553", "0.61268824", "0.6126784" ]
0.7175829
2
yo thau ma requirement save huna aaucha
public function save(){ // yei bata feri "index.php" ma falne jun chai profile ma jancha $req = new Requirement(); if(isset($_POST['title'])){ $req->setTitle($_POST['title']); }else{ $req->setTitle(""); } if(isset($_POST['date'])){ $req->setDate($_POST['date']); }else{ $req->setDate("01-01-2001"); } if(isset($_POST['details'])){ $req->setDescription($_POST['details']); }else{ $req->setDescription(""); } $req->setStatus(1); $req->setOrgname(""); $this->requirement_repository->insert($req); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save()\n {\n }", "function save()\n {\n }", "public function save()\n\t{\n\n\t}", "function save();", "function save();", "public function save()\r\n {\r\n \r\n }", "public function save() {\n\t\t\t\n\t\t}", "function saveVister()\n {\n \n }", "function save(ezcWorlflow $workflow) {\n\t\t\n\t}", "public function save(){\n }", "private function _saveExt() {\r\n\r\n }", "function Save();", "public function save():void;", "public function save()\r\n {\r\n //\r\n }", "public function save()\n {\n }", "public function saveData()\r\n {\r\n \r\n }", "public function save()\n {\n }", "public function save()\n {\n }", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "function wyz_bus_save_draft() {\n\n}", "public function save() {}", "public function save() {}", "public function save() {}", "public\tfunction\tsave()\n\t\t{\n\t\t}", "protected function save()\n\t{\n\t\t$this->saveItems();\n\t\t//$this->saveAssignments();\n\t\t//$this->saveRules();\n\t}", "public function save() {\n }", "public function save() {\n }", "public function save() {\n }", "function preSave()\n\t{\n\n\t}", "public function testSave()\n {\n $change = Change::fetch('default');\n $change->setDescription('Test submit')\n ->save();\n }", "public function preSave() {}", "protected function hook_afterSave(){}", "public function save()\n {\n //\n }", "function preSave()\n {\n }", "function evt__1__salida()\n\t{\n\t\t$this->dep('dependencias')->limpiar_seleccion();\n\t}", "public function preSave() { }", "public function save()\n {\n // For V2.0\n }", "protected function saveUpdate()\n {\n }", "public function boleta()\n\t{\n\t\t//\n\t}", "function saveNewArticulo(){\n\t\t$r = $this->ar->insertArticulo($this->alcance,$this->documento,$this->nombre,$this->descripcion);\n\t\tif($r=='true'){\n\t\t\t$msg = ARTICULO_AGREGADO;\n\t\t}else{\n\t\t\t$msg = ERROR_ADD_ARTICULO;\n\t\t}\t\n\t\treturn $msg;\n\t}", "private function approve() {\n\n }", "public function testPreSave()\n {\n $this->todo('stub');\n }", "public function savesubmit(){\n\t\t$this->autoRender = false;\n\t\t if($this->request->is('POST')){ \n\t\t\t //\n\t\t \n\t\t\t$this->Session->write('project.aftersave', 'sent');\n//\t\t\t$this->Session->write('brief.type', $this->name);\n\t\t\t$this->Session->write('brief.type', $this->params['controller']);\n\t\t\t$this->Session->write('brief.id', $this->Email->id);\n\t\t\t \n\t\t\t \n\t\t\t//echo 'aftersave';\t\n\t\t\t //$this->redirect(array('controller'=>'projects', 'action' => 'view', $this->Session->read('project.id') ));\n\n\t\t }\t\t\n\t}", "public function save_donation();", "function commit() ;", "public function Save()\n {\n }", "public function save()\n {\n parent::save();\n\n // make sure that we are auditing this phase's survey\n $this->ensure_auditing();\n }", "function beforeSaveLoop()\r\n {\r\n }", "function SaveAfspraak()\n{\n //zoniet, return false\n\n //afspraak opslaan en return true\n\n}", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "public function afterSaveCommit(): void\n {\n }", "public final function save()\n {\n }", "function SetProblem( $problemId)\n{\n global $serverURL;\n global $task_type;\n $q=\"select * from problems where id=\".$problemId;\n $r=mysql_query($q);\n $l=mysql_fetch_array($r);\n $dirname=\"prob/\".$l['title'];\n $task_type = $l['problemType'];\n if(!file_exists($dirname) || problemaActualizata($problemId))\n {\n //downloadez archiva cu teste\n if ( file_exists($dirname) ){\n\t\t\techo \"\\nSterge testele existente\\n\";\n\t\t\t$cmd=\"rm -r {$dirname} 2> /dev/null\";\n\t\t\texec($cmd);\n\t\t }\n echo \"Descarc arhiva cu teste \\n\";\n $qv=\"select verificator from problems where id=\".$problemId;\n $rv= @ mysql_query($qv);\n \t\t $verificator = @ mysql_result ($rv, 0 , \"verificator\");\n \t\t echo \"Gata verificator\\n\";\n \t\t $fv=fopen(\"prob/verif.zip\",\"wb\");\n \t\t fwrite($fv,$verificator);\n \t\t fclose($fv);\n \t\t echo \"Scris fisier\\n\"; \n //$cmd=\"wget \".$serverURL.\"dwn-eval-cli.php?id=\".$problemId.\" -O prob/verif.zip 2> /dev/null\";\n //exec($cmd);\n //dezarhivez\n $cmd=\"unzip prob/verif.zip -d ./prob\";\n exec($cmd);\n echo \"Dezarhivat\\n\";\n exec(\"chmod -R 755 prob/\".$l['title'].\"/\");\n //sterg arhiva\n unlink(\"prob/verif.zip\");\n //setez problema ca descarcata\n if (! mysql_query(\"update problems set actualizat=1 where id = {$problemId}\"))\n\t\t\tdie(\"Nu pot seta problema ca descarcata - functia SetProblem\");\n }\n else\n {\n //directorul exista\n //echo \"Arhiva de teste exista\\n\";\n } \n return $l['title'];\n}", "function saveEditArticulo(){\n\t\t$r = $this->ar->updateArticulo($this->id,$this->nombre,$this->descripcion);\n\t\tif($r=='true'){\n\t\t\t$msg = ARTICULO_EDITADO;\n\t\t}else{\n\t\t\t$msg = ERROR_EDIT_ARTICULO;\n\t\t}\n\t\treturn $msg;\t\n\t}", "public final function save() {\n }", "public function save_toolset()\n\t{\n\t\tee()->rte_lib->save_toolset();\n\t}", "private function distribuidores_after_save($id='') {\n\t\t$tabla = \"distribuidores_usuarios\"; $key=\"id_distribuidor\"; \n\t\t$dataupdte[\"estado_epedidos\"] = \"0\";\n\t\t$this->Global_model->update_data($tabla,$dataupdte,array($key=>$id));\t\n\t\t\n\t}", "private function _saveQcontrol() {\r\n\r\n }", "public function save() {\n\n }", "function hookInstall() {\n// $db = get_db()cou;\n//die(\"got to the installer method...\");\n $this->_saveVocabularies();\n }", "function save()\n {\n parent::save();\n }", "function save()\n {\n parent::save();\n }", "function save()\n {\n parent::save();\n }", "public function modifyOrder_finish(){\r\n // $cookie_id = $cookies -> read();\r\n // $Form = M('userinfo');\r\n // $condition_in['stuid'] = $cookie_id;\r\n // $data = $Form->where($condition_in)->find();\r\n // if (! $data['manager']) $this->redirect('/');\r\n $key = $_REQUEST['id'];\r\n $condition['id'] = $key;\r\n $form = M(\"orderinfo\");\r\n $data = $form->where($condition)->find();\r\n if ($_REQUEST['finish']) $data['finish'] = 1;\r\n $data['id'] = $key;\r\n $form->save($data);\r\n var_dump($data);\r\n //$this->display();\r\n }", "public function afterSave(){\n\t}", "function saveApproveProofs($args, &$request) {\n\t\t// TODO: implement and execute the ApproveProofsForm\n\t\t$json = new JSONMessage(true);\n\t\treturn $json->getString();\n\t}", "public function testUpdateSurvey0()\n {\n }", "public function testUpdateSurvey0()\n {\n }", "public function save()\n {\n return;\n }", "public static function metodo_estatico () {\n }", "function open_save($val){\n\t\t\n\tglobal $in;\n\t\tif ($this->xml_form->form['CONT_FORM']==\"yes\" && !preg_match(\"/_PROGR_/\",$this->attributes['VAR'])) return true;\n\t\tif ($this->attributes['CONDITION']!='') {\n\t\t\t$var_cond=$this->attributes['CONDITION'];\n\t\t\t$val_cond=$this->attributes['CONDITION_VALUE'];\n\t\t\tif (preg_match(\"/,/\", $val_cond)){\n\t\t\t\t$vals=explode(\",\",$val_cond);\n\t\t\t\tforeach ($vals as $key => $value)\tif ($in[$var_cond]==$value) $this->condition_passed=true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ($in[$var_cond]==$val_cond) $this->condition_passed=true;\n\t\t\t\telse $this->condition_passed=false;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$this->condition_passed=true;\n\t\t\n\t\t\t$this->salva_js=\"\n\t\t\t\tvar checked_{$this->id}=false;\n\t\t\t\t\";\n\t\t\tforeach($this->values as $key => $val){\n\t\t\t\t$this->salva_js.=\"\n\t\t\t\t\tif (document.forms[0].{$key}.checked) checked_{$this->id}=true;\n\t\t\t\t\";\n\t\t\t}\n\t\t\tif ($this->attributes['ALERT']!='') {\n\t\t\t\t$msg=$this->attributes['ALERT'];\n\t\t\t}\n\t\t\telse $msg=\"Selezionare almeno un checkbox\";\n\t\t\t$this->salva_js.=\"\n\t\t\tif (!checked_{$this->id}){\t\t\t\t\n\t\t\t\talert('$msg');\n\t\t\t\tdocument.forms[0].{$this->id}.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\";\n\t\t}\n\t\tif (($in['salva']!='' || $in['INVIOCO']=='0')){\n\t\t\t$checked=false;\n\t\t\tforeach($this->values as $key => $val){\n\t\t\t\tif ($in[$key]!='0') $checked=true;\n\t\t\t}\n\t\t\t\n\t\t\tglobal $insert_errors;\n\t\t\tif ($this->condition_passed && !$checked) {\n\t\t\t\t$this->validata=false;\n\t\t\t\t$insert_errors[$this->attributes['VAR']]='Selezionare almeno un checkbox';\n\t\t\t}\n\t\t\tif (!$this->condition_passed && $checked) {\n\t\t\t\t$this->validata=false;\n\t\t\t\t$insert_errors[$this->attributes['VAR']]='Lasciare libero il seguente campo';\n\t\t\t}\n\t\t}\n\t}", "function after_save() {}", "public function save()\n {\n return FALSE;\n }", "public function makeCheck_Out()\n {}", "function saveForm(){\t\n\t\t$this->saveFormBase();\n\t\t$this->saveFormGeoCoverage();\n\t\t$this->saveVaFormResolution();\n\t\tif ($this->dataset->nbModForm >0) $this->saveModForm();\n\t\tif ($this->dataset->nbSatForm >0) $this->saveSatForm();\n\t\tif ($this->dataset->nbInstruForm >0) $this->saveInstruForm();\n\t\t$this->saveFormGrid();\n\t\t//Parameter\n\t\t$this->saveFormVariables($this->dataset->nbVars);\n\t\t//REQ DATA_FORMAT\n\t\t$this->dataset->required_data_formats = array();\n\t\t$this->dataset->required_data_formats[0] = new data_format;\n\t\t$this->dataset->required_data_formats[0]->data_format_id = $this->exportValue('required_data_format');\n\t}", "function save_chargo_manifest(){\n\t $kode=$this->model_app->generateNo(\"tr_cargo_release\",\"CargoReleaseCode\",\"CR-\");\n\t \n\tif(isset($_POST['checklish']))\n\t{\t\n \t$nosmu=$_POST['smu2'];\t\n\t$flight=$_POST['checklish'];\t\n\t//$search=$this->model_app->getdata('outgoing_master',\"WHERE FlightNumbDate1='$flight'\");\n\tforeach($flight as $key => $val)\n\t{\n\t\t$flightno=$_POST['checklish'][$key];\n\t\t$search=$this->model_app->getdata('outgoing_master',\"WHERE FlightNumbDate1='$flightno' AND StatusProses in (2,3)\");\n\t\tforeach($search as $row){\n\t $smu =$row->NoSMU;\n\t\t$cwt =$row->CWT;\n\t\t$pcs =$row->PCS;\n\t\t$flight2 =$flightno;\n\t\t\n\t\t$cwt_total+=$cwt;\n\t\t$pcs_total+=$pcs;\n\t$cargo_items=array(\n\t\t'CargoReleaseCode' =>$kode,\n\t\t'FlightNumber' =>$flight2,\n\t\t'smu' =>$smu,\n\t\t'CWT' =>$cwt,\n\t\t'PCS' =>$pcs,\n\t\t'CreatedBy' =>$this->session->userdata('idusr'),\n\t\t'CreatedDate'=>date('Y-m-d H:i:s'),\n\t\t);\t\n\t\t$updatesmu=array(\n\t\t'StatusProses' =>'4',\n\t\t);\n\t\t\t\t\n\t\t$save=$this->model_app->insert('cargo_items',$cargo_items);\t\n\t\t$this->model_app->update('outgoing_master','NoSMU',$smu,$updatesmu);\t\t\n\t\t\t\n\t\t}\n\t\t\t\n\t}\n\t \t//---insert header manifest\n\t\t$insert_cargo=array(\n\t\t'CargoReleaseCode' =>$kode,\n\t\t'AirLine' =>$this->input->post('airlines'),\n\t\t'CargoDetails' =>$this->input->post('details'),\n\t\t'ReleaseDate' =>$this->input->post('tgl3'),\n\t\t'Created' =>$this->input->post('created'),\n\t\t'CarriedBy' =>$this->input->post('carry'),\n\t\t'ReceivedBy' =>$this->input->post('receive'),\n\t\t'CreatedBy' =>$this->session->userdata('idusr'),\n\t\t'CreatedDate'=>date('Y-m-d H:i:s'),\n\t\t);\t\t\n\t\t$save=$this->model_app->insert('tr_cargo_release',$insert_cargo);\n\t\tredirect('cargo_release');\n }\n }", "public function save_donation() {\r\n\t\t/**\r\n\t\t * Do something here, or save it elsewhere?\r\n\t\t */\r\n\t}", "protected function _postSave()\r\n\t{\r\n\t}", "function saveCompletionStatus() \n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$complete = 0;\n\t\tif ($this->isComplete()) \n\t\t{\n\t\t\t$complete = 1;\n\t\t}\n if ($this->getSurveyId() > 0) \n\t\t{\n\t\t\t$affectedRows = $ilDB->manipulateF(\"UPDATE svy_svy SET complete = %s, tstamp = %s WHERE survey_id = %s\",\n\t\t\t\tarray('text','integer','integer'),\n\t\t\t\tarray($this->isComplete(), time(), $this->getSurveyId())\n\t\t\t);\n\t\t}\n\t}" ]
[ "0.6064194", "0.6064194", "0.6034287", "0.6028627", "0.6028627", "0.6011346", "0.6007474", "0.5951088", "0.59067535", "0.5847437", "0.5845925", "0.5844639", "0.5834071", "0.58112854", "0.5803388", "0.5775602", "0.5765763", "0.5765763", "0.5764737", "0.5764737", "0.5764737", "0.5764737", "0.5764737", "0.5764737", "0.5764737", "0.5764737", "0.5764737", "0.5764737", "0.5764737", "0.5764737", "0.5764737", "0.5764737", "0.5764737", "0.5764737", "0.5764737", "0.5764737", "0.57542825", "0.57500523", "0.57500523", "0.5748157", "0.5713159", "0.5676554", "0.5646681", "0.5635991", "0.5635991", "0.56301886", "0.5627299", "0.56081086", "0.5605767", "0.56026703", "0.5599709", "0.5582237", "0.55746335", "0.55623126", "0.55485976", "0.5531586", "0.5523684", "0.55148286", "0.5508928", "0.5507465", "0.54956913", "0.54903334", "0.5483661", "0.54683787", "0.5468113", "0.54670763", "0.54565144", "0.54565144", "0.54565144", "0.54565144", "0.54565144", "0.54519916", "0.54513705", "0.54468286", "0.5440399", "0.5440293", "0.5439687", "0.54381907", "0.5432747", "0.5429792", "0.54164827", "0.54126847", "0.54126847", "0.54126847", "0.5411934", "0.5411278", "0.54069054", "0.5403266", "0.5403266", "0.5398036", "0.53889185", "0.53877836", "0.5387169", "0.5384972", "0.5383141", "0.5379644", "0.53766143", "0.53667116", "0.5366611", "0.53527486" ]
0.7193968
0
Changes all database tables charset to the specified charset recommended to use utf8,utf8_general_ci for testing purposes you might use latin1, latin1_general_ci
function db_change_charset_for_tables($charset = 'utf8', $collate='utf8_general_ci', $data = true){ if(!trim($charset) || !trim($collate)){ echo 'No charset selected'; return; } $CI = &get_instance(); $query_show_tables = 'SELECT table_name FROM information_schema.tables WHERE table_schema = DATABASE()';//'SHOW TABLES'; $query_col_collation = 'SHOW FULL COLUMNS FROM %s'; $tables = $CI->db->query($query_show_tables)->result(); if(!empty($tables)){ $CI->db->query(sprintf('SET foreign_key_checks = 0')); foreach($tables as $table){ $table = (array) $table; if( isset($table['table_name']) && trim($table['table_name'])){ $query_collation_generated = sprintf($query_col_collation, $table['table_name']); $result_before = $CI->db->query($query_collation_generated)->result(); db_show_table_column_collations($result_before, $table['table_name']); $CI->db->query(sprintf('ALTER TABLE %s CONVERT TO CHARACTER SET '.$charset.' COLLATE '.$collate, $table['table_name'])); $result_after = $CI->db->query($query_collation_generated)->result(); db_show_table_column_collations($result_after, $table['table_name'], true); } } $CI->db->query(sprintf('SET foreign_key_checks = 1')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function charset()\n\t{\n\t\tif (isset($this->_conf['charset']) AND $this->_conf['charset'] != '')\n\t\t{\n\t\t\tif (isset($this->_conf['collation']) AND $this->_conf['collation'] != '')\n\t\t\t{\n\t\t\t\t$this->_con->exec('SET NAMES '.$this->_conf['charset'].' COLLATE '.$this->_conf['collation']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->_con->exec('SET NAMES '.$this->_conf['charset']);\n\t\t\t}\n\t\t}\n\t}", "function myPear_set_collation(){\n $needed = False;\n if (!$needed) return;\n $c_set = 'utf8';\n $d_col = 'utf8_unicode_ci';\n myPear_db()->qquery(\"ALTER SCHEMA \".myPear_db()->Database.\" DEFAULT CHARACTER SET $c_set DEFAULT COLLATE $d_col\",True);\n foreach(myPear_db()->getTables() as $table){\n b_debug::xxx($table.\"------------------------------------------------\");\n myPear_db()->qquery(\"ALTER TABLE $table CONVERT TO CHARACTER SET $c_set COLLATE $d_col\",True);\n $q = myPear_db()->qquery(\"SHOW COLUMNS FROM $table\",cnf_dev);\n while($r = $this->next_record($q)){\n if (preg_match('/(char|text)/i',strToLower($r['Type']))){\n\tb_debug::xxx($r['Field']);\n\tmyPear_db()->qquery(sprintf(\"ALTER TABLE `%s` CHANGE `%s` `%s` %s CHARACTER SET $c_set COLLATE $d_col %s NULL\",\n\t\t\t\t $r['Field'],$r['Field'],$r['Type'],(strToLower($r['Null']) == 'yes' ? '' : 'NOT')),\n\t\t\t True);\n\t\n }\n }\n }\n}", "function database_set_charset($charset)\n {\n\t if( function_exists('mysql_set_charset') === TRUE )\n {\n\t return mysql_set_charset($charset, $this->database_connection);\n\t }\n else\n {\n\t return $this->database_query('SET NAMES \"'.$charset.'\"');\n\t }\n\t}", "public static function setCharsetEncoding () {\r\n\t\tif ( self::$instance == null ) {\r\n\t\t\tself::getInstance ();\r\n\t\t}\r\n\t\tself::$instance->exec (\r\n\t\t\t\"SET NAMES 'utf8';\r\n\t\t\tSET character_set_connection=utf8;\r\n\t\t\tSET character_set_client=utf8;\r\n\t\t\tSET character_set_results=utf8\" );\r\n\t}", "function sql_set_charset($charset, $dbh=NULL) {\n global $MYSQL_HANDLER,$SQL_DBH;\n if (strpos($MYSQL_HANDLER[1], 'mysql') === 0) {\n switch(strtolower($charset)){\n case 'utf-8':\n case 'utf8':\n $charset = 'utf8';\n break;\n case 'utf8mb4':\n $charset = 'utf8mb4';\n break;\n case 'euc-jp':\n case 'ujis':\n $charset = 'ujis';\n break;\n case 'gb2312':\n $charset = 'gb2312';\n break;\n /*\n case 'shift_jis':\n case 'sjis':\n $charset = 'sjis';\n break;\n */\n default:\n $charset = 'latin1';\n break;\n }\n\n $db = ($dbh ? $dbh : sql_get_db());\n $mySqlVer = implode('.', array_map('intval', explode('.', sql_get_server_info($db))));\n if (version_compare($mySqlVer, '4.1.0', '>='))\n {\n $res = $db->exec(\"SET CHARACTER SET \" . $charset);\n }\n }\n return $res;\n }", "private function set_charset() {\n\t\t//regresa bool\n\t\t$this->conn->set_charset(\"utf8\");\n\t}", "public function set_charset($charset)\n\t{\n\t\t// Make sure the database is connected\n\t\t$this->_connection OR $this->connect();\n\n\t\tif (self::$_set_names === TRUE)\n\t\t{\n\t\t\t// PHP is compiled against MySQL 4.x\n\t\t\t$status = (bool) $this->_connection->query('SET NAMES '.$this->quote($charset));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// PHP is compiled against MySQL 5.x\n\t\t\t$status = $this->_connection->set_charset($charset);\n\t\t}\n\n\t\tif ($status === FALSE)\n\t\t{\n\t\t\tthrow new DatabaseException($this->_connection->error, $this->_connection->errno);\n\t\t}\n\t}", "public function alterCharset($table, $charset = 'utf8', $collation = 'utf8_unicode_ci', $execute = true) {\r\n\t\t$sql = 'ALTER TABLE ' . $table . ' MODIFY' . \"\\n\";\r\n\t\t$sql .= 'CHARACTER SET ' . $charset;\r\n\t\t$sql .= 'COLLATE ' . $collation;\r\n\t\tif ($execute) {\r\n\t\t\t$this->exec($sql);\r\n\t\t}\r\n\t\treturn $sql;\r\n\t}", "function convert_utf8($echo_results = false)\n\t{\n\t\tglobal $db, $dbname, $table_prefix;\n\n\t\t$db->sql_return_on_error(true);\n\n\t\t$sql = \"ALTER DATABASE {$db->sql_escape($dbname)}\n\t\t\tCHARACTER SET utf8\n\t\t\tDEFAULT CHARACTER SET utf8\n\t\t\tCOLLATE utf8_bin\n\t\t\tDEFAULT COLLATE utf8_bin\";\n\t\t$db->sql_query($sql);\n\n\t\t$sql = \"SHOW TABLES\";\n\t\t$result = $db->sql_query($sql);\n\t\twhile ($row = $db->sql_fetchrow($result))\n\t\t{\n\t\t\t// This assignment doesn't work...\n\t\t\t//$table = $row[0];\n\n\t\t\t$current_item = each($row);\n\t\t\t$table = $current_item['value'];\n\t\t\treset($row);\n\n\t\t\t$sql = \"ALTER TABLE {$db->sql_escape($table)}\n\t\t\t\tDEFAULT CHARACTER SET utf8\n\t\t\t\tCOLLATE utf8_bin\";\n\t\t\t$db->sql_query($sql);\n\n\t\t\tif (!empty($echo_results))\n\t\t\t{\n\t\t\t\techo(\"&bull;&nbsp;Table&nbsp;<b style=\\\"color: #dd2222;\\\">$table</b> converted to UTF-8<br />\\n\");\n\t\t\t}\n\n\t\t\t$sql = \"SHOW FIELDS FROM {$db->sql_escape($table)}\";\n\t\t\t$result_fields = $db->sql_query($sql);\n\n\t\t\twhile ($row_fields = $db->sql_fetchrow($result_fields))\n\t\t\t{\n\t\t\t\t// These assignments don't work...\n\t\t\t\t/*\n\t\t\t\t$field_name = $row_fields[0];\n\t\t\t\t$field_type = $row_fields[1];\n\t\t\t\t$field_null = $row_fields[2];\n\t\t\t\t$field_key = $row_fields[3];\n\t\t\t\t$field_default = $row_fields[4];\n\t\t\t\t$field_extra = $row_fields[5];\n\t\t\t\t*/\n\n\t\t\t\t$field_name = $row_fields['Field'];\n\t\t\t\t$field_type = $row_fields['Type'];\n\t\t\t\t$field_null = $row_fields['Null'];\n\t\t\t\t$field_key = $row_fields['Key'];\n\t\t\t\t$field_default = $row_fields['Default'];\n\t\t\t\t$field_extra = $row_fields['Extra'];\n\n\t\t\t\t// Let's remove BLOB and BINARY for now...\n\t\t\t\t//if ((strpos(strtolower($field_type), 'char') !== false) || (strpos(strtolower($field_type), 'text') !== false) || (strpos(strtolower($field_type), 'blob') !== false) || (strpos(strtolower($field_type), 'binary') !== false))\n\t\t\t\tif ((strpos(strtolower($field_type), 'char') !== false) || (strpos(strtolower($field_type), 'text') !== false))\n\t\t\t\t{\n\t\t\t\t\t//$sql_fields = \"ALTER TABLE {$db->sql_escape($table)} CHANGE \" . $db->sql_escape($field_name) . \" \" . $db->sql_escape($field_name) . \" \" . $db->sql_escape($field_type) . \" CHARACTER SET utf8 COLLATE utf8_bin\";\n\n\t\t\t\t\t$sql_fields = \"ALTER TABLE {$db->sql_escape($table)} CHANGE \" . $db->sql_escape($field_name) . \" \" . $db->sql_escape($field_name) . \" \" . $db->sql_escape($field_type) . \" CHARACTER SET utf8 COLLATE utf8_bin \" . (($field_null != 'YES') ? \"NOT \" : \"\") . \"NULL DEFAULT \" . (($field_default != 'None') ? ((!empty($field_default) || !is_null($field_default)) ? (is_string($field_default) ? (\"'\" . $db->sql_escape($field_default) . \"'\") : $field_default) : (($field_null != 'YES') ? \"''\" : \"NULL\")) : \"''\");\n\t\t\t\t\t$db->sql_query($sql_fields);\n\n\t\t\t\t\tif (!empty($echo_results))\n\t\t\t\t\t{\n\t\t\t\t\t\techo(\"\\t&nbsp;&nbsp;&raquo;&nbsp;Field&nbsp;<b style=\\\"color: #4488aa;\\\">$field_name</b> (in table <b style=\\\"color: #009900;\\\">$table</b>) converted to UTF-8<br />\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($echo_results))\n\t\t\t{\n\t\t\t\techo(\"<br />\\n\");\n\t\t\t\tflush();\n\t\t\t}\n\t\t}\n\n\t\t$db->sql_return_on_error(false);\n\t\treturn true;\n\t}", "public function set_charset($dbh, $charset = \\null, $collate = \\null)\n {\n }", "function pdo_set_charset($charset, $link=NULL) {\r\n $charset = pdo_handle($link)->quote($charset);\r\n return (bool)pdo_query(\"SET NAMES $charset\", pdo_handle($link));\r\n }", "final public function setUTF() {\n mysqli_query($this->resourceId,\"SET NAMES 'utf8'\");\n }", "function mysql_set_charset(string $charset, $link_identifier = null): void\n{\n error_clear_last();\n $result = \\mysql_set_charset($charset, $link_identifier);\n if ($result === false) {\n throw MysqlException::createFromPhpError();\n }\n}", "public function setDatabaseCharsetAndCollation($options = array()) {\n $sql = 'ALTER DATABASE `'. $this->_dbName .'`\n CHARACTER SET '. db::CHARSET .'\n COLLATE '. db::COLLATION;\n\n return $this->execute($sql, $options);\n }", "public function updateTables()\n {\n $prefix = $this->getPrefix();\n $charset = $this->wpdb->get_charset_collate();\n\n foreach ($this->config['tables'] as $table => $createStatement) {\n $sql = str_replace(\n ['{prefix}', '{charset}'],\n [$prefix, $charset],\n $createStatement\n );\n dbDelta($sql);\n }\n }", "public function setCharset(string $charset = 'utf-8');", "abstract protected function set_charset($charset);", "abstract protected function setCharset($charset, $collation);", "function maybe_convert_table_to_utf8mb4($table)\n {\n }", "public function setCharset($charset);", "public function convertTableCharsetAndCollation($table, $options = array()) {\n // mysql - postgresql\n $sql = 'ALTER TABLE `'. $table .'`\n CONVERT TO CHARACTER SET '. db::CHARSET .'\n COLLATE '. db::COLLATION;\n\n return $this->execute($sql, $options);\n }", "function set_encoding($encoding=\"\")\r\n {\r\n if(\"\" == $encoding)\r\n $encoding = $this->encoding;\r\n $sql = \"SET SESSION character_set_database = \" . $encoding; //'character_set_database' MySQL server variable is [also] to parse file with rigth encoding\r\n $res = @mysql_query($sql);\r\n return mysql_error();\r\n }", "protected function setupDatabaseConnection()\n {\n $db = DBConnection::getInstance($this->config);\n\n $enc = property_exists($this->config, 'dbEncoding') ? $this->config->dbEncoding : 'utf8';\n $tz = property_exists($this->config, 'dbTimezone') ? $this->config->dbTimezone : '00:00';\n\n $db->query(\n sprintf('SET NAMES \"%s\"', $enc)\n );\n\n $db->query(\n sprintf('SET time_zone = \"%s\"', $tz)\n );\n }", "private function setCharSet()\n {\n // preparing csConvObj\n if (!is_object($GLOBALS['TSFE']->csConvObj)) {\n if (is_object($GLOBALS['LANG'])) {\n $GLOBALS['TSFE']->csConvObj = $GLOBALS['LANG']->csConvObj;\n\n } else {\n $GLOBALS['TSFE']->csConvObj = Tx_Smarty_Service_Compatibility::makeInstance('t3lib_cs');\n }\n }\n\n // preparing renderCharset\n if (!is_object($GLOBALS['TSFE']->renderCharset)) {\n if (is_object($GLOBALS['LANG'])) {\n $GLOBALS['TSFE']->renderCharset = $GLOBALS['LANG']->charSet;\n\n } else {\n $GLOBALS['TSFE']->renderCharset = $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'];\n }\n }\n }", "public function __construct(){\n // Conectar no banco de dados\n mysql_connect(DBHOST, DBUSER, DBPASS) or die ('Erro ao conectar no banco: '. mysql_error());\n // Selecionar o banco \n mysql_select_db(DBNAME);\n \n $this->execQuery('SET character_set_connection=utf8');\n $this->execQuery('SET character_set_client=utf8');\n $this->execQuery('SET character_set_results=utf8');\n }", "public static function determine_charset() {\n global $wpdb;\n $charset = '';\n\n if (!empty($wpdb->charset)) {\n $charset = \"DEFAULT CHARACTER SET {$wpdb->charset}\";\n\n if (!empty($wpdb->collate)) {\n $charset .= \" COLLATE {$wpdb->collate}\";\n }\n }\n return $charset;\n }", "function get_sql_encodings()\n{\n global $config;\n unset($config['mysql_possible_character_sets']);\n if (!isset($config['dbconnection'])) {\n MSD_mysql_connect();\n }\n $erg = false;\n $config['mysql_standard_character_set'] = '';\n $config['mysql_possible_character_sets'] = array();\n\n if (!defined('MSD_MYSQL_VERSION')) {\n GetMySQLVersion();\n }\n $v = explode('.', MSD_MYSQL_VERSION);\n $config['mysql_can_change_encoding'] = false;\n if (($v[0] <= 4 && $v[1] < 1) || $v[0] <= 3) {\n // MySQL < 4.1\n $config['mysql_can_change_encoding'] = false;\n $sqlt = 'SHOW VARIABLES LIKE \\'character_set%\\'';\n $res = MSD_query($sqlt) or die(SQLError(\n $sqlt,\n ((is_object($GLOBALS[\"___mysqli_ston\"]))\n ? mysqli_error($GLOBALS[\"___mysqli_ston\"])\n : (($___mysqli_res\n = mysqli_connect_error()) ? $___mysqli_res : false))\n ));\n if ($res) {\n WHILE ($row = mysqli_fetch_row($res)) {\n if ($row[0] == 'character_set') {\n $config['mysql_standard_character_set'] = $row[1];\n if ($v[0] == 3) {\n $config['mysql_possible_character_sets'][0] = $row[1];\n }\n }\n\n if ($row[0] == 'character_sets' && $v[0] > 3) {\n $config['mysql_possible_character_sets'] = explode(' ', $row[1]);\n sort($config['mysql_possible_character_sets']);\n }\n }\n }\n } else {\n // MySQL-Version >= 4.1\n $config['mysql_can_change_encoding'] = true;\n $sqlt = 'SHOW CHARACTER SET';\n $res = MSD_query($sqlt) or die(SQLError(\n $sqlt,\n ((is_object($GLOBALS[\"___mysqli_ston\"]))\n ? mysqli_error($GLOBALS[\"___mysqli_ston\"])\n : (($___mysqli_res\n = mysqli_connect_error()) ? $___mysqli_res : false))\n ));\n\n if ($res) {\n WHILE ($row = mysqli_fetch_row($res)) {\n $config['mysql_possible_character_sets'][] = $row[0] . ' - ' . $row[1];\n }\n sort($config['mysql_possible_character_sets']);\n }\n\n $sqlt = 'SHOW VARIABLES LIKE \\'character_set_connection\\'';\n $res = MSD_query($sqlt) or die(SQLError(\n $sqlt,\n ((is_object($GLOBALS[\"___mysqli_ston\"]))\n ? mysqli_error($GLOBALS[\"___mysqli_ston\"])\n : (($___mysqli_res\n = mysqli_connect_error()) ? $___mysqli_res : false))\n ));\n\n if ($res) {\n WHILE ($row = mysqli_fetch_row($res)) {\n $config['mysql_standard_character_set'] = $row[1];\n }\n }\n }\n}", "public function set_charset($charset){\n if (in_array($charset,$this->_supported_charsets))\n $this->_charset=$charset;\n }", "public function setCharset($charset) {\n\t\tif($charset == self::CHARSET_ISO){\n\t\t\t$this->charset = self::CHARSET_ISO;\n\t\t} else {\n\t\t\t$this->charset = self::CHARSET_UTF;\n\t\t}\n\t}", "abstract protected function encodingTables();", "private function changeTableCollation($tableName, $newCollation, $changeColumns = true)\n\t{\n\t\t$db = $this->container->db;\n\t\t$collationParts = explode('_', $newCollation);\n\t\t$charset = $collationParts[0];\n\n\t\t// Change the collation of the table itself.\n\t\t$this->query(sprintf(\n\t\t\t\"ALTER TABLE %s CONVERT TO CHARACTER SET %s COLLATE %s\",\n\t\t\t$db->qn($tableName),\n\t\t\t$charset,\n\t\t\t$newCollation\n\t\t));\n\n\t\t// Are we told not to bother with text columns?\n\t\tif (!$changeColumns)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Convert each text column\n\t\ttry\n\t\t{\n\t\t\t$columns = $db->getTableColumns($tableName, false);\n\t\t}\n\t\tcatch (RuntimeException $e)\n\t\t{\n\t\t\t$columns = [];\n\t\t}\n\n\t\t// The table is broken or MySQL cannot report any columns for it. Early return.\n\t\tif (!is_array($columns) || empty($columns))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$modifyColumns = [];\n\n\t\tforeach ($columns as $col)\n\t\t{\n\t\t\t// Make sure we are redefining only columns which do support a collation\n\t\t\tif (empty($col->Collation))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$modifyColumns[] = sprintf(\"MODIFY COLUMN %s %s %s %s COLLATE %s\",\n\t\t\t\t$db->qn($col->Field),\n\t\t\t\t$col->Type,\n\t\t\t\t(strtoupper($col->Null) == 'YES') ? 'NULL' : 'NOT NULL',\n\t\t\t\tis_null($col->Default) ? '' : sprintf('DEFAULT %s', $db->q($col->Default)),\n\t\t\t\t$newCollation\n\t\t\t);\n\t\t}\n\n\t\t// No text columns to modify? Return immediately.\n\t\tif (empty($modifyColumns))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Issue an ALTER TABLE statement which modifies all text columns.\n\t\t$this->query(sprintf(\n\t\t\t'ALTER TABLE %s %s',\n\t\t\t$db->qn($tableName),\n\t\t\timplode(', ', $modifyColumns\n\t\t\t)));\n\t}", "function convert_to_utf8($obj)\n{\n global $config;\n $ret = $obj;\n // wenn die Verbindung zur Datenbank nicht auf utf8 steht, dann muessen die Rückgaben in utf8 gewandelt werden,\n // da die Webseite utf8-kodiert ist\n if (!isset($config['mysql_can_change_encoding'])) {\n get_sql_encodings();\n }\n\n if ($config['mysql_can_change_encoding'] == false && $config['mysql_standard_character_set'] != 'utf8') {\n if (is_array($obj)) {\n foreach ($obj as $key => $val) {\n //echo \"<br> Wandle \" . $val . \" nach \";\n $obj[$key] = utf8_encode($val);\n //echo $obj[$key];\n }\n }\n if (is_string($obj)) {\n $obj = utf8_encode($obj);\n }\n $ret = $obj;\n }\n\n return $ret;\n}", "function upgrade_373_mysql() { # MySQL only\n $table_domain = table_by_key ('domain');\n $table_mailbox = table_by_key('mailbox');\n\n $all_sql = explode(\"\\n\", trim(\"\n ALTER TABLE `$table_domain` CHANGE `description` `description` VARCHAR( 255 ) {UTF-8} NOT NULL\n ALTER TABLE `$table_mailbox` CHANGE `name` `name` VARCHAR( 255 ) {UTF-8} NOT NULL\n \"));\n\n foreach ($all_sql as $sql) {\n $result = db_query_parsed($sql);\n }\n}", "public function set_charset($cs) {\n $this->default_charset = $cs;\n }", "public function setCharset($charset)\n {\n $this->charset = strtoupper($charset);\n }", "public function updateAutoEncoding() {}", "public function fixCharsets() {}", "private function getCharsetCollate() {\n global $wpdb;\n $this->charsetCollate = $wpdb->get_charset_collate();\n }", "public function init_charset()\n {\n }", "function database_encoding(){\r\n\t$default = \"WIN1252\";\r\n\tif(strlen($_SESSION[\"DATABASE_ENCODING\"]) === 0){\r\n\t\t$file_name = dirname($_SERVER[\"SCRIPT_FILENAME\"]).str_repeat(\"/..\", substr_count($_SERVER[\"SCRIPT_NAME\"], \"/\") - 2).\"/support/config.ini\";\r\n\t\tif(file_exists($file_name)){\r\n\t\t\t$ini = parse_ini_file($file_name);\r\n\t\t\tif(strlen($ini[\"dbenco\"]) > 0){\r\n\t\t\t\t$_SESSION[\"DATABASE_ENCODING\"] = $ini[\"dbenco\"];\r\n\t\t\t}else{\r\n\t\t\t\t$_SESSION[\"DATABASE_ENCODING\"] = $default;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$_SESSION[\"DATABASE_ENCODING\"] = $default;\r\n\t\t}\r\n\t}\r\n\treturn strtoupper($_SESSION[\"DATABASE_ENCODING\"]);\r\n}", "private function setCharset(string $charset): void {\n\t\t$this->charset = $charset;\n\t}", "function convert_data_encodings($known_utf8 = false)\n{\n global $VALID_ENCODING, $CONVERTED_ENCODING;\n $VALID_ENCODING = true;\n\n if ($CONVERTED_ENCODING) {\n return; // Already done it\n }\n\n if (preg_match('#^[\\x00-\\x7F]*$#', serialize($_POST) . serialize($_GET) . serialize($_FILES)) != 0) { // Simple case, all is ASCII\n $CONVERTED_ENCODING = true;\n return;\n }\n\n require_code('character_sets');\n _convert_data_encodings($known_utf8);\n}", "public function set_charset($charset)\n {\n $this->charset = $charset;\n }", "public function testCharset()\n {\n $statement = (new CreateTable($this->mockConnection));\n $return = $statement->charset('utf8');\n $array = $statement->toArray();\n\n $this->assertInstanceOf(CreateTable::class, $return);\n $this->assertEquals([\n 'charset' => 'utf8',\n 'collate' => null,\n ], $array);\n }", "public function convertDatabaseToUTF8();", "public function setCharset($charset) {\r\n\t\t$this->charset = $charset;\r\n\t}", "public function convCharset(array $data): array\n {\n $dbCharset = 'utf-8';\n if ($dbCharset != $this->indata['charset']) {\n $converter = GeneralUtility::makeInstance(CharsetConverter::class);\n foreach ($data as $k => $v) {\n $data[$k] = $converter->conv($v, strtolower($this->indata['charset']), $dbCharset);\n }\n }\n return $data;\n }", "public function convertToUTF($prefix = null, $content_only = false)\n {\n\n if ( $prefix === null ) {\n $prefix = PREFIX_DB;\n }\n\n try {\n $this->_db->beginTransaction();\n\n $tables = $this->getTables($prefix);\n\n foreach ($tables as $table) {\n if ( $content_only === false ) {\n //Change whole table charset\n //CONVERT TO instruction will take care of each fields,\n //but converting data stay our problem.\n $query = 'ALTER TABLE ' . $table .\n ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci';\n\n $this->_db->getConnection()->exec($query);\n Analog::log(\n 'Charset successfully changed for table `' . $table .'`',\n Analog::DEBUG\n );\n }\n\n //Data conversion\n if ( $table != $prefix . 'pictures' ) {\n $this->_convertContentToUTF($prefix, $table);\n }\n }\n $this->_db->commit();\n } catch (\\Exception $e) {\n $this->_db->rollBack();\n Analog::log(\n 'An error occured while converting to utf table ' .\n $table . ' (' . $e->getMessage() . ')',\n Analog::ERROR\n );\n }\n }", "public function setCharset($charset)\n\t{\n\t\t$this->charset = $charset;\n\t}", "protected function initDB() {\n $db = $this->settings['db'];\n $this->mysqli = new \\mysqli($db['host'], $db['user'], $db['pass'], $db['dbname']);\n $this->mysqli->query(\"SET NAMES 'utf8'\");\n }", "function conmysql(){\n $con=mysql_connect('localhost','root','');\n if(!$con){\n die('ء¬½ست§°ـ£؛'.mysql_error());\n }\n mysql_set_charset('utf-8');\n mysql_select_db('fnp2p');\n return $con;\n}", "public function setCharset(string $charset): void\n {\n $this->isAlive() || throw new LinkException('Link is dead');\n\n $this->pdo->exec('SET NAMES ' . $this->pdo->quote($charset));\n }", "public function get_charset_collate()\n {\n }", "public function setCharset($charset)\n {\n $this->charset = $charset;\n }", "public function setCharset($charset)\n {\n $this->charset = $charset;\n }", "public function setCharset($charset)\n {\n $this->charset = $charset;\n }", "public function setCharset($charset)\n {\n $this->charset = $charset;\n }", "public function setConnectionCharset($connectionCharset = 'utf8')\n {\n $this->disconnectIfConnected();\n $this->connectionCharset = $connectionCharset;\n }", "protected function _getEncodingTable() {}", "protected function _getEncodingTable() {}", "protected function _getEncodingTable() {}", "function setDocumentCharset($charset)\n {\n $this->documentCharset = $charset;\n }", "public function setUpDatabaseTables()\n {\n $table = new DModuleTable();\n $table -> setName(\"currencies\");\n $table -> addBigIncrements( \"id\" , true );\n $table -> addString( \"base\" , true);\n $table -> addLongText( 'rates' , true);\n $table -> addDateTime( 'added' , true );\n $table -> addBoolean( 'status' , true);\n $table -> addString( \"extra\" , false);\n $table -> addString( \"extra2\" , false);\n $this -> addTable( $table );\n }", "function reset_mbstring_encoding() {\r\n\t\tmbstring_binary_safe_encoding( true );\r\n\t}", "protected function process_field_charsets($data, $table)\n {\n }", "function connect(\n $host = 'localhost',\n $user = 'root',\n $pass = '',\n $dbname = 'traveldb'\n){\n $link = mysql_connect($host, $user, $pass) or die('connection error');\n mysql_select_db($dbname) or die('db open error');\n mysql_query(\"set names 'utf8'\");\n}", "function THR_ConnectToDatabase()\r\n\r\n{\r\n\tmysql_connect(\"localhost\", \"root\", \"\") or die(\"Impossibile connettersi al database: \" . mysql_error());\r\n\tmysql_select_db(\"crm\");\r\n\tmysql_query(\"SET NAMES utf8\");\r\n}", "public function setCharSet($charset = 1252, $country = '')\n {\n $charsetList = array(\n '437' => array ('value' => 0, 'desc' => 'DOS 437 English - US USA'),\n '850' => array('value' => 1, 'desc' => 'DOS 850 Latin 1 British'),\n '851' => array('value' => 12, 'desc' => 'DOS 851 Greek 1'),\n '852' => array('value' => 2, 'desc' => 'DOS 852 Latin 2 (Cyrillic II/Slavic) German'),\n '855' => array('value' => 9, 'desc' => 'DOS 855 Cyrillic'),\n '857' => array('value' => 6, 'desc' => 'DOS 857 Turkish Spanish'),\n '860' => array('value' => 3, 'desc' => 'DOS 860 Portuguese French'),\n '861' => array('value' => 7, 'desc' => 'DOS 861 Icelandic Swedish'),\n '862' => array('value' => 8, 'desc' => 'DOS 862 Hebrew Swiss'),\n '863' => array('value' => 4, 'desc' => 'DOS 863 French Canadian Danish'),\n '865' => array('value' => 5, 'desc' => 'DOS 865 Nordic Italian'),\n '866' => array('value' => 10, 'desc' => 'DOS 866 Cyrillic CIS 1'),\n '869' => array('value' => 13, 'desc' => 'DOS 869 Greek 2'),\n '737' => array('value' => 11, 'desc' => 'DOS 737 Greek'),\n '1250' => array('value' => 'B', 'desc' => 'Windows 1250 Latin 2'),\n '1251' => array('value' => 'C', 'desc' => 'Windows 1251 Cyrillic'),\n '1252' => array('value' => 'A', 'desc' => 'Windows 1252 Latin 1'),\n '1253' => array('value' => 'D', 'desc' => 'Windows 1253 Greek'),\n '1254' => array('value' => 'E', 'desc' => 'Windows 1254 Turkish'),\n '1255' => array('value' => 'F', 'desc' => 'Windows 1255 Hebrew'));\n \n $countryList = array(\n '' => '',\n 'USA' => '001',\n 'Canada' => '002',\n 'Latin Am' => '003',\n 'S Africa' => '027',\n 'Belgium' => '032',\n 'Netherlds' => '031',\n 'France' => '033',\n 'Spain' => '034',\n 'Italy' => '039',\n 'Swizerld' => '041',\n 'UK' => '044',\n 'Denmark' => '045',\n 'Sweden' => '046',\n 'Norway' => '047',\n 'Germany' => '049',\n 'Portugal' => '351',\n 'Finland' => '358');\n $this->charset = $charset;\n if ($charset > 1100) {\n $this->charset = 'CP'.$charset;\n }\n $command = 'I8,'. $charsetList[$charset]['value'];\n if ($country != '') {\n $command .= ','.$countryList[$country].self::CRLF;\n }\n $this->device->buffer .= $command;\n }", "abstract protected function _getEncodingTable();", "public function setCharset($charset)\n {\n $this->headers->setAttribute(\"Content-Type\", \"charset\", $charset);\n if (($this->getEncoding() == \"7bit\") && (strtolower($charset) == \"utf-8\" || strtolower($charset) == \"utf8\")) $this->setEncoding(\"8bit\");\n }", "static function initMySQL()\n {\n require_once \"system/3d-party/DBSimple/Generic.php\" ;\n self::$sql = DbSimple_Generic::connect('mysql://'.self::$config['db']['user'].':'.self::$config['db']['password'].'@'.self::$config['db']['server'].'/'.self::$config['db']['database']);\n self::$sql->setIdentPrefix(self::$config['db']['table_prefix'].\"_\");\n self::$sql->setErrorHandler(array('Core', 'databaseErrorHandler'));\n\n mysql_set_charset(\"utf8\") or trigger_error(\"An error occurred when specifying the encoding for MySQL\", E_USER_WARNING);\n define('TABLE_PREFIX', self::$config['db']['table_prefix'].\"_\");\n }", "function convert_to_latin1($obj)\n{\n global $config;\n $ret = $obj;\n // wenn die Verbindung zur Datenbank nicht auf utf8 steht, dann muessen die Rückgaben in utf8 gewandelt werden,\n // da die Webseite utf8-kodiert ist\n if ($config['mysql_can_change_encoding'] == false && $config['mysql_standard_character_set'] != 'utf8') {\n if (is_array($obj)) {\n foreach ($obj as $key => $val) {\n $obj[$key] = utf8_decode($val);\n }\n }\n if (is_string($obj)) {\n $obj = utf8_decode($obj);\n }\n $ret = $obj;\n }\n\n return $ret;\n}", "public function getTableCharsetAndCollation($table, $options = array()) {\n $sql = 'SELECT CCSA.character_set_name AS charset, CCSA.collation_name AS collation\n FROM information_schema.`TABLES` T, information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA\n WHERE CCSA.collation_name = T.table_collation\n AND T.table_schema = \\''. $this->_dbName .'\\' AND T.table_name = \\''. $table .'\\'';\n\n return $this->selectOne($sql, $options);\n }", "protected function getCharsetConversion() {}", "function setContentCharset($content_charset){\n\t\tsettype($content_charset,\"string\");\n\t\t$this->_ContentCharset_Redefined = true;\n\t\t$this->_ContentCharset = $content_charset;\n\t}", "public function setCharset($charset)\n {\n $charset = strtolower($charset);\n $defaultCollation = self::getCharsetDefaultCollation($charset);\n if (is_null($defaultCollation)) {\n throw new RuntimeException(\"unknown character set '$charset'\");\n }\n if (!is_null($this->charset) &&\n $this->charset !== $charset\n ) {\n throw new RuntimeException(\"Conflicting CHARACTER SET declarations\");\n }\n $this->charset = $charset;\n $this->collation = $defaultCollation;\n }", "function unicode2charset($texte, $charset='AUTO') {\n\tstatic $CHARSET_REVERSE;\n\tstatic $trans = array();\n\t\n\tif ($charset == 'AUTO')\n\t\t$charset = $GLOBALS['meta']['charset'];\n$charset='utf-8';\n\tswitch($charset) {\n\tcase 'utf-8':\n\t\treturn unicode_to_utf_8($texte);\n\t\tbreak;\n\n\tdefault:\n\t\t$charset = load_charset($charset);\n\n\t\tif (!is_array($CHARSET_REVERSE[$charset])) {\n\t\t\t$CHARSET_REVERSE[$charset] = array_flip($GLOBALS['CHARSET'][$charset]);\n\t\t}\n\n\t\tif (!isset($trans[$charset])){\n\t\t\t$trans[$charset]=array();\n\t\t\t$t = &$trans[$charset];\n\t\t\tfor($e=128;$e<255;$e++){\n\t\t\t\t$h = dechex($e);\n\t\t\t\tif ($s = isset($CHARSET_REVERSE[$charset][$e])){\n\t\t\t\t\t$s = $CHARSET_REVERSE[$charset][$e];\n\t\t\t\t\t$t['&#'.$e.';'] = $t['&#0'.$e.';'] = $t['&#00'.$e.';'] = chr($s);\n\t\t\t\t\t$t['&#x'.$h.';'] = $t['&#x0'.$h.';'] = $t['&#x00'.$h.';'] = chr($s);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$t['&#'.$e.';'] = $t['&#0'.$e.';'] = $t['&#00'.$e.';'] = chr($e);\n\t\t\t\t\t$t['&#x'.$h.';'] = $t['&#x0'.$h.';'] = $t['&#x00'.$h.';'] = chr($e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$texte = strtr($texte, $trans[$charset]);\n\t\treturn $texte;\n\t}\n}", "protected function setUtf8Context()\n {\n $locale = 'en_US.UTF-8';\n setlocale(LC_ALL, $locale);\n putenv('LC_ALL=' . $locale);\n }", "public function getDatabaseCharsetAndCollation($options = array()) {\n $sql = 'SELECT default_character_set_name AS charset, default_collation_name AS collation\n FROM information_schema.SCHEMATA\n WHERE schema_name = \\''. $this->_dbName .'\\'';\n\n return $this->selectOne($sql, $options);\n }", "function backup_tables($tables,$db,$name,$file_name)\n{\n\tif($tables == '*')\n\t{\n\t\t$tables = array();\n\t\t$result = mysql_query('SHOW TABLES');\n\t\twhile($row = mysql_fetch_row($result))\n\t\t{\n\t\t\t$tables[] = $row[0];\n\t\t}\n\t}\n\telse\n\t{\n\t\t$tables = is_array($tables) ? $tables : explode(',',$tables);\n\t}\n\n $return = '';\n\n\t//cycle through\n\tforeach($tables as $table)\n\t{\n $q = 'SELECT * FROM '.$table;\n // echo $db;\n $result = mysqli_query($db, $q);\n\t\t// $result = mysql_query('SELECT * FROM '.$table);\n\t\t$num_fields = mysqli_num_fields($result);\n\n\t\t$return.= 'DROP TABLE '.$table.';';\n\t\t$row2 = mysqli_fetch_row(mysqli_query($db, 'SHOW CREATE TABLE '.$table));\n\t\t$return.= \"\\n\\n\".$row2[1].\";\\n\\n\";\n\n $colname_query = \"SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = N'$table'\";\n $col = mysqli_query($db, $colname_query);\n\n $col_name = [];\n\n while($row = mysqli_fetch_assoc($col)){\n \t // echo $row['COLUMN_NAME'];\n array_push($col_name, $row['COLUMN_NAME']);\n \t // echo '<br>';\n \t}\n\n $cnt = 0;\n\n\t\tfor ($i = 0; $i < $num_fields; $i++)\n\t\t{\n\t\t\twhile($row = mysqli_fetch_assoc($result))\n\t\t\t{\n\t\t\t\t$return.= 'INSERT INTO '.$table.' VALUES(';\n\t\t\t\tfor($j=0; $j < count($col_name); $j++)\n\t\t\t\t{\n $k = $col_name[$j];\n\t\t\t\t\t$row[$k] = addslashes($row[$k]);\n\t\t\t\t\t// $row[$k] = ereg_replace(\"\\n\",\"\\\\n\",$row[$k]);\n\t\t\t\t\tif (isset($row[$k])) { $return.= '\"'.$row[$k].'\"' ; } else { $return.= '\"\"'; }\n\t\t\t\t\tif ($k < ($num_fields-1)) { $return.= ','; }\n\t\t\t\t}\n $cnt++;\n\t\t\t\t$return.= \");\\n\";\n\t\t\t}\n\t\t}\n\t\t$return.=\"\\n\\n\\n\";\n\t}\n\n\n\t$handle = fopen('Backup/'.$file_name.'_'.$name.'-'.$cnt.'.sql','w+');\n\tfwrite($handle,$return);\n\tfclose($handle);\n}", "private function reset_mbstring_encoding() {\n\t\t$this->mbstring_binary_safe_encoding( true );\n\t}", "private function dbConnect(){\n\t$this->mysqli = new mysqli(DB_SERVER, DB_USER, DB_PASSWORD, DB);\n\t$this->mysqli->set_charset(\"utf8\");\n}", "private function do_fix_database() {\n\t\tglobal $wpdb, $wp_version, $utils;\n\t\t$global_schema_to_change = array(\n\t\t\t\t$wpdb->prefix.'commentmeta' => array(\n\t\t\t\t\t\"comment_id bigint(20) unsigned NOT NULL default '0'\",\n\t\t\t\t\t\"meta_key varchar(255) default NULL\",\n\t\t\t\t\t\"meta_value longtext\"\n\t\t\t\t),\n\t\t\t\t$wpdb->prefix.'comments' => array(\n\t\t\t\t\t\"comment_post_ID bigint(20) unsigned NOT NULL default '0'\",\n\t\t\t\t\t\"comment_author_email varchar(100) NOT NULL default ''\",\n\t\t\t\t\t\"comment_author_url varchar(200) NOT NULL default ''\",\n\t\t\t\t\t\"comment_author_IP varchar(100) NOT NULL default ''\",\n\t\t\t\t\t\"comment_date datetime NOT NULL default '0000-00-00 00:00:00'\",\n\t\t\t\t\t\"comment_date_gmt datetime NOT NULL default '0000-00-00 00:00:00'\",\n\t\t\t\t\t\"comment_karma int(11) NOT NULL default '0'\",\n\t\t\t\t\t\"comment_approved varchar(20) NOT NULL default '1'\",\n\t\t\t\t\t\"comment_agent varchar(255) NOT NULL default ''\",\n\t\t\t\t\t\"comment_type varchar(20) NOT NULL default ''\",\n\t\t\t\t\t\"comment_parent bigint(20) unsigned NOT NULL default '0'\",\n\t\t\t\t\t\"user_id bigint(20) unsigned NOT NULL default '0'\"\n\t\t\t\t),\n\t\t\t\t$wpdb->prefix.'links' => array(\n\t\t\t\t\t\"link_url varchar(255) NOT NULL default ''\",\n\t\t\t\t\t\"link_name varchar(255) NOT NULL default ''\",\n\t\t\t\t\t\"link_image varchar(255) NOT NULL default ''\",\n\t\t\t\t\t\"link_target varchar(25) NOT NULL default ''\",\n\t\t\t\t\t\"link_description varchar(255) NOT NULL default ''\",\n\t\t\t\t\t\"link_visible varchar(20) NOT NULL default 'Y'\",\n\t\t\t\t\t\"link_owner bigint(20) unsigned NOT NULL default '1'\",\n\t\t\t\t\t\"link_rating int(11) NOT NULL default '0'\",\n\t\t\t\t\t\"link_updated datetime NOT NULL default '0000-00-00 00:00:00'\",\n\t\t\t\t\t\"link_rel varchar(255) NOT NULL default ''\",\n\t\t\t\t\t\"link_notes mediumtext NOT NULL\",\n\t\t\t\t\t\"link_rss varchar(255) NOT NULL default ''\"\n\t\t\t\t),\n\t\t\t\t$wpdb->prefix.'options' => array(\n\t\t\t\t\t\"option_name varchar(64) NOT NULL default ''\",\n\t\t\t\t\t\"option_value longtext NOT NULL\",\n\t\t\t\t\t\"autoload varchar(20) NOT NULL default 'yes'\"\n\t\t\t\t),\n\t\t\t\t$wpdb->prefix.'postmeta' => array(\n\t\t\t\t\t\"post_id bigint(20) unsigned NOT NULL default '0'\",\n\t\t\t\t\t\"meta_key varchar(255) default NULL\",\n\t\t\t\t\t\"meta_value longtext\"\n\t\t\t\t),\n\t\t\t\t$wpdb->prefix.'posts' => array(\n\t\t\t\t\t\"post_author bigint(20) unsigned NOT NULL default '0'\",\n\t\t\t\t\t\"post_date datetime NOT NULL default '0000-00-00 00:00:00'\",\n\t\t\t\t\t\"post_date_gmt datetime NOT NULL default '0000-00-00 00:00:00'\",\n\t\t\t\t\t\"post_status varchar(20) NOT NULL default 'publish'\",\n\t\t\t\t\t\"comment_status varchar(20) NOT NULL default 'open'\",\n\t\t\t\t\t\"ping_status varchar(20) NOT NULL default 'open'\",\n\t\t\t\t\t\"post_password varchar(20) NOT NULL default ''\",\n\t\t\t\t\t\"post_name varchar(200) NOT NULL default ''\",\n\t\t\t\t\t\"post_modified datetime NOT NULL default '0000-00-00 00:00:00'\",\n\t\t\t\t\t\"post_modified_gmt datetime NOT NULL default '0000-00-00 00:00:00'\",\n\t\t\t\t\t\"post_content_filtered longtext NOT NULL\",\n\t\t\t\t\t\"post_parent bigint(20) unsigned NOT NULL default '0'\",\n\t\t\t\t\t\"guid varchar(255) NOT NULL default ''\",\n\t\t\t\t\t\"menu_order int(11) NOT NULL default '0'\",\n\t\t\t\t\t\"post_type varchar(20) NOT NULL default 'post'\",\n\t\t\t\t\t\"post_mime_type varchar(100) NOT NULL default ''\",\n\t\t\t\t\t\"comment_count bigint(20) NOT NULL default '0'\"\n\t\t\t\t),\n\t\t\t\t$wpdb->prefix.'term_relationships' => array(\n\t\t\t\t\t\"term_order int(11) NOT NULL default 0\"\n\t\t\t\t),\n\t\t\t\t$wpdb->prefix.'term_taxonomy' => array(\n\t\t\t\t\t\"taxonomy varchar(32) NOT NULL default ''\",\n\t\t\t\t\t\"description longtext NOT NULL\",\n\t\t\t\t\t\"parent bigint(20) unsigned NOT NULL default 0\",\n\t\t\t\t\t\"count bigint(20) NOT NULL default 0\"\n\t\t\t\t),\n\t\t\t\t$wpdb->prefix.'terms' => array(\n\t\t\t\t\t\"name varchar(200) NOT NULL default ''\",\n\t\t\t\t\t\"slug varchar(200) NOT NULL default ''\",\n\t\t\t\t\t\"term_group bigint(10) NOT NULL default 0\"\n\t\t\t\t),\n\t\t\t\t$wpdb->prefix.'users' => array(\n\t\t\t\t\t\"user_login varchar(60) NOT NULL default ''\",\n\t\t\t\t\t\"user_pass varchar(64) NOT NULL default ''\",\n\t\t\t\t\t\"user_nicename varchar(50) NOT NULL default ''\",\n\t\t\t\t\t\"user_email varchar(100) NOT NULL default ''\",\n\t\t\t\t\t\"user_url varchar(100) NOT NULL default ''\",\n\t\t\t\t\t\"user_registered datetime NOT NULL default '0000-00-00 00:00:00'\",\n\t\t\t\t\t\"user_activation_key varchar(60) NOT NULL default ''\",\n\t\t\t\t\t\"user_status int(11) NOT NULL default '0'\",\n\t\t\t\t\t\"display_name varchar(250) NOT NULL default ''\"\n\t\t\t\t),\n\t\t\t\t$wpdb->prefix.'usermeta' => array(\n\t\t\t\t\t\"user_id bigint(20) unsigned NOT NULL default '0'\",\n\t\t\t\t\t\"meta_key varchar(255) default NULL\",\n\t\t\t\t\t\"meta_value longtext\"\n\t\t\t\t)\n\t\t);\n\n\t\t$network_schema_to_change = array(\n\t\t\t\t$wpdb->prefix.'blog_versions' => array(\n\t\t\t\t\t\"blog_id bigint(20) NOT NULL default '0'\",\n\t\t\t\t\t\"db_version varchar(20) NOT NULL default ''\",\n\t\t\t\t\t\"last_updated datetime NOT NULL default '0000-00-00 00:00:00'\"\n\t\t\t\t),\n\t\t\t\t$wpdb->prefix.'blogs' => array(\n\t\t\t\t\t\"site_id bigint(20) NOT NULL default '0'\",\n\t\t\t\t\t\"domain varchar(200) NOT NULL default ''\",\n\t\t\t\t\t\"path varchar(100) NOT NULL default ''\",\n\t\t\t\t\t\"registered datetime NOT NULL default '0000-00-00 00:00:00'\",\n\t\t\t\t\t\"last_updated datetime NOT NULL default '0000-00-00 00:00:00'\",\n\t\t\t\t\t\"public tinyint(2) NOT NULL default '1'\",\n\t\t\t\t\t\"mature tinyint(2) NOT NULL default '0'\",\n\t\t\t\t\t\"spam tinyint(2) NOT NULL default '0'\",\n\t\t\t\t\t\"deleted tinyint(2) NOT NULL default '0'\",\n\t\t\t\t\t\"lang_id int(11) NOT NULL default '0'\"\n\t\t\t\t),\n\t\t\t\t$wpdb->prefix.'registration_log' => array(\n\t\t\t\t\t\"email varchar(255) NOT NULL default ''\",\n\t\t\t\t\t\"IP varchar(30) NOT NULL default ''\",\n\t\t\t\t\t\"blog_id bigint(20) NOT NULL default '0'\",\n\t\t\t\t\t\"date_registered datetime NOT NULL default '0000-00-00 00:00:00'\"\n\t\t\t\t),\n\t\t\t\t$wpdb->prefix.'signups' => array(\n\t\t\t\t\t\"domain varchar(200) NOT NULL default ''\",\n\t\t\t\t\t\"path varchar(100) NOT NULL default ''\",\n\t\t\t\t\t\"title longtext NOT NULL\",\n\t\t\t\t\t\"user_login varchar(60) NOT NULL default ''\",\n\t\t\t\t\t\"user_email varchar(100) NOT NULL default ''\",\n\t\t\t\t\t\"registered datetime NOT NULL default '0000-00-00 00:00:00'\",\n\t\t\t\t\t\"activated datetime NOT NULL default '0000-00-00 00:00:00'\",\n\t\t\t\t\t\"active tinyint(1) NOT NULL default '0'\",\n\t\t\t\t\t\"activation_key varchar(50) NOT NULL default ''\",\n\t\t\t\t\t\"meta longtext\"\n\t\t\t\t),\n\t\t\t\t$wpdb->prefix.'site' => array(\n\t\t\t\t\t\"domain varchar(200) NOT NULL default ''\",\n\t\t\t\t\t\"path varchar(100) NOT NULL default ''\"\n\t\t\t\t),\n\t\t\t\t$wpdb->prefix.'sitemeta' => array(\n\t\t\t\t\t\"site_id bigint(20) NOT NULL default '0'\",\n\t\t\t\t\t\"meta_key varchar(255) default NULL\",\n\t\t\t\t\t\"meta_value longtext\"\n\t\t\t\t),\n\t\t\t\t$wpdb->prefix.'users' => array(\n\t\t\t\t\t\"user_login varchar(60) NOT NULL default ''\",\n\t\t\t\t\t\"spam tinyint(2) NOT NULL default '0'\",\n\t\t\t\t\t\"deleted tinyint(2) NOT NULL default '0'\"\n\t\t\t\t)\n\t\t);\n\t\tif (version_compare($wp_version, '3.6', '<')) return false;\n\t\t$return_val = array();\n\t\t$queries = array();\n\t\t$results = $this->sanity_check();\n\t\tif ($results !== true) {\n\t\t\tif (!$this->maintenance_backup()) {\n\t\t\t\t$message = __('Can\\'t create backup file.', $domain);\n\t\t\t\treturn $message;\n\t\t\t}\n\t\t\t$tables = array_keys($results);\n\t\t\tforeach ($tables as $table) {\n\t\t\t\tif (key_exists($table, $global_schema_to_change)) {\n\t\t\t\t\t$queries = $global_schema_to_change[$table];\n\t\t\t\t}\n\t\t\t\tif (key_exists($table, $network_schema_to_change)) {\n\t\t\t\t\tif (!empty($queries)) {\n\t\t\t\t\t\t$queries = array_merge($queries, $network_schema_to_change[$table]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$queries = $network_schema_to_change[$table];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tforeach ($queries as $query) {\n\t\t\t\t\t$sql = 'ALTER TABLE' . ' ' . $table . ' ' . 'CHANGE COLUMN' . ' ' . $query;\n\t\t\t\t\t$res = $wpdb->query($sql);\n\t\t\t\t\tif ($res === false) {\n\t\t\t\t\t\t$return_val[] = __('Failed: ', $domain) . $query;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$message = __('Your database is OK. You don\\'t have to restore it.', $domain);\n\t\t\treturn $message;\n\t\t}\n\t\tif (empty($return_val)) {\n\t\t\t$message = __('Your database restoration is successfully finished!', $domain);\n\t\t\treturn $message;\n\t\t} else {\n\t\t\treturn $return_val;\n\t\t}\n\t}", "protected function migrateTables()\n {\n foreach ($this->tables as $table) {\n \\DB::getPdo()->exec(\"INSERT IGNORE INTO {$this->newDbName}.{$table} SELECT * FROM {$this->oldDbName}.{$table}\");\n }\n }", "abstract protected function encodingTablesOrder();", "protected function switchEnvTables()\n {\n /**\n * Update .env file for allowing new users requests to hang within locking cycle.\n */\n $this->updateDotEnv('DB_DATABASE', $this->newDbName); // switch .env database names\n $this->updateDotEnv('DB_DUMP_DATABASE', $this->oldDbName);\n\n \\Artisan::call('config:clear'); // clear .env file cache for allowing new requests to receive fresh config\n }", "function reset_mbstring_encoding()\n {\n }", "function getDB(){\r\n $servername = DB_SERVER;\r\n $username = DB_USERNAME;\r\n $password = DB_PASSWORD;\r\n $dbname = DB_DATABASE;\r\n// Create connection\r\n$conn = new mysqli($servername, $username, $password,$dbname);\r\n// Check connection\r\nif ($conn->connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n}\r\n$conn->query(\"SET character_set_results=utf8\"); // สำหรับแปลงค่าภาษาไทยให้ db อ่านได้\r\n$conn->query(\"SET character_set_client=utf8\"); // สำหรับแปลงค่าภาษาไทยให้ db อ่านได้\r\n$conn->query(\"set names utf8\");\r\n//echo \"Connected successfully\";\r\nreturn $conn;\r\n}", "function db_upgrade_all($iOldDBVersion) {\n /// This function does anything necessary to upgrade\n /// older versions to match current functionality\n global $modifyoutput;\n Yii::app()->loadHelper('database');\n\n $sUserTemplateRootDir = Yii::app()->getConfig('usertemplaterootdir');\n $sStandardTemplateRootDir = Yii::app()->getConfig('standardtemplaterootdir');\n echo str_pad(gT('The LimeSurvey database is being upgraded').' ('.date('Y-m-d H:i:s').')',14096).\".<br /><br />\". gT('Please be patient...').\"<br /><br />\\n\";\n\n $oDB = Yii::app()->getDb();\n $oDB->schemaCachingDuration=0; // Deactivate schema caching\n $oTransaction = $oDB->beginTransaction();\n try\n {\n if ($iOldDBVersion < 111)\n {\n // Language upgrades from version 110 to 111 because the language names did change\n\n $aOldNewLanguages=array('german_informal'=>'german-informal',\n 'cns'=>'cn-Hans',\n 'cnt'=>'cn-Hant',\n 'pt_br'=>'pt-BR',\n 'gr'=>'el',\n 'jp'=>'ja',\n 'si'=>'sl',\n 'se'=>'sv',\n 'vn'=>'vi');\n foreach ($aOldNewLanguages as $sOldLanguageCode=>$sNewLanguageCode)\n {\n alterLanguageCode($sOldLanguageCode,$sNewLanguageCode);\n }\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>111),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 112) {\n // New size of the username field (it was previously 20 chars wide)\n $oDB->createCommand()->alterColumn('{{users}}','users_name',\"string(64) NOT NULL\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>112),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 113) {\n //Fixes the collation for the complete DB, tables and columns\n\n if (Yii::app()->db->driverName=='mysql')\n {\n $sDatabaseName=getDBConnectionStringProperty('dbname');\n fixMySQLCollations();\n modifyDatabase(\"\",\"ALTER DATABASE `$sDatabaseName` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;\");echo $modifyoutput; flush();@ob_flush();\n }\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>113),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 114) {\n $oDB->createCommand()->alterColumn('{{saved_control}}','email',\"string(320) NOT NULL\");\n $oDB->createCommand()->alterColumn('{{surveys}}','adminemail',\"string(320) NOT NULL\");\n $oDB->createCommand()->alterColumn('{{users}}','email',\"string(320) NOT NULL\");\n $oDB->createCommand()->insert('{{settings_global}}',array('stg_name'=>'SessionName','stg_value'=>randomChars(64,'ABCDEFGHIJKLMNOPQRSTUVWXYZ!\"$%&/()=?`+*~#\",;.:abcdefghijklmnopqrstuvwxyz123456789')));\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>114),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 126) {\n\n addColumn('{{surveys}}','printanswers',\"string(1) default 'N'\");\n addColumn('{{surveys}}','listpublic',\"string(1) default 'N'\");\n\n upgradeSurveyTables126();\n upgradeTokenTables126();\n\n // Create quota table\n $oDB->createCommand()->createTable('{{quota}}',array(\n 'id' => 'pk',\n 'sid' => 'integer',\n 'qlimit' => 'integer',\n 'name' => 'string',\n 'action' => 'integer',\n 'active' => 'integer NOT NULL DEFAULT 1'\n ));\n\n // Create quota_members table\n $oDB->createCommand()->createTable('{{quota_members}}',array(\n 'id' => 'pk',\n 'sid' => 'integer',\n 'qid' => 'integer',\n 'quota_id' => 'integer',\n 'code' => 'string(5)'\n ));\n $oDB->createCommand()->createIndex('sid','{{quota_members}}','sid,qid,quota_id,code',true);\n\n\n // Create templates_rights table\n $oDB->createCommand()->createTable('{{templates_rights}}',array(\n 'uid' => 'integer NOT NULL',\n 'folder' => 'string NOT NULL',\n 'use' => 'integer',\n 'PRIMARY KEY (uid, folder)'\n ));\n\n // Create templates table\n $oDB->createCommand()->createTable('{{templates}}',array(\n 'folder' => 'string NOT NULL',\n 'creator' => 'integer NOT NULL',\n 'PRIMARY KEY (folder)'\n ));\n\n // Rename Norwegian language codes\n alterLanguageCode('no','nb');\n\n addColumn('{{surveys}}','htmlemail',\"string(1) default 'N'\");\n addColumn('{{surveys}}','tokenanswerspersistence',\"string(1) default 'N'\");\n addColumn('{{surveys}}','usecaptcha',\"string(1) default 'N'\");\n addColumn('{{surveys}}','bounce_email','text');\n addColumn('{{users}}','htmleditormode',\"string(7) default 'default'\");\n addColumn('{{users}}','superadmin',\"integer NOT NULL default '0'\");\n addColumn('{{questions}}','lid1',\"integer NOT NULL default '0'\");\n\n alterColumn('{{conditions}}','value',\"string\",false,'');\n alterColumn('{{labels}}','title',\"text\");\n\n $oDB->createCommand()->update('{{users}}',array('superadmin'=>1),\"create_survey=1 AND create_user=1 AND move_user=1 AND delete_user=1 AND configurator=1\");\n $oDB->createCommand()->update('{{conditions}}',array('method'=>'=='),\"(method is null) or method='' or method='0'\");\n\n dropColumn('{{users}}','move_user');\n\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>126),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 127) {\n modifyDatabase(\"\",\"create index answers_idx2 on {{answers}} (sortorder)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index assessments_idx2 on {{assessments}} (sid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index assessments_idx3 on {{assessments}} (gid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index conditions_idx2 on {{conditions}} (qid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index conditions_idx3 on {{conditions}} (cqid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index groups_idx2 on {{groups}} (sid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index question_attributes_idx2 on {{question_attributes}} (qid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index questions_idx2 on {{questions}} (sid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index questions_idx3 on {{questions}} (gid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index questions_idx4 on {{questions}} (type)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index quota_idx2 on {{quota}} (sid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index saved_control_idx2 on {{saved_control}} (sid)\"); echo $modifyoutput;\n modifyDatabase(\"\",\"create index user_in_groups_idx1 on {{user_in_groups}} (ugid, uid)\"); echo $modifyoutput;\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>127),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 128) {\n upgradeTokens128();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>128),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 129) {\n addColumn('{{surveys}}','startdate',\"datetime\");\n addColumn('{{surveys}}','usestartdate',\"string(1) NOT NULL default 'N'\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>129),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 130)\n {\n addColumn('{{conditions}}','scenario',\"integer NOT NULL default '1'\");\n $oDB->createCommand()->update('{{conditions}}',array('scenario'=>'1'),\"(scenario is null) or scenario=0\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>130),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 131)\n {\n addColumn('{{surveys}}','publicstatistics',\"string(1) NOT NULL default 'N'\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>131),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 132)\n {\n addColumn('{{surveys}}','publicgraphs',\"string(1) NOT NULL default 'N'\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>132),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 133)\n {\n addColumn('{{users}}','one_time_pw','binary');\n // Add new assessment setting\n addColumn('{{surveys}}','assessments',\"string(1) NOT NULL default 'N'\");\n // add new assessment value fields to answers & labels\n addColumn('{{answers}}','assessment_value',\"integer NOT NULL default '0'\");\n addColumn('{{labels}}','assessment_value',\"integer NOT NULL default '0'\");\n // copy any valid codes from code field to assessment field\n switch (Yii::app()->db->driverName){\n case 'mysql':\n case 'mysqli':\n $oDB->createCommand(\"UPDATE {{answers}} SET assessment_value=CAST(`code` as SIGNED) where `code` REGEXP '^-?[0-9]+$'\")->execute();\n $oDB->createCommand(\"UPDATE {{labels}} SET assessment_value=CAST(`code` as SIGNED) where `code` REGEXP '^-?[0-9]+$'\")->execute();\n // copy assessment link to message since from now on we will have HTML assignment messages\n $oDB->createCommand(\"UPDATE {{assessments}} set message=concat(replace(message,'/''',''''),'<br /><a href=\\\"',link,'\\\">',link,'</a>')\")->execute();\n break;\n case 'sqlsrv':\n case 'dblib':\n case 'mssql':\n try{\n $oDB->createCommand(\"UPDATE {{answers}} SET assessment_value=CAST([code] as int) WHERE ISNUMERIC([code])=1\")->execute();\n $oDB->createCommand(\"UPDATE {{labels}} SET assessment_value=CAST([code] as int) WHERE ISNUMERIC([code])=1\")->execute();\n } catch(Exception $e){};\n // copy assessment link to message since from now on we will have HTML assignment messages\n alterColumn('{{assessments}}','link',\"text\",false);\n alterColumn('{{assessments}}','message',\"text\",false);\n $oDB->createCommand(\"UPDATE {{assessments}} set message=replace(message,'/''','''')+'<br /><a href=\\\"'+link+'\\\">'+link+'</a>'\")->execute();\n break;\n case 'pgsql':\n $oDB->createCommand(\"UPDATE {{answers}} SET assessment_value=CAST(code as integer) where code ~ '^[0-9]+'\")->execute();\n $oDB->createCommand(\"UPDATE {{labels}} SET assessment_value=CAST(code as integer) where code ~ '^[0-9]+'\")->execute();\n // copy assessment link to message since from now on we will have HTML assignment messages\n $oDB->createCommand(\"UPDATE {{assessments}} set message=replace(message,'/''','''')||'<br /><a href=\\\"'||link||'\\\">'||link||'</a>'\")->execute();\n break;\n default: die('Unknown database type');\n }\n // activate assessment where assessment rules exist\n $oDB->createCommand(\"UPDATE {{surveys}} SET assessments='Y' where sid in (SELECT sid FROM {{assessments}} group by sid)\")->execute();\n // add language field to assessment table\n addColumn('{{assessments}}','language',\"string(20) NOT NULL default 'en'\");\n // update language field with default language of that particular survey\n $oDB->createCommand(\"UPDATE {{assessments}} SET language=(select language from {{surveys}} where sid={{assessments}}.sid)\")->execute();\n // drop the old link field\n dropColumn('{{assessments}}','link');\n\n // Add new fields to survey language settings\n addColumn('{{surveys_languagesettings}}','surveyls_url',\"string\");\n addColumn('{{surveys_languagesettings}}','surveyls_endtext','text');\n // copy old URL fields ot language specific entries\n $oDB->createCommand(\"UPDATE {{surveys_languagesettings}} set surveyls_url=(select url from {{surveys}} where sid={{surveys_languagesettings}}.surveyls_survey_id)\")->execute();\n // drop old URL field\n dropColumn('{{surveys}}','url');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>133),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 134)\n {\n // Add new tokens setting\n addColumn('{{surveys}}','usetokens',\"string(1) NOT NULL default 'N'\");\n addColumn('{{surveys}}','attributedescriptions','text');\n dropColumn('{{surveys}}','attribute1');\n dropColumn('{{surveys}}','attribute2');\n upgradeTokenTables134();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>134),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 135)\n {\n alterColumn('{{question_attributes}}','value','text');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>135),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 136) //New Quota Functions\n {\n addColumn('{{quota}}','autoload_url',\"integer NOT NULL default 0\");\n // Create quota table\n $aFields = array(\n 'quotals_id' => 'pk',\n 'quotals_quota_id' => 'integer NOT NULL DEFAULT 0',\n 'quotals_language' => \"string(45) NOT NULL default 'en'\",\n 'quotals_name' => 'string',\n 'quotals_message' => 'text NOT NULL',\n 'quotals_url' => 'string',\n 'quotals_urldescrip' => 'string',\n );\n $oDB->createCommand()->createTable('{{quota_languagesettings}}',$aFields);\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>136),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 137) //New Quota Functions\n {\n addColumn('{{surveys_languagesettings}}','surveyls_dateformat',\"integer NOT NULL default 1\");\n addColumn('{{users}}','dateformat',\"integer NOT NULL default 1\");\n $oDB->createCommand()->update('{{surveys}}',array('startdate'=>NULL),\"usestartdate='N'\");\n $oDB->createCommand()->update('{{surveys}}',array('expires'=>NULL),\"useexpiry='N'\");\n dropColumn('{{surveys}}','useexpiry');\n dropColumn('{{surveys}}','usestartdate');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>137),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 138) //Modify quota field\n {\n alterColumn('{{quota_members}}','code',\"string(11)\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>138),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 139) //Modify quota field\n {\n upgradeSurveyTables139();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>139),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 140) //Modify surveys table\n {\n addColumn('{{surveys}}','emailresponseto','text');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>140),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 141) //Modify surveys table\n {\n addColumn('{{surveys}}','tokenlength','integer NOT NULL default 15');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>141),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 142) //Modify surveys table\n {\n upgradeQuestionAttributes142();\n $oDB->createCommand()->alterColumn('{{surveys}}','expires',\"datetime\");\n $oDB->createCommand()->alterColumn('{{surveys}}','startdate',\"datetime\");\n $oDB->createCommand()->update('{{question_attributes}}',array('value'=>0),\"value='false'\");\n $oDB->createCommand()->update('{{question_attributes}}',array('value'=>1),\"value='true'\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>142),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 143)\n {\n addColumn('{{questions}}','parent_qid','integer NOT NULL default 0');\n addColumn('{{answers}}','scale_id','integer NOT NULL default 0');\n addColumn('{{questions}}','scale_id','integer NOT NULL default 0');\n addColumn('{{questions}}','same_default','integer NOT NULL default 0');\n dropPrimaryKey('answers');\n addPrimaryKey('answers', array('qid','code','language','scale_id'));\n\n $aFields = array(\n 'qid' => \"integer NOT NULL default 0\",\n 'scale_id' => 'integer NOT NULL default 0',\n 'sqid' => 'integer NOT NULL default 0',\n 'language' => 'string(20) NOT NULL',\n 'specialtype' => \"string(20) NOT NULL default ''\",\n 'defaultvalue' => 'text',\n );\n $oDB->createCommand()->createTable('{{defaultvalues}}',$aFields);\n addPrimaryKey('defaultvalues', array('qid','specialtype','language','scale_id','sqid'));\n\n // -Move all 'answers' that are subquestions to the questions table\n // -Move all 'labels' that are answers to the answers table\n // -Transscribe the default values where applicable\n // -Move default values from answers to questions\n upgradeTables143();\n\n dropColumn('{{answers}}','default_value');\n dropColumn('{{questions}}','lid');\n dropColumn('{{questions}}','lid1');\n\n $aFields = array(\n 'sesskey' => \"string(64) NOT NULL DEFAULT ''\",\n 'expiry' => \"datetime NOT NULL\",\n 'expireref' => \"string(250) DEFAULT ''\",\n 'created' => \"datetime NOT NULL\",\n 'modified' => \"datetime NOT NULL\",\n 'sessdata' => 'text'\n );\n $oDB->createCommand()->createTable('{{sessions}}',$aFields);\n addPrimaryKey('sessions',array('sesskey'));\n $oDB->createCommand()->createIndex('sess2_expiry','{{sessions}}','expiry');\n $oDB->createCommand()->createIndex('sess2_expireref','{{sessions}}','expireref');\n // Move all user templates to the new user template directory\n echo \"<br>\".sprintf(gT(\"Moving user templates to new location at %s...\"),$sUserTemplateRootDir).\"<br />\";\n $hTemplateDirectory = opendir($sStandardTemplateRootDir);\n $aFailedTemplates=array();\n // get each entry\n while($entryName = readdir($hTemplateDirectory)) {\n if (!in_array($entryName,array('.','..','.svn')) && is_dir($sStandardTemplateRootDir.DIRECTORY_SEPARATOR.$entryName) && !isStandardTemplate($entryName))\n {\n if (!rename($sStandardTemplateRootDir.DIRECTORY_SEPARATOR.$entryName,$sUserTemplateRootDir.DIRECTORY_SEPARATOR.$entryName))\n {\n $aFailedTemplates[]=$entryName;\n };\n }\n }\n if (count($aFailedTemplates)>0)\n {\n echo \"The following templates at {$sStandardTemplateRootDir} could not be moved to the new location at {$sUserTemplateRootDir}:<br /><ul>\";\n foreach ($aFailedTemplates as $sFailedTemplate)\n {\n echo \"<li>{$sFailedTemplate}</li>\";\n }\n echo \"</ul>Please move these templates manually after the upgrade has finished.<br />\";\n }\n // close directory\n closedir($hTemplateDirectory);\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>143),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 145)\n {\n addColumn('{{surveys}}','savetimings',\"string(1) NULL default 'N'\");\n addColumn('{{surveys}}','showXquestions',\"string(1) NULL default 'Y'\");\n addColumn('{{surveys}}','showgroupinfo',\"string(1) NULL default 'B'\");\n addColumn('{{surveys}}','shownoanswer',\"string(1) NULL default 'Y'\");\n addColumn('{{surveys}}','showqnumcode',\"string(1) NULL default 'X'\");\n addColumn('{{surveys}}','bouncetime','integer');\n addColumn('{{surveys}}','bounceprocessing',\"string(1) NULL default 'N'\");\n addColumn('{{surveys}}','bounceaccounttype',\"string(4)\");\n addColumn('{{surveys}}','bounceaccounthost',\"string(200)\");\n addColumn('{{surveys}}','bounceaccountpass',\"string(100)\");\n addColumn('{{surveys}}','bounceaccountencryption',\"string(3)\");\n addColumn('{{surveys}}','bounceaccountuser',\"string(200)\");\n addColumn('{{surveys}}','showwelcome',\"string(1) default 'Y'\");\n addColumn('{{surveys}}','showprogress',\"string(1) default 'Y'\");\n addColumn('{{surveys}}','allowjumps',\"string(1) default 'N'\");\n addColumn('{{surveys}}','navigationdelay',\"integer default 0\");\n addColumn('{{surveys}}','nokeyboard',\"string(1) default 'N'\");\n addColumn('{{surveys}}','alloweditaftercompletion',\"string(1) default 'N'\");\n\n\n $aFields = array(\n 'sid' => \"integer NOT NULL\",\n 'uid' => \"integer NOT NULL\",\n 'permission' => 'string(20) NOT NULL',\n 'create_p' => \"integer NOT NULL default 0\",\n 'read_p' => \"integer NOT NULL default 0\",\n 'update_p' => \"integer NOT NULL default 0\",\n 'delete_p' => \"integer NOT NULL default 0\",\n 'import_p' => \"integer NOT NULL default 0\",\n 'export_p' => \"integer NOT NULL default 0\"\n );\n $oDB->createCommand()->createTable('{{survey_permissions}}',$aFields);\n addPrimaryKey('survey_permissions', array('sid','uid','permission'));\n\n upgradeSurveyPermissions145();\n\n // drop the old survey rights table\n $oDB->createCommand()->dropTable('{{surveys_rights}}');\n\n // Add new fields for email templates\n addColumn('{{surveys_languagesettings}}','email_admin_notification_subj',\"string\");\n addColumn('{{surveys_languagesettings}}','email_admin_responses_subj',\"string\");\n addColumn('{{surveys_languagesettings}}','email_admin_notification',\"text\");\n addColumn('{{surveys_languagesettings}}','email_admin_responses',\"text\");\n\n //Add index to questions table to speed up subquestions\n $oDB->createCommand()->createIndex('parent_qid_idx','{{questions}}','parent_qid');\n\n addColumn('{{surveys}}','emailnotificationto',\"text\");\n\n upgradeSurveys145();\n dropColumn('{{surveys}}','notification');\n alterColumn('{{conditions}}','method',\"string(5)\",false,'');\n\n $oDB->createCommand()->renameColumn('{{surveys}}','private','anonymized');\n $oDB->createCommand()->update('{{surveys}}',array('anonymized'=>'N'),\"anonymized is NULL\");\n alterColumn('{{surveys}}','anonymized',\"string(1)\",false,'N');\n\n //now we clean up things that were not properly set in previous DB upgrades\n $oDB->createCommand()->update('{{answers}}',array('answer'=>''),\"answer is NULL\");\n $oDB->createCommand()->update('{{assessments}}',array('scope'=>''),\"scope is NULL\");\n $oDB->createCommand()->update('{{assessments}}',array('name'=>''),\"name is NULL\");\n $oDB->createCommand()->update('{{assessments}}',array('message'=>''),\"message is NULL\");\n $oDB->createCommand()->update('{{assessments}}',array('minimum'=>''),\"minimum is NULL\");\n $oDB->createCommand()->update('{{assessments}}',array('maximum'=>''),\"maximum is NULL\");\n $oDB->createCommand()->update('{{groups}}',array('group_name'=>''),\"group_name is NULL\");\n $oDB->createCommand()->update('{{labels}}',array('code'=>''),\"code is NULL\");\n $oDB->createCommand()->update('{{labelsets}}',array('label_name'=>''),\"label_name is NULL\");\n $oDB->createCommand()->update('{{questions}}',array('type'=>'T'),\"type is NULL\");\n $oDB->createCommand()->update('{{questions}}',array('title'=>''),\"title is NULL\");\n $oDB->createCommand()->update('{{questions}}',array('question'=>''),\"question is NULL\");\n $oDB->createCommand()->update('{{questions}}',array('other'=>'N'),\"other is NULL\");\n\n alterColumn('{{answers}}','answer',\"text\",false);\n alterColumn('{{answers}}','assessment_value','integer',false , '0');\n alterColumn('{{assessments}}','scope',\"string(5)\",false , '');\n alterColumn('{{assessments}}','name',\"text\",false);\n alterColumn('{{assessments}}','message',\"text\",false);\n alterColumn('{{assessments}}','minimum',\"string(50)\",false , '');\n alterColumn('{{assessments}}','maximum',\"string(50)\",false , '');\n // change the primary index to include language\n if (Yii::app()->db->driverName=='mysql') // special treatment for mysql because this needs to be in one step since an AUTOINC field is involved\n {\n modifyPrimaryKey('assessments', array('id', 'language'));\n }\n else\n {\n dropPrimaryKey('assessments');\n addPrimaryKey('assessments',array('id','language'));\n }\n\n\n alterColumn('{{conditions}}','cfieldname',\"string(50)\",false , '');\n dropPrimaryKey('defaultvalues');\n alterColumn('{{defaultvalues}}','specialtype',\"string(20)\",false , '');\n addPrimaryKey('defaultvalues', array('qid','specialtype','language','scale_id','sqid'));\n\n alterColumn('{{groups}}','group_name',\"string(100)\",false , '');\n alterColumn('{{labels}}','code',\"string(5)\",false , '');\n dropPrimaryKey('labels');\n alterColumn('{{labels}}','language',\"string(20)\",false , 'en');\n addPrimaryKey('labels', array('lid', 'sortorder', 'language'));\n alterColumn('{{labelsets}}','label_name',\"string(100)\",false , '');\n alterColumn('{{questions}}','parent_qid','integer',false ,'0');\n alterColumn('{{questions}}','title',\"string(20)\",false , '');\n alterColumn('{{questions}}','question',\"text\",false);\n try { setTransactionBookmark(); $oDB->createCommand()->dropIndex('questions_idx4','{{questions}}'); } catch(Exception $e) { rollBackToTransactionBookmark();}\n\n alterColumn('{{questions}}','type',\"string(1)\",false , 'T');\n try{ $oDB->createCommand()->createIndex('questions_idx4','{{questions}}','type');} catch(Exception $e){};\n alterColumn('{{questions}}','other',\"string(1)\",false , 'N');\n alterColumn('{{questions}}','mandatory',\"string(1)\");\n alterColumn('{{question_attributes}}','attribute',\"string(50)\");\n alterColumn('{{quota}}','qlimit','integer');\n\n $oDB->createCommand()->update('{{saved_control}}',array('identifier'=>''),\"identifier is NULL\");\n alterColumn('{{saved_control}}','identifier',\"text\",false);\n $oDB->createCommand()->update('{{saved_control}}',array('access_code'=>''),\"access_code is NULL\");\n alterColumn('{{saved_control}}','access_code',\"text\",false);\n alterColumn('{{saved_control}}','email',\"string(320)\");\n $oDB->createCommand()->update('{{saved_control}}',array('ip'=>''),\"ip is NULL\");\n alterColumn('{{saved_control}}','ip',\"text\",false);\n $oDB->createCommand()->update('{{saved_control}}',array('saved_thisstep'=>''),\"saved_thisstep is NULL\");\n alterColumn('{{saved_control}}','saved_thisstep',\"text\",false);\n $oDB->createCommand()->update('{{saved_control}}',array('status'=>''),\"status is NULL\");\n alterColumn('{{saved_control}}','status',\"string(1)\",false , '');\n $oDB->createCommand()->update('{{saved_control}}',array('saved_date'=>'1980-01-01 00:00:00'),\"saved_date is NULL\");\n alterColumn('{{saved_control}}','saved_date',\"datetime\",false);\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>''),\"stg_value is NULL\");\n alterColumn('{{settings_global}}','stg_value',\"string\",false , '');\n\n alterColumn('{{surveys}}','admin',\"string(50)\");\n $oDB->createCommand()->update('{{surveys}}',array('active'=>'N'),\"active is NULL\");\n\n alterColumn('{{surveys}}','active',\"string(1)\",false , 'N');\n\n alterColumn('{{surveys}}','startdate',\"datetime\");\n alterColumn('{{surveys}}','adminemail',\"string(320)\");\n alterColumn('{{surveys}}','anonymized',\"string(1)\",false , 'N');\n\n alterColumn('{{surveys}}','faxto',\"string(20)\");\n alterColumn('{{surveys}}','format',\"string(1)\");\n alterColumn('{{surveys}}','language',\"string(50)\");\n alterColumn('{{surveys}}','additional_languages',\"string\");\n alterColumn('{{surveys}}','printanswers',\"string(1)\",true , 'N');\n alterColumn('{{surveys}}','publicstatistics',\"string(1)\",true , 'N');\n alterColumn('{{surveys}}','publicgraphs',\"string(1)\",true , 'N');\n alterColumn('{{surveys}}','assessments',\"string(1)\",true , 'N');\n alterColumn('{{surveys}}','usetokens',\"string(1)\",true , 'N');\n alterColumn('{{surveys}}','bounce_email',\"string(320)\");\n alterColumn('{{surveys}}','tokenlength','integer',true , 15);\n\n $oDB->createCommand()->update('{{surveys_languagesettings}}',array('surveyls_title'=>''),\"surveyls_title is NULL\");\n alterColumn('{{surveys_languagesettings}}','surveyls_title',\"string(200)\",false);\n alterColumn('{{surveys_languagesettings}}','surveyls_endtext',\"text\");\n alterColumn('{{surveys_languagesettings}}','surveyls_url',\"string\");\n alterColumn('{{surveys_languagesettings}}','surveyls_urldescription',\"string\");\n alterColumn('{{surveys_languagesettings}}','surveyls_email_invite_subj',\"string\");\n alterColumn('{{surveys_languagesettings}}','surveyls_email_remind_subj',\"string\");\n alterColumn('{{surveys_languagesettings}}','surveyls_email_register_subj',\"string\");\n alterColumn('{{surveys_languagesettings}}','surveyls_email_confirm_subj',\"string\");\n alterColumn('{{surveys_languagesettings}}','surveyls_dateformat','integer',false , 1);\n\n $oDB->createCommand()->update('{{users}}',array('users_name'=>''),\"users_name is NULL\");\n $oDB->createCommand()->update('{{users}}',array('full_name'=>''),\"full_name is NULL\");\n alterColumn('{{users}}','users_name',\"string(64)\",false , '');\n alterColumn('{{users}}','full_name',\"string(50)\",false);\n alterColumn('{{users}}','lang',\"string(20)\");\n alterColumn('{{users}}','email',\"string(320)\");\n alterColumn('{{users}}','superadmin','integer',false , 0);\n alterColumn('{{users}}','htmleditormode',\"string(7)\",true,'default');\n alterColumn('{{users}}','dateformat','integer',false , 1);\n try{\n setTransactionBookmark();\n $oDB->createCommand()->dropIndex('email','{{users}}');\n }\n catch(Exception $e)\n {\n // do nothing\n rollBackToTransactionBookmark();\n }\n\n $oDB->createCommand()->update('{{user_groups}}',array('name'=>''),\"name is NULL\");\n $oDB->createCommand()->update('{{user_groups}}',array('description'=>''),\"description is NULL\");\n alterColumn('{{user_groups}}','name',\"string(20)\",false);\n alterColumn('{{user_groups}}','description',\"text\",false);\n\n try { $oDB->createCommand()->dropIndex('user_in_groups_idx1','{{user_in_groups}}'); } catch(Exception $e) {}\n try { addPrimaryKey('user_in_groups', array('ugid','uid')); } catch(Exception $e) {}\n\n addColumn('{{surveys_languagesettings}}','surveyls_numberformat',\"integer NOT NULL DEFAULT 0\");\n\n $oDB->createCommand()->createTable('{{failed_login_attempts}}',array(\n 'id' => \"pk\",\n 'ip' => 'string(37) NOT NULL',\n 'last_attempt' => 'string(20) NOT NULL',\n 'number_attempts' => \"integer NOT NULL\"\n ));\n upgradeTokens145();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>145),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 146) //Modify surveys table\n {\n upgradeSurveyTimings146();\n // Fix permissions for new feature quick-translation\n try { setTransactionBookmark(); $oDB->createCommand(\"INSERT into {{survey_permissions}} (sid,uid,permission,read_p,update_p) SELECT sid,owner_id,'translations','1','1' from {{surveys}}\")->execute(); echo $modifyoutput; flush();@ob_flush();} catch(Exception $e) { rollBackToTransactionBookmark();}\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>146),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 147)\n {\n addColumn('{{users}}','templateeditormode',\"string(7) NOT NULL default 'default'\");\n addColumn('{{users}}','questionselectormode',\"string(7) NOT NULL default 'default'\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>147),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 148)\n {\n addColumn('{{users}}','participant_panel',\"integer NOT NULL default 0\");\n\n $oDB->createCommand()->createTable('{{participants}}',array(\n 'participant_id' => 'string(50) NOT NULL',\n 'firstname' => 'string(40) default NULL',\n 'lastname' => 'string(40) default NULL',\n 'email' => 'string(80) default NULL',\n 'language' => 'string(40) default NULL',\n 'blacklisted' => 'string(1) NOT NULL',\n 'owner_uid' => \"integer NOT NULL\"\n ));\n addPrimaryKey('participants', array('participant_id'));\n\n $oDB->createCommand()->createTable('{{participant_attribute}}',array(\n 'participant_id' => 'string(50) NOT NULL',\n 'attribute_id' => \"integer NOT NULL\",\n 'value' => 'string(50) NOT NULL'\n ));\n addPrimaryKey('participant_attribute', array('participant_id','attribute_id'));\n\n $oDB->createCommand()->createTable('{{participant_attribute_names}}',array(\n 'attribute_id' => 'autoincrement',\n 'attribute_type' => 'string(4) NOT NULL',\n 'visible' => 'string(5) NOT NULL',\n 'PRIMARY KEY (attribute_id,attribute_type)'\n ));\n\n $oDB->createCommand()->createTable('{{participant_attribute_names_lang}}',array(\n 'attribute_id' => 'integer NOT NULL',\n 'attribute_name' => 'string(30) NOT NULL',\n 'lang' => 'string(20) NOT NULL'\n ));\n addPrimaryKey('participant_attribute_names_lang', array('attribute_id','lang'));\n\n $oDB->createCommand()->createTable('{{participant_attribute_values}}',array(\n 'attribute_id' => 'integer NOT NULL',\n 'value_id' => 'pk',\n 'value' => 'string(20) NOT NULL'\n ));\n\n $oDB->createCommand()->createTable('{{participant_shares}}',array(\n 'participant_id' => 'string(50) NOT NULL',\n 'share_uid' => 'integer NOT NULL',\n 'date_added' => 'datetime NOT NULL',\n 'can_edit' => 'string(5) NOT NULL'\n ));\n addPrimaryKey('participant_shares', array('participant_id','share_uid'));\n\n $oDB->createCommand()->createTable('{{survey_links}}',array(\n 'participant_id' => 'string(50) NOT NULL',\n 'token_id' => 'integer NOT NULL',\n 'survey_id' => 'integer NOT NULL',\n 'date_created' => 'datetime NOT NULL'\n ));\n addPrimaryKey('survey_links', array('participant_id','token_id','survey_id'));\n // Add language field to question_attributes table\n addColumn('{{question_attributes}}','language',\"string(20)\");\n upgradeQuestionAttributes148();\n fixSubquestions();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>148),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 149)\n {\n $aFields = array(\n 'id' => 'integer',\n 'sid' => 'integer',\n 'parameter' => 'string(50)',\n 'targetqid' => 'integer',\n 'targetsqid' => 'integer'\n );\n $oDB->createCommand()->createTable('{{survey_url_parameters}}',$aFields);\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>149),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 150)\n {\n addColumn('{{questions}}','relevance','TEXT');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>150),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 151)\n {\n addColumn('{{groups}}','randomization_group',\"string(20) NOT NULL default ''\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>151),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 152)\n {\n $oDB->createCommand()->createIndex('question_attributes_idx3','{{question_attributes}}','attribute');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>152),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 153)\n {\n $oDB->createCommand()->createTable('{{expression_errors}}',array(\n 'id' => 'pk',\n 'errortime' => 'string(50)',\n 'sid' => 'integer',\n 'gid' => 'integer',\n 'qid' => 'integer',\n 'gseq' => 'integer',\n 'qseq' => 'integer',\n 'type' => 'string(50)',\n 'eqn' => 'text',\n 'prettyprint' => 'text'\n ));\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>153),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 154)\n {\n $oDB->createCommand()->addColumn('{{groups}}','grelevance',\"text\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>154),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 155)\n {\n addColumn('{{surveys}}','googleanalyticsstyle',\"string(1)\");\n addColumn('{{surveys}}','googleanalyticsapikey',\"string(25)\");\n try { setTransactionBookmark(); $oDB->createCommand()->renameColumn('{{surveys}}','showXquestions','showxquestions');} catch(Exception $e) { rollBackToTransactionBookmark();}\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>155),\"stg_name='DBVersion'\");\n }\n\n\n if ($iOldDBVersion < 156)\n {\n try\n {\n $oDB->createCommand()->dropTable('{{survey_url_parameters}}');\n }\n catch(Exception $e)\n {\n // do nothing\n }\n $oDB->createCommand()->createTable('{{survey_url_parameters}}',array(\n 'id' => 'pk',\n 'sid' => 'integer NOT NULL',\n 'parameter' => 'string(50) NOT NULL',\n 'targetqid' => 'integer',\n 'targetsqid' => 'integer'\n ));\n\n $oDB->createCommand()->dropTable('{{sessions}}');\n if (Yii::app()->db->driverName=='mysql')\n {\n $oDB->createCommand()->createTable('{{sessions}}',array(\n 'id' => 'string(32) NOT NULL',\n 'expire' => 'integer',\n 'data' => 'longtext'\n ));\n }\n else\n {\n $oDB->createCommand()->createTable('{{sessions}}',array(\n 'id' => 'string(32) NOT NULL',\n 'expire' => 'integer',\n 'data' => 'text'\n ));\n }\n\n addPrimaryKey('sessions', array('id'));\n addColumn('{{surveys_languagesettings}}','surveyls_attributecaptions',\"TEXT\");\n addColumn('{{surveys}}','sendconfirmation',\"string(1) default 'Y'\");\n\n upgradeSurveys156();\n\n // If a survey has an deleted owner, re-own the survey to the superadmin\n $oDB->schema->refresh();\n Survey::model()->refreshMetaData();\n $surveys = Survey::model();\n $surveys = $surveys->with(array('owner'))->findAll();\n foreach ($surveys as $row)\n {\n if (!isset($row->owner->attributes))\n {\n Survey::model()->updateByPk($row->sid,array('owner_id'=>1));\n }\n }\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>156),\"stg_name='DBVersion'\");\n $oTransaction->commit();\n $oTransaction=$oDB->beginTransaction();\n }\n\n if ($iOldDBVersion < 157)\n {\n // MySQL DB corrections\n try { setTransactionBookmark(); $oDB->createCommand()->dropIndex('questions_idx4','{{questions}}'); } catch(Exception $e) { rollBackToTransactionBookmark();}\n\n alterColumn('{{answers}}','assessment_value','integer',false , '0');\n dropPrimaryKey('answers');\n alterColumn('{{answers}}','scale_id','integer',false , '0');\n addPrimaryKey('answers', array('qid','code','language','scale_id'));\n alterColumn('{{conditions}}','method',\"string(5)\",false , '');\n alterColumn('{{participants}}','owner_uid','integer',false);\n alterColumn('{{participant_attribute_names}}','visible','string(5)',false);\n alterColumn('{{questions}}','type',\"string(1)\",false , 'T');\n alterColumn('{{questions}}','other',\"string(1)\",false , 'N');\n alterColumn('{{questions}}','mandatory',\"string(1)\");\n alterColumn('{{questions}}','scale_id','integer',false , '0');\n alterColumn('{{questions}}','parent_qid','integer',false ,'0');\n\n alterColumn('{{questions}}','same_default','integer',false , '0');\n alterColumn('{{quota}}','qlimit','integer');\n alterColumn('{{quota}}','action','integer');\n alterColumn('{{quota}}','active','integer',false , '1');\n alterColumn('{{quota}}','autoload_url','integer',false , '0');\n alterColumn('{{saved_control}}','status',\"string(1)\",false , '');\n try { setTransactionBookmark(); alterColumn('{{sessions}}','id',\"string(32)\",false); } catch(Exception $e) { rollBackToTransactionBookmark();}\n alterColumn('{{surveys}}','active',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','anonymized',\"string(1)\",false,'N');\n alterColumn('{{surveys}}','format',\"string(1)\");\n alterColumn('{{surveys}}','savetimings',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','datestamp',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','usecookie',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','allowregister',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','allowsave',\"string(1)\",false , 'Y');\n alterColumn('{{surveys}}','autonumber_start','integer' ,false, '0');\n alterColumn('{{surveys}}','autoredirect',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','allowprev',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','printanswers',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','ipaddr',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','refurl',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','publicstatistics',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','publicgraphs',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','listpublic',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','htmlemail',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','sendconfirmation',\"string(1)\",false , 'Y');\n alterColumn('{{surveys}}','tokenanswerspersistence',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','assessments',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','usecaptcha',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','usetokens',\"string(1)\",false , 'N');\n alterColumn('{{surveys}}','tokenlength','integer',false, '15');\n alterColumn('{{surveys}}','showxquestions',\"string(1)\", true , 'Y');\n alterColumn('{{surveys}}','showgroupinfo',\"string(1) \", true , 'B');\n alterColumn('{{surveys}}','shownoanswer',\"string(1) \", true , 'Y');\n alterColumn('{{surveys}}','showqnumcode',\"string(1) \", true , 'X');\n alterColumn('{{surveys}}','bouncetime','integer');\n alterColumn('{{surveys}}','showwelcome',\"string(1)\", true , 'Y');\n alterColumn('{{surveys}}','showprogress',\"string(1)\", true , 'Y');\n alterColumn('{{surveys}}','allowjumps',\"string(1)\", true , 'N');\n alterColumn('{{surveys}}','navigationdelay','integer', false , '0');\n alterColumn('{{surveys}}','nokeyboard',\"string(1)\", true , 'N');\n alterColumn('{{surveys}}','alloweditaftercompletion',\"string(1)\", true , 'N');\n alterColumn('{{surveys}}','googleanalyticsstyle',\"string(1)\");\n\n alterColumn('{{surveys_languagesettings}}','surveyls_dateformat','integer',false , 1);\n try { setTransactionBookmark(); alterColumn('{{survey_permissions}}','sid',\"integer\",false); } catch(Exception $e) { rollBackToTransactionBookmark();}\n try { setTransactionBookmark(); alterColumn('{{survey_permissions}}','uid',\"integer\",false); } catch(Exception $e) { rollBackToTransactionBookmark();}\n alterColumn('{{survey_permissions}}','create_p', 'integer',false , '0');\n alterColumn('{{survey_permissions}}','read_p', 'integer',false , '0');\n alterColumn('{{survey_permissions}}','update_p','integer',false , '0');\n alterColumn('{{survey_permissions}}','delete_p' ,'integer',false , '0');\n alterColumn('{{survey_permissions}}','import_p','integer',false , '0');\n alterColumn('{{survey_permissions}}','export_p' ,'integer',false , '0');\n\n alterColumn('{{survey_url_parameters}}','targetqid' ,'integer');\n alterColumn('{{survey_url_parameters}}','targetsqid' ,'integer');\n\n alterColumn('{{templates_rights}}','use','integer',false );\n\n alterColumn('{{users}}','create_survey','integer',false, '0');\n alterColumn('{{users}}','create_user','integer',false, '0');\n alterColumn('{{users}}','participant_panel','integer',false, '0');\n alterColumn('{{users}}','delete_user','integer',false, '0');\n alterColumn('{{users}}','superadmin','integer',false, '0');\n alterColumn('{{users}}','configurator','integer',false, '0');\n alterColumn('{{users}}','manage_template','integer',false, '0');\n alterColumn('{{users}}','manage_label','integer',false, '0');\n alterColumn('{{users}}','dateformat','integer',false, 1);\n alterColumn('{{users}}','participant_panel','integer',false , '0');\n alterColumn('{{users}}','parent_id','integer',false);\n try { setTransactionBookmark(); alterColumn('{{surveys_languagesettings}}','surveyls_survey_id',\"integer\",false); } catch(Exception $e) { rollBackToTransactionBookmark(); }\n alterColumn('{{user_groups}}','owner_id',\"integer\",false);\n dropPrimaryKey('user_in_groups');\n alterColumn('{{user_in_groups}}','ugid',\"integer\",false);\n alterColumn('{{user_in_groups}}','uid',\"integer\",false);\n\n // Additional corrections for Postgres\n try{ setTransactionBookmark(); $oDB->createCommand()->createIndex('questions_idx3','{{questions}}','gid');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->createIndex('conditions_idx3','{{conditions}}','cqid');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->createIndex('questions_idx4','{{questions}}','type');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->dropIndex('user_in_groups_idx1','{{user_in_groups}}');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->dropIndex('{{user_name_key}}','{{users}}');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->createIndex('users_name','{{users}}','users_name',true);} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); addPrimaryKey('user_in_groups', array('ugid','uid'));} catch(Exception $e) { rollBackToTransactionBookmark(); };\n\n alterColumn('{{participant_attribute}}','value',\"string(50)\", false);\n try{ setTransactionBookmark(); alterColumn('{{participant_attribute_names}}','attribute_type',\"string(4)\", false);} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); dropColumn('{{participant_attribute_names_lang}}','id');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); addPrimaryKey('participant_attribute_names_lang',array('attribute_id','lang'));} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->renameColumn('{{participant_shares}}','shared_uid','share_uid');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n alterColumn('{{participant_shares}}','date_added',\"datetime\", false);\n alterColumn('{{participants}}','firstname',\"string(40)\");\n alterColumn('{{participants}}','lastname',\"string(40)\");\n alterColumn('{{participants}}','email',\"string(80)\");\n alterColumn('{{participants}}','language',\"string(40)\");\n alterColumn('{{quota_languagesettings}}','quotals_name',\"string\");\n try{ setTransactionBookmark(); alterColumn('{{survey_permissions}}','sid','integer',false); } catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); alterColumn('{{survey_permissions}}','uid','integer',false); } catch(Exception $e) { rollBackToTransactionBookmark(); };\n alterColumn('{{users}}','htmleditormode',\"string(7)\",true,'default');\n\n // Sometimes the survey_links table was deleted before this step, if so\n // we recreate it (copied from line 663)\n if (!tableExists('{survey_links}')) {\n $oDB->createCommand()->createTable('{{survey_links}}',array(\n 'participant_id' => 'string(50) NOT NULL',\n 'token_id' => 'integer NOT NULL',\n 'survey_id' => 'integer NOT NULL',\n 'date_created' => 'datetime NOT NULL'\n ));\n addPrimaryKey('survey_links', array('participant_id','token_id','survey_id'));\n }\n alterColumn('{{survey_links}}','date_created',\"datetime\",true);\n alterColumn('{{saved_control}}','identifier',\"text\",false);\n alterColumn('{{saved_control}}','email',\"string(320)\");\n alterColumn('{{surveys}}','adminemail',\"string(320)\");\n alterColumn('{{surveys}}','bounce_email',\"string(320)\");\n alterColumn('{{users}}','email',\"string(320)\");\n\n try{ setTransactionBookmark(); $oDB->createCommand()->dropIndex('assessments_idx','{{assessments}}');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->createIndex('assessments_idx3','{{assessments}}','gid');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n\n try{ setTransactionBookmark(); $oDB->createCommand()->dropIndex('ixcode','{{labels}}');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->dropIndex('{{labels_ixcode_idx}}','{{labels}}');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->createIndex('labels_code_idx','{{labels}}','code');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n\n\n\n if (Yii::app()->db->driverName=='pgsql')\n {\n try{ setTransactionBookmark(); $oDB->createCommand(\"ALTER TABLE ONLY {{user_groups}} ADD PRIMARY KEY (ugid); \")->execute;} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand(\"ALTER TABLE ONLY {{users}} ADD PRIMARY KEY (uid); \")->execute;} catch(Exception $e) { rollBackToTransactionBookmark(); };\n }\n\n // Additional corrections for MSSQL\n alterColumn('{{answers}}','answer',\"text\",false);\n alterColumn('{{assessments}}','name',\"text\",false);\n alterColumn('{{assessments}}','message',\"text\",false);\n alterColumn('{{defaultvalues}}','defaultvalue',\"text\");\n alterColumn('{{expression_errors}}','eqn',\"text\");\n alterColumn('{{expression_errors}}','prettyprint',\"text\");\n alterColumn('{{groups}}','description',\"text\");\n alterColumn('{{groups}}','grelevance',\"text\");\n alterColumn('{{labels}}','title',\"text\");\n alterColumn('{{question_attributes}}','value',\"text\");\n alterColumn('{{questions}}','preg',\"text\");\n alterColumn('{{questions}}','help',\"text\");\n alterColumn('{{questions}}','relevance',\"text\");\n alterColumn('{{questions}}','question',\"text\",false);\n alterColumn('{{quota_languagesettings}}','quotals_quota_id',\"integer\",false);\n alterColumn('{{quota_languagesettings}}','quotals_message',\"text\",false);\n alterColumn('{{saved_control}}','refurl',\"text\");\n alterColumn('{{saved_control}}','access_code',\"text\",false);\n alterColumn('{{saved_control}}','ip',\"text\",false);\n alterColumn('{{saved_control}}','saved_thisstep',\"text\",false);\n alterColumn('{{saved_control}}','saved_date',\"datetime\",false);\n alterColumn('{{surveys}}','attributedescriptions',\"text\");\n alterColumn('{{surveys}}','emailresponseto',\"text\");\n alterColumn('{{surveys}}','emailnotificationto',\"text\");\n\n alterColumn('{{surveys_languagesettings}}','surveyls_description',\"text\");\n alterColumn('{{surveys_languagesettings}}','surveyls_welcometext',\"text\");\n alterColumn('{{surveys_languagesettings}}','surveyls_email_invite',\"text\");\n alterColumn('{{surveys_languagesettings}}','surveyls_email_remind',\"text\");\n alterColumn('{{surveys_languagesettings}}','surveyls_email_register',\"text\");\n alterColumn('{{surveys_languagesettings}}','surveyls_email_confirm',\"text\");\n alterColumn('{{surveys_languagesettings}}','surveyls_attributecaptions',\"text\");\n alterColumn('{{surveys_languagesettings}}','email_admin_notification',\"text\");\n alterColumn('{{surveys_languagesettings}}','email_admin_responses',\"text\");\n alterColumn('{{surveys_languagesettings}}','surveyls_endtext',\"text\");\n alterColumn('{{user_groups}}','description',\"text\",false);\n\n\n\n alterColumn('{{conditions}}','value','string',false,'');\n alterColumn('{{participant_shares}}','can_edit',\"string(5)\",false);\n\n alterColumn('{{users}}','password',\"binary\",false);\n dropColumn('{{users}}','one_time_pw');\n addColumn('{{users}}','one_time_pw','binary');\n\n\n $oDB->createCommand()->update('{{question_attributes}}',array('value'=>'1'),\"attribute = 'random_order' and value = '2'\");\n\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>157),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 158)\n {\n LimeExpressionManager::UpgradeConditionsToRelevance();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>158),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 159)\n {\n alterColumn('{{failed_login_attempts}}', 'ip', \"string(40)\",false);\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>159),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 160)\n {\n alterLanguageCode('it','it-informal');\n alterLanguageCode('it-formal','it');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>160),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 161)\n {\n addColumn('{{survey_links}}','date_invited','datetime NULL default NULL');\n addColumn('{{survey_links}}','date_completed','datetime NULL default NULL');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>161),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 162)\n {\n /* Fix participant db types */\n alterColumn('{{participant_attribute}}', 'value', \"text\", false);\n alterColumn('{{participant_attribute_names_lang}}', 'attribute_name', \"string(255)\", false);\n alterColumn('{{participant_attribute_values}}', 'value', \"text\", false);\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>162),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 163)\n {\n //Replace by <script type=\"text/javascript\" src=\"{TEMPLATEURL}template.js\"></script> by {TEMPLATEJS}\n\n $replacedTemplate=replaceTemplateJS();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>163),\"stg_name='DBVersion'\");\n\n }\n\n if ($iOldDBVersion < 164)\n {\n upgradeTokens148(); // this should have bee done in 148 - that's why it is named this way\n // fix survey tables for missing or incorrect token field\n upgradeSurveyTables164();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>164),\"stg_name='DBVersion'\");\n\n // Not updating settings table as upgrade process takes care of that step now\n }\n\n if ($iOldDBVersion < 165)\n {\n $oDB->createCommand()->createTable('{{plugins}}', array(\n 'id' => 'pk',\n 'name' => 'string NOT NULL',\n 'active' => 'boolean'\n ));\n $oDB->createCommand()->createTable('{{plugin_settings}}', array(\n 'id' => 'pk',\n 'plugin_id' => 'integer NOT NULL',\n 'model' => 'string',\n 'model_id' => 'integer',\n 'key' => 'string',\n 'value' => 'text'\n ));\n alterColumn('{{surveys_languagesettings}}','surveyls_url',\"text\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>165),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 166)\n {\n $oDB->createCommand()->renameTable('{{survey_permissions}}', '{{permissions}}');\n dropPrimaryKey('permissions');\n alterColumn('{{permissions}}', 'permission', \"string(100)\", false);\n $oDB->createCommand()->renameColumn('{{permissions}}','sid','entity_id');\n alterColumn('{{permissions}}', 'entity_id', \"string(100)\", false);\n addColumn('{{permissions}}','entity',\"string(50)\");\n $oDB->createCommand(\"update {{permissions}} set entity='survey'\")->query();\n addColumn('{{permissions}}','id','pk');\n $oDB->createCommand()->createIndex('idxPermissions','{{permissions}}','entity_id,entity,permission,uid',true);\n\n upgradePermissions166();\n dropColumn('{{users}}','create_survey');\n dropColumn('{{users}}','create_user');\n dropColumn('{{users}}','delete_user');\n dropColumn('{{users}}','superadmin');\n dropColumn('{{users}}','configurator');\n dropColumn('{{users}}','manage_template');\n dropColumn('{{users}}','manage_label');\n dropColumn('{{users}}','participant_panel');\n $oDB->createCommand()->dropTable('{{templates_rights}}');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>166),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 167)\n {\n addColumn('{{surveys_languagesettings}}', 'attachments', 'text');\n addColumn('{{users}}', 'created', 'datetime');\n addColumn('{{users}}', 'modified', 'datetime');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>167),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 168)\n {\n addColumn('{{participants}}', 'created', 'datetime');\n addColumn('{{participants}}', 'modified', 'datetime');\n addColumn('{{participants}}', 'created_by', 'integer');\n $oDB->createCommand('update {{participants}} set created_by=owner_uid')->query();\n alterColumn('{{participants}}', 'created_by', \"integer\", false);\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>168),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 169)\n {\n // Add new column for question index options.\n addColumn('{{surveys}}', 'questionindex', 'integer not null default 0');\n // Set values for existing surveys.\n $oDB->createCommand(\"update {{surveys}} set questionindex = 0 where allowjumps <> 'Y'\")->query();\n $oDB->createCommand(\"update {{surveys}} set questionindex = 1 where allowjumps = 'Y'\")->query();\n\n // Remove old column.\n dropColumn('{{surveys}}', 'allowjumps');\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>169),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 170)\n {\n // renamed advanced attributes fields dropdown_dates_year_min/max\n $oDB->createCommand()->update('{{question_attributes}}',array('attribute'=>'date_min'),\"attribute='dropdown_dates_year_min'\");\n $oDB->createCommand()->update('{{question_attributes}}',array('attribute'=>'date_max'),\"attribute='dropdown_dates_year_max'\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>170),\"stg_name='DBVersion'\");\n }\n\n if ($iOldDBVersion < 171)\n {\n try {\n dropColumn('{{sessions}}','data');\n }\n catch (Exception $e) {\n \n }\n switch (Yii::app()->db->driverName){\n case 'mysql':\n case 'mysqli':\n addColumn('{{sessions}}', 'data', 'longbinary');\n break;\n case 'sqlsrv':\n case 'dblib':\n case 'mssql':\n addColumn('{{sessions}}', 'data', 'VARBINARY(MAX)');\n break;\n case 'pgsql':\n addColumn('{{sessions}}', 'data', 'BYTEA');\n break;\n default: die('Unknown database type');\n }\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>171),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 172)\n {\n switch (Yii::app()->db->driverName){\n case 'pgsql':\n // Special treatment for Postgres as it is too dumb to convert a string to a number without explicit being told to do so ... seriously?\n alterColumn('{{permissions}}', 'entity_id', \"INTEGER USING (entity_id::integer)\", false);\n break;\n case 'sqlsrv':\n case 'dblib':\n case 'mssql':\n try{ setTransactionBookmark(); $oDB->createCommand()->dropIndex('permissions_idx2','{{permissions}}');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n try{ setTransactionBookmark(); $oDB->createCommand()->dropIndex('idxPermissions','{{permissions}}');} catch(Exception $e) { rollBackToTransactionBookmark(); };\n alterColumn('{{permissions}}', 'entity_id', \"INTEGER\", false);\n $oDB->createCommand()->createIndex('permissions_idx2','{{permissions}}','entity_id,entity,permission,uid',true);\n break;\n default:\n alterColumn('{{permissions}}', 'entity_id', \"INTEGER\", false);\n }\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>172),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 173)\n {\n addColumn('{{participant_attribute_names}}','defaultname',\"string(50) NOT NULL default ''\");\n upgradeCPDBAttributeDefaultNames173();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>173),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 174)\n {\n alterColumn('{{participants}}', 'email', \"string(254)\");\n alterColumn('{{saved_control}}', 'email', \"string(254)\");\n alterColumn('{{surveys}}', 'adminemail', \"string(254)\");\n alterColumn('{{surveys}}', 'bounce_email', \"string(254)\");\n switch (Yii::app()->db->driverName){\n case 'sqlsrv':\n case 'dblib':\n case 'mssql': dropUniqueKeyMSSQL('email','{{users}}');\n }\n alterColumn('{{users}}', 'email', \"string(254)\");\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>174),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 175)\n {\n switch (Yii::app()->db->driverName){\n case 'pgsql':\n // Special treatment for Postgres as it is too dumb to convert a boolean to a number without explicit being told to do so\n alterColumn('{{plugins}}', 'active', \"INTEGER USING (active::integer)\", false);\n break;\n default:\n alterColumn('{{plugins}}', 'active', \"integer\",false,'0');\n }\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>175),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 176)\n {\n upgradeTokens176();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>176),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 177)\n {\n if ( Yii::app()->getConfig('auth_webserver') === true ) {\n // using auth webserver, now activate the plugin with default settings.\n if (!class_exists('Authwebserver', false)) {\n $plugin = Plugin::model()->findByAttributes(array('name'=>'Authwebserver'));\n if (!$plugin) {\n $plugin = new Plugin();\n $plugin->name = 'Authwebserver';\n $plugin->active = 1;\n $plugin->save();\n $plugin = App()->getPluginManager()->loadPlugin('Authwebserver', $plugin->id);\n $aPluginSettings = $plugin->getPluginSettings(true);\n $aDefaultSettings = array();\n foreach ($aPluginSettings as $key => $settings) {\n if (is_array($settings) && array_key_exists('current', $settings) ) {\n $aDefaultSettings[$key] = $settings['current'];\n }\n }\n $plugin->saveSettings($aDefaultSettings);\n } else {\n $plugin->active = 1;\n $plugin->save();\n }\n }\n }\n upgradeSurveys177();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>177),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 178)\n {\n if (Yii::app()->db->driverName=='mysql' || Yii::app()->db->driverName=='mysqli')\n {\n modifyPrimaryKey('questions', array('qid','language'));\n }\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>178),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 179)\n {\n upgradeSurveys177(); // Needs to be run again to make sure\n upgradeTokenTables179();\n alterColumn('{{participants}}', 'email', \"string(254)\", false);\n alterColumn('{{participants}}', 'firstname', \"string(150)\", false);\n alterColumn('{{participants}}', 'lastname', \"string(150)\", false);\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>179),\"stg_name='DBVersion'\");\n }\n if ($iOldDBVersion < 180)\n {\n $aUsers = User::model()->findAll();\n $aPerm = array(\n 'entity_id' => 0,\n 'entity' => 'global',\n 'uid' => 0,\n 'permission' => 'auth_db',\n 'create_p' => 0,\n 'read_p' => 1,\n 'update_p' => 0,\n 'delete_p' => 0,\n 'import_p' => 0,\n 'export_p' => 0\n );\n\n foreach ($aUsers as $oUser)\n {\n if (!Permission::model()->hasGlobalPermission('auth_db','read',$oUser->uid))\n {\n $oPermission = new Permission;\n foreach ($aPerm as $k => $v)\n {\n $oPermission->$k = $v;\n }\n $oPermission->uid = $oUser->uid;\n $oPermission->save();\n }\n }\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>180),\"stg_name='DBVersion'\");\n \n }\n if ($iOldDBVersion < 181)\n {\n upgradeTokenTables181();\n upgradeSurveyTables181();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>181),\"stg_name='DBVersion'\");\n } \n if ($iOldDBVersion < 182)\n {\n fixKCFinder182();\n $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>182),\"stg_name='DBVersion'\");\n } \n $oTransaction->commit();\n // Activate schema caching\n $oDB->schemaCachingDuration=3600;\n // Load all tables of the application in the schema\n $oDB->schema->getTables();\n // clear the cache of all loaded tables\n $oDB->schema->refresh();\n }\n catch(Exception $e)\n {\n $oTransaction->rollback();\n // Activate schema caching\n $oDB->schemaCachingDuration=3600;\n // Load all tables of the application in the schema\n $oDB->schema->getTables();\n // clear the cache of all loaded tables\n $oDB->schema->refresh();\n echo '<br /><br />'.gT('An non-recoverable error happened during the update. Error details:').\"<p>\".htmlspecialchars($e->getMessage()).'</p><br />';\n return false;\n }\n fixLanguageConsistencyAllSurveys();\n echo '<br /><br />'.sprintf(gT('Database update finished (%s)'),date('Y-m-d H:i:s')).'<br /><br />';\n return true;\n}", "public function setCharset(string $charset)\n {\n $this->charset = $charset;\n }", "function sql_connect() {\n // Create connection\n $conn = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n // check connection\n if(!$conn){\n die(\"Connection failed: \" . mysqli_connect_error());\n }\n\n mysqli_set_charset($conn, \"utf8\");\n return $conn;\n}", "public function setAll(array $data, $encoding = 'UTF-8') {}", "public function getDownSQL()\n {\n return array (\n 'cungfoo' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `demande_identifiant_i18n`;\n\nDROP TABLE IF EXISTS `top_camping_i18n`;\n\nDROP TABLE IF EXISTS `demande_annulation_i18n`;\n\nALTER TABLE `activite_i18n` DROP `seo_title`;\n\nALTER TABLE `activite_i18n` DROP `seo_description`;\n\nALTER TABLE `activite_i18n` DROP `seo_h1`;\n\nALTER TABLE `activite_i18n` DROP `seo_keywords`;\n\nALTER TABLE `avantage_i18n` DROP `seo_title`;\n\nALTER TABLE `avantage_i18n` DROP `seo_description`;\n\nALTER TABLE `avantage_i18n` DROP `seo_h1`;\n\nALTER TABLE `avantage_i18n` DROP `seo_keywords`;\n\nALTER TABLE `baignade_i18n` DROP `seo_title`;\n\nALTER TABLE `baignade_i18n` DROP `seo_description`;\n\nALTER TABLE `baignade_i18n` DROP `seo_h1`;\n\nALTER TABLE `baignade_i18n` DROP `seo_keywords`;\n\nALTER TABLE `bon_plan_categorie_i18n` DROP `seo_title`;\n\nALTER TABLE `bon_plan_categorie_i18n` DROP `seo_description`;\n\nALTER TABLE `bon_plan_categorie_i18n` DROP `seo_h1`;\n\nALTER TABLE `bon_plan_categorie_i18n` DROP `seo_keywords`;\n\nALTER TABLE `bon_plan_i18n` DROP `seo_title`;\n\nALTER TABLE `bon_plan_i18n` DROP `seo_description`;\n\nALTER TABLE `bon_plan_i18n` DROP `seo_h1`;\n\nALTER TABLE `bon_plan_i18n` DROP `seo_keywords`;\n\nALTER TABLE `categorie_i18n` DROP `seo_title`;\n\nALTER TABLE `categorie_i18n` DROP `seo_description`;\n\nALTER TABLE `categorie_i18n` DROP `seo_h1`;\n\nALTER TABLE `categorie_i18n` DROP `seo_keywords`;\n\nALTER TABLE `category_type_hebergement_i18n` DROP `seo_title`;\n\nALTER TABLE `category_type_hebergement_i18n` DROP `seo_description`;\n\nALTER TABLE `category_type_hebergement_i18n` DROP `seo_h1`;\n\nALTER TABLE `category_type_hebergement_i18n` DROP `seo_keywords`;\n\nALTER TABLE `departement_i18n` DROP `seo_title`;\n\nALTER TABLE `departement_i18n` DROP `seo_description`;\n\nALTER TABLE `departement_i18n` DROP `seo_h1`;\n\nALTER TABLE `departement_i18n` DROP `seo_keywords`;\n\nALTER TABLE `edito_i18n` DROP `seo_title`;\n\nALTER TABLE `edito_i18n` DROP `seo_description`;\n\nALTER TABLE `edito_i18n` DROP `seo_h1`;\n\nALTER TABLE `edito_i18n` DROP `seo_keywords`;\n\nALTER TABLE `etablissement_i18n` DROP `seo_title`;\n\nALTER TABLE `etablissement_i18n` DROP `seo_description`;\n\nALTER TABLE `etablissement_i18n` DROP `seo_h1`;\n\nALTER TABLE `etablissement_i18n` DROP `seo_keywords`;\n\nALTER TABLE `event_i18n` DROP `seo_title`;\n\nALTER TABLE `event_i18n` DROP `seo_description`;\n\nALTER TABLE `event_i18n` DROP `seo_h1`;\n\nALTER TABLE `event_i18n` DROP `seo_keywords`;\n\nALTER TABLE `idee_weekend_i18n` DROP `seo_title`;\n\nALTER TABLE `idee_weekend_i18n` DROP `seo_description`;\n\nALTER TABLE `idee_weekend_i18n` DROP `seo_h1`;\n\nALTER TABLE `idee_weekend_i18n` DROP `seo_keywords`;\n\nALTER TABLE `mise_en_avant_i18n` DROP `seo_title`;\n\nALTER TABLE `mise_en_avant_i18n` DROP `seo_description`;\n\nALTER TABLE `mise_en_avant_i18n` DROP `seo_h1`;\n\nALTER TABLE `mise_en_avant_i18n` DROP `seo_keywords`;\n\nALTER TABLE `multimedia_etablissement_i18n` DROP `seo_title`;\n\nALTER TABLE `multimedia_etablissement_i18n` DROP `seo_description`;\n\nALTER TABLE `multimedia_etablissement_i18n` DROP `seo_h1`;\n\nALTER TABLE `multimedia_etablissement_i18n` DROP `seo_keywords`;\n\nALTER TABLE `multimedia_type_hebergement_i18n` DROP `seo_title`;\n\nALTER TABLE `multimedia_type_hebergement_i18n` DROP `seo_description`;\n\nALTER TABLE `multimedia_type_hebergement_i18n` DROP `seo_h1`;\n\nALTER TABLE `multimedia_type_hebergement_i18n` DROP `seo_keywords`;\n\nALTER TABLE `pays_i18n` DROP `seo_title`;\n\nALTER TABLE `pays_i18n` DROP `seo_description`;\n\nALTER TABLE `pays_i18n` DROP `seo_h1`;\n\nALTER TABLE `pays_i18n` DROP `seo_keywords`;\n\nALTER TABLE `personnage_i18n` DROP `seo_title`;\n\nALTER TABLE `personnage_i18n` DROP `seo_description`;\n\nALTER TABLE `personnage_i18n` DROP `seo_h1`;\n\nALTER TABLE `personnage_i18n` DROP `seo_keywords`;\n\nALTER TABLE `point_interet_i18n` DROP `seo_title`;\n\nALTER TABLE `point_interet_i18n` DROP `seo_description`;\n\nALTER TABLE `point_interet_i18n` DROP `seo_h1`;\n\nALTER TABLE `point_interet_i18n` DROP `seo_keywords`;\n\nALTER TABLE `region_i18n` DROP `seo_title`;\n\nALTER TABLE `region_i18n` DROP `seo_description`;\n\nALTER TABLE `region_i18n` DROP `seo_h1`;\n\nALTER TABLE `region_i18n` DROP `seo_keywords`;\n\nALTER TABLE `region_ref_i18n` DROP `seo_title`;\n\nALTER TABLE `region_ref_i18n` DROP `seo_description`;\n\nALTER TABLE `region_ref_i18n` DROP `seo_h1`;\n\nALTER TABLE `region_ref_i18n` DROP `seo_keywords`;\n\nALTER TABLE `service_complementaire_i18n` DROP `seo_title`;\n\nALTER TABLE `service_complementaire_i18n` DROP `seo_description`;\n\nALTER TABLE `service_complementaire_i18n` DROP `seo_h1`;\n\nALTER TABLE `service_complementaire_i18n` DROP `seo_keywords`;\n\nALTER TABLE `situation_geographique_i18n` DROP `seo_title`;\n\nALTER TABLE `situation_geographique_i18n` DROP `seo_description`;\n\nALTER TABLE `situation_geographique_i18n` DROP `seo_h1`;\n\nALTER TABLE `situation_geographique_i18n` DROP `seo_keywords`;\n\nALTER TABLE `tag_i18n` DROP `seo_title`;\n\nALTER TABLE `tag_i18n` DROP `seo_description`;\n\nALTER TABLE `tag_i18n` DROP `seo_h1`;\n\nALTER TABLE `tag_i18n` DROP `seo_keywords`;\n\nALTER TABLE `thematique_i18n` DROP `seo_title`;\n\nALTER TABLE `thematique_i18n` DROP `seo_description`;\n\nALTER TABLE `thematique_i18n` DROP `seo_h1`;\n\nALTER TABLE `thematique_i18n` DROP `seo_keywords`;\n\nALTER TABLE `theme_i18n` DROP `seo_title`;\n\nALTER TABLE `theme_i18n` DROP `seo_description`;\n\nALTER TABLE `theme_i18n` DROP `seo_h1`;\n\nALTER TABLE `theme_i18n` DROP `seo_keywords`;\n\nALTER TABLE `type_hebergement_capacite_i18n` DROP `seo_title`;\n\nALTER TABLE `type_hebergement_capacite_i18n` DROP `seo_description`;\n\nALTER TABLE `type_hebergement_capacite_i18n` DROP `seo_h1`;\n\nALTER TABLE `type_hebergement_capacite_i18n` DROP `seo_keywords`;\n\nALTER TABLE `type_hebergement_i18n` DROP `seo_title`;\n\nALTER TABLE `type_hebergement_i18n` DROP `seo_description`;\n\nALTER TABLE `type_hebergement_i18n` DROP `seo_h1`;\n\nALTER TABLE `type_hebergement_i18n` DROP `seo_keywords`;\n\nALTER TABLE `ville_i18n` DROP `seo_title`;\n\nALTER TABLE `ville_i18n` DROP `seo_description`;\n\nALTER TABLE `ville_i18n` DROP `seo_h1`;\n\nALTER TABLE `ville_i18n` DROP `seo_keywords`;\n\nALTER TABLE `vos_vacances_i18n` DROP `seo_title`;\n\nALTER TABLE `vos_vacances_i18n` DROP `seo_description`;\n\nALTER TABLE `vos_vacances_i18n` DROP `seo_h1`;\n\nALTER TABLE `vos_vacances_i18n` DROP `seo_keywords`;\n\nDROP TABLE IF EXISTS `seo`;\n\nDROP TABLE IF EXISTS `seo_i18n`;\n\nALTER TABLE `destination_i18n` CHANGE `seo_title` `seo_title` VARCHAR(255) DEFAULT \\'\\';\n\nALTER TABLE `destination_i18n` CHANGE `seo_h1` `seo_h1` VARCHAR(255) DEFAULT \\'\\';\n\nALTER TABLE `metadata_i18n` CHANGE `seo_title` `seo_title` VARCHAR(255) DEFAULT \\'\\';\n\nALTER TABLE `metadata_i18n` CHANGE `seo_h1` `seo_h1` VARCHAR(255) DEFAULT \\'\\';\n\nALTER TABLE `destination_i18n` DROP `seo_h1`;\n\nALTER TABLE `destination_i18n` DROP `seo_keywords`;\n\nALTER TABLE `metadata_i18n` DROP `seo_h1`;\n\nALTER TABLE `metadata_i18n` DROP `seo_keywords`;\n\nALTER TABLE `metadata_i18n` DROP `seo_title`;\n\nALTER TABLE `metadata_i18n` DROP `seo_description`;\n\nALTER TABLE `destination_i18n` DROP `seo_title`;\n\nALTER TABLE `destination_i18n` DROP `seo_description`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "function backupDatabaseTables($dbHost, $dbUsername, $dbPassword, $dbName, $tables = '*')\n\t{\n\t\t$db = new mysqli($dbHost, $dbUsername, $dbPassword, $dbName);\n\t\t//Mendapatkan semua Table\n\t\tif ($tables == '*') {\n\t\t\t$tables = array();\n\t\t\t$result = $db->query(\"SHOW TABLES\");\n\t\t\twhile ($row = $result->fetch_row()) {\n\t\t\t\t$tables[] = $row[0];\n\t\t\t}\n\t\t} else {\n\t\t\t$tables = is_array($tables) ? $tables : explode(',', $tables);\n\t\t}\n\t\t$return = '';\n\t\t//Loop melalui Table\n\t\tforeach ($tables as $table) {\n\t\t\t$result = $db->query(\"SELECT * FROM $table\");\n\t\t\t$numColumns = $result->field_count;\n\t\t\t$return .= \"DROP TABLE $table;\";\n\t\t\t$result2 = $db->query(\"SHOW CREATE TABLE $table\");\n\t\t\t$row2 = $result2->fetch_row();\n\t\t\t$return .= \"\\n\\n\" . $row2[1] . \";\\n\\n\";\n\t\t\tfor ($i = 0; $i < $numColumns; $i++) {\n\t\t\t\twhile ($row = $result->fetch_row()) {\n\t\t\t\t\t$return .= \"INSERT INTO $table VALUES(\";\n\t\t\t\t\tfor ($j = 0; $j < $numColumns; $j++) {\n\t\t\t\t\t\t$row[$j] = addslashes($row[$j]);\n\t\t\t\t\t\t$row[$j] = preg_replace(\"/\\n/\", \"\\\\n\", $row[$j]);\n\t\t\t\t\t\tif (isset($row[$j])) {\n\t\t\t\t\t\t\t$return .= '\"' . $row[$j] . '\"';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$return .= '\"\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($j < ($numColumns - 1)) {\n\t\t\t\t\t\t\t$return .= ',';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$return .= \");\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$return .= \"\\n\\n\\n\";\n\t\t}\n\t\t//simpan file\n\t\t$handle = fopen('../assets/backup/esurvei-' . date('Ymd') . '.sql', 'w+');\n\t\tfwrite($handle, $return);\n\t\tfclose($handle);\n\t}", "protected function setUtf8Context()\n {\n setlocale(LC_ALL, $locale = 'en_US.UTF-8');\n putenv('LC_ALL=' . $locale);\n }", "public static function encoding($charset)\n {\n }", "function get_encodings()\r\n {\r\n $rez = array();\r\n $sql = \"SHOW CHARACTER SET\";\r\n $res = @mysql_query($sql);\r\n if(mysql_num_rows($res) > 0)\r\n {\r\n while ($row = mysql_fetch_assoc ($res))\r\n {\r\n $rez[$row[\"Charset\"]] = (\"\" != $row[\"Description\"] ? $row[\"Description\"] : $row[\"Charset\"]); //some MySQL databases return empty Description field\r\n }\r\n }\r\n return $rez;\r\n }", "public static function reset_mbstring_encoding() {\n\t\tself::mbstring_binary_safe_encoding(true);\n\t}", "function set_content_columns($table_name) {\n\t\t\t$this->content_columns = $this->content_columns_all = self::$db->table_info($table_name);\n\t\t\t$table_name_i18n = $table_name.$this->i18n_table_suffix;\n\n\t\t\tif($this->is_i18n && self::$db->table_exists($table_name_i18n)) {\n\t\t\t\t$reserved_columns = $this->i18n_reserved_columns;\n\t\t\t\t$this->content_columns_i18n = $i18n_columns = self::$db->table_info($table_name_i18n);\n\t\t\t\t$this->content_columns_all = array_merge($this->content_columns, $i18n_columns);\n\n\t\t\t\tforeach($i18n_columns as $key => $col) {\n\t\t\t\t\tif(in_array($col['name'], $reserved_columns)) {\n\t\t\t\t\t\tunset($i18n_columns[$key]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->i18n_column_names[] = $col['name'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->i18n_table = $table_name_i18n;\n\t\t\t} else {\n\t\t\t\t$this->is_i18n = false;\n\t\t\t}\n\t\t}", "private function changeDatabaseCollation($newCollation)\n\t{\n\t\t$db = $this->container->db;\n\t\t$collationParts = explode('_', $newCollation);\n\t\t$charset = $collationParts[0];\n\t\t$dbName = $this->container->platform->getConfig()->get('db');\n\n\t\t$this->query(sprintf(\n\t\t\t\"ALTER DATABASE %s CHARACTER SET = %s COLLATE = %s\",\n\t\t\t$db->qn($dbName),\n\t\t\t$charset,\n\t\t\t$newCollation\n\t\t));\n\t}" ]
[ "0.7186634", "0.70275986", "0.6864148", "0.6849646", "0.6609463", "0.6600705", "0.6423357", "0.6407846", "0.6255509", "0.6217119", "0.6161178", "0.6103325", "0.60913867", "0.6069469", "0.60602903", "0.60290754", "0.6023016", "0.6019959", "0.5961847", "0.5909544", "0.583975", "0.5783891", "0.5740957", "0.5696413", "0.5657116", "0.5656371", "0.5642773", "0.5601999", "0.55949974", "0.55885553", "0.5550862", "0.5535507", "0.55289364", "0.55240047", "0.5506989", "0.549106", "0.54866207", "0.5472514", "0.54668176", "0.54591566", "0.5444853", "0.5397166", "0.53701884", "0.53603685", "0.53292793", "0.5323666", "0.53225183", "0.5297274", "0.52936184", "0.5253105", "0.5248008", "0.523477", "0.52315694", "0.52267855", "0.52267855", "0.52267855", "0.52267855", "0.5222729", "0.51989955", "0.519879", "0.519879", "0.5191876", "0.5184917", "0.5177112", "0.51710725", "0.5164102", "0.5163207", "0.5155578", "0.51537377", "0.5148814", "0.5136152", "0.51259404", "0.5108108", "0.5089798", "0.5088539", "0.508739", "0.50846624", "0.5082434", "0.5081502", "0.5079656", "0.50765795", "0.50711966", "0.50704443", "0.5069747", "0.50635326", "0.5062187", "0.5060649", "0.50583375", "0.5040606", "0.5033549", "0.50088257", "0.50083005", "0.5002931", "0.50026464", "0.50010836", "0.49838352", "0.49824095", "0.497745", "0.4973914", "0.49640048" ]
0.7734704
0
Display a listing of the resource.
public function index(request $request) { if($request->has('cari')){ $dtKepen = Kependidikan::where('nama','LIKE', '%' .$request->cari. '%')->paginate(2); }else{ $dtKepen = Kependidikan::paginate(2); } return view('KependidikanView.kependidikan-index', compact('dtKepen')); }
{ "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 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 actionRestList() {\n\t $this->doRestList();\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 CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\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 index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "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 index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\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 return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\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 _index(){\n\t $this->_list();\n\t}", "public function index()\n {\n $this->booklist();\n }", "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 $items = Item::all();\n return view('items::list_items',compact('items'));\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 // 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 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 showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\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 actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\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 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 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 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 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 $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\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.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236", "0.68033123", "0.6797587", "0.6795274", "0.67868614", "0.67610204", "0.67426085", "0.67303514", "0.6727031", "0.67257243", "0.67257243", "0.67257243", "0.67195046", "0.67067856", "0.67063624", "0.67045796", "0.66655326", "0.666383", "0.66611767", "0.66604036", "0.66582054", "0.6654805", "0.6649084", "0.6620993", "0.66197145", "0.6616024", "0.66077465", "0.6602853", "0.6601494", "0.6593894", "0.65878326", "0.6586189", "0.6584675", "0.65813804", "0.65766823", "0.65754175", "0.657203", "0.657202", "0.65713936", "0.65642136", "0.6563951", "0.6553249", "0.6552584", "0.6546312", "0.6536654", "0.6534106", "0.6532539", "0.6527516", "0.6526785", "0.6526042", "0.65191233", "0.6518727", "0.6517732", "0.6517689", "0.65155584", "0.6507816", "0.65048593", "0.6503226", "0.6495243", "0.6492096", "0.6486592", "0.64862204", "0.6485348", "0.6483991", "0.64789015", "0.6478804", "0.64708763", "0.6470304", "0.64699143", "0.6467142", "0.646402", "0.6463102", "0.6460929", "0.6458856", "0.6454334", "0.6453653", "0.645357", "0.6450551", "0.64498454", "0.64480853", "0.64453584" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('KependidikanView.kependidikan-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) { $nm = $request->foto; $nmFile = $nm->getClientOriginalName(); $dtUp = new Kependidikan; $dtUp->nip = $request->nip; $dtUp->nama = $request->nama; $dtUp->foto = $nmFile; $nm->move(public_path().'/img', $nmFile); $dtUp->save(); return redirect('/kependidikan') -> with('status','Success'); }
{ "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.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show(kependidikan $kependidikan) { return view('KependidikanView.kependidikan-detail',compact('kependidikan')); }
{ "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(kependidikan $kependidikan) { return view('KependidikanView.kependidikan-edit',compact('kependidikan')); }
{ "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($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(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, 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 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(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\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 $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($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(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 editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n {\n return view('initializer::edit');\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 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($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "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(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\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 $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "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.78560394", "0.76944435", "0.7274738", "0.7242069", "0.7171281", "0.70639855", "0.7054131", "0.6983364", "0.69478005", "0.69461757", "0.69413805", "0.69277894", "0.690145", "0.68984276", "0.68984276", "0.68784773", "0.68642735", "0.68610847", "0.6857929", "0.684406", "0.6834666", "0.6812317", "0.6806476", "0.68056434", "0.6802016", "0.6796308", "0.67925215", "0.67925215", "0.6788407", "0.67854327", "0.67798024", "0.67778105", "0.6768292", "0.67620933", "0.6746622", "0.6746622", "0.67451817", "0.6744156", "0.67404944", "0.67362344", "0.672656", "0.67133087", "0.66945624", "0.66931814", "0.6689649", "0.6689253", "0.66885525", "0.668543", "0.6683226", "0.66704214", "0.6670041", "0.666635", "0.666635", "0.6661137", "0.66608137", "0.6659381", "0.6657332", "0.66547334", "0.6653617", "0.6643329", "0.6632568", "0.6632244", "0.6628306", "0.6628306", "0.6620114", "0.66194344", "0.66173506", "0.6616366", "0.6611815", "0.6609614", "0.6606548", "0.65972704", "0.6595697", "0.6595222", "0.65914685", "0.65912557", "0.6588314", "0.6581422", "0.6581033", "0.6580827", "0.657766", "0.6577083", "0.6574992", "0.6570292", "0.65680474", "0.65676284", "0.6567584", "0.65626866", "0.6562467", "0.6562467", "0.65586925", "0.6558524", "0.6557367", "0.65571094", "0.6556675", "0.6556111", "0.6555878", "0.6555186", "0.6549289", "0.6548959", "0.65455836" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $ubah = Kependidikan::findorfail($id); $awal = $ubah->foto; $dt = [ 'nip' => $request['nip'], 'nama' => $request['nama'], 'foto' => $awal, ]; $request->foto->move(public_path().'/img', $awal); $ubah->update($dt); return redirect('/kependidikan') -> with('status','Change Saved'); }
{ "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(kependidikan $kependidikan) { Kependidikan::destroy($kependidikan->id); return redirect('/kependidikan') -> with('status','Deleted'); }
{ "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
method response digunakan untuk langsung mencetak string / text ke layar
public function getWelcome(){ // berguna untuk debugging return response("Welcome"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLangWidgetAction()\n {\n $this->response['LANG'] = array(\n 'YOURCITY' => 'Ваш город',\n 'COURIER' => 'Курьер',\n 'PICKUP' => 'Самовывоз',\n 'TERM' => 'Срок',\n 'PRICE' => 'Стоимость',\n 'DAY' => 'дн.',\n 'RUB' => 'руб.',\n 'NODELIV' => 'Нет доставки',\n 'CITYSEATCH' => 'Поиск города',\n 'CITYSEARCH' => 'Поиск города',\n 'ALL' => 'Все',\n 'PVZ' => 'Пункты выдачи',\n 'MOSCOW' => 'Москва',\n 'RUSSIA' => 'Россия',\n 'COUNTING' => 'Идет расчет',\n\n 'NO_AVAIL' => 'Нет доступных способов доставки',\n 'CHOOSE_TYPE_AVAIL' => 'Выберите способ доставки',\n 'CHOOSE_OTHER_CITY' => 'Выберите другой населенный пункт',\n\n 'EST' => 'есть',\n\n 'L_ADDRESS' => 'Адрес пункта выдачи заказов',\n 'L_TIME' => 'Время работы',\n 'L_WAY' => 'Как к нам проехать',\n 'L_CHOOSE' => 'Выбрать',\n\n 'H_LIST' => 'Список пунктов выдачи заказов',\n 'H_PROFILE' => 'Способ доставки',\n 'H_CASH' => 'Расчет картой',\n 'H_DRESS' => 'С примеркой',\n 'H_SUPPORT' => 'Служба поддержки',\n );\n }", "function y_translate($text, $lang = \"en-ru\")\r\n{\r\n global $encoding;\r\n $save_encoding = @$encoding;\r\n $encoding = 'UTF-8';\r\n $url = 'http://translate.yandex.net/api/v1/tr.json/translate?format=html&lang=' . $lang . '&text=' . urlencode($text);\r\n for ($i=0;$i<5;$i++) {\r\n $result = json_decode(get($url), true);\r\n if (g('last_result')==200) break;\r\n }\r\n $encoding=$save_encoding;\r\n if ($result['code'] == 200) {\r\n $r = implode('<br />', $result['text']);\r\n } else $r = $text;\r\n\r\n if (DEV)\r\n xlogc('y_translate', $r, $text, $lang);\r\n\r\n return $r;\r\n}", "function translate_parse($dataStr)\n\t\t{\n\t\t if($dataStr)\n\t\t {\n\t\t\t $arr = json_decode($dataStr,true); \n\t\t\t\t return $arr['responseData']['translatedText'];\n\t\t }\n\t\t return \"\";\n\t\t}", "function textus_get_text($id, $type) {\n $request = new get_text_controller();\n $text = $request->ol_get_text($id, $type);\n\n if ($text['error']) {\n return $text['error'];\n }\n else{\n return $text['data'];\n }\n}", "function translate_bing($data)\n\t {\n\t \t //\n\t \t //print_r($data);\n\t \t $api = 'F0DE0CCB37335B16E7EB0BD3FA2A3C9FD3543DE5';\n\t \t \n\t \t if(empty($data['text']))\n\t\t { \n\t\t return ''; \n\t\t } \n\t\t \n\t\t if($data['orignal_type'] == 'zh')\n\t\t {\n\t\t \t$data['orignal_type'] = 'zh-CHS';\n\t\t }\n\t\t \n\t\t if($data['local_type'] == 'zh')\n\t\t {\n\t\t \t$data['local_type'] = 'zh-CHS';\n\t\t }\n\n\t\t \n\t\t $url = \"http://api.microsofttranslator.com/v2/Http.svc/Translate?appId=\".$api.\"&text=\".urlencode($data['text']) . \"&from=\" . $data['orignal_type'] . \"&to=\" . $data['local_type']; \n\t\t \n\t\t //echo $url;\n\t\t \n\t\t if (function_exists('curl_init')) \n\t\t { \n\t\t $curl = curl_init(); \n\t\t curl_setopt($curl, CURLOPT_URL, $url); \n\t\t curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); \n\t\t $res = curl_exec($curl); \n\t\t } \n\t\t else \n\t\t { \n\t\t $res = @file_get_contents($url); \n\t\t }\n\t\t \n\t\t //echo $res;\n\t\t \n\t\t preg_match(\"~<string([^><]*?)>([\\s\\S]*?)<\\/string>~i\", $res, $ostr); \n\t\t //print_r($ostr);\n\t\t if (empty($ostr[2])) \n\t\t { \n\t\t return ''; \n\t\t } \n\t\t else \n\t\t { \n\t\t return htmlspecialchars_decode($ostr[2]); \n\t\t } \n\t }", "function a_selectText($a_lang)\n{\n$a_text=array();\n\n// ENGLISH start ------\nif ($a_lang==\"en\")\n{\n\t$a_text[\"server\"][\"mapname\"][\"sara\"]=\"Sahrani\";\n\t$a_text[\"server\"][\"mapname\"][\"intro\"]=\"Rahmadi\";\n\n\t$a_text[\"server\"][\"difficulty\"][0]=\"Standard\";\n\t$a_text[\"server\"][\"difficulty\"][1]=\"Veteran\";\n\n\t$a_text[\"server\"][\"mod\"][\"ca\"]=\"Armed Assault\";\n\n\t$a_text[\"server\"][\"gameState\"][1]=\"No mission selected\";\n\t$a_text[\"server\"][\"gameState\"][3]=\"Players assignment\";\n\t$a_text[\"server\"][\"gameState\"][5]=\"Loading mission\";\n\t$a_text[\"server\"][\"gameState\"][6]=\"Briefing\";\n\t$a_text[\"server\"][\"gameState\"][7]=\"Game in progress\";\n\t$a_text[\"server\"][\"gameState\"][8]=\"Debriefing\";\n\t$a_text[\"server\"][\"gameState\"][9]=\"Debriefing\";\n\n\t$a_text[\"password\"][0]=\"Public\";\n\t$a_text[\"password\"][1]=\"Private\";\n\n\t$a_text[\"dedicated\"]=\"Dedicated\";\n\t$a_text[\"unset\"]=\"Not set\";\n\n\t$a_text[\"players\"][\"name\"]=\"Nick\";\n\t$a_text[\"players\"][\"team\"]=\"Squad\";\n\t$a_text[\"players\"][\"score\"]=\"Score\";\n\t$a_text[\"players\"][\"deaths\"]=\"Deaths\";\n\n\t$a_text[\"label\"][\"serverH\"]=\"Basic server info\";\n\t$a_text[\"label\"][\"game\"]=\"Game\";\n\t$a_text[\"label\"][\"arma\"]=\"Armed Assault\";\n\t$a_text[\"slabel\"][\"hostname\"]=\"Hostname\";\n\t$a_text[\"slabel\"][\"currentVersion\"]=\"Version\";\n\t$a_text[\"slabel\"][\"requiredVersion\"]=\"Required version\";\n\t$a_text[\"slabel\"][\"servertype\"]=\"Server type\";\n\t$a_text[\"slabel\"][\"gameState\"]=\"Game status\";\n\t$a_text[\"slabel\"][\"numplayers\"]=\"# players\";\n\t$a_text[\"slabel\"][\"maxplayers\"]=\"Max. players\";\n\t$a_text[\"label\"][\"serverLoad\"]=\"Server load\";\n\n\t$a_text[\"label\"][\"missionH\"]=\"Mission details\";\n\t$a_text[\"mlabel\"][\"mission\"]=\"Mission\";\n\t$a_text[\"mlabel\"][\"gametype\"]=\"Game type\";\n\t$a_text[\"mlabel\"][\"mapname\"]=\"Island\";\n\t$a_text[\"mlabel\"][\"mod\"]=\"Mod\";\n\t$a_text[\"mlabel\"][\"difficulty\"]=\"Difficulty\";\n\t$a_text[\"mlabel\"][\"timelimit\"]=\"Time limit (minutes)\";\n\t$a_text[\"mlabel\"][\"param1\"]=\"param1\";\n\t$a_text[\"mlabel\"][\"param2\"]=\"param2\";\n\n\t$a_text[\"label\"][\"playersH\"]=\"Player table\";\n\n\t$a_text[\"err\"][\"nocon\"]=\"No connection\";\n\t$a_text[\"err\"][\"contime\"]=\"Connection timed out\";\n\t$a_text[\"err\"][\"incdat\"]=\"Incorrect data\";\n\t$a_text[\"err\"][\"incparam\"]=\"Incorrect parameters\";\n\t$a_text[\"err\"][\"unable\"]=\"Unable to contact server, probably down\";\n\n}\n// ENGLISH end ------\n\n// CZECH start ------\nelseif ($a_lang==\"cs\")\n{\n\t$a_text[\"server\"][\"mapname\"][\"sara\"]=\"Sahrani\";\n\t$a_text[\"server\"][\"mapname\"][\"intro\"]=\"Rahmadi\";\n\n\t$a_text[\"server\"][\"difficulty\"][0]=\"Standard\";\n\t$a_text[\"server\"][\"difficulty\"][1]=\"Veterán\";\n\n\t$a_text[\"server\"][\"mod\"][\"ca\"]=\"Armed Assault\";\n\n\t$a_text[\"server\"][\"gameState\"][1]=\"Čeká se na výběr mise\";\n\t$a_text[\"server\"][\"gameState\"][3]=\"Přiřazení hráčů\";\n\t$a_text[\"server\"][\"gameState\"][5]=\"Mise se nahrává\";\n\t$a_text[\"server\"][\"gameState\"][6]=\"Briefing\";\n\t$a_text[\"server\"][\"gameState\"][7]=\"Hra probíhá\";\n\t$a_text[\"server\"][\"gameState\"][8]=\"Debriefing\";\n\t$a_text[\"server\"][\"gameState\"][9]=\"Debriefing\";\n\n\t$a_text[\"password\"][0]=\"Bez hesla\";\n\t$a_text[\"password\"][1]=\"Pod heslem\";\n\n\t$a_text[\"dedicated\"]=\"Dedikovaný\";\n\t$a_text[\"unset\"]=\"Nenastaveno\";\n\n\t$a_text[\"players\"][\"name\"]=\"Nick\";\n\t$a_text[\"players\"][\"team\"]=\"Squad\";\n\t$a_text[\"players\"][\"score\"]=\"Skóre\";\n\t$a_text[\"players\"][\"deaths\"]=\"Zabit\";\n\n\t$a_text[\"label\"][\"serverH\"]=\"Základní informace\";\n\t$a_text[\"label\"][\"game\"]=\"Hra\";\n\t$a_text[\"label\"][\"arma\"]=\"Armed Assault\";\n\t$a_text[\"slabel\"][\"hostname\"]=\"Název serveru\";\n\t$a_text[\"slabel\"][\"currentVersion\"]=\"Verze serveru\";\n\t$a_text[\"slabel\"][\"requiredVersion\"]=\"Požadovaná verze klienta\";\n\t$a_text[\"slabel\"][\"servertype\"]=\"Přístup\";\n\t$a_text[\"slabel\"][\"gameState\"]=\"Stav hry\";\n\t$a_text[\"slabel\"][\"numplayers\"]=\"Počet hráčů\";\n\t$a_text[\"slabel\"][\"maxplayers\"]=\"Max. hráčů\";\n\t$a_text[\"label\"][\"serverLoad\"]=\"Obsazenost serveru\";\n\n\t$a_text[\"label\"][\"missionH\"]=\"Detaily mise\";\n\t$a_text[\"mlabel\"][\"mission\"]=\"Mise\";\n\t$a_text[\"mlabel\"][\"gametype\"]=\"Druh mise\";\n\t$a_text[\"mlabel\"][\"mapname\"]=\"Ostrov\";\n\t$a_text[\"mlabel\"][\"mod\"]=\"Mod\";\n\t$a_text[\"mlabel\"][\"difficulty\"]=\"Obtížnost\";\n\t$a_text[\"mlabel\"][\"timelimit\"]=\"Časový limit (minut)\";\n\t$a_text[\"mlabel\"][\"param1\"]=\"param1\";\n\t$a_text[\"mlabel\"][\"param2\"]=\"param2\";\n\n\t$a_text[\"label\"][\"playersH\"]=\"Připojení hráči\";\n\n\t$a_text[\"err\"][\"nocon\"]=\"Nepodařilo se připojit\";\n\t$a_text[\"err\"][\"contime\"]=\"Nepodařilo se připojit v časovém limitu\";\n\t$a_text[\"err\"][\"incdat\"]=\"Nesprávná data\";\n\t$a_text[\"err\"][\"incparam\"]=\"Nesprávné parametry dotazu\";\n\t$a_text[\"err\"][\"unable\"]=\"Není možno se spojit se serverem. Zřejmě neběží, nebo je problém s komunikací.\";\n\n}\n// CZECH end ------\n\n// DANISH start ------\nelseif ($a_lang==\"dk\")\n{\n\t$a_text[\"server\"][\"mapname\"][\"sara\"]=\"Sahrani\";\n\t$a_text[\"server\"][\"mapname\"][\"intro\"]=\"Rahmadi\";\n\n\t$a_text[\"server\"][\"difficulty\"][0]=\"Standard\";\n\t$a_text[\"server\"][\"difficulty\"][1]=\"Veteran\";\n\n\t$a_text[\"server\"][\"mod\"][\"ca\"]=\"Armed Assault\";\n\n\t$a_text[\"server\"][\"gameState\"][1]=\"Ingen missioner valgt\";\n\t$a_text[\"server\"][\"gameState\"][3]=\"Spillere g&oslash;res klar\";\n\t$a_text[\"server\"][\"gameState\"][5]=\"Indl&aelig;ser mission\";\n\t$a_text[\"server\"][\"gameState\"][6]=\"Briefing igang\";\n\t$a_text[\"server\"][\"gameState\"][7]=\"Spil igang\";\n\t$a_text[\"server\"][\"gameState\"][8]=\"Debriefing igang\";\n\t$a_text[\"server\"][\"gameState\"][9]=\"Debriefing igang\";\n\n\t$a_text[\"password\"][0]=\"&Aring;ben (adgang for alle)\";\n\t$a_text[\"password\"][1]=\"Lukket (kodeord p&aring;kr&aelig;vet)\";\n\n\t$a_text[\"dedicated\"]=\"Dedikeret\";\n\t$a_text[\"unset\"]=\"Ikke sat\";\n\n\t$a_text[\"players\"][\"name\"]=\"Navn\";\n\t$a_text[\"players\"][\"team\"]=\"Enhed\";\n\t$a_text[\"players\"][\"score\"]=\"Point\";\n\t$a_text[\"players\"][\"deaths\"]=\"D&oslash;dsfald\";\n\n\t$a_text[\"label\"][\"serverH\"]=\"Basis server-information\";\n\t$a_text[\"label\"][\"game\"]=\"Spil\";\n\t$a_text[\"label\"][\"arma\"]=\"Armed Assault\";\n\t$a_text[\"slabel\"][\"hostname\"]=\"Servernavn\";\n\t$a_text[\"slabel\"][\"currentVersion\"]=\"Version\";\n\t$a_text[\"slabel\"][\"requiredVersion\"]=\"P&aring;kr&aelig;vet version\";\n\t$a_text[\"slabel\"][\"servertype\"]=\"Server type\";\n\t$a_text[\"slabel\"][\"gameState\"]=\"Spillets status\";\n\t$a_text[\"slabel\"][\"numplayers\"]=\"# Spillere\";\n\t$a_text[\"slabel\"][\"maxplayers\"]=\"Max. Spillere\";\n\t$a_text[\"label\"][\"serverLoad\"]=\"Server belastning\";\n\n\t$a_text[\"label\"][\"missionH\"]=\"Detaljeret server-information\";\n\t$a_text[\"mlabel\"][\"mission\"]=\"Mission\";\n\t$a_text[\"mlabel\"][\"gametype\"]=\"Spil type\";\n\t$a_text[\"mlabel\"][\"mapname\"]=\"Missionen spilles p&aring;\";\n\t$a_text[\"mlabel\"][\"mod\"]=\"Modifikation\";\n\t$a_text[\"mlabel\"][\"difficulty\"]=\"Sv&aelig;rhedsgrad\";\n\t$a_text[\"mlabel\"][\"timelimit\"]=\"Tidsgr&aelig;nse (minutter)\";\n\t$a_text[\"mlabel\"][\"param1\"]=\"param1\";\n\t$a_text[\"mlabel\"][\"param2\"]=\"param2\";\n\n\t$a_text[\"label\"][\"playersH\"]=\"Spillerliste\";\n\n\t$a_text[\"err\"][\"nocon\"]=\"Ingen forbindelse\";\n\t$a_text[\"err\"][\"contime\"]=\"Forbindelsen brev afbrudt\";\n\t$a_text[\"err\"][\"incdat\"]=\"Forkert data\";\n\t$a_text[\"err\"][\"incparam\"]=\"Forkerte parametre\";\n\t$a_text[\"err\"][\"unable\"]=\"Ikke i stand til at oprette forbindelse til serveren\";\n\n}\n// DANISH end ------\n\n// GERMAN start ------\nelseif ($a_lang==\"de\")\n{\n\t$a_text[\"server\"][\"mapname\"][\"sara\"]=\"Sahrani\";\n\t$a_text[\"server\"][\"mapname\"][\"intro\"]=\"Rahmadi\";\n\t\n\t$a_text[\"server\"][\"difficulty\"][0]=\"Standard\";\n\t$a_text[\"server\"][\"difficulty\"][1]=\"Veteran\";\n\n\t$a_text[\"server\"][\"mod\"][\"ca\"]=\"Armed Assault\";\n\n\t$a_text[\"server\"][\"gameState\"][1]=\"Keine Mission gew&auml;hlt\";\n\t$a_text[\"server\"][\"gameState\"][3]=\"Spieler werden zugewiesen\";\n\t$a_text[\"server\"][\"gameState\"][5]=\"Lade Mission\";\n\t$a_text[\"server\"][\"gameState\"][6]=\"Missionsbesprechung\";\n\t$a_text[\"server\"][\"gameState\"][7]=\"Spiel l&auml;uft\";\n\t$a_text[\"server\"][\"gameState\"][8]=\"Abschlussbesprechung\";\n\t$a_text[\"server\"][\"gameState\"][9]=\"Abschlussbesprechung\";\n\n\t$a_text[\"password\"][0]=\"Offen\";\n\t$a_text[\"password\"][1]=\"Geschlossen\";\n\n\t$a_text[\"dedicated\"]=\"Dediziert\";\n\t$a_text[\"unset\"]=\"Nicht gesetzt\";\n\n\t$a_text[\"players\"][\"name\"]=\"Spielername\";\n\t$a_text[\"players\"][\"team\"]=\"Squad\";\n\t$a_text[\"players\"][\"score\"]=\"Punkte\";\n\t$a_text[\"players\"][\"deaths\"]=\"Gestorben\";\n\n\t$a_text[\"label\"][\"serverH\"]=\"Server Info\";\n\t$a_text[\"label\"][\"game\"]=\"Spiel\";\n\t$a_text[\"label\"][\"arma\"]=\"Armed Assault\";\n\t$a_text[\"slabel\"][\"hostname\"]=\"Server Name\";\n\t$a_text[\"slabel\"][\"currentVersion\"]=\"Version\";\n\t$a_text[\"slabel\"][\"requiredVersion\"]=\"Ben&ouml;tigte Version\";\n\t$a_text[\"slabel\"][\"servertype\"]=\"Server Typ\";\n\t$a_text[\"slabel\"][\"gameState\"]=\"Spiel Status\";\n\t$a_text[\"slabel\"][\"numplayers\"]=\"# Spieler\";\n\t$a_text[\"slabel\"][\"maxplayers\"]=\"Max. Spieler\";\n\t$a_text[\"label\"][\"serverLoad\"]=\"Server Auslastung\";\n\n\t$a_text[\"label\"][\"missionH\"]=\"Missions Details\";\n\t$a_text[\"mlabel\"][\"mission\"]=\"Mission\";\n\t$a_text[\"mlabel\"][\"gametype\"]=\"Spiel Typ\";\n\t$a_text[\"mlabel\"][\"mapname\"]=\"Insel\";\n\t$a_text[\"mlabel\"][\"mod\"]=\"Mod\";\n\t$a_text[\"mlabel\"][\"difficulty\"]=\"Schwierigkeitsgrad\";\n\t$a_text[\"mlabel\"][\"timelimit\"]=\"Zeit Limit (minutes)\";\n\t$a_text[\"mlabel\"][\"param1\"]=\"param1\";\n\t$a_text[\"mlabel\"][\"param2\"]=\"param2\";\n\n\t$a_text[\"label\"][\"playersH\"]=\"Spieler Daten\";\n\n\t$a_text[\"err\"][\"nocon\"]=\"Keine Verbindung\";\n\t$a_text[\"err\"][\"contime\"]=\"Verbindung verloren\";\n\t$a_text[\"err\"][\"incdat\"]=\"Inkorrekte Datan\";\n\t$a_text[\"err\"][\"incparam\"]=\"Inkorrekte Parameter\";\n\t$a_text[\"err\"][\"unable\"]=\"Kann Server nicht erreichen, vermutlich offline\";\n\n}\n// GERMAN end ------\n\n// Language neutral common texts ------\n\n\t$a_text[\"credit\"]=\"<p>Based on PHP code from <a href=\\\"http://www.wkk.dk\\\">[WKK]</a> RealTime Server Query (RTSQ) for OFP.<br/>\nRewritten for ArmA by <a href=\\\"mailto:mivo@post.cz\\\">Mivo</a> with big help of <a href=\\\"http://6thsense.eu\\\">6th Sense advSQ</a>.</p>\"; \n\t$a_text[\"credit\"].=\"<p>Version: 1.00 (20070306)</p>\";\n\nreturn $a_text;\n\n// END function a_selectText()\n}", "public function responseMsg()\n {\n $postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n global $textTpl;\n if (!empty($postStr))\n {\n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $type = $postObj->MsgType;\n\n switch ($type)\n {\n case \"event\":\n $resultStr = GetEventMessage($postObj);\n break;\n case \"location\":\n $resultStr = GetLocationMessage($postObj);\n break;\n case \"text\":\n $resultStr = GetTextMessage($postObj);\n break;\n default:\n $resultStr = GetTextMessage($postObj);\n //$resultStr = GetDefaultMessage($postObj);\n break;\n }\n\n RecordInputContent($postObj); //保存用户输入的所有内容\n RefleshUserLoginTime($postObj); // 更新用户登录的最新时间\n\n echo $resultStr;\n }\n else\n {\n echo \"\";\n exit;\n }\n }", "public function toGetResponse()\n {\n $matieres = $this->getMatieres();\n for ($i = 0; $i < count($matieres); $i ++) {\n $matiere = $matieres[$i];\n if ($matiere == \"francais\") {\n $matieres[$i] = \"français\";\n }\n }\n $matieres = implode(\"_\", $matieres);\n return (utf8_encode($matieres));\n }", "public function get_localization_strings() {\n\n return response()->json([\n 'file_type_error' => trans('asset_library_videospheres_controller.file_type_error'),\n 'file_size_error' => trans('asset_library_videospheres_controller.file_size_error'),\n 'file_ext_error' => trans('asset_library_videospheres_controller.file_ext_error'),\n 'vr_view' => trans('template_asset_library_videospheres.vr_view'),\n 'edit' => trans('template_asset_library_videospheres.edit'),\n 'insert' => trans('template_asset_library_videospheres.insert'),\n 'save' => trans('template_asset_library_videospheres.save'),\n 'saved' => trans('template_asset_library_videospheres.saved'),\n ]);\n }", "public function responseMsg_demo()\n {\n $postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\n //extract post data\n if (!empty($postStr)){\n\n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $fromUsername = $postObj->FromUserName;\n $toUsername = $postObj->ToUserName;\n $type = $postObj->MsgType;\n $event=$postObj->Event;\n $EventKey=$postObj->EventKey;\n\n $latitude = $postObj->Location_X;\n $longitude = $postObj->Location_Y;\n $keyword = trim($postObj->Content);\n $time = time();\n $textTpl = \"<xml>\n\t\t\t\t\t\t\t<ToUserName><![CDATA[%s]]></ToUserName>\n\t\t\t\t\t\t\t<FromUserName><![CDATA[%s]]></FromUserName>\n\t\t\t\t\t\t\t<CreateTime>%s</CreateTime>\n\t\t\t\t\t\t\t<MsgType><![CDATA[text]]></MsgType>\n\t\t\t\t\t\t\t<Content><![CDATA[%s]]></Content>\n\t\t\t\t\t\t\t<FuncFlag>0</FuncFlag>\n\t\t\t\t\t\t\t</xml>\";\n if ($event==\"CLICK\" and $EventKey==\"V1001_BRAND\")\n {\n $contentStr=\"自定义菜单教程\";\n\n }\n elseif ($event==\"CLICK\" and $EventKey==\"V1001_SUPPLY\")\n {\n $contentStr=\"谢谢你的赞扬\";\n }\n elseif ($event==\"CLICK\" and $EventKey==\"V1001_CHECK\")\n {\n $contentStr=\"你好我也好\";\n } elseif ($event==\"CLICK\" and $EventKey==\"V1001_ANTI_FAKE\")\n {\n $contentStr=\"谢谢你的赞扬\";\n }\n elseif ($event==\"CLICK\" and $EventKey==\"V1001_PROMOTE\")\n {\n $contentStr=\"你好我也好\";\n }\n $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $contentStr);\n echo $resultStr;\n\n\n\n }\n\n }", "function responseToDialogue($response){\n $response = json_encode(array_merge($response, array_filter(['extendedIds' => SUtl::translatedExtendedIdCols()]), ['extras' => Tfk::getExtras(), 'feedback' => Feedback::get()]));\n if ($response){\n $this->dialogue->response->setContent(Tfk::$registry->get('translatorsStore')->substituteTranslations($response));\n }else{\n Tfk::debug_mode('error', 'AbstractController->responseToDialogue - json_encoding error: ', json_last_error());\n }\n }", "public function responseMsg()\n {\n //设置了register_globals禁止,不能用$GLOBALS[\"HTTP_RAW_POST_DATA\"];\n // 2018-5-17 潘\n\t\t// $postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n $postStr = file_get_contents(\"php://input\");\n \t//extract post data\n\t\tif (!empty($postStr)){\n /* libxml_disable_entity_loader is to prevent XML eXternal Entity Injection,\n the best way is to check the validity of xml by yourself */\n libxml_disable_entity_loader(true);\n \t$postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $fromUsername = $postObj->FromUserName;\n $toUsername = $postObj->ToUserName;\n $keyword = trim($postObj->Content);\n $time = time();\n $textTpl = \"<xml>\n\t\t\t\t\t\t\t<ToUserName><![CDATA[%s]]></ToUserName>\n\t\t\t\t\t\t\t<FromUserName><![CDATA[%s]]></FromUserName>\n\t\t\t\t\t\t\t<CreateTime>%s</CreateTime>\n\t\t\t\t\t\t\t<MsgType><![CDATA[%s]]></MsgType>\n\t\t\t\t\t\t\t<Content><![CDATA[%s]]></Content>\n\t\t\t\t\t\t\t<FuncFlag>0</FuncFlag>\n\t\t\t\t\t\t\t</xml>\"; \n\t\t\t\tif(!empty( $keyword ))\n {\n \t\t$msgType = \"text\";\n \t$contentStr = \"行行,DSB\";\n \t$resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n \techo $resultStr;\n }else{\n \techo \"Input something...\";\n }\n\n }else {\n \techo \"嗨!\";\n \texit;\n }\n }", "public function wplt_ajax_response(){\n global $sitepress;\n $sitepress->switch_lang('all');\n }", "public function definition()\n {\n $str = 'भौतिकशास्त्रमा प्राप्त उपलब्धिहरूले प्रविधि विकास र अर्थतन्त्रमा पुर्‍याउने योगदान त छँदै छ, भौतिक विज्ञानका खासखास सिद्धान्तहरू अर्थशास्त्रको व्याख्यामा पनि उपयोगी देखिएकाले अर्थशास्त्र र भौतिकशास्त्रलाई मिलाएर नयाँ शब्दावली प्रयोगमा ल्याइएको छ— ‘इकोनोफिजिक्स’ भौतिकशास्त्री युजिन स्ट्यान्लीले सन् १९९५ मा जटिल प्रणालीहरूको गतिशीलतासम्बन्धी कोलकाता सम्मेलनमा यो शब्द पहिलो पटक प्रयोग गरेका थिए बजारको गतिशीलता र सम्पत्ति–आम्दानीको वितरण पद्धतिको अध्ययनमा इकोनोफिजिक्स निकै उपयोगी पाइएको सम्बद्ध अर्थशास्त्री र भौतिकशास्त्रीहरूको दाबी छ डिसेम्बर २०१७ मा अमेरिकन इकोनोमिक एसोसिएसन (एईए) ले इकोनोफिजिक्सबारे आयोजना गरेको सम्मेलनलाई एउटा महत्त्वपूर्ण कदमका रूपमा लिँदै यी दुवै विधा मिलाएर गरिएका अध्ययनहरू वित्तीय संकट हल गर्न उपयोगी हुने बताइएको थियो इकोनोफिजिक्स अवधारणा त्यति पुरानो नभए पनि युरोप र अमेरिकाका केही विश्वविद्यालयमा यसको पढाइ हुँदै आएको छ नेपालमा पनि सन् २०१५ देखि त्रिभुवन विश्वविद्यालयमा पढाउन थालिएको छ अर्थशास्त्रलाई समाज विज्ञानको भौतिकशास्त्र पनि भन्ने गरिन्छ जसरी सूक्ष्म कणदेखि ब्रह्माण्डका ठूलठूला पिण्डसम्मलाई गति दिन ऊर्जाको प्रयोग भएको हुन्छ भन्दै भौतिकशास्त्रमा ऊर्जालाई नै आधार मानेर प्राकृतिक प्रक्रियाहरूको व्याख्या गरिन्छ, त्यसरी नै पुँजीले सामाजिक गतिविधिहरू पैदा गराउँछ भन्ने मान्यताअनुसार अर्थशास्त्रमा सामाजिक प्रक्रियाहरूको व्याख्या हुने गर्छ भौतिक विज्ञानका थुप्रै समीकरण अर्थशास्त्रका क्षेत्रमा पनि उस्तै किसिमले लागू हुन सक्ने देखिन्छ, भलै भौतिक विज्ञानमा प्रयोग हुने भौतिक परिमाण र अर्थशास्त्रमा प्रयोग हुने परिमाण बुझाउने शब्द र सूचक फरक हुन सक्छन्';\n $nepaliWord = explode(\" \",$str);\n $nepaliWord = array_unique($nepaliWord);\n $tag = $nepaliWord[array_rand($nepaliWord)];\n return [\n 'name' => $tag,\n 'slug' => $tag,\n ];\n }", "public function responseMsg()\r\n\t{\r\n\t\t$postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\r\n\r\n\t\t//extract post data\r\n\t\tif (!empty($postStr)){\r\n\t\t\t\t\r\n\t\t\t\t$postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\r\n\t\t\t\t$fromUsername = $postObj->FromUserName;\r\n\t\t\t\t$toUsername = $postObj->ToUserName;\r\n\t\t\t\t$keyword = trim($postObj->Content);\r\n\t\t\t\t$time = time();\r\n\r\n\t\t\t\t/*文字回复*/\r\n\t\t\t\t$textTpl = \"<xml>\r\n\t\t\t\t\t\t\t<ToUserName><![CDATA[%s]]></ToUserName>\r\n\t\t\t\t\t\t\t<FromUserName><![CDATA[%s]]></FromUserName>\r\n\t\t\t\t\t\t\t<CreateTime>%s</CreateTime>\r\n\t\t\t\t\t\t\t<MsgType><![CDATA[%s]]></MsgType>\r\n\t\t\t\t\t\t\t<Content><![CDATA[%s]]></Content>\r\n\t\t\t\t\t\t\t<FuncFlag>0</FuncFlag>\r\n\t\t\t\t\t\t\t</xml>\"; \r\n\r\n\t\t\t\t/*图文回复*/\r\n\t\t\t\t$itemTpl = \"<xml>\r\n\t\t\t\t\t\t<ToUserName><![CDATA[%s]]></ToUserName>\r\n\t\t\t\t\t\t<FromUserName><![CDATA[%s]]></FromUserName>\r\n\t\t\t\t\t\t<CreateTime>%s</CreateTime>\r\n\t\t\t\t\t\t<MsgType><![CDATA[%s]]></MsgType>\r\n\t\t\t\t\t\t<ArticleCount>1</ArticleCount>\r\n\t\t\t\t\t\t<Articles>\r\n\t\t\t\t\t\t<item>\r\n\t\t\t\t\t\t<Title><![CDATA[%s]]></Title> \r\n\t\t\t\t\t\t<Description><![CDATA[%s]]></Description>\r\n\t\t\t\t\t\t<PicUrl><![CDATA[%s]]></PicUrl>\r\n\t\t\t\t\t\t<Url><![CDATA[%s]]></Url>\r\n\t\t\t\t\t\t</item>\r\n\t\t\t\t\t\t</Articles>\r\n\t\t\t\t\t\t</xml>\";\r\n\r\n\r\n\r\n\t\t\t\tif(!empty( $keyword )){\r\n\t\t\t\t\t$keyworde = $this -> FindKeyword($keyword,$fromUsername);\r\n\t\t\t\t\tswitch ($keyworde) {\r\n\t\t\t\t\t\tcase '红包':\r\n\t\t\t\t\t\t\t// $msgType = \"news\";\r\n\t\t\t\t\t\t\t// $contentStr = \"恭喜你获得一个红包!\";\r\n\t\t\t\t\t\t\t// $contentStr2 = \"点击图片领取你的红包!\";\r\n\t\t\t\t\t\t\t// // $PicUrl = \"http://imgsrc.baidu.com/forum/w%3D580/sign=6926f2cad488d43ff0a991fa4d1fd2aa/3e8ad5dcd100baa1583412044510b912c9fc2ea8.jpg\";\r\n\t\t\t\t\t\t\t// $url = \"http://i.shuilaile.com/index.php?s=/Home/Get/pay/openid/\".$fromUsername.\"/code/\".$keyword.\".html\";\r\n\t\t\t\t\t\t\t// $resultStr = sprintf($itemTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr, $contentStr2, $PicUrl, $url);\r\n\t\t\t\t\t\t\t// echo $resultStr;\r\n\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$this -> pay($fromUsername,$keyword);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t$msgType = \"text\";\r\n\t\t\t\t\t\t\t$contentStr = $keyworde;\r\n\t\t\t\t\t\t\t// $contentStr = \"Welcome to wechat world!\";\r\n\t\t\t\t\t\t\t$resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\r\n\t\t\t\t\t\t\techo $resultStr;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\techo \"Input something...\";\r\n\t\t\t\t}\r\n\r\n\t\t}else {\r\n\t\t\techo \"\";\r\n\t\t\texit;\r\n\t\t}\r\n\t}", "function targoman($text)\n{\n if (empty(trim($text))) {\n return null;\n }\n $ch = curl_init('https://targoman.ir/API/');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n curl_setopt($ch, CURLOPT_POSTFIELDS, '{\"jsonrpc\":\"2.0\",\"method\":\"Targoman::translate\",\"id\":1,\"params\":[\"sSTargomanWUI\",\"'.$text.'\",\"en2fa\",\"127.0.0.10\",\"NMT\",true,true,true]}');\n $response = curl_exec($ch);\n curl_close($ch);\n $response = json_decode($response, true);\n if (isset($response['result']['tr']['base'][0][1])) {\n return $response['result']['tr']['base'][0][1];\n }\n\n return null;\n}", "public function exampleAction() {\n //return 'tatata' // erreur : retour non valide car chaîne de caractères retournée. On doit retourner un objet de type réponse\n $res = new Response(\"tatata\"); //on transite par un objet pour pouvoir retourner une châine de caractères.\n $res2 = new Response(\"<h1>tadaaam</h1>\");\n $res3 = new Response($this->getMessage());\n //$res4 = new Response($this->fruits); erreur : on ne peut pas renvoyer au client une structure de données PHP non convertible en string. Si un boléen est facilement convertible, ce n'est pas le cas des tableaux.\n\n return $this->render('test/example.html.twig', array(\n 'fruits' => $this->fruits3\n ));\n }", "public function responseMsg()\n {\n $postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\n //extract post data\n if (!empty($postStr)){\n \n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $RX_TYPE = trim($postObj->MsgType);\n\n switch($RX_TYPE)\n {\n case \"text\":\n $resultStr = $this->handleText($postObj);\n break;\n case \"event\":\n $resultStr = $this->handleEvent($postObj);\n break;\n default:\n $resultStr = \"Unknow msg type: \".$RX_TYPE;\n break;\n }\n echo $resultStr;\n }else {\n echo \"\";\n exit;\n }\n }", "public function responseMsg()\n {\n $postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\n //extract post data\n if (!empty($postStr)) {\n\n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $fromUsername = $postObj->FromUserName;\n $toUsername = $postObj->ToUserName;\n $keyword = trim($postObj->Content);\n $time = time();\n $textTpl = \"<xml>\n\t\t\t\t\t\t\t<ToUserName><![CDATA[%s]]></ToUserName>\n\t\t\t\t\t\t\t<FromUserName><![CDATA[%s]]></FromUserName>\n\t\t\t\t\t\t\t<CreateTime>%s</CreateTime>\n\t\t\t\t\t\t\t<MsgType><![CDATA[%s]]></MsgType>\n\t\t\t\t\t\t\t<Content><![CDATA[%s]]></Content>\n\t\t\t\t\t\t\t<FuncFlag>0</FuncFlag>\n\t\t\t\t\t\t\t</xml>\";\n if (!empty($keyword)) {\n $msgType = \"text\";\n $contentStr = \"Welcome to wechat world!\";\n $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n echo $resultStr;\n } else {\n echo \"Input something...\";\n }\n\n } else {\n echo \"\";\n exit;\n }\n }", "public function sendLangRESTRequest()\n {\n $config = array(\n 'method' => 'GET',\n 'route' => '/lang/en_us',\n );\n \n $job = new \\SugarRestHarness\\Jobs\\Generic($config);\n $job->rawResults = $job->connector->makeRequest();\n $results = json_decode($job->rawResults, true);\n return $results['app_list_strings'];\n }", "public function getBarang_get(){\n $res = $this->api_model->getBarang();\n $this->response($res, 200);\n }", "public function responseMsg()\n {\n\t\t$postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\n \t//extract post data\n\t\tif (!empty($postStr)){\n /* libxml_disable_entity_loader is to prevent XML eXternal Entity Injection,\n the best way is to check the validity of xml by yourself */\n libxml_disable_entity_loader(true);\n \t$postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $fromUsername = $postObj->FromUserName;\n $toUsername = $postObj->ToUserName;\n $keyword = trim($postObj->Content);\n $time = time();\n $textTpl = \"<xml>\n\t\t\t\t\t\t\t<ToUserName><![CDATA[%s]]></ToUserName>\n\t\t\t\t\t\t\t<FromUserName><![CDATA[%s]]></FromUserName>\n\t\t\t\t\t\t\t<CreateTime>%s</CreateTime>\n\t\t\t\t\t\t\t<MsgType><![CDATA[%s]]></MsgType>\n\t\t\t\t\t\t\t<Content><![CDATA[%s]]></Content>\n\t\t\t\t\t\t\t<FuncFlag>0</FuncFlag>\n\t\t\t\t\t\t\t</xml>\"; \n\t\t\t\tif(!empty( $keyword ))\n {\n \t\t$msgType = \"text\";\n \t$contentStr = \"Welcome to wechat world!\";\n \t$resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n \techo $resultStr;\n }else{\n \techo \"Input something...\";\n }\n\n }else {\n \techo \"\";\n \texit;\n }\n }", "public function translated();", "public function translated();", "public function languageDetection($data) {\n $parameters=array(\n 'data'=>$data \n );\n $content = json_encode($parameters);\n \n $jsonreply=$this->CallWebService('getLanguage',$content);\n \n return $this->ParseReply($jsonreply);\n }", "public function get_text()\n {\n }", "public function language();", "public function language();", "function helpResponse($code, $data = NULL, $msg = '', $status = '', $note=NULL)\n{\n\tswitch($code){\n\t\tcase '200':\n\t\t$s = 'OK';\n\t\t$m = 'Sukses';\n\t\tbreak;\n\t\tcase '201':\n\t\tcase '202':\n\t\t$s = 'Saved';\n\t\t$m = 'Data berhasil disimpan';\n\t\tbreak;\n\t\tcase '204':\n\t\t$s = 'No Content';\n\t\t$m = 'Data tidak ditemukan';\n\t\tbreak;\n\t\tcase '304':\n\t\t$s = 'Not Modified';\n\t\t$m = 'Data gagal disimpan';\n\t\tbreak;\n\t\tcase '400':\n\t\t$s = 'Bad Request';\n\t\t$m = 'Fungsi tidak ditemukan';\n\t\tbreak;\n\t\tcase '401':\n\t\t$s = 'Unauthorized';\n\t\t$m = 'Silahkan login terlebih dahulu';\n\t\tbreak;\n\t\tcase '403':\n\t\t$s = 'Forbidden';\n\t\t$m = 'Sesi anda telah berakhir';\n\t\tbreak;\n\t\tcase '404':\n\t\t$s = 'Not Found';\n\t\t$m = 'Halaman tidak ditemukan';\n\t\tbreak;\n\t\tcase '414':\n\t\t$s = 'Request URI Too Long';\n\t\t$m = 'Data yang dikirim terlalu panjang';\n\t\tbreak;\n\t\tcase '500':\n\t\t$s = 'Internal Server Error';\n\t\t$m = 'Maaf, terjadi kesalahan dalam mengolah data';\n\t\tbreak;\n\t\tcase '502':\n\t\t$s = 'Bad Gateway';\n\t\t$m = 'Tidak dapat terhubung ke server';\n\t\tbreak;\n\t\tcase '503':\n\t\t$s = 'Service Unavailable';\n\t\t$m = 'Server tidak dapat diakses';\n\t\tbreak;\n\t\tdefault:\n\t\t$s = 'Undefined';\n\t\t$m = 'Undefined';\n\t\tbreak;\n\t}\n\t\n\t$status = ($status != '') ? $status : $s;\n\t$msg = ($msg != '') ? $msg : $m;\n\t$result=array(\n\t\t\"status\"=>$status,\n\t\t\"code\"=>$code,\n\t\t\"message\"=>$msg,\n\t\t\"data\"=>$data,\n\t\t\"note\"=>$note\n\t);\n\n\tsetHeader($code, $status);\n\t\n\treturn $result;\n}", "public function responseMsg()\n {\n\t\t$postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\n \t//extract post data\n\t\tif (!empty($postStr))\n { \n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $fromUsername = $postObj->FromUserName;\n $toUsername = $postObj->ToUserName;\n $msgType = $postObj->MsgType;\n \n $time = time();\n \n $textTpl = \"<xml>\n <ToUserName><![CDATA[%s]]></ToUserName>\n <FromUserName><![CDATA[%s]]></FromUserName>\n <CreateTime>%s</CreateTime>\n <MsgType><![CDATA[%s]]></MsgType>\n <Content><![CDATA[%s]]></Content>\n <FuncFlag>0</FuncFlag>\n </xml>\";\n \n if($msgType == \"text\")\n {\n \t/*\n $keyword = trim($postObj->Content);\n\t\t\t\t\n\t\t\t\t\n $msgType = \"text\";\n \n $contentStr = $keyword;\n $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n echo $resultStr;\n\t\t\t\t * \n\t\t\t\t */\n }\n else if($msgType == \"event\")\n {\n $event = $postObj->Event;\n if($event == \"subscribe\")\n {\n $msgType = \"text\";\n \n $contentStr = \"你好,欢迎你的关注!\";\n \n \n $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n echo $resultStr;\n }\n\t\t\t\telse if($event == \"CLICK\")\n\t\t\t\t{\n\t\t\t\t\t$eventKey = $postObj->EventKey;\n\t\t\t\t\t\n\t\t\t\t\tif($eventKey == \"VK_RECENT\")\n\t { \n\t \n\t $query = \"select `id`, `post_title`, `post_content`\n\t from `wp_posts`\n\t where `post_status` like 'publish' and `post_type` like 'post'\n\t order by `post_date` desc\n\t limit 0, 5\";\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t$sql = new SQL();\n\t $result = $sql->getResult($query);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($result === FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$msgType = \"text\"; \n\t \n\t\t $contentStr = \"服务器维护中\";\n\t\t $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n\t\t echo $resultStr;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t $strTitle = \"近期文章:\\n\\n\";\n\t\t $num_results = $result->num_rows;\n\t\t for($i = 0; $i < $num_results; ++$i)\n\t\t {\n\t\t $row = $result->fetch_assoc();\n\t\t \n\t\t $strTitle .= '「<a href=\"'. SITE . '/?p=' . $row['id'] . '\">';\n\t\t $strTitle .= $row['post_title'];\n\t\t $strTitle .= \"</a>」\\n\\n\";\n\t\t }\n\t\t \n\t\t $msgType = \"text\";\n\t\t \n\t\t \n\t\t $contentStr = $strTitle;\n\t\t $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n\t\t echo $resultStr;\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\n\t \n\t }\n\t else if($eventKey == \"VK_DATE\")\n\t {\n\t $query = \"select year(`post_date`), month(`post_date`), extract(year_month from(`post_date`)), count(extract(year_month from(`post_date`))) \n\t from `wp_posts`\n\t where `post_status` like 'publish' and `post_type` like 'post' \n\t group by extract(year_month from(`post_date`))\n\t order by extract(year_month from(`post_date`)) desc\";\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$sql = new SQL();\n\t $result = $sql->getResult($query);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($result === FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$msgType = \"text\"; \n\t \n\t\t $contentStr = \"服务器维护中\";\n\t\t $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n\t\t echo $resultStr;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t $strTitle = \"文章归档:\\n\\n\";\n\t\t $num_results = $result->num_rows;\n\t\t for($i = 0; $i < $num_results; ++$i)\n\t\t {\n\t\t $row = $result->fetch_assoc();\n\t\t \n\t\t $strTitle .= ' <a href=\"'. SITE . '/?m=' . $row['extract(year_month from(`post_date`))'] . '\">';\n\t\t $strTitle .= $row['year(`post_date`)'] . \"年\".\n\t\t chineseMonth($row['month(`post_date`)']) . \"月\";\n\t\t \n\t\t $strTitle .= \"</a> (\" .$row['count(extract(year_month from(`post_date`)))']. \")\\n\\n\";\n\t\t }\n\t\t \n\t\t $msgType = \"text\";\n\t\t \n\t\t \n\t\t $contentStr = $strTitle;\n\t\t $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n\t\t echo $resultStr;\n\t \t}\n\t \n\t }\n\t else if($eventKey == \"VK_CATEGORY\")\n\t {\n\t \t$query = \"select `wp_terms`.`term_id`, `wp_terms`.`name`, `wp_term_taxonomy`.`count`\n\t from `wp_terms`, `wp_term_taxonomy`\n\t where `wp_term_taxonomy`.`taxonomy` like 'category' and `wp_term_taxonomy`.`count` != 0\n\t and `wp_terms`.`term_id` = `wp_term_taxonomy`.`term_id`\";\n\t \n\t \n\t $sql = new SQL();\n\t $result = $sql->getResult($query);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($result === FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$msgType = \"text\"; \n\t \n\t\t $contentStr = \"服务器维护中\";\n\t\t $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n\t\t echo $resultStr;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t $strTitle = \"分类目录:\\n\\n\";\n\t\t $num_results = $result->num_rows;\n\t\t for($i = 0; $i < $num_results; ++$i)\n\t\t {\n\t\t $row = $result->fetch_assoc();\n\t\t \n\t\t $strTitle .= ' <a href=\"'. SITE . '/?cat=' . $row['term_id'] . '\">';\n\t\t $strTitle .= $row['name'];\n\t\t \n\t\t $strTitle .= \"</a> (\" .$row['count']. \")\\n\\n\";\n\t\t }\n\t\t \n\t\t $msgType = \"text\";\n\t\t \n\t\t $contentStr = $strTitle;\n\t\t $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n\t\t echo $resultStr;\n\t\t\t\t\t\t} \n\t }\n\t else if($eventKey == \"VK_TAG\")\n\t {\n\t $query = \"select `wp_terms`.`slug`, `wp_terms`.`name`, `wp_term_taxonomy`.`count`\n\t from `wp_terms`, `wp_term_taxonomy`\n\t where `wp_term_taxonomy`.`taxonomy` like 'post_tag' and `wp_term_taxonomy`.`count` != 0\n\t and `wp_terms`.`term_id` = `wp_term_taxonomy`.`term_id`\";\n\t \n\t \n\t $sql = new SQL();\n\t $result = $sql->getResult($query);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($result === FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$msgType = \"text\"; \n\t \n\t\t $contentStr = \"服务器维护中\";\n\t\t $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n\t\t echo $resultStr;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t $strTitle = \"标签列表:\\n\\n\";\n\t\t $num_results = $result->num_rows;\n\t\t for($i = 0; $i < $num_results; ++$i)\n\t\t {\n\t\t $row = $result->fetch_assoc();\n\t\t \n\t\t $strTitle .= ' <a href=\"'. SITE . '/?tag=' . $row['slug'] . '\">';\n\t\t $strTitle .= $row['name'];\n\t\t \n\t\t $strTitle .= \"</a> (\" .$row['count']. \")\\n\\n\";\n\t\t }\n\t\t \n\t\t $msgType = \"text\";\n\t\t \n\t\t $contentStr = $strTitle;\n\t\t $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n\t\t echo $resultStr;\n\t\t\t\t\t\t}\n\t }\t\t\t\t\t\n\t\t\t\t}\n }\n\n }\n else\n {\n \techo \"\";\n \texit;\n }\n }", "public function responseMsg()\n {\n $postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\n //extract post data\n if (!empty($postStr)){\n \n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $RX_TYPE = trim($postObj->MsgType);\n\n switch($RX_TYPE)\n {\n case \"text\":\n $resultStr = $this->handleText($postObj);\n break;\n case \"event\":\n $resultStr = $this->handleEvent($postObj);\n break;\n default:\n $resultStr = \"Unknow msg type: \".$RX_TYPE;\n break;\n }\n echo $resultStr;\n }else {\n echo \"\";\n exit;\n }\n }", "public function testTranslateUsingDetector()\n {\n // Given\n $this->responseMock->expects($this->any())->method('json')->will($this->returnValue(\n ['data' => ['translations' => [['translatedText' => 'comment allez-vous ?']]]]\n ));\n\n // When\n $value = $this->translator->translate('how are you?', 'fr');\n\n // Then\n $this->assertEquals($value, 'comment allez-vous ?', 'Should return \"comment allez-vous ?\"');\n }", "function verifVadsAuthResult($data) {\n \n switch ($data) {\n\n case \"03\":\n return '<p style=\"margin-top:1px;\">Accepteur invalide - Ce code est émis par la banque du marchand.</p>\n <p style=\"margin-top:1px;\">Il correspond à un problème de configuration sur les serveurs d’autorisation.</p>\n <p style=\"margin-top:1px;\">(ex: contrat clos, mauvais code MCC déclaré, etc..).</p>';\n break;\n \n case \"00\":\n return '<p style=\"margin-top:1px;color:green;\"><b>Transaction approuvée ou traitée avec succès</b></p>';\n break;\n\n case \"05\":\n return '<p style=\"margin-top:1px;color:red;\">Ne pas honorer - Ce code est émis par la banque émettrice de la carte.</p>\n <p style=\"margin-top:1px;color:red;\">Il peut être obtenu en général dans les cas suivants :</p>\n <p style=\"margin-top:1px;color:red;\">Date d’expiration invalide, CVV invalide, crédit dépassé, solde insuffisant (etc.)</p>\n <p style=\"margin-top:1px;color:red;\">Pour connaître la raison précise du refus, l’acheteur doit contacter sa banque.</p>';\n break;\n\n case \"51\":\n return '<p style=\"margin-top:1px;color:red;\">Provision insuffisante ou crédit dépassé</p>\n <p style=\"margin-top:1px;color:red;\">Ce code est émis par la banque émettrice de la carte.</p>\n <p style=\"margin-top:1px;color:red;\">Il peut être obtenu si l’acheteur ne dispose pas d’un solde suffisant pour réaliser son achat.</p>\n <p style=\"margin-top:1px;color:red;\">Pour connaître la raison précise du refus, l’acheteur doit contacter sa banque.</p>';\n break;\n\n case \"56\":\n return '<p style=\"margin-top:1px;color:red;\">Carte absente du fichier - Ce code est émis par la banque émettrice de la carte.</p>\n <p style=\"margin-top:1px;color:red;\">Le numéro de carte saisi est erroné ou le couple numéro de carte + date d\\'expiration n\\'existe pas..</p>';\n break;\n \n case \"57\":\n return '<p style=\"margin-top:1px;color:red;\">Transaction non permise à ce porteur - Ce code est émis par la banque émettrice de la carte.</p>\n <p style=\"margin-top:1px;color:red;\">Il peut être obtenu en général dans les cas suivants :</p>\n <p style=\"margin-top:1px;color:red;\">L’acheteur tente d’effectuer un paiement sur internet avec une carte de retrait.</p>\n <p style=\"margin-top:1px;color:red;\">Le plafond d’autorisation de la carte est dépassé.</p>\n <p style=\"margin-top:1px;color:red;\">Pour connaître la raison précise du refus, l’acheteur doit contacter sa banque.</p>';\n break;\n \n case \"59\":\n return '<p style=\"margin-top:1px;color:red;\">Suspicion de fraude - Ce code est émis par la banque émettrice de la carte.</p>\n <p style=\"margin-top:1px;color:red;\">Il peut être obtenu en général suite à une saisie répétée de CVV ou de date d’expiration erronée.</p>\n <p style=\"margin-top:1px;color:red;\">Pour connaître la raison précise du refus, l’acheteur doit contacter sa banque.</p>';\n break;\n \n case \"60\":\n return '<p style=\"margin-top:1px;\">L’accepteur de carte doit contacter l’acquéreur</p>\n <p style=\"margin-top:1px;\">Ce code est émis par la banque du marchand. </p>\n <p style=\"margin-top:1px;\">Il correspond à un problème de configuration sur les serveurs d’autorisation.</p>\n <p style=\"margin-top:1px;\">Il est émis en général lorsque le contrat commerçant ne correspond pas au canal de vente utilisé.</p>\n <p style=\"margin-top:1px;\">(ex : une transaction e-commerce avec un contrat VAD-saisie manuelle).</p>\n <p style=\"margin-top:1px;\">Contactez le service client pour régulariser la situation.</p>';\n break;\n \n case \"07\":\n return '<p style=\"margin-top:1px;\">Conserver la carte, conditions spéciales</p>';\n break;\n \n case \"08\":\n return '<p style=\"margin-top:1px;\">Approuver après identification</p>';\n break;\n \n case \"12\":\n return '<p style=\"margin-top:1px;color:red;\">Transaction invalide</p>';\n break;\n \n case \"13\":\n return '<p style=\"margin-top:1px;color:red;\">Montant invalide</p>';\n break;\n \n case \"14\":\n return '<p style=\"margin-top:1px;color:red;\">Numéro de porteur invalide</p>';\n break;\n \n case \"15\":\n return '<p style=\"margin-top:1px;color:red;\">Emetteur de carte inconnu</p>';\n break;\n \n case \"17\":\n return '<p style=\"margin-top:1px;color:red;\">Annulation acheteur</p>';\n break;\n \n case \"19\":\n return '<p style=\"margin-top:1px;\">Répéter la transaction ultérieurement</p>';\n break;\n \n case \"20\":\n return '<p style=\"margin-top:1px;color:red;\">Réponse erronée (erreur dans le domaine serveur)</p>';\n break;\n \n case \"24\":\n return '<p style=\"margin-top:1px;\">Mise à jour de fichier non supportée</p>';\n break;\n \n case \"25\":\n return '<p style=\"margin-top:1px;\">Impossible de localiser l’enregistrement dans le fichier</p>';\n break;\n \n case \"26\":\n return '<p style=\"margin-top:1px;\">Enregistrement dupliqué, ancien enregistrement remplacé</p>';\n break;\n \n case \"27\":\n return '<p style=\"margin-top:1px;\">Erreur en « edit » sur champ de liste à jour fichier</p>';\n break;\n \n case \"28\":\n return '<p style=\"margin-top:1px;\">Accès interdit au fichier</p>';\n break;\n \n case \"29\":\n return '<p style=\"margin-top:1px;\">Mise à jour impossible</p>';\n break;\n \n case \"30\":\n return '<p style=\"margin-top:1px;\">Erreur de format</p>';\n break;\n \n case \"31\":\n return '<p style=\"margin-top:1px;color:red;\">Identifiant de l’organisme acquéreur inconnu</p>';\n break;\n \n case \"33\":\n return '<p style=\"margin-top:1px;color:red;\">Date de validité de la carte dépassée</p>';\n break;\n \n case \"34\":\n return '<p style=\"margin-top:1px;color:red;\">Suspicion de fraude</p>';\n break;\n \n case \"38\":\n return '<p style=\"margin-top:1px;color:red;\">Date de validité de la carte dépassée</p>';\n break;\n \n case \"41\":\n return '<p style=\"margin-top:1px;color:red;\">Carte perdue</p>';\n break;\n \n case \"43\":\n return '<p style=\"margin-top:1px;color:red;\">Carte volée</p>';\n break;\n \n case \"54\":\n return '<p style=\"margin-top:1px;color:red;\">Date de validité de la carte dépassée</p>';\n break;\n \n case \"55\":\n return '<p style=\"margin-top:1px;color:red;\">Code confidentiel erroné</p>';\n break;\n \n case \"58\":\n return '<p style=\"margin-top:1px;color:red;\">Transaction non permise à ce porteur</p>';\n break;\n \n case \"61\":\n return '<p style=\"margin-top:1px;color:red;\">Montant de retrait hors limite</p>';\n break;\n \n case \"63\":\n return '<p style=\"margin-top:1px;color:red;\">Règles de sécurité non respectées</p>';\n break;\n \n case \"68\":\n return '<p style=\"margin-top:1px;color:red;\">Réponse non parvenue ou reçue trop tard</p>';\n break;\n \n case \"75\":\n return '<p style=\"margin-top:1px;color:red;\">Nombre d’essais code confidentiel dépassé</p>';\n break;\n \n case \"76\":\n return '<p style=\"margin-top:1px;color:red;\">Porteur déjà en opposition, ancien enregistrement conservé</p>';\n break;\n \n case \"90\":\n return '<p style=\"margin-top:1px;color:red;\">Arrêt momentané du système</p>';\n break;\n \n case \"91\":\n return '<p style=\"margin-top:1px;color:red;\">Émetteur de cartes inaccessible</p>';\n break;\n \n case \"94\":\n return '<p style=\"margin-top:1px;color:red;\">Transaction dupliquée</p>';\n break;\n \n case \"96\":\n return '<p style=\"margin-top:1px;color:red;\">Mauvais fonctionnement du système</p>';\n break;\n \n case \"97\":\n return '<p style=\"margin-top:1px;color:red;\">Échéance de la temporisation de surveillance globale</p>';\n break;\n \n case \"98\":\n return '<p style=\"margin-top:1px;color:red;\">Serveur indisponible routage réseau demandé à nouveau</p>';\n break;\n \n case \"99\":\n return '<p style=\"margin-top:1px;color:red;\">Incident domaine initiateur</p>';\n break;\n\n case \"ERRORTYPE\":\n return '<p style=\"margin-top:1px;\">Erreur verifVadsOperationType() type non défini.</p>';\n break;\n\n default;\n return 'Erreur '.$data;\n break;\n\n }\n\n }", "function gTranslate($text,$langOriginal,$langFinal){\n\t\t//Si los idiomas son iguales no hago nada\n\t\tif($langOriginal != $langFinal){\n\t\t/* Definimos la URL de la API de Google Translate y metemos en la variable el texto a traducir */\n\t\t$url = 'http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q='.urlencode($text).'&langpair='.$langOriginal.'|'.$langFinal;\n\t\t// iniciamos y configuramos curl_init();\n\t\t$curl_handle = curl_init();\n\t\tcurl_setopt($curl_handle,CURLOPT_URL, $url);\n\t\tcurl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);\n\t\tcurl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);\n\t\t$code = curl_exec($curl_handle);\n\t\tcurl_close($curl_handle);\n\t\t/* La api nos devuelve los resultados en forma de objeto stdClass */\t\n\t\t$json \t\t= json_decode($code)->responseData;\n \t $traduccion = utf8_decode($json->translatedText);\n\t\treturn utf8_decode($traduccion);\n\t\t}else{\n\t\t\treturn $text;\n\t\t}\n\t}", "function _gaiabb_autocompresp($string) {\n\n $matches = array();\n $result = db_select('gbb_gresp', 'c')\n ->fields('c', array('nomu'))\n ->condition('nomu', '%' . db_like($string) . '%', 'LIKE')\n ->distinct()\n ->range(0, 10)\n ->execute();\n foreach ($result as $r) {\n $matches[$r->nomu] = $r->nomu;\n }\n $count = $result->rowCount();\n if ($count > 9) $matches[' '] = '..... Et bien d\\'autres .....';\n drupal_json_output($matches);\n}", "function fetch_word_info()\n {\n $word_id = $this->input->post('id');\n $res = $this->landing_page_cms_model->get_word_info_by_word_id($word_id);\n $title = $res['s_title'];\n $desc = $res['s_desc'];\n echo json_encode(array('title'=>$title,'desc'=>$desc));\n }", "public function responseMsg()\n {\n $postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n \n //extract post data\n if (!empty($postStr)){\n /* libxml_disable_entity_loader is to prevent XML eXternal Entity Injection,\n the best way is to check the validity of xml by yourself */\n libxml_disable_entity_loader(true);\n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $fromUsername = $postObj->FromUserName;\n $toUsername = $postObj->ToUserName;\n $keyword = trim($postObj->Content);\n $time = time();\n $msgType = $postObj->MsgType;//消息类型\n $event = $postObj->Event;//时间类型,subscribe(订阅)、unsubscribe(取消订阅)\n $textTpl = \"<xml>\n <ToUserName><![CDATA[%s]]></ToUserName>\n <FromUserName><![CDATA[%s]]></FromUserName>\n <CreateTime>%s</CreateTime>\n <MsgType><![CDATA[%s]]></MsgType>\n <Content><![CDATA[%s]]></Content>\n <FuncFlag>0</FuncFlag>\n </xml>\"; \n \n switch($msgType){\n case \"event\":\n if($event==\"subscribe\"){\n $contentStr = \"最新更新说明:\".\"\\n\".\"A:优化二维码搜索功能,搜索更精准\".\"\\n\".\"B:微信群二维码采集源更新:\".\"\\n\".\"1、百度贴吧\".\"\\n\".\"2、新浪微博\".\"\\n\".\"3、兴趣部落\".\"\\n\".\"4、700+陌陌群\".\"\\n\".\"5、3500+个微信群\".\"\\n\".\"6、1300+个QQ群\".\"\\n\".\"C:支持支付方式:\".\"\\n\".\"1、微信支付\".\"\\n\".\"2、支付宝(敬请期待)\";\n } \n break;\n case \"text\":\n /*switch($keyword){\n case \"1\":\n $contentStr = \"店铺地址:\".\"\\n\".\"杭州市江干艮山西路233号新东升市场地下室第一排.\"; \n break;\n case \"2\":\n $contentStr = \"商品种类:\".\"\\n\".\"杯子、碗、棉签、水桶、垃圾桶、洗碗巾(刷)、拖把、扫把、\"\n .\"衣架、粘钩、牙签、垃圾袋、保鲜袋(膜)、剪刀、水果刀、饭盒等.\";\n break;\n default:\n $contentStr = \"对不起,你的内容我会稍后回复\";\n }*/\n $contentStr = \"对不起,你的内容我会稍后回复\";\n break;\n }\n $msgType = \"text\";\n $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n echo $resultStr;\n }else {\n echo \"post str is null\";\n exit;\n }\n }", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "private function msg($k){\r\n global $language;\r\n\r\n return $language[$k];\r\n\r\n\r\n }", "public function getdanhsachmonhoc(){\n\t\t$matruong = Session::get('matruong');\n\t\t$data = monhoc::with('tochuyenmon')->where('matruong',$matruong)->get();\n\t\treturn json_encode($data, JSON_UNESCAPED_UNICODE);\n\t}", "public function getInfoLengkap(){\n $str = \"{$this->tipe} : {$this->judul} | {$this->getLable()} (Rp. {$this->harga}\";\n if($this->tipe == \"Komik\"){\n $str .= \" - ($this->jmlHalaman) Halaman.\";\n }elseif ($this->tipe == \"Game\"){\n $str .= \" ~ ($this->waktuMain) Jam.\";\n }\n return $str;\n }", "function translate_google($data)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$text = $data['text'];\n\t\t\t\t$orignal_type = $data['orignal_type'];\n\t\t\t\t$local_type = $data['local_type'];\n\t\t\t\t\n\t\t\t\t$url = \"http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=\".urlencode($text).\"&langpair=$orignal_type|$local_type\";\n\t\t\t\t$retJsonStr = file_get_contents($url);\n\t\t\t\t\n\t\t\t\treturn $this->translate_parse($retJsonStr);\n\t\t\t}\n\t\t\tcatch(Exception $e)\n\t\t\t{\n\t\t\t\treturn $e->getMessage();\n\t\t\t}\n\t\t}", "public function response ();", "function create_response($text, $message)\r\n{\r\n global $usernamebot;\r\n \r\n // inisiasi variable hasil yang mana merupakan hasil olahan pesan\r\n $hasil = ''; \r\n \r\n $chatid = $message[\"chat\"][\"id\"]; // variable penampung id chat\r\n \r\n\r\n // variable penampung username nya user\r\n isset($message[\"from\"][\"username\"])\r\n ? $chatuser = $message[\"from\"][\"username\"]\r\n : $chatuser = '';\r\n \r\n\r\n // variable penampung nama user\r\n\r\n isset($message[\"from\"][\"last_name\"]) \r\n ? $namakedua = $message[\"from\"][\"last_name\"] \r\n : $namakedua = ''; \r\n\r\n $namauser = $message[\"from\"][\"first_name\"]. ' ' .$namakedua;\r\n\r\n $pecah = explode(' ', $text); \r\n\t\r\n // identifikasi perintah (yakni kata pertama, atau array pertamanya)\r\n switch ($pecah[0]) {\r\n \r\n case '/start':\r\n if(str_word_count($text)<=1){\r\n $_SESSION['namauser']=$namauser;\r\n\r\n $hasil = \"Hai 💁 `{$_SESSION['namauser']}` .. Selamat datang di `Sistem Informasi Jadwal Laboratorium FASILKOM-TI` Universitas Sumatera Utara! \\n\\n\";\r\n $hasil .= '💁🏼 Aku adalah *bot SisLabTI* ver.`'.myVERSI.\"`\\n\";\r\n $hasil .= \"🎓 yang dibuat oleh :\\n\";\r\n $hasil .= \" _Indana Fariza Hidayat 161402082_\\n\";\r\n $hasil .= \" _Gistya Fakhrani 161402094_\\n\";\r\n $hasil .= \" _Rina Ayu Wulan Sari 161402097_\\n \";\r\n $hasil .= \" _Sinta Anjelina 161402100_\\n\";\r\n $hasil .= \" _Dea Amanda 161402118_\\n⌛️\".lastUPDATE.\"\\n\\n\";\r\n $hasil .= \"‼️ Notes ‼️ \\n `Bot hanya mengerti bahasa instruksi yang disediakan` 🔻 \\n `Jika` instruksi sudah sesuai namun `bot sedang lambat & tidak merespons`. `Ketikkan instruksi ulang` 🔻\\n\\n\";\r\n\r\n $hasil .= \"Silahkan _login_ terlebih dahulu. ketik: /login\\n\";\r\n $_SESSION['step']= \"/login\";\r\n } else {\r\n $hasil= '⛔️ *ERROR:* _Tidak ada instruksi tersebut . Panggil bot sesuai instruksi!_';\r\n $hasil .= \"\\n\".'ingat /start ya ! 😅'; \r\n }\r\n break;\r\n\r\n // balasan default jika pesan tidak di definisikan\r\n default:\r\n\t\t\t//if(isset($_SESSION['chatid'])){\r\n\t\t\t\tif(isset($_SESSION['step'])){\r\n\t\t\t\t\tswitch($_SESSION['step']){\r\n case '/login':\r\n var_dump($text);\r\n $hasil = start($text);\r\n break;\r\n case 'level_user':\r\n $hasil = level_user($text);\r\n // return $hasil;\r\n break;\r\n case 'menupraktikan':\r\n $hasil = menupraktikan($text);\r\n $_SESSION['chat_id'] = $chatid;\r\n break;\r\n case 'menuaslab':\r\n $hasil = menuaslab($text);\r\n $_SESSION['chat_id'] = $chatid;\r\n break;\r\n case 'nim':\r\n //tampung dulu nimnya ke SESSION\r\n var_dump($text);\r\n $_SESSION['nim'] = $text;\r\n var_dump($_SESSION['nim']);\r\n $hasil = login($text);\r\n $_SESSION['chat_id'] = $chatid;\r\n break;\r\n case 'password':\r\n var_dump($text);\r\n $_SESSION['password'] = $text; \r\n $hasil = password($text);\r\n $_SESSION['chat_id'] = $chatid; \r\n break;\r\n case 'term': \r\n $_SESSION['semester'] = $text;\r\n $hasil = term($text);\r\n $_SESSION['chat_id']=$chatid;\r\n break;\r\n case 'matakuliah':\r\n $_SESSION['id_matkul']= $text;\r\n $hasil = matakuliah($text);\r\n $_SESSION['chat_id']=$chatid;\r\n break;\r\n case 'hari':\r\n $_SESSION['hari'] = $text;\r\n $hasil = hari($text);\r\n $_SESSION['chat_id'] = $chatid;\r\n break;\r\n case 'waktu':\r\n $_SESSION['waktu'] = $text;\r\n $hasil = waktu($text);\r\n $_SESSION['chat_id'] = $chatid;\r\n break;\r\n case 'ruangan':\r\n $_SESSION['ruangan'] = $text;\r\n $hasil = ruangan($text);\r\n $_SESSION['chat_id'] = $chatid;\r\n break;\r\n case 'kom':\r\n $_SESSION['kom'] = $text;\r\n $hasil = kom($text);\r\n $_SESSION['chat_id'] = $chatid;\r\n break;\r\n\r\n case 'menu': \r\n $hasil = menu($_SESSION['nama_aslab']);\r\n break;\r\n\r\n case 'gantihari':\r\n $_SESSION['hariganti'] = $text;\r\n $hasil = gantihari($text);\r\n $_SESSION['chat_id'] = $chatid;\r\n break;\r\n case 'gantiwaktu':\r\n $_SESSION['waktuganti'] = $text;\r\n $hasil = gantiwaktu($text);\r\n $_SESSION['chat_id'] = $chatid;\r\n break;\r\n case 'gantiruangan':\r\n $_SESSION['ruanganganti'] = $text;\r\n $hasil = gantiruangan($text);\r\n $_SESSION['chat_id'] = $chatid;\r\n break;\r\n case 'update':\r\n $text = strtolower($text);\r\n $_SESSION['chat_id'] = $chatid;\r\n if($text == 'ya'){\r\n $hasil .=upselesai();\r\n return $hasil;\r\n }\r\n elseif ($text== 'tidak') {\r\n # code...\r\n var_dump($_SESSION['nama_aslab']);\r\n $hasil = \"🅾️ Anda tidak jadi mengubah jadwal.\\n\\n\";\r\n $_SESSION['step']='menuaslab';\r\n $hasil .= menu($_SESSION['nama_aslab']);\r\n \r\n }\r\n else {\r\n $hasil = \"Masukkan sesuai perintah (ya/tidak)\\n\";\r\n $_SESSION['step'] ='update';\r\n break; \r\n }\r\n break;\r\n\r\n case 'upselesai':\r\n $hasil .= upselesai();\r\n break;\r\n\r\n\r\n \r\n\t\t\t\t\t\tcase 'verifikasi':\r\n $text = strtolower($text);\r\n $_SESSION['chat_id'] = $chatid;\r\n\t\t\t\t\t\t\tif($text == 'ya'){\r\n $hasil .=selesai();\r\n return $hasil;\r\n\t\t\t\t\t\t\t}\r\n elseif ($text== 'tidak') {\r\n # code...\r\n $hasil = \"Silahkan ulangi dengan perintah /tambah\";\r\n $_SESSION['step']='menuaslab';\r\n }\r\n else {\r\n $hasil = \"Masukkan sesuai perintah (ya/tidak)\\n\";\r\n $_SESSION['step'] ='verifikasi';\r\n break; \r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'selesai':\r\n\t\t\t\t\t\t\t// simpan ke database\r\n $hasil=selesai();\r\n\t\t\t\t\t\t\t//return $hasil;\r\n\t\t\t\t\t\t\t//session_destroy();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t $hasil = \"😥 Instruksi tidak tersedia jika `anda belum memanggil Bot`.\\n Panggil bot dengan `/start` ya! 😅\";\r\n\t\t\t\t}\r\n\t\t\t//}\r\n break;\r\n\t\t\t\r\n }\r\n\t\r\n\tprint_r($_SESSION);\r\n\r\n return $hasil;\r\n}", "public function responseMsg()\n\t{\n\t\t$postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\t\t//extract post data\n\t\tif (!empty($postStr)){\n\t\t\t/* libxml_disable_entity_loader is to prevent XML eXternal Entity Injection,\n\t\t\t the best way is to check the validity of xml by yourself */\n\t\t\tlibxml_disable_entity_loader(true);\n\t\t\t$postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n\t\t\t$fromUsername = $postObj->FromUserName;\n\t\t\tif(!empty($fromUsername)){\n\t\t\t\t$this->getGzUserInfo($fromUsername);\n\t\t\t}\n\t\t\t$toUsername = $postObj->ToUserName;\n\t\t\t$keyword = trim($postObj->Content);\n\t\t\t$Event = trim($postObj->Event);//事件类型,subscribe(订阅)、unsubscribe(取消订阅)\n// \t\t\t$time = time();\n// \t\t\t$textTpl = \"<xml>\n// \t\t\t\t\t\t\t<ToUserName><![CDATA[%s]]></ToUserName>\n// \t\t\t\t\t\t\t<FromUserName><![CDATA[%s]]></FromUserName>\n// \t\t\t\t\t\t\t<CreateTime>%s</CreateTime>\n// \t\t\t\t\t\t\t<MsgType><![CDATA[%s]]></MsgType>\n// \t\t\t\t\t\t\t<Content><![CDATA[%s]]></Content>\n// \t\t\t\t\t\t\t<FuncFlag>0</FuncFlag>\n// \t\t\t\t\t\t\t</xml>\";\n// \t\t\tif(!empty( $keyword ))\n// \t\t\t{\n// \t\t\t\t$msgType = \"text\";\n\t\t\t//订阅消息推送\n\t\t\t$resultStr\t= \"\";\n\t\t\tif(!empty($Event) && $Event=='subscribe'){\n\t\t\t\t$contentStr = \"您好,感谢您订阅衣伴网络,我们程序员正在玩命开发中,敬请期待...... 如果觉得我们有用,请推荐您的朋友关注。(微信搜索yibanwangluo)\";\n\t\t\t\t$resultStr\t= $this->responseTxt($fromUsername, $toUsername, $contentStr);\n\t\t\t}else{\n\t\t\t\tif(!empty($keyword) && $keyword=='ybwl' ){\n\t\t\t\t\t$title\t= '衣伴商务速洗';\n\t\t\t\t\t$des\t= '全国最大商务速洗O2O平台';\n\t\t\t\t\t$picurl\t= 'http://www.91yb.cn/static/images/weixin.jpg';\n\t\t\t\t\t$url\t= 'http://www.91yb.cn/?f=weixin';\n\t\t\t\t\t$resultStr = $this->responsePicTxt($fromUsername, $toUsername, $title, $des, $picurl, $url);\n\t\t\t\t}else{\n\t\t\t\t\t$resultStr =$this->responseTxt($fromUsername, $toUsername, '您好,感谢您订阅衣伴网络,我们程序员正在玩命开发中,敬请期待......');\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//@mwtlog(\"responseMsg_test\",$postStr.\"\\r\\n\",true);\n\t\t\t\techo $resultStr;\n// \t\t\t}else{\n// \t\t\t\techo \"Input something...\";\n// \t\t\t}\n\t\n\t\t}else {\n\t\t\techo \"\";\n\t\t\texit;\n\t\t}\n\t}", "private function checkResponseFormat(){\n\n }", "public function testPlainTextTranslate()\n {\n // Given\n $this->responseMock->expects($this->any())->method('json')->will($this->returnValue(\n ['data' => ['translations' => [['translatedText' => \"J'ai\"]]]]\n ));\n\n // When\n $value = $this->translator->translate('I have', 'fr', 'en', true);\n\n // Then\n $this->assertEquals($value, \"J'ai\", 'Should return \"J\\'ai\"');\n }", "function errorCase($lan) {\n\t\t$error_msg = \"\";\n\t\tif($lan == \"Hebrew\"){\n\t\t\t$error_msg = \"לא נמצאו נתונים.\";\n\t\t} \n\t\telse if($lan == \"English\") {\n\t\t\t$error_msg = \"Data not Found.\";\n\t\t} \n\t\telse if($lan == \"Arabic\") {\n\t\t\t$error_msg = \"لم يتم العثور على بيانات.\";\n\t\t}\n\t\telse {\n\t\t\t$error_msg = \"Data not Found.\";\n\t\t}\n\t\n\t\t$output = '\n\t\t\t<div class=\"table-responsive\">\n\t\t\t\t<table class=\"table table-bordered\" id=\"tableWidth\" >\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=\"4\">'.$error_msg.'</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>';\n\t\techo $output;\n\t}", "function content($word) {\n $link = new Db;\n $link2 = new Db;\n $link->query(sprintf(\"select path,descr,razd.id as rid,razd.type_user from texts,razd where razd.site='%d' and texts.razd=razd.id and messages like '%%%s%%'\",$this->sitenumber,addslashes($word)));\n $y=$link->num_rows();\n $j=0;\n for ($i=0;$i<$y;$i++) {\n $res[$i]=$link->next_record();\n if ($this->auth->verify($res[$i])) {\n $result[$j]=$res[$i];\n $result[$j]['msg']=$this->muntree($result[$j]['rid'],$link2);\n\t $j++;\n }\n }\n $smarty = new Smarty; \n $smarty->assign(\"res\",$result);\n $smarty->assign(\"word\",$word);\n $smarty->assign(\"from\",$this->from);\n $res=$smarty->fetch(\"{$this->path}sres-cont.tpl\");\n// $link2->close();\n return $res;\n }", "function formatBodyForDisplay($body, $lang) {\n global $serverScriptHelper;\n global $HTTP_ACCEPT_LANGUAGE;\n//LOCALE SPECIFIC\n if (ereg(\"^ja\",$lang) || ereg(\"^ja\",$HTTP_ACCEPT_LANGUAGE)) {\n $j = new EncodingConv($body, \"japanese\");\n $returnBody = $j->toSJIS();\n } else {\n $returnBody = $body;\n }\n return $returnBody;\n}", "function getResponse();", "function getResponse();", "public function responseMsg()\n {\n\t\t$postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\n if (!empty($postStr)){\n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $RX_TYPE = trim($postObj->MsgType);\n\n switch ($RX_TYPE)\n {\n case \"text\":\n $resultStr = $this->receiveText1($postObj);\n break;\n case \"event\":\n $resultStr = $this->receiveEvent($postObj);\n break;\n default:\n $resultStr = \"\";\n break;\n }\n echo $resultStr;\n }else {\n echo \"\";\n exit;\n }\n // \t//extract post data\n\t\t// if (!empty($postStr)){\n // /* libxml_disable_entity_loader is to prevent XML eXternal Entity Injection,\n // the best way is to check the validity of xml by yourself */\n // libxml_disable_entity_loader(true);\n // \t$postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n // $fromUsername = $postObj->FromUserName;\n // $toUsername = $postObj->ToUserName;\n // $keyword = trim($postObj->Content);\n // $time = time();\n // $textTpl = \"<xml>\n\t\t// \t\t\t\t\t<ToUserName><![CDATA[%s]]></ToUserName>\n\t\t// \t\t\t\t\t<FromUserName><![CDATA[%s]]></FromUserName>\n\t\t// \t\t\t\t\t<CreateTime>%s</CreateTime>\n\t\t// \t\t\t\t\t<MsgType><![CDATA[%s]]></MsgType>\n\t\t// \t\t\t\t\t<Content><![CDATA[%s]]></Content>\n\t\t// \t\t\t\t\t<FuncFlag>0</FuncFlag>\n\t\t// \t\t\t\t\t</xml>\"; \n\t\t// \t\tif(!empty( $keyword ))\n // {\n // \t\t$msgType = \"text\";\n // \t$contentStr = \"Welcome to wechat world!\";\n // \t$resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n // \techo $resultStr;\n // }else{\n // \techo \"Input something...\";\n // }\n\n // }else {\n // \techo \"\";\n // \texit;\n // }\n }", "function detect_bing($data)\n\t {\n\t \t //\n\t \t //print_r($data);\n\t \t $api = 'F0DE0CCB37335B16E7EB0BD3FA2A3C9FD3543DE5';\n\t \t \n\t \t if(empty($data['text']))\n\t\t { \n\t\t return ''; \n\t\t } \n\t\t \t\t \n\t\t $url = \"http://api.microsofttranslator.com/v2/Http.svc/Detect?appId=\".$api.\"&text=\".urlencode($data['text']); \n\t\t \n\t\t //echo $url;\n\t\t \n\t\t if (function_exists('curl_init')) \n\t\t { \n\t\t $curl = curl_init(); \n\t\t curl_setopt($curl, CURLOPT_URL, $url); \n\t\t curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); \n\t\t $res = curl_exec($curl); \n\t\t } \n\t\t else \n\t\t { \n\t\t $res = @file_get_contents($url); \n\t\t }\n\t\t \t\t \n\t\t preg_match(\"~<string([^><]*?)>([\\s\\S]*?)<\\/string>~i\", $res, $ostr); \n\t\t //print_r($ostr);\n\t\t if (empty($ostr[2])) \n\t\t { \n\t\t return ''; \n\t\t } \n\t\t else \n\t\t { \n\t\t $code_str = htmlspecialchars_decode($ostr[2]); \n\t\t $arr = explode(\"-\",$code_str);\n\t\t return (count($arr)>1) ? $arr[0] : $code_str;\n\t\t } \n\t }", "public function tp_resp(){\n $ddep = $this->model_proyecto->dep_dist($this->dist);\n if($this->adm==1){\n $titulo='RESPONSABLE NACIONAL';\n }\n elseif($this->adm==2){\n $titulo='RESPONSABLE '.strtoupper($ddep[0]['dist_distrital']);\n }\n\n return $titulo;\n }", "function check_parse($jsonStr)\n\t\t{\n\t\t\tif($jsonStr)\n\t\t\t{\n\t\t\t $arr = json_decode($jsonStr,true); \n\t\t\t\t $langType = $arr['responseData']['language'];\n\t\t\t\t $typeArr = explode(\"-\",$langType);\n\t\t\t\t \n\t\t\t\t if(count($typeArr)>1)\n\t\t\t\t\t{\n\t\t\t\t\t return $typeArr[0];\n\t\t\t\t\t}\n\t\t\t\t else\n\t\t\t\t\t{\n\t\t\t\t\t return $langType;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\treturn \"\";\n\t\t}", "public function getListLanguage()\n\t{\n\t\t$params = [\n\t\t\t'verify' => false,\n\t\t\t'query' => [\n\t\t\t\t'output' => Config::get( 'response.format' )\n\t\t\t]\n\t\t];\n\n\t\t$baseUrl = sprintf( Config::get( 'endpoints.base_url' ), Config::get( 'settings.api' ) ) . Config::get( 'endpoints.general_list_language' );\n\n\t\ttry {\n\t\t\t$response = parent::send( 'GET', $baseUrl, $params );\n\t\t} catch (TiketException $e) {\n\t\t\tthrow parent::convertException( $e );\n\t\t}\n\n\t\treturn $response;\n\t}", "public function translate();", "function _dispen_hari(){\n\t\t$CI =& get_instance();\n\t\t$api_url \t= URL_API_SIA.'sia_sistem/data_view';\n\t\t$parameter = array('api_kode' =>200002, 'api_subkode' => 1, 'api_search' => array());\n\t\t$data \t\t= $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\treturn $data[0]->KADALUWARSA_HARI1;\n\t}", "function mLANG(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$LANG;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:231:3: ( 'lang' ) \n // Tokenizer11.g:232:3: 'lang' \n {\n $this->matchString(\"lang\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "abstract public function response();", "function translate($data)\n\t {\n\t \t return $this->translate_bing($data);\n\t }", "public function lang(): string;", "public function index_get () {\n\t\tif ( ! $this->get('id') ) { \n \tself::error($this->config->item(\"api_bad_request_code\"));\n return; \n }\n\n $Language = new Language();\n\n if ( ! $Language->Load( $this->get(\"id\") ) ) {\n \tself::error($this->config->item(\"api_not_found_code\"));\n \treturn;\n }\n\n $this->response( $Language->Export() );\n\t}", "public function actionLanguage() {\n $response=array();\n $model = new User();\n $model2 = new UserSearch();\n if(Yii::$app->getRequest()->method===\"POST\")\n {\n $data=Yii::$app->request->post();\n $language=$data[\"lang\"];\n if($language==1)\n {\n $language=1; //Chinese\n $returnmessage=$this->alertchinese(); \n }\n else\n {\n $language=0; //English\n $returnmessage=$this->alertenglish();\n }\n if(!empty($data[\"token\"]) && isset($data[\"lang\"]))\n {\n $getid=$model2->isExistBytoken($data[\"token\"]);\n if(!empty($getid))\n {\n $updatearr=array(\n 'lang' => ($data[\"lang\"]==1)?'1':'0', \n 'last_update_date' => date('Y-m-d g:i:s'),\n );\n $upd=User::updateAll($updatearr, 'id = '.$getid[\"id\"]); \n if ($upd===1)\n {\n $response['error']=false;\n $response['statuscode']=200;\n $response['msg']=\"Success\";\n } \n else \n {\n $response['error']=true;\n $response['statuscode']=202;\n $response['msg']=$returnmessage[$response['statuscode']];\n }\n }\n else\n {\n $response['error']=true;\n $response['statuscode']=410;\n $response['msg']=$returnmessage[$response['statuscode']];\n }\n }\n else\n {\n $response['error']=true;\n $response['statuscode']=412;\n $response['msg']=$returnmessage[$response['statuscode']];\n } \n }\n else\n {\n $response['error']=true;\n $response['statuscode']=512;\n $response['msg']=\"Invalid Request\";\n }\n echo json_encode($response); \n }", "function sendUnicode()\n {\n $fieldcnt = 6;\n $fieldstring = \"Userid=$this->username&pwd=$this->password&APIKEY=$this->apikey&MSG=$this->msgtext&FROM=$this->from&To=$this->to\";\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $this->base_url_SendSMSUnicode);\n curl_setopt($ch, CURLOPT_POST, $fieldcnt);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $fieldstring);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $res = curl_exec($ch);\n curl_close($ch);\n return $res;\n }", "static function setResponseFormatPlain(){\n self::$responseFormat = 'plain';\n }", "public function getResponseAsString(): string;", "function lang() {\r\n\t\tif($this->language === \"french\") {\r\n\t\t\tforeach($this->config['lang_fr'] as $tag_name) {\r\n\t\t\t\t$this->code = preg_replace('/<' . $tag_name . '([^<>]*)>/', '<' . $tag_name . ' lang=\"fr\" xml:lang=\"fr\"$1>', $this->code);\r\n\t\t\t\t$this->code = preg_replace('/<' . $tag_name . ' lang=\"fr\" xml:lang=\"fr\"([^<>]*) lang=\"fr\" xml:lang=\"fr\"([^<>]*)>/', '<' . $tag_name . ' lang=\"fr\" xml:lang=\"fr\"$1$2>', $this->code);\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($this->language === \"english_and_french\") {\r\n\t\t\tpreg_match_all('/<body[^<>]*>(.*?)<\\/body>/is', $this->code, $matches);\r\n\t\t\t$initial_body_code = $body_code = $matches[1][0];\r\n\t\t\t$replace_count = -1;\r\n\t\t\twhile($replace_count != 0) {\r\n\t\t\t\t$body_code = preg_replace('/<(\\w*)([^<>]*)>\\s*([^<>\\/]*[^\\s])\\s*\\/\\s*([^<>\\/]{1,})\\s*</is', '<$1$2><span lang=\"en\" xml:lang=\"en\">$3</span> / <span lang=\"fr\" xml:lang=\"fr\">$4</span><', $body_code, -1, $replace_count);\r\n\t\t\t}\r\n\t\t\t$this->code = str_replace($initial_body_code, $body_code, $this->code);\r\n\t\t}\r\n\t\t$this->logMsgIf(\"lang\", $ct);\r\n\t\treturn true;\r\n\t}", "public function jalan() {\n return \"Hewan ini berjalan<br/>\";\n }", "public function ajax_get_translation_status()\n {\n $type = ee()->input->get('type', TRUE);\n $id = ee()->input->get('id', TRUE);\n\n $status = FALSE;\n\n $detailed = ee()->publisher_setting->detailed_translation_status();\n\n switch ($type)\n {\n case 'phrase':\n $status = ee()->publisher_phrase->is_translated_formatted($id, $detailed);\n break;\n case 'category':\n $status = ee()->publisher_category->is_translated_formatted($id, $detailed);\n break;\n case 'entry':\n if (strstr($id, ','))\n {\n $id = explode(',', $id);\n }\n\n if (is_array($id))\n {\n $status = FALSE;\n $translated_entries = array();\n\n foreach ($id as $entry_id)\n {\n if ($status = ee()->publisher_entry->is_translated_formatted($entry_id, $detailed))\n {\n $translated_entries[$entry_id] = $status;\n }\n }\n\n return ee()->publisher_helper->send_ajax_response(json_encode($translated_entries));\n }\n else\n {\n $status = ee()->publisher_entry->is_translated_formatted($id, $detailed);\n }\n break;\n }\n\n ee()->publisher_helper->send_ajax_response($status);\n }", "public function getLanguage($word){\n\t\t\t\n\t\t\t$paramArr = array (\n\t\t\t\t\t\t\t\t\t 'locale'\t=> urlencode($word)\n );\n\t\t\t$paramArr = http_build_query($paramArr);\n\n\t\t\t$this->http->setURL($this->url.$this->apiUrl.$this->getMode(\"languages\").\"?\".$paramArr);\n\t\t\t$response = $this->http->send(FALSE);\n\n\t\t\treturn $response;\n\n\t\t}", "function GetLocalizedTexts()\n\t{\n\t\t$result = $this->sendRequest(\"GetLocalizedTexts\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function textKontrolEt($veri)\r\n{\r\n \r\n $ifade = '/[a-zA-ZçığöşüÇĞİÖŞÜ ]+$/i'; //Türkçe Uyumlu\r\n $islem= preg_match($ifade, $veri);\r\n return $islem;\r\n \r\n}", "protected function responseMsg()\n {\n $postStr = file_get_contents('php://input', 'r');\n\n //extract post data\n if (!empty($postStr)){\n /* libxml_disable_entity_loader is to prevent XML eXternal Entity Injection,\n the best way is to check the validity of xml by yourself */\n libxml_disable_entity_loader(true);\n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $fromUsername = $postObj->FromUserName;\n $toUsername = $postObj->ToUserName;\n $keyword = trim($postObj->Content);\n $time = time();\n $textTpl = \"<xml>\n\t\t\t\t\t\t\t<ToUserName><![CDATA[%s]]></ToUserName>\n\t\t\t\t\t\t\t<FromUserName><![CDATA[%s]]></FromUserName>\n\t\t\t\t\t\t\t<CreateTime>%s</CreateTime>\n\t\t\t\t\t\t\t<MsgType><![CDATA[%s]]></MsgType>\n\t\t\t\t\t\t\t<Content><![CDATA[%s]]></Content>\n\t\t\t\t\t\t\t<FuncFlag>0</FuncFlag>\n\t\t\t\t\t\t\t</xml>\";\n if(!empty( $keyword ))\n {\n $msgType = \"text\";\n $contentStr = \"Welcome to wechat world!\";\n $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);\n echo $resultStr;\n }else{\n echo \"Input something...\";\n }\n\n }else {\n echo \"\";\n exit;\n }\n }", "public function setGatewayResponse(string $text);", "protected function getHTTPResponceTextByCode($code) {\n $text = '';\n switch ($code) {\n case 100: $text = 'Continue'; break;\n case 101: $text = 'Switching Protocols'; break;\n case 200: $text = 'OK'; break;\n case 201: $text = 'Created'; break;\n case 202: $text = 'Accepted'; break;\n case 203: $text = 'Non-Authoritative Information'; break;\n case 204: $text = 'No Content'; break;\n case 205: $text = 'Reset Content'; break;\n case 206: $text = 'Partial Content'; break;\n case 300: $text = 'Multiple Choices'; break;\n case 301: $text = 'Moved Permanently'; break;\n case 302: $text = 'Moved Temporarily'; break;\n case 303: $text = 'See Other'; break;\n case 304: $text = 'Not Modified'; break;\n case 305: $text = 'Use Proxy'; break;\n case 400: $text = 'Bad Request'; break;\n case 401: $text = 'Unauthorized'; break;\n case 402: $text = 'Payment Required'; break;\n case 403: $text = 'Forbidden'; break;\n case 404: $text = 'Not Found'; break;\n case 405: $text = 'Method Not Allowed'; break;\n case 406: $text = 'Not Acceptable'; break;\n case 407: $text = 'Proxy Authentication Required'; break;\n case 408: $text = 'Request Time-out'; break;\n case 409: $text = 'Conflict'; break;\n case 410: $text = 'Gone'; break;\n case 411: $text = 'Length Required'; break;\n case 412: $text = 'Precondition Failed'; break;\n case 413: $text = 'Request Entity Too Large'; break;\n case 414: $text = 'Request-URI Too Large'; break;\n case 415: $text = 'Unsupported Media Type'; break;\n case 500: $text = 'Internal Server Error'; break;\n case 501: $text = 'Not Implemented'; break;\n case 502: $text = 'Bad Gateway'; break;\n case 503: $text = 'Service Unavailable'; break;\n case 504: $text = 'Gateway Time-out'; break;\n case 505: $text = 'HTTP Version not supported'; break;\n default: break;\n }\n return $text;\n }", "function jika($m){\t\t\n\t\t\tif ($m==1){\n\t\t\t\treturn \"Aktif\";\t\t\t\n\t\t\t} else {\n\t\t\t\treturn \"Tidak Aktif\";\n\t\t\t}\n\t\t\t}", "function errorMsg($msg){\n $error = array(\"eroare\" => $msg);\n echo JSON_encode($error);\n }", "function re_parse($data)\n\t {\n print_r($data);\n\t \tif($data['lang_code'] == 'zh')\n\t \t{\n\t \t\treturn $this->re_parse_zh($data);\n\t \t}\n\t \telse\n\t \t{\n\t \t\treturn $this->re_parse_not_zh($data);\n\t \t}\n\t }", "public function languages();", "function getCommandes(){\n $manager = new commandeManager(database::getDB());\n $tabCommandes = $manager->getList();\n echo json_encode($tabCommandes, JSON_UNESCAPED_UNICODE);\n}", "public function getStatutTxt() {\n\t\n\t\t$this->log->debug(\"Usager::getStatutTxt() Début\");\n\t\t\n\t\t$val = \"\";\n\t\n\t\tif ($this->get(\"statut\") != \"\") {\n\t\t\t// Obtenir la chaîne à récupérer\n\t\t\t$str =\"USAGER_STATUT_\" . strtoupper($this->get('statut'));\n\t\n\t\t\t// Obtenir la valeur à partir du fichier des langues\n\t\t\t$val = constant($str);\n\t\t}\n\t\t\n\t\t$this->log->debug(\"Usager::getStatutTxt() Fin\");\n\t\n\t\treturn $val;\n\t}", "function re_parse_zh($data)\n\t {\n\t \t $tags_arr = $this->retrieve_tags($data);\n\t \t $processed_tags = $this->re_generate_chinese_tags($tags_arr);\n $location_data = $processed_tags['location'];\n $tags_arr = $processed_tags['tag'];\n \n $location_arr = $this->location_tag_process(array('country_code'=>$data['lang_code'], 'tag'=>$location_data, 'nId'=>$data['nId']));\n \n $key_arr = $this->key_tag_process(array('lang_code'=>$data['lang_code'], 'tag'=>$tags_arr, 'nId'=>$data['nId']));\n $this->Tag_process->tag_store4question(array('nId'=>$data['nId'],'tag'=>array_merge($key_arr,$location_arr))); \n $result_data = array('key'=>$key_arr,'location'=>$location_arr);\n \n echo '----------------TAG RESULT--------------------\\n';\n print_r($result_data);\n echo '----------------------------------------------\\n';\n \n return $result_data;\n\t }", "public function response();", "public function getLangcode() {\n }", "public function getResponse() {\n\t}", "public function execute()\n\t{\n\t\t$iso = $this->getLanguage()->getISO();\n\t\t$_SERVER['REQUEST_URI'] = preg_replace(\"/_lang=[a-z]{2}/\", \"_lang=\".$iso , urldecode($_SERVER['REQUEST_URI']));\n\t\t$_REQUEST['_lang'] = $iso;\n\t\tGDO_Session::set('gdo-language', $iso);\n\t\tTrans::setISO($iso);\n\t\t\n\t\t# Build response\n\t\t$response = GDT_Success::responseWith('msg_language_set', [$this->getLanguage()->displayName()]);\n\t\t\n\t\t# Redirect if 'ref' is set\n\t\tif ($url = $this->gdoParameterVar('ref'))\n\t\t{\n\t\t\t$url = preg_replace(\"/_lang=[a-z]{2}/\", \"_lang=\".$iso , $url);\n\t\t\t$response->addField(Website::redirect($url));\n\t\t}\n\n\t\treturn $response;\n\t}", "public function getResponse()\n {\n }", "public function getMultilingual();", "function verifVadsStatus($data) {\n switch ($data) {\n\n case \"AUTHORISED\":\n return '<p style=\"margin-top:1px;\">En attente de remise : La transaction est acceptée et sera remise en banque automatiquement à la date prévue.</p>';\n break;\n\n case \"ABANDONED\":\n return '<p style=\"margin-top:1px;\">Abandonné : Le paiement a été abandonné par l\\’acheteur.</p>';\n break;\n\n case \"AUTHORISED_TO_VALIDATE\":\n return '<p style=\"margin-top:1px;\">A valider : La transaction, créée en validation manuelle, est autorisée.</p>\n <p style=\"margin-top:1px;\">Le marchand doit valider manuellement la transaction afin qu\\'elle soit remise en banque.</p>\n <p style=\"margin-top:1px;\">La transaction peut être validée tant que la date de remise n’est pas dépassée.</p>\n <p style=\"margin-top:1px;\">Si cette date est dépassée alors le paiement prend le statut EXPIRED.</p>\n <p style=\"margin-top:1px;\">Le statut Expiré est définitif.</p>';\n break;\n\n case \"CANCELLED\":\n return '<p style=\"margin-top:1px;\">Annulée : La transaction est annulée par le marchand.</p>';\n break;\n\n case \"CAPTURED\":\n return '<p style=\"margin-top:1px;\">Remisée : La transaction est remise en banque.</p>';\n break;\n\n case \"CAPTURE_FAILED\":\n return '<p style=\"margin-top:1px;\">Erreur remise : La remise de la transaction a échoué.<br />\n Contactez le Support.</p>';\n break;\n \n case \"EXPIRED\":\n return '<p style=\"margin-top:1px;\">Expirée : La date de remise est atteinte et le marchand n\\’a pas validé la transaction.</p>';\n break;\n \n case \"NOT_CREATED\":\n return '<p style=\"margin-top:1px;\">Transaction non créée : La transaction n\\'est pas créée et n\\'est pas visible dans le Back Office.</p>';\n break;\n\n case \"REFUSED\":\n return '<p style=\"margin-top:1px;\">Refusée : La transaction est refusée.</p>';\n break;\n \n case \"UNDER_VERIFICATION\":\n return '<p style=\"margin-top:1px;\">Vérification PayPal en cours : En attente de vérification par PayPal.</p> \n <p style=\"margin-top:1px;\">PayPal retient la transaction pour suspicion de fraude.</p> \n <p style=\"margin-top:1px;\">Le paiement est dans l’onglet Transactions en cours dans votre backoffice.</p>';\n break;\n\n case \"WAITING_AUTHORISATION\":\n return '<p style=\"margin-top:1px;\">En attente d’autorisation : Le délai de remise en banque est supérieur à la durée de validité de l\\'autorisation.</p>\n <p style=\"margin-top:1px;\">Une autorisation d\\’un euro est réalisée et acceptée par la banque émettrice.</p>\n <p style=\"margin-top:1px;\">La demande d\\’autorisation sera déclenchée automatiquement à J-1 avant la date de remise en banque.</p>\n <p style=\"margin-top:1px;\">Le paiement pourra être accepté ou refusé.</p>\n <p style=\"margin-top:1px;\">La remise en banque est automatique.</p>';\n break;\n \n case \"WAITING_AUTHORISATION_TO_VALIDATE\":\n return '<p style=\"margin-top:1px;\">A valider et autoriser : Le délai de remise en banque est supérieur à la durée de validité de l\\'autorisation.</p>\n <p style=\"margin-top:1px;\">Une autorisation d\\’un euro a été acceptée.</p>\n <p style=\"margin-top:1px;\">Le marchand doit valider manuellement la transaction afin que la demande d’autorisation et la remise aient lieu.</p>';\n break;\n \n case \"ERRORSTATUS\":\n return '<p style=\"margin-top:1px;\">Erreur verifVadsStatus() le paiement n\\'à pu aboutir erreur de status.</p>';\n break;\n\n }\n }" ]
[ "0.66641784", "0.6549816", "0.6383949", "0.6358248", "0.63362354", "0.6229947", "0.6223381", "0.61819875", "0.61480594", "0.6124543", "0.60299504", "0.6000768", "0.5994711", "0.5992639", "0.5951198", "0.5938699", "0.59306794", "0.5914436", "0.5900166", "0.5894488", "0.58927375", "0.58648896", "0.58629256", "0.58629256", "0.58568597", "0.58511376", "0.58051705", "0.58051705", "0.5802662", "0.5802599", "0.5799501", "0.5797851", "0.57814264", "0.5768093", "0.5768031", "0.5742352", "0.5738588", "0.57271206", "0.57271206", "0.57271206", "0.57271206", "0.57271206", "0.57271206", "0.57271206", "0.57271206", "0.57271206", "0.57271206", "0.57271206", "0.5722781", "0.5718088", "0.57151574", "0.57006085", "0.56725675", "0.5672035", "0.5670162", "0.56638163", "0.5660236", "0.5651178", "0.56502396", "0.5642198", "0.56421643", "0.56421643", "0.56417024", "0.5634918", "0.5621685", "0.56180537", "0.5611795", "0.5602094", "0.5590769", "0.5586485", "0.5577287", "0.55770236", "0.55751055", "0.5567765", "0.5550275", "0.5548943", "0.5544697", "0.55441624", "0.55403817", "0.5536973", "0.5533327", "0.55294394", "0.55256253", "0.55222476", "0.55210483", "0.55176", "0.55152893", "0.5501082", "0.5500114", "0.54980177", "0.54972035", "0.54791445", "0.54615873", "0.5458915", "0.54560596", "0.5456037", "0.5454918", "0.5453971", "0.54522574", "0.54452777", "0.54428536" ]
0.0
-1
Execute the console command.
public function handle() { $relative = $this->option('relative'); foreach ($this->links() as $link => $target) { if (file_exists($link) && ! $this->isRemovableSymlink($link, $this->option('force'))) { $this->error("The [$link] link already exists."); continue; } if (is_link($link)) { $this->laravel->make('files')->delete($link); } if ($relative) { $this->laravel->make('files')->relativeLink($target, $link); } else { $this->laravel->make('files')->link($target, $link); } $this->info("The [$link] link has been connected to [$target]."); } $this->info('The links have been created.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() method on it.\n $this->info(\n \\Aregsar\\Converter\\ConverterFacade::convert($this->argument(\"currency\"))\n );\n }", "public function handle()\n {\n $this->locale = $this->argument('locale');\n\n $this->loadGroupLines();\n\n $this->loadNameSpacedLines();\n\n $this->info('Complete');\n }", "public function handle()\n {\n $this->importUser($this->argument('username'));\n $this->call('ldap:show-user', $this->arguments());\n }", "public function handle() {\n $user = User::where('id', $this->argument('userId'))->first();\n $this->info($user->email);\n }", "public function handle()\n {\n $translations = collect(json_decode(file_get_contents('https://raw.githubusercontent.com/getbible/Bibles/master/translations.json')))->flatten();\n switch($this->argument('action')) {\n case 'fetch':\n $this->fetchBibles($translations);\n break;\n case 'convert':\n $this->convertBibles($translations);\n break;\n }\n }", "public function handle()\n {\n\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\n }", "public function handle()\n {\n try {\n $evalstr = $this->evaluater->evaluate($this->argument('evalString'));\n $this->info($evalstr);\n } catch (ForbiddenSymbolsException $exception) {\n $this->error($exception->getMessage());\n } catch (IncorrectSymbolsException $exception) {\n $this->error($exception->getMessage());\n }\n }", "public function handle()\n {\n // env('CALENDARINDEX_TOKEN', '6f2bd927201ba4b22bb57df08db0c517e51732de')\n $this->getData($this->argument('country'), $this->argument('region'));\n }", "public function handle()\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n\n $this->info(\"starting to generate users details\");\n\n }", "public function handle()\n {\n\t\t$this->info('Importing translations...');\n\n\t\t$this->manager->importTranslations(true);\n }", "public function handle()\n {\n $user = null;\n\n if ($email = $this->option(\"email\", false)) {\n $user = $this->findByEmail($email);\n }\n\n if ($id = $this->option(\"id\", false)) {\n $user = $this->findById($id);\n }\n\n if (empty($user)) {\n $this->warn(\"User no found\");\n }\n else {\n $this->setRoleToUser($user);\n }\n }", "public function handle()\n {\n $name = ucwords($this->argument('name'));\n $this->call('repository:contract', [ 'name' => $name ]);\n $this->call('repository:class', [ 'name' => $name, '--driver' => $this->option('driver') ]);\n }", "public function handle()\n\t{\n\t\t// Superuser\n\t\tif( ! $this->option('no-superuser'))\n\t\t\t$this->call('setup:superuser');\n\n\t\t// Countries\n\t\tif( ! $this->option('no-countries'))\n\t\t\t$this->call('setup:countries', ['country' => array_filter(explode(',', $this->option('countries')))]);\n\n\t\t// Languages\n\t\tif( ! $this->option('no-languages'))\n\t\t\t$this->call('setup:languages', ['language' => array_filter(explode(',', $this->option('languages')))]);\n\n\t\t// Currencies\n\t\tif( ! $this->option('no-currencies'))\n\t\t\t$this->call('setup:currencies', ['currency' => array_filter(explode(',', $this->option('currencies')))]);\n\n\t\t// Clear cache\n\t\t$this->call('cache:clear');\n\t}", "public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\t\t\n\t\t$this->info(\"Searching eve api for {$name}\");\n\t\t$result = Corporation::searchEVEAPI($name);\n\n\t\t$this->info(\"results\");\n\t\tforeach($result as $corp)\n\t\t{\n\t\t\tprint $corp->name . \" \" . $corp->id . \"\\r\\n\";\n\t\t}\n\t}", "public function handle()\n {\n $user = $this->argument('user');\n $this->info('Display this on the screen, user ' . $user);\n return 0;\n }", "public function handle()\n {\n $this->userVectors->test($this->option('force'));\n }", "public function handle()\n {\n $mapping = $this->formatMappingName((string)$this->argument('mapping'));\n \n $model = $this->option('model') ? $this->formatModelName($this->option('model')) : null;\n \n $this->filesystem->put(\n $this->buildMappingFilePath($mapping),\n $this->buildMapping(\n $this->getDefaultStub(),\n $mapping,\n $model\n )\n );\n \n $this->composer->dumpAutoloads();\n }", "public function handle()\n {\n $option = $this->argument('option');\n\n if (! in_array($option, ['expired', 'all'])) {\n return $this->error('Invalid option supplied to command...');\n }\n\n $this->comment('Beginning pruning process...');\n\n $this->comment($this->pruneDatabase($option) . ' deleted from database...');\n\n $this->comment($this->pruneFiles($option) . ' deleted from files...');\n\n $this->info('Nonces pruned successfully!');\n }", "public function handle()\n {\n switch ($this->argument('type')) {\n case 'dns':\n $this->dnscheck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n case 'whois':\n $this->whoischeck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n }\n }", "public function handle()\n\t{\n\t\t\n\t\t$source_directory = $this->argument( 'source_directory' );\n\t\t$target_directory = $this->argument( 'target_directory' );\n\t\t$template = (string) $this->option( 'template' );\n\n\t\t$statik = new \\App\\Statik\\Statik;\n\n\t\t$statik->generateHTMLFiles( $this, $source_directory, $target_directory, $template ) && $this->info( \"\\e[1;32mDONE!\" );\n\n\t}", "public function handle()\n {\n $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\n }", "public function handle()\n {\n if (!$this->argument('file')) {\n $this->info('Please specify file to call.');\n }\n\n $file = $this->argument('file');\n\n if (!$this->fileHandler->exists($file)) {\n $this->info('Wrong path or file not exist.');\n }\n\n $this->executeFile($file);\n }", "public function handle()\n {\n $user = $this->argument('user');\n $this->scanner->setUserName($user);\n $this->scanner->scanUser();\n }", "public function handle()\n {\n if ($this->argument('user')) {\n $userId = $this->argument('user');\n\n $this->info(\"Liquidate affiliate commission for user \" . $userId);\n\n $user = $this->userService->findById($userId);\n\n if ($user) {\n $this->walletService->liquidateUserBalance($user);\n } else {\n $this->error(\"User not found\");\n }\n\n $this->info(\"Done\");\n } else {\n $this->info(\"Liquidate all commissions\");\n\n $this->walletService->liquidateAllUsersBalance();\n\n $this->info(\"Done\");\n }\n }", "public function handle()\n {\n $action = $this->choice('what action do you have on mind', [\n 'add-relation', 'remove-columns', 'column-type', 'rename-column'\n ]);\n switch ($action) {\n case 'add-relation':\n $this->addRelation();\n break;\n\n case 'remove-columns':\n $this->removeColumns();\n break;\n case 'column-type':\n $this->columnType();\n break;\n case 'rename-column':\n $this->renameColumn();\n break;\n default:\n $this->error('Unsupported action requested...');\n }\n $this->info('Command executed successfully');\n }", "public function handle()\n {\n $arguments = $this->arguments();\n $storageDir = $arguments['storageDir'];\n $localStorageDir = $arguments['localStorageDir'];\n $url = $arguments['url'];\n $cmd = sprintf(\"./app/Console/Commands/ShellScripts/screen_shot.sh %s %s %s\", $storageDir, $localStorageDir, $url);\n\n while (true) {\n $result = shell_exec($cmd);\n print_r($result);\n sleep(3);\n }\n }", "public function handle()\n {\n $city = $this->argument('city');\n\n $weatherService = new CurrentWeatherService();\n try {\n $weather = $weatherService->getByCity($city);\n } catch (WeatherException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n $this->info('Weather for city '.$city);\n dump($weather->toArray());\n }", "public function handle()\n {\n $this->getModels($this->argument('model'));\n $this->getLanguages($this->argument('locale'));\n $this->createMultiLanguageRecords();\n }", "public function handle()\n {\n $this->processOptions();\n\n echo json_encode( $this->dateTimeRange ) . \"\\n\";\n\n $this->dispatch( new ProcessNewActionsJob(\n $this->dateTimeRange ,\n str_random( 16 ),\n $this->option('runtime-threshold')\n ) );\n }", "public function handle()\n {\n $fightId = $this->argument('fight_id');\n $metricId = $this->argument('metric_id');\n //$strategyName = 'App\\\\'.$this->argument('metric_name');\n\n $metric = BossMetric::find($metricId);\n if ($metric === null) {\n $this->error(\"Error: no metric with id: $metricId found!\");\n return;\n }\n\n $fight = Fight::find($fightId);\n\n if ($fight === null) {\n $this->error(\"Error: no fight with id: $fightId found!\");\n return;\n }\n\n $strategy = $metric->getStrategy();\n $strategy->setFight($fight);\n $strategy->run();\n }", "public function handle()\n {\n $user_id = $this->argument('user') ?? null;\n\n if (is_null($user_id)) {\n $users = User::all();\n\n foreach ($users as $user) {\n $this->showUserBalance($user);\n }\n } else {\n $user = User::find($user_id);\n\n $this->showUserBalance($user);\n }\n }", "public function handle()\n {\n\t\t$this->call('vendor:publish');\n\t\t$this->call('migrate');\n\t\t$this->call('db:seed');\n\t\t$this->call('factotum:storage');\n\t\t$this->call('factotum:storage');\n }", "public function handle()\n {\n $this->capsuleService->getAll();\n $this->line('Command Worked');\n }", "public function handle()\n {\n $platform_wechat_id = $this->argument('id');\n $customer_id = $this->argument('customer_id');\n $this->info(\"Starting at \".date('Y-m-d H:i:s').\". Running initial for 【{$this->signature}】\");\n $this->getUserInfoList($platform_wechat_id,$customer_id);\n $this->info(\"End at \".date('Y-m-d H:i:s').\". over for 【{$this->signature}】\");\n }", "public function handle()\n {\n $this->publishAssets();\n $this->call('twill:flush-manifest');\n $this->call('view:clear');\n }", "public function handle()\n {\n \n $argument = $this->argument('data');\n \n $this->prepare( $argument );\n \n $this->make();\n \n $this->info( 'migration has been created : '. $this->fileName );\n \n }", "public function handle()\n {\n chdir(resource_path('assets/ts'));\n $path = $this->argument(\"path\");\n if(isset($path))\n {\n Logger::info('execute '.$path);\n Command::executeRaw('tsc', [\"-p\", $path]);\n }else\n Logger::info('execute tsc');\n Command::executeRaw('tsc');\n }", "public function handle()\n {\n $this->info('Starting date change command.');\n\n Word::where('language_id', 1)->update(array('created_at' => '1970-01-01 00:00:01'));\n Word::where('language_id', 2)->update(array('created_at' => '1970-01-01 00:00:01'));\n\n $this->info('Dates have been changed to 1970-01-01 00:00:01');\n }", "public function handle()\n {\n $this->info($this->slugger->encode($this->argument('id')));\n }", "public function handle()\n {\n $this->line(static::$logo);\n $this->line('Neat admin current version:' . Neat::version());\n\n $this->comment('');\n $this->comment('Available commands:');\n\n $this->listAvailableCommands();\n }", "public function handle(): void\n {\n // Set argument\n $this->url = $this->argument(self::URL_ARGUMENT);\n\n // Handler takes care of computation\n (new CommandHandler($this))->compute();\n }", "public function handle()\n {\n $this->revisions->updateListFiles();\n }", "public function handle()\n {\n try\n {\n $filename = $this->argument('filename');\n Excel::import(new ObjectsImport, $filename);\n\n $this->info('Data import is now completed');\n }\n catch(Exception $ex)\n {\n $this->error($ex->getMessage());\n }\n }", "public function handle()\n {\n $isProductionMode = 'prod' == $this->argument('mode');\n\n if ($isProductionMode) {\n if (!$this->confirm('Are you sure to run in production mode? Running this command may cause critical issues?')) {\n exit(1);\n }\n }\n\n $this->_recalculate($isProductionMode);\n }", "public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }", "public function handle()\n {\n if(!$this->verify()) {\n $rank = $this->createRankSuperAdmin();\n $user = $this->createUserSuperAdmin();\n $user->Ranks()->attach($rank);\n $this->line('Felicitaciones');\n } else {\n $this->error('No se puede ejecutar');\n }\n }", "public function handle()\n {\n // Get CLI Input\n $user_id = $this->option(\"uid\");\n\n // User Products\n ( new CommandManager() )->showUserProducts( $user_id );\n }", "public function handle()\n {\n $force = $this->option('force');\n\n if($this->option('without-bulk')){\n $this->withoutBulk = true;\n }\n\n if ($this->generateClass($force)){\n $this->info('Generating permissions for '.$this->modelBaseName.' finished');\n }\n }", "public function handle()\n {\n $userId = $this->argument('user');\n\n /** @var User $user */\n $user = User::findOrFail($userId);\n\n // Get token.\n $info = (new Client())->auth();\n\n // Save to db.\n $user->access_token = $info['access_token'];\n $user->access_secret = $info['access_secret'];\n $user->save();\n\n $this->line(\"Saved access token and secret for user: {$user->email}\");\n }", "public function handle()\n {\n $tournaments = Tournament::all()->toArray();\n foreach ($tournaments as $tournament) {\n $slug = $this->tournamentRepoObj->generateSlug($tournament['name'].Carbon::createFromFormat('d/m/Y', $tournament['start_date'])->year,'');\n DB::table('tournaments')\n ->where('id', $tournament['id'])\n ->update([\n 'slug' => $slug\n ]);\n }\n $this->info('Script executed.');\n }", "public function handle()\n {\n $m = new MemberFromText;\n $m->train();\n $id = $m->predict($this->argument('text'));\n dump(Miembro::find($id)->toArray());\n }", "public function handle()\n {\n $this->generator\n ->setConsole($this)\n ->run();\n }", "public function handle()\n {\n $this->createController();\n $this->createServiceDir();\n\n exit;\n $args = [\n '--provider' => TestProvider::class\n ];\n $className = $this->argument('className');\n if (!$className) {\n $className = 'MethodsList';\n }\n $className = ucwords($className);\n $this->call('vendor:publish', $args);\n $this->info('Display this on the screen ' . $className);\n }", "public function handle()\n {\n $this->createDirectories();\n\n $this->publishTests();\n\n $this->info('Authentication tests generated successfully.');\n }", "public function handle()\n {\n $this->setDbConnection(\n $this->input->getOption('database') ?: config('ghost-database.default_connection')\n );\n\n $native = $this->input->getOption('native-import') ?: config('ghost-database.use_native_importer');\n\n $snapshot = $this->import($native);\n\n $this->info(\"Snapshot `{$snapshot->name}` loaded!\");\n }", "public function handle()\n {\n $exec = $this->argument('exec');\n\n switch ($exec) {\n case 'download' :\n $this->download();\n break;\n\n case 'generate' :\n $this->generate();\n break;\n\n default :\n echo \"Choose 'download' or 'generate' for this command\";\n break;\n }\n }", "public function handle()\n {\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-admin.js', '--group' => 'admin']);\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-frontend.js', '--group' => 'frontend']);\n $this->call(TranslationsGenerateCommand::class);\n }", "public function handle()\n {\n $tenantName = $this->argument('tenant');\n\n $tenant = Tenant::where('name', $tenantName)->orWhere('subdomain', $tenantName)->first();\n\n if ($tenant) {\n $tenant->setActive();\n \\Artisan::call('tinker');\n } else {\n $this->error('Error: Tenant not found');\n }\n }", "public function handle()\n {\n try {\n if (!empty($userId = $this->argument('user'))) {\n $user = User::find($userId);\n } else {\n $user = User::inRandomOrder()->first();\n }\n\n if (empty($user)) {\n throw new \\Exception('User not found');\n }\n\n echo JWTAuth::fromUser($user);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n }", "public function handle()\n {\n $this->fetchAndSetToken();\n $imagesToDownload = $this->peekImages(WatchedApp::pluck('package_name'));\n $this->fetchImages($imagesToDownload);\n\n if ($this->option('dont-optimize')) {\n return;\n }\n\n $this->runOptimizeCommand();\n }", "public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $participant = URLParser::parseByName('santa.index', $this->argument('url'))->participant;\n if($participant) {\n $draw = $participant->draw;\n } else {\n $draw = URLParser::parseByName('organizer.index', $this->argument('url'))->draw;\n }\n\n $this->table(\n ['ID', 'Name', 'Email'],\n $draw->participants()->get(['id', 'name', 'email'])->toArray()\n );\n }", "public function handle()\n {\n // if you are on the local environment\n if (!(app()->isLocal() || app()->runningUnitTests())) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $fqdn = $this->argument('fqdn');\n if ($tenant = Tenant::retrieveBy($fqdn)){\n $tenant->delete($fqdn);\n $this->info(\"Tenant {$fqdn} successfully deleted.\");\n }else {\n $this->error('This fqdn doesn\\'t exist.');\n }\n\n }", "public function handle()\n {\n $user_from = $this->option('from');\n $user_to = $this->option('to');\n $sum = $this->option('sum');\n\n CreateTransaction::dispatch($this->usersRepository->getByID($user_from), $this->usersRepository->getByID($user_to), $sum, true);\n $this->transactionsRepository->getAll()->each(function ($transaction){\n \tExecuteTransaction::dispatch($transaction);\n });\n }", "public function handle()\n {\n $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\n }", "public function handle()\n {\n \n $period = $this->option('period');\n \n switch ($period) {\n\n case 'half_month':\n $this->info('Grabing Half Month Income...');\n $this->halfMonth();\n break;\n\n case 'monthly':\n $this->info('Grabing Monthly Income...');\n $this->monthly();\n break;\n \n default:\n $this->info('Grabing Daily Income...');\n $this->daily();\n break;\n\n }\n\n \n }", "public function handle()\n {\n $countryFiles = $this->getFiles();\n\n foreach ($countryFiles as $fileName) {\n $this->seed($fileName);\n }\n\n $this->info('End.');\n }", "public function fire()\n {\n $entityName = $this->argument('entityName');\n $startEntityId = $this->argument('startEntityId');\n $endEntityId = $this->argument('endEntityId');\n $depth = $this->argument('depth');\n\n $this->fixturePath = $this->option('outputPath');\n\n $this->info(\"Generating fixtures for $entityName in {$this->fixturePath}...\");\n \n $this->generateFixtures($entityName, $startEntityId, $endEntityId, $depth);\n }", "public function handle()\n {\n $check = PublishTraitsService::publishTraits();\n\n if ($check)\n {\n $this->info('All files have been published');\n }\n\n $this->info('Failed to publish');\n }", "public function handle()\n {\n $user = User::where('username', $this->argument('user'))\n ->orWhere('email', $this->argument('user'))\n ->first();\n\n if ($user != null) {\n $user->assign('admin');\n $this->line(\"{$user->email} was successfully made an admin.\");\n } else {\n $this->line(\"No user found where username or email is '{$this->argument('user')}'\");\n }\n }", "public function handle()\n {\n event( 'laraview:compile' );\n $this->checkForSelectedViewGeneration();\n\n app( RegisterBlueprint::class )\n ->console( $this )\n ->generate();\n }", "public function handle()\n {\n $project = Project::with(['team.admins', 'team.members'])->findOrFail($this->option('project-id'));\n $user = User::findOrFail($this->option('user-id'));\n if ($this->option('admin')) {\n $project->team->admins()->syncWithoutDetaching($user);\n } else {\n $project->team->members()->syncWithoutDetaching($user);\n }\n return Command::SUCCESS;\n }", "public function handle() {\n try {\n $this->roomService->loadRoomOccupations();\n Log::notice('untis:occupations executed successfully.');\n $this->line('Loaded room occupations from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading room occupations.', ['exception' => $e]);\n $this->error('Error loading room occupations: ' . $e->getMessage());\n }\n }", "public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\n }", "public function handle()\n {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }", "public function handle()\n\t{\n\t\tif ($this->option('dev')) {\n\t\t\tsystem('php '.base_path('.deploy/deploy-dev.php'));\n\t\t} else {\n\t\t\tsystem('php '.base_path('.deploy/deploy.php'));\n\t\t}\n\t}", "public function handle(Command $command);", "public function handle(Command $command);", "public function handle()\n {\n $date_from = $this->argument('date_from');\n\t\t$date_to = $this->argument('date_to');\n\t\tif(!$date_from) {\n\t\t\t$date_from = Carbon::today()->subDays(5);\n\t\t}\n\t\tif(!$date_to) {\n\t\t\t$date_to = Carbon::yesterday();\n\t\t}\n\t\tStats::computeMembers($this->argument('venue_id'), $date_from, $date_to);\n }", "public function handle()\n {\n switch ($this->argument('type')){\n case 'fih':\n $scrapper = new Scrappers\\FederationScrapper();\n $scrapper->get($this->option('level'));\n print $scrapper->message();\n break;\n }\n }", "public function handle()\n {\n Log::info(\"seed:dash Command is working fine!\");\n $this->info('Dashboard Database seeding completed successfully.');\n }", "public function handle()\n {\n $originalId = $this->argument('original_id');\n\n $status = true;\n if ($this->option('status') === 'false') {\n $status = false;\n }\n\n if ($video = Video::where('original_id', $originalId)->first()) {\n $video->dmca_claim = $status;\n $video->save();\n\n $this->info('Video\\'s dmca_claim set to: ' . json_encode($status));\n return ;\n }\n\n $this->error('No video found with original_id of: ' . $originalId);\n return;\n }", "public function handle()\n {\n $this->call('config:clear');\n\n $this->call('config:update');\n\n $this->info('Configuration cached successfully!');\n }", "public function handle()\n {\n //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\n }", "public function handle()\n {\n $filePath = 'public/' . $this->argument('fileName');\n $count = $this->argument('count');\n \n $fileData = array_slice(file($filePath), 0, $count);\n $this->info(implode('', $fileData));\n }", "public function handle()\n {\n $email = $this->argument('email');\n\n Mail::to($email)->send(new SendMailable('Test Mail'));\n\n if (Mail::failures()) {\n $this->info('Email failed to send');\n } else {\n $this->info('Email successfully sent');\n }\n }", "public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }", "public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\WilayahIndonesia package');\n }", "public function handle()\n {\n if($this->hasOption('no_dump') && $this->option('no_dump')){\n $this->composer_dump = false;\n }\n $this->readyDatas();\n $this->datas['startSymbol']='{{';\n $this->datas['endSymbol']='}}';\n $this->create();\n }", "public function handle()\n {\n $this->makeDir($this->basePath . $this->kebabPlural());\n\n $this->exportViews();\n\n $this->info('Resource views generated successfully.');\n }", "public function handle()\n {\n $repository = new OglasiCrawlerRepository();\n $ads = $repository->getAds();\n $repository->saveAds($ads);\n\n echo 'Ads were successfully retrieved' . PHP_EOL;\n }", "public function handle()\n {\n $movies = \\App\\Models\\Movie::whereNull('meta')->take(40)->orderBy('id')->get();\n $movies->each(function($movie){ sleep(1); $movie->getMeta(); });\n return Command::SUCCESS;\n }", "public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setType('shipping')\n ->setForce($this->option('force'))\n ->generate();\n }", "public function handle()\n {\n $test = $this->argument('test');\n\n $dir = config('speed-test.dir');\n\n $className = ucfirst(\\Str::camel($test));\n\n $namespace = config('speed-test.namespace');\n\n $class = class_entity($className)\n ->namespace($namespace);\n\n $class->method('speed1')\n ->line($this->option('line'))->doc(function ($doc) use ($className) {\n /** @var DocumentorEntity $doc */\n $doc->tagCustom('times', $this->option('times'));\n $doc->description($this->option('description') ?: \"{$className} Speed 1\");\n });\n\n if (! is_dir($dir)) {\n mkdir($dir, 0777, 1);\n }\n\n file_put_contents(\n $dir.'/'.$className.'.php',\n $class->wrap('php')\n );\n\n $this->info('Speed created!');\n\n return 0;\n }", "public function handle()\n {\n $message = $this->GenerateRandomUser($this->argument('count'));\n $this->info($message);\n }", "public function handle()\n {\n // Configuration...\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-config']);\n\n // Migrations\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-migrations']);\n\n $this->info('Model Login resources published.');\n }", "public function handle()\n {\n $host = Cache::get('executingHost', null);\n $this->info(\"Host: ${host}\");\n\n if ($host === null) {\n $this->info('実行するホストが選択されていません');\n return;\n }\n\n if (Schema::hasTable('companies') && Company::count() !== 0) {\n $this->info('マイグレーションが既に1回以上実行されています');\n return;\n }\n\n $should_execute = $host === $this->argument('executingHost');\n\n if ($should_execute) {\n Artisan::call('migrate:fresh', ['--seed' => true]);\n $this->info('マイグレーションが完了しました');\n\n Cache::forget('executingHost');\n } else {\n $this->info('別ホストにてマイグレーションが行われます');\n }\n }", "public function handle()\n {\n if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\n }", "public function handle()\n {\n $this->publishConfig();\n $this->publishClassStub();\n $this->generateAndStoreKey();\n\n $this->info('Use the details below for your \"Lead delivery options\" in Google Ads.');\n $this->info('Webhook URL: ' . route('GoogleAdsLeadExtensionController@index'));\n $this->info('Key: ' . $this->generated_key);\n }", "public function handle()\n {\n $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\n }", "public function handle()\n {\n $opts = $this->options();\n $args = $this->arguments();\n #print_r($opts);\n #print_r($args);\n\n # Redundant as argument validation handled by Laravel\n #\n if (!isset($args['destination'])) {\n printf(\"Usage: php artisan %s\\n\", $this->signature);\n exit(1);\n }\n\n # Default to normal message type\n #\n if (!isset($opts['type'])) {\n $opts['type'] = 'normal';\n }\n\n $uac = new UserApiController();\n\n if ($opts['type'] == 'normal') {\n if (!isset($opts['message'])) {\n printf(\"Usage: php artisan %s\\n\\n\", $this->signature);\n printf(\"ERROR: Message must be specified for type 'normal'\\n\");\n exit(1);\n }\n $result = $uac->sendSms(\n $args['destination'],\n $opts['message'],\n $opts['route']\n );\n }\n else if ($opts['type'] == 'otp') {\n $result = $uac->sendVerificationSms(\n $args['destination'],\n '<code>',\n '<name>',\n $opts['route'],\n '<appName>'\n );\n }\n\n if ($result === true) {\n printf(\"INFO: SMS message to %s sent successfully (%s)\\n\",\n $args['destination'], $opts['type']);\n }\n else {\n printf(\"INFO: SMS message to %s failed to send (%s)\\n\", \n $args['destination'], $opts['type']);\n printf(\"ERROR: %s\\n\", $result);\n }\n\n return;\n }" ]
[ "0.6469124", "0.64643437", "0.64273024", "0.6350274", "0.6317952", "0.6274692", "0.6261577", "0.6260772", "0.6235357", "0.6224455", "0.62206244", "0.62140554", "0.61932796", "0.6192204", "0.6183315", "0.61777353", "0.6176878", "0.6173231", "0.6149831", "0.6149495", "0.61483794", "0.61474675", "0.61386526", "0.6134599", "0.6131879", "0.6115958", "0.6113315", "0.61099243", "0.61083984", "0.6104786", "0.6102854", "0.6102131", "0.61007583", "0.60950017", "0.6094485", "0.60913336", "0.6089169", "0.6083996", "0.6081503", "0.60778654", "0.6076426", "0.60749197", "0.6074788", "0.60722744", "0.60700077", "0.6069655", "0.6068089", "0.6067386", "0.60620165", "0.60593814", "0.6058238", "0.6056948", "0.6048962", "0.6042094", "0.60394555", "0.6032159", "0.60314023", "0.60278696", "0.60252076", "0.6020387", "0.6019317", "0.6019291", "0.60139126", "0.60138196", "0.6013005", "0.6012074", "0.60077745", "0.60077286", "0.60066825", "0.6006023", "0.60048425", "0.6001768", "0.5999739", "0.5999627", "0.5998163", "0.59914", "0.5988565", "0.5988565", "0.598749", "0.5987178", "0.59849685", "0.59840816", "0.5979884", "0.5976888", "0.59768575", "0.59724116", "0.59688014", "0.59680855", "0.59663355", "0.5964249", "0.5963836", "0.5961141", "0.5960875", "0.59562397", "0.59538645", "0.5951744", "0.5950589", "0.5947919", "0.59461087", "0.5945232", "0.59452045" ]
0.0
-1
Get the symbolic links that are configured for the application.
protected function links() { return $this->laravel['config']['filesystems.links'] ?? [public_path('storage') => storage_path('app/public')]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDeviceFileSymlinks()\n {\n return [];\n }", "public function getSymlinkMaps() {\n return $this->maps;\n }", "public static function getLinks()\n\t{\n\t\treturn static::$links;\n\t}", "public static function getLinks() {\n $links = Yii::$app->cacheManage->links;\n if ($links) {\n return $links;\n }\n\n $links = LinkOption::getAllLinks();\n if ($links) {\n Yii::$app->cacheManage->links = $links;\n }\n return $links;\n }", "public function getListSymlinksCreation() {\n\t\treturn $this->_getConfigValueArray('symlinksCreationList');\n\t}", "public function getLinks()\n {\n // Define an empty array to hold the list of admin links\n $links = array();\n if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'modifyconfig'),\n 'text' => $this->__('Settings'),\n 'class' => 'z-icon-es-config');\n }\n if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'view'),\n 'text' => $this->__('Tag List'),\n 'class' => 'z-icon-es-view');\n }\n if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'edit'),\n 'text' => $this->__('New tag'),\n 'class' => 'z-icon-es-new');\n }\n\n return $links;\n }", "function links() {\n return array(\n\n );\n }", "public function getlinks()\n {\n $links = array();\n\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'main'), 'text' => $this->__('System summary'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 4)), 'text' => $this->__('PHP configuration'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 8)), 'text' => $this->__('PHP modules'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 16)), 'text' => $this->__('Server environment'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 32)), 'text' => $this->__('PHP variables'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'extensions'), 'text' => $this->__('Zikula extensions'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'filesystem'), 'text' => $this->__('Zikula file system'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'ztemp'), 'text' => $this->__('Zikula ztemp directory'));\n }\n\n return $links;\n }", "private function generateSymlinks()\n {\n $fs = new Filesystem();\n $uploadPath = $this->getContainer()->getParameter('contao.upload_path');\n\n // Remove the base folders in the document root\n $fs->remove($this->rootDir . '/web/' . $uploadPath);\n $fs->remove($this->rootDir . '/web/system/modules');\n $fs->remove($this->rootDir . '/web/vendor');\n\n $this->symlinkFiles($uploadPath);\n $this->symlinkModules();\n $this->symlinkThemes();\n\n // Symlink the assets and themes directory\n $this->symlink('assets', 'web/assets');\n $this->symlink('system/themes', 'web/system/themes');\n $this->symlink('app/logs', 'system/logs');\n }", "public function getLinkshells() { return $this->Linkshells; }", "public function getlinks()\n {\n $links = array();\n\n if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_READ)) {\n $links[] = array('url' => ModUtil::url($this->name, 'user', 'hooks'),\n 'text' => $this->__('Frontend'),\n 'title' => $this->__('Switch to user area.'),\n 'class' => 'z-icon-es-home');\n }\n if (SecurityUtil::checkPermission($this->name . ':Twitterparm:', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'view', array('ot' => 'twitterparm')),\n 'text' => $this->__('Twitterparms'),\n 'title' => $this->__('Twitterparm list'));\n }\n\n return $links;\n }", "public function getLinks()\n {\n $links = array();\n \n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_READ)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'displaysysinfo'),\n 'text' => $this->__('Server'),\n 'class' => 'z-icon-es-info');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_OVERVIEW)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'displaybrowserinfo'),\n 'text' => $this->__('Client'),\n 'class' => 'z-icon-es-info');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_EDIT)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'backupdb'),\n 'text' => $this->__('Backup'),\n 'class' => 'z-icon-es-export');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'scripts'),\n 'text' => $this->__('Scripts'),\n 'class' => 'z-icon-es-gears');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url('Zfiler', 'admin', 'filer'),\n 'text' => $this->__('Filer'),\n 'class' => 'z-icon-es-folder');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'modifyconfig'),\n 'text' => $this->__('Settings'),\n 'class' => 'z-icon-es-config');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => 'https://github.com/nmpetkov/Ztools/wiki',\n 'text' => $this->__('Wiki'),\n 'class' => 'z-icon-es-help');\n }\n\n return $links;\n }", "public function getLinks()\n\t{\n\t\treturn $this->aLinks;\n\t}", "public function getlinks()\n {////\n // Define an empty array to hold the list of admin links\n $links = array();\n\n // Return the links array back to the calling function\n return $links;\n }", "public function getLinks() {\n\t\treturn $this->links;\n\t}", "public function getLinks()\n {\n if(null === $this->_link){\n\t\t\t$node = Mage::app()->getConfig()\n\t\t\t\t->getNode('global/faonni_accountnavigation/link');\n\t\t\t$this->_link = $node->asArray();\t\n\t\t}\n\t\treturn $this->_link;\n }", "public function getLinks()\n {\n return $this->links;\n }", "public function getLinks()\n {\n return $this->links;\n }", "public function getLinks()\n {\n return $this->links;\n }", "public function getLinks(): array\n {\n return $this->links;\n }", "public function getLinks(): array\n {\n return $this->links;\n }", "public function getLinks() {\n return $this->links;\n }", "public function getSiteLinks()\n {\n $menufile = $GLOBALS['registry']->get('fileroot') . '/config/menu.php';\n\n if (is_readable($menufile)) {\n include $menufile;\n if (isset($_menu) && is_array($_menu)) {\n return $_menu;\n }\n }\n\n return array();\n }", "public function getLinks()\n {\n return $this->getProperty(\"Links\", new NotebookLinks());\n }", "public function getLinks()\r\n {\r\n return $this->_links;\r\n }", "public function getDirectLinkUrls()\n {\n return $this->getUrls($this->directLinkPath);\n }", "private static function links()\n {\n $files = ['Link'];\n $folder = static::$root.'Http/Links'.'/';\n\n self::call($files, $folder);\n\n $files = ['LinkKeyNotFoundException'];\n $folder = static::$root.'Http/Links/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function getLinks()\n {\n $url = Yii::$app->getRequest()->getAbsoluteUrl();\n // change $url_cut_point if you have more prefix in the url of restful api\n $url_cut_point = 5;\n $url_slice = array_slice(preg_split(\"#[?/]#\", $url), 0, $url_cut_point);\n $link = implode('/', $url_slice).'/'.$this->id;\n\n return [ Link::REL_SELF => $link ];\n }", "public function getAdminLinks()\n {\n return $this->adminLinks;\n }", "public function get_application_platform_import_links()\r\n {\r\n return array();\r\n }", "public function get_url_list() {\n\t\t$home_no_www = str_replace( '://www.', '://', get_option( 'home' ) );\n\t\t$home_yes_www = str_replace( '://', '://www.', $home_no_www );\n\n\t\t// Build the search links.\n\t\t$search = array(\n\t\t\tstr_replace( 'https://', 'http://', $home_yes_www ),\n\t\t\tstr_replace( 'https://', 'http://', $home_no_www ),\n\t\t\t\"src='http://\",\n\t\t\t'src=\"http://',\n\t\t);\n\n\t\treturn array(\n\t\t\t'search' => $search, // The search links.\n\t\t\t'replace' => str_replace( 'http://', 'https://', $search ), // The replace links.\n\t\t);\n\t}", "function getAdminLinks()\n {\n }", "public function getShowResetLinks()\n {\n return $this->breadCrumbsConfiguration->getShowResetLinks();\n }", "public function getDocsLinks()\n {\n $links = array();\n\t\t$docs_tree = $this->getDocsTree();\t\n\t\t$links = $this->getDocsLangLinks($docs_tree);\n return $links;\n }", "public function getSettingLinks()\n {\n $currentUserModel = Users_Record_Model::getCurrentUserModel();\n if ($currentUserModel->isAdminUser()) {\n $settingsLinks[] = array(\"linktype\" => \"LISTVIEWSETTING\", \"linklabel\" => \"Settings\", \"linkurl\" => \"index.php?module=VDXMLExport&view=Settings&parent=Settings\", \"linkicon\" => \"\");\n $settingsLinks[] = array(\"linktype\" => \"LISTVIEWSETTING\", \"linklabel\" => \"Uninstall\", \"linkurl\" => \"index.php?module=VDXMLExport&view=Uninstall&parent=Settings\", \"linkicon\" => \"\");\n }\n return $settingsLinks;\n }", "public function getProdLinks()\n {\n return $this->prod_links;\n }", "public function getLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'info'),\n \t\t\t\t 'text' => $this->__(' Info'),\n \t\t\t\t 'class' => 'mediasharex-icon-laptop',\n\t\t\t\t\t\t\t 'links' => $this->getInfoLinks());\n }\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'info_docs'),\n \t\t\t\t 'text' => $this->__(' Documentation'),\n \t\t\t\t 'class' => 'mediasharex-icon-cabinet');\n }\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_general'),\n \t\t\t\t 'text' => $this->__(' Settings'),\n \t\t\t\t 'class' => 'mediasharex-icon-cogs',\n\t\t\t\t\t\t\t 'links' => $this->getSettingsLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager'),\n \t\t\t\t 'text' => $this->__(' Content manager'),\n \t\t\t\t 'class' => 'mediasharex-icon-folder',\n\t\t\t\t\t\t\t 'links' => $this->getManagerLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'sandh'),\n \t\t\t\t 'text' => $this->__(' Sources & Handlers'),\n \t\t\t\t 'class' => 'mediasharex-icon-equalizer',\n\t\t\t\t\t\t\t 'links' => $this->getSandHLinks());\n }\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'media_types'),\n \t\t\t\t 'text' => $this->__(' Media types'),\n \t\t\t\t 'class' => 'mediasharex-icon-star',\n\t\t\t\t\t\t\t 'links' => $this->getMediaTypesLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'import'),\n \t\t\t\t 'text' => $this->__(' Import'),\n \t\t\t\t 'class' => 'mediasharex-icon-loop',\n\t\t\t\t\t\t\t 'links' => $this->getImportLinks());\n }\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t/*\t\n\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'mainsettings'), 'text' => $this->__('Main settings'), 'class' => 'z-icon-es-config');\n }\n\n\n\n\n\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managealbums'), 'text' => $this->__('Albums'), 'class' => 'z-icon-es-display');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manageitems'), 'text' => $this->__('Media'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managemediastore'), 'text' => $this->__('Media store'), 'class' => 'z-icon-es-display');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managehandlers'), 'text' => $this->__('Handlers'), 'class' => 'z-icon-es-display');\n }\n\t\t\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managesources'), 'text' => $this->__('Sources'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manageinvitations'), 'text' => $this->__('Invitations'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'import'), 'text' => $this->__('Import'), 'class' => 'z-icon-es-filter');\n }\t\n\t * \n\t * \n\t * \n\t * \n\t * \n\t * \n\t */\t\n \n return $links;\n }", "function getBaseUrls()\n{\n // reliable document_root (https://gist.github.com/jpsirois/424055)\n $root_path = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['SCRIPT_FILENAME']);\n $conf_path = rtrim(dirname(dirname(__FILE__)), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;\n\n // reliable document_root with symlinks resolved\n $info = new \\SplFileInfo($root_path);\n $real_root_path = $info->getRealPath();\n\n // defined root_relative url used in admin routing\n // ie: /my-dir/\n $root_relative_url = '/' . ltrim(\n str_replace(array($real_root_path, DIRECTORY_SEPARATOR), array('', '/'), $conf_path),\n '/'\n );\n // sanitize directory separator\n $base_url = (((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . $root_relative_url;\n\n return array(\n 'root_relative_url' => $root_relative_url,\n 'base_url' => $base_url\n );\n}", "public function getLinksArray()\n {\n $db = new db(self::db_links);\n return $db->getLinksArray();\n }", "public function AbsoluteLinks()\n {\n return HTTP::absoluteURLs($this->forTemplate());\n }", "public function getLinks()\n {\n $displayName = $this->getDisplayName();\n\n $links = $this->reddit->getLinksBySubreddit($displayName);\n\n return $links;\n }", "public function getLinks()\n {\n return $this->getAllChildren();\n }", "private function symlinkModules()\n {\n $filter = function (SplFileInfo $file) {\n return HtaccessAnalyzer::create($file)->grantsAccess();\n };\n\n $this->createSymlinksFromFinder(\n $this->findIn($this->rootDir . '/system/modules')->files()->filter($filter)->name('.htaccess'),\n 'system/modules'\n );\n }", "public function getSettingLinks()\n\t{\n\t\t$currentUserModel = Users_Record_Model::getCurrentUserModel();\n\t\t$settingLinks = parent::getSettingLinks();\n\n\t\tif ($currentUserModel->isAdminUser()) {\n\t\t\t$settingLinks[] = array(\n\t\t\t\t'linktype' => 'LISTVIEWSETTING',\n\t\t\t\t'linklabel' => 'LBL_PASS_CONFIGURATION',\n\t\t\t\t'linkurl' => 'index.php?module=OSSPasswords&view=ConfigurePass&parent=Settings',\n\t\t\t\t'linkicon' => ''\n\t\t\t);\n\t\t}\n\t\treturn $settingLinks;\n\t}", "function getServerURLs() {\n\t\treturn $this->m_serverURLs;\n\t}", "function getAllLinks(){\r\n return $this->link_arry;\r\n }", "function getPreferenceLinks()\n {\n }", "public function getFinalAppUrls()\n {\n return $this->final_app_urls;\n }", "public function getBrowserLinks()\n\t{\n\t\treturn array('Wordpress site' => '');\n\t}", "public function getLink()\n {\n $link = $this->getFunctionPath();\n $parameterCount = count($this->servers);\n\n if($parameterCount > 0)\n $link .= \"?\";\n\n $link .= $this->buildParameterArray('servers', $this->servers);\n\n return $link;\n }", "protected function getLinkHandlers() {}", "protected function getLinkHandlers() {}", "public function getLinksList(){\n return $this->_get(9);\n }", "protected function getApplicationDirectoreis(): array\n {\n return $this->directories;\n }", "public function get_links()\n {\n }", "public function getInfoBoxLinks(): array\n {\n return $this->infoBoxLinks;\n }", "public function getLinks()\n\t{\n\t\t$data = $this->curl->curlGetReq($this->baseURL);\n\t\t$query = \"//a/@href\";\n\t\t$links = $this->curl->getDOMData($data,$query);\n\t\t\n\n\t\t//var_dump($links[0]);\n\n\t\tforeach ($links as $link)\n\t\t{\n\t\t\t\n\t\t\tif($link->value == \"/calendar\")\n\t\t\t{\n\t\t\t\t$this->calendarLink = $this->baseURL. str_replace(\"/\", \"\", $link->value).\"/\";\n\t\t\t\t\n\t\t\t}\n\t\t\tif($link->value == \"/cinema\")\n\t\t\t{\n\t\t\t\t$this->cinemaLink = $this->baseURL. str_replace(\"/\", \"\", $link->value).\"/\";\n\t\t\t}\n\t\t\tif($link->value == \"/dinner\")\n\t\t\t{\n\t\t\t\t$this->dinnerLink = $this->baseURL. str_replace(\"/\", \"\", $link->value).\"/\";\n\t\t\t\t$this->dinnerLoginLink = $this->dinnerLink.\"login\";\n\t\t\t}\n\n\t\t\n\t\t\n\t\t}\n\t}", "public function getlinks()\n {\n $links = array();\n\n if (Content_Util::contentHasPageCreateAccess()) {\n $links[] = array(\n 'url' => ModUtil::url('Content', 'admin', 'newPage'),\n 'text' => $this->__('Add new page'),\n 'class' => 'z-icon-es-new');\n }\n if (SecurityUtil::checkPermission('Content::', '::', ACCESS_EDIT)) {\n $links[] = array(\n 'url' => ModUtil::url('Content', 'admin', 'main'),\n 'text' => $this->__('Page list'),\n 'class' => 'z-icon-es-edit',\n 'links' => array(\n array('url' => ModUtil::url('Content', 'user', 'sitemap'),\n 'text' => $this->__('Sitemap')),\n array('url' => ModUtil::url('Content', 'user', 'extlist'),\n 'text' => $this->__('Extended')),\n array('url' => ModUtil::url('Content', 'user', 'pagelist'),\n 'text' => $this->__('Complete')),\n array('url' => ModUtil::url('Content', 'user', 'categories'),\n 'text' => $this->__('Category list')),\n ));\n }\n\n return $links;\n }", "private function links()\n {\n foreach ($this->controller->links as $value)\n echo \"\\t<link rel='stylesheet' href='\" . DOMAIN . $value . \"' />\\n\";\n }", "public function getlinks()\n {\n $links = array();\n if (UserUtil::isLoggedIn()) {\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'inbox'),\n 'text' => $this->__('Inbox'),\n 'class' => 'z-icon-es-inbox'\n );\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'outbox'),\n 'text' => $this->__('Outbox'),\n 'class' => 'z-icon-es-outbox'\n );\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'archive'),\n 'text' => $this->__('Archive'),\n 'class' => 'z-icon-es-gears'\n );\n if ($this->getVar('messages_allow_emailnotification')|| $this->getVar('messages_allow_autoreply')) {\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'settings'),\n 'text' => $this->__('Settings'),\n 'class' => 'z-icon-es-config'\n );\n }\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'newpm'),\n 'text' => $this->__('New message'),\n 'class' => 'z-icon-es-new'\n );\n }\n return $links;\n }", "function getUrls(){\n $urls = $this->all('schema:url');\n return $urls;\n }", "public function getHelpLinks(){\n return $this->pluginDefinition['help_links'];\n }", "public function getImportLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'import'), 'text' => $this->__('Main settings'), 'class' => 'z-icon-es-confi');\n }\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managealbums'), 'text' => $this->__('Albums'), 'class' => 'z-icon-es-displa');\n }\n\n\t\t\t\n return $links;\n }", "protected function get_schema_links()\n {\n }", "protected function get_schema_links()\n {\n }", "private function symlinkThemes()\n {\n /** @var SplFileInfo[] $themes */\n $themes = $this->getContainer()->get('contao.resource_finder')->findIn('themes')->depth(0)->directories();\n\n foreach ($themes as $theme) {\n $path = str_replace($this->rootDir . DIRECTORY_SEPARATOR, '', $theme->getPathname());\n\n if (0 === strpos(strtr($path, '\\\\', '/'), 'system/modules/')) {\n continue;\n }\n\n $this->symlink($path, 'system/themes/' . basename($path));\n }\n }", "public function get_links() {\n\t\t$context = $this->context_memoizer->for_current_page();\n\n\t\treturn $context->presentation->breadcrumbs;\n\t}", "public function getlinks()\r\n {\r\n $links = array();\r\n\r\n if (SecurityUtil::checkPermission('EZComments::', '::', ACCESS_ADMIN)) {\r\n $links[] = array('url' => ModUtil::url('EZComments', 'admin', 'main'),\r\n 'text' => $this->__('View comments'),\r\n 'class' => 'z-icon-es-view');\r\n $links[] = array('url' => ModUtil::url('EZComments', 'admin', 'stats'),\r\n 'text' => $this->__('Comment statistics'),\r\n 'class' => 'z-icon-es-cubes');\r\n $links[] = array('url' => ModUtil::url('EZComments', 'admin', 'modifyconfig'),\r\n 'text' => $this->__('Settings'),\r\n 'class' => 'z-icon-es-config',\r\n 'links' => array(\r\n array('url' => ModUtil::url('EZComments', 'admin', 'modifyconfig'),\r\n 'text' => $this->__('Settings')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'cleanup'),\r\n 'text' => $this->__('Delete orphaned comments')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'migrate'),\r\n 'text' => $this->__('Migrate comments')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'purge'),\r\n 'text' => $this->__('Purge comments')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'applyrules'),\r\n 'text' => $this->__('Re-apply moderation rules'))\r\n ));\r\n }\r\n return $links;\r\n }", "public function pruneSymbolicLinks(): void\n {\n Site::pruneLinks();\n }", "protected function discoverCurrentCoreSymlink() {}", "public static function paths() {\n\t\tif (is_null(static::$paths)) {\n\t\t\tstatic::$paths = new ApplicationPathProvider();\n\t\t}\n\n\t\treturn static::$paths;\n\t}", "private function getBaseLinks() {\r\n return array(\r\n array(\r\n 'rel' => 'self',\r\n 'type' => RestoUtil::$contentTypes['json'],\r\n 'title' => $this->context->dictionary->translate('_selfCollectionLink'),\r\n 'href' => RestoUtil::updateUrl($this->context->getUrl(false), $this->writeRequestParams($this->context->query))\r\n ),\r\n array(\r\n 'rel' => 'search',\r\n 'type' => 'application/opensearchdescription+xml',\r\n 'title' => $this->context->dictionary->translate('_osddLink'),\r\n 'href' => $this->context->baseUrl . '/api/collections/' . (isset($this->defaultCollection) ? $this->defaultCollection->name . '/' : '') . 'describe.xml'\r\n )\r\n );\r\n }", "protected function getSiteLinks() {\n\t\t$menu = new MenuBuilder();\n\n\t\t// About link\n\t\t$title = Title::newFromText( $this->msg( 'aboutpage' )->inContentLanguage()->text() );\n\t\t$msg = $this->msg( 'aboutsite' );\n\t\tif ( $title && !$msg->isDisabled() ) {\n\t\t\t$menu->insert( 'about' )\n\t\t\t\t->addComponent( $msg->text(), $title->getLocalUrl() );\n\t\t}\n\n\t\t// Disclaimers link\n\t\t$title = Title::newFromText( $this->msg( 'disclaimerpage' )->inContentLanguage()->text() );\n\t\t$msg = $this->msg( 'disclaimers' );\n\t\tif ( $title && !$msg->isDisabled() ) {\n\t\t\t$menu->insert( 'disclaimers' )\n\t\t\t\t->addComponent( $msg->text(), $title->getLocalUrl() );\n\t\t}\n\n\t\t// Allow other extensions to add or override tools\n\t\tHooks::run( 'MobileMenu', [ 'sitelinks', &$menu ] );\n\t\treturn $menu->getEntries();\n\t}", "final public function get_paths() {\n return array();\n }", "public function getLinkableObjects() {\n\t\treturn self::$linkable_objects;\n\t}", "public function getLinks(): ?DocumentLinks\n {\n return DocumentLinks::createWithoutBaseUri(\n [\n \"self\" => new Link(\"/books/\" . $this->bookId . \"/authors\"),\n ]\n );\n }", "public function getProjectFileList() {\n $list = [];\n /** @var $map SymlinkMap */\n foreach ($this->getSymlinkMaps() as $map) {\n $list[] = $map->getTarget();\n }\n\n return $list;\n }", "function get_shortcut_link()\n {\n }", "public function getInfoLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'info'),\n 'text' => $this->__('Status'),\n 'class' => 'z-icon-es-confi');\n }\n\t\t\n return $links;\n }", "public function getLinks()\r\r\n {\r\r\n $links = $this->parseParams();\r\r\n\r\r\n foreach ($links as &$link) {\r\r\n $key = key($link);\r\r\n unset($link[$key]);\r\r\n $link['url'] = trim($key, '<> ');\r\r\n }\r\r\n\r\r\n return $links;\r\r\n }", "public function getAllUrls()\n {\n $urls = [];\n $stores = $this->storeManager->getStores(false);\n foreach($stores as $store) {\n $urls[] = $store->getBaseUrl();\n }\n\n return $urls;\n }", "public function getSandHLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'sandh'), 'text' => $this->__('Media handling'), 'class' => 'z-icon-es-confi');\n }\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'sandh_sources'), 'text' => $this->__('Media sources'), 'class' => 'z-icon-es-displa');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'sandh_handlers'), 'text' => $this->__('Media handlers'), 'class' => 'z-icon-es-displa');\n }\n \n\t\t\t\n return $links;\n }", "function userLinks() {\n return $this->user_links;\n }", "public function DisplayLinks(): ArrayList\n {\n return $this->getUserPreferencesClass()->getLinksPerType('DISPLAY');\n }", "public static function getLink()\n {\n return self::$link;\n }", "public function getLinks()\n {\n if ($this->filterCallback === null) {\n $links = $this->visitedLinks;\n } else {\n $links = array_filter($this->visitedLinks, function (Link $linkObj) {\n /* @var $linkObj Link */\n return $linkObj->shouldNotVisit() === false;\n });\n }\n\n return $links;\n }", "public function getSettingsLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_general'), 'text' => $this->__('General settings'), 'class' => 'z-icon-es-confi');\n }\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_display'), 'text' => $this->__('Display'), 'class' => 'z-icon-es-displa');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_albums'), 'text' => $this->__('Albums'), 'class' => 'z-icon-es-displa');\n }\n \t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_media'), 'text' => $this->__('Media'), 'class' => 'z-icon-es-displa');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_access'), 'text' => $this->__('Access'), 'class' => 'z-icon-es-displa');\n }\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_storage'), 'text' => $this->__('Storage'), 'class' => 'z-icon-es-displa');\n } \n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_handlers'), 'text' => $this->__('Handlers'), 'class' => 'z-icon-es-displa');\n }\n \tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_sources'), 'text' => $this->__('Sources'), 'class' => 'z-icon-es-displa');\n }\n \tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_import'), 'text' => $this->__('Import'), 'class' => 'z-icon-es-displa');\n } \n\t\t\t\t\n return $links;\n }", "public static function all()\n\t{\n\t\treturn Route::$_routes + Kohana::$tree['routes']['external'];\n\t}", "public function index()\n {\n return Links::all();\n }", "public function getUrls() {\n return $this->urls;\n }", "public function getConnectors()\n {\n if (array_key_exists(\"connectors\", $this->_propDict)) {\n return $this->_propDict[\"connectors\"];\n } else {\n return null;\n }\n }", "public function provideUrls()\n {\n return array(\n array('/'),\n array('/login'),\n array('/contact/1'),\n array('/contact/add'),\n array('/contact/1/edit'),\n array('/adresse/1/add'),\n array('/adresse/1/edit'),\n array('/validate/prefixe@suffixe.extension')\n );\n }", "public function getManagerLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager'), 'text' => $this->__('Manager'), 'class' => 'z-icon-es-confi');\n }\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager_albums'), 'text' => $this->__('Albums'), 'class' => 'z-icon-es-displa');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager_media'), 'text' => $this->__('Media'), 'class' => 'z-icon-es-displa');\n }\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager_previews'), 'text' => $this->__('Previews'), 'class' => 'z-icon-es-displa');\n }\n\t\t//unused yet\n\t\t//if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n // $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager_invitations'), 'text' => $this->__('Invitations'), 'class' => 'z-icon-es-displa');\n // }\n \n\t\t\t\n return $links;\n }", "public function getArrayLinkRels()\n {\n return $this->arrayLinkRels;\n }", "public function getSitemapUrls()\n {\n if (!$this->sitemaps) {\n throw new \\BadMethodCallException(\n 'To get sitemap URLs, first create a sitemap with'\n . ' the createSitemap() function.'\n );\n }\n if (count($this->sitemaps) < 2) {\n return [$this->baseURL . $this->sitemaps[0]['filename']];\n }\n $urls = array_column($this->indexes, 'filename');\n foreach ($urls as &$url) {\n $url = $this->baseURL . $url;\n }\n unset($url);\n return $urls;\n }", "public function get_link() { return (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] \n === 'on' ? \"https\" : \"http\") . \"://\" . \n $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; }", "public function getCrlAccessUrls()\n {\n return $this->crl_access_urls;\n }", "public function getDiscoveryURLs()\n {\n return $this->discoveryURLs;\n }", "public static function getMarkedLinks() {\n\t\t$sessionVars = WCF::getSession()->getVars();\n\t\tif (isset($sessionVars['markedLinkListLinks'])) {\n\t\t\treturn $sessionVars['markedLinkListLinks'];\n\t\t}\n\t\treturn null;\n\t}", "public function getLinkConfiguration()\r\n {\r\n return $this->linkConfiguration;\r\n }" ]
[ "0.7384656", "0.7163757", "0.68649286", "0.6854557", "0.6848591", "0.64935845", "0.6394646", "0.6383204", "0.62798035", "0.6268321", "0.6242634", "0.62301546", "0.6221509", "0.62140924", "0.62048304", "0.61971486", "0.6191184", "0.6191184", "0.6191184", "0.6186622", "0.6186622", "0.6135508", "0.6077493", "0.6064446", "0.60503185", "0.6028282", "0.6024097", "0.5985896", "0.5980617", "0.5968551", "0.59202194", "0.58903694", "0.5874663", "0.58636254", "0.58528054", "0.583432", "0.58223", "0.5804277", "0.58036196", "0.5796636", "0.5793749", "0.579354", "0.57467663", "0.5743142", "0.57157844", "0.57155234", "0.56990707", "0.5660161", "0.5653428", "0.5649667", "0.5648486", "0.5648486", "0.5639497", "0.56324196", "0.56278944", "0.5627686", "0.5626006", "0.56235015", "0.5607921", "0.5557754", "0.5538763", "0.5537747", "0.5504647", "0.5495579", "0.5495579", "0.548177", "0.54672426", "0.54627025", "0.5443204", "0.54365426", "0.54244554", "0.5423193", "0.5418131", "0.5403538", "0.5381886", "0.5377082", "0.5354765", "0.53543055", "0.5350744", "0.53492147", "0.53455955", "0.5336801", "0.53339195", "0.5319769", "0.53182924", "0.53158224", "0.531345", "0.53104883", "0.5299126", "0.52984244", "0.52974164", "0.52802265", "0.5269235", "0.5265416", "0.5256172", "0.52543944", "0.5242739", "0.5239624", "0.5236391", "0.52255094" ]
0.80326825
0
Determine if the provided path is a symlink that can be removed.
protected function isRemovableSymlink(string $link, bool $force): bool { return is_link($link) && $force; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkIsSymlink($path);", "public function unlink(string $path): bool\n\t{\n\t\t$path = substr($path, strpos($path, ':') + 3);\n\t\treturn unlink($path);\n\t}", "public function canNotUnlink()\n {\n $this->assertFalse(@unlink(vfsStream::url('foo')));\n }", "function isSymlink($id) {\n\t\tif(isset($this->myelements[$id]['symlink']) && $this->myelements[$id]['symlink'] != \"\" && $this->myelements[$id]['symlink'] != \"0\") {\n\t\t\treturn $this->myelements[$id]['symlink'];\n\t\t}\n\n\t\treturn 0;\n\t}", "public function handle($symlink)\n {\n $symlink = $this->filesystem->getAdapter()->applyPathPrefix($symlink);\n\n if (!is_link($symlink)) {\n return false;\n }\n\n return unlink($symlink);\n }", "function fs_is_link($filename) {\n\treturn @is_link($filename);\n}", "public static function pathExists($path) {\n return file_exists($path) || is_link($path);\n }", "public function unlink($path) : bool\n {\n if (is_array($path))\n {\n $path = $path['path'] ?? '';\n }\n\n $connection_identifier = '';\n $rpath = '';\n $service = $this->getServiceFromPath($path, $connection_identifier, $rpath);\n\n return $service->unlink($rpath);\n }", "function file_exists_wrapper($string) {\n\tif (is_link($string)) {\n\t\t$linkinfo = readlink($string);\n\t\tif ($linkinfo === false) {\n\t\t\t//TODO: throw error?\n\t\t\treturn !unlink($string);\n\t\t} else {\n\t\t\tif (file_exists($linkinfo)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn !unlink($string);\n\t\t\t}\n\t\t}\n\t} else {\n\t\treturn file_exists($string);\n\t}\n}", "public function isSymLink()\n {\n return ( $this->fileStructure->type == self::IS_SYMBOLIC_LINK );\n }", "public function isLink(): bool\n {\n return is_link($this->directory->getPath().'/'.$this->filename);\n }", "final public static function delete($path){\n \n //If we have permission to remove this file\n if (static::isWritable($path)) {\n if (!@unlink($path)) //This is highly unreliable as unlink returns a warning not a bool\n return false;\n }else {\n if (!@unlink($path)) //This is highly unreliable as unlink returns a warning not a bool\n return false;\n }\n return true;\n }", "public function isLink()\n {\n return ( $this->isHardLink() || $this->isSymLink() );\n }", "function remove($relativePath): bool;", "function fn_check_path($path)\n{\n $real_path = realpath($path);\n\n return str_replace('\\\\', '/', $real_path) == $path ? true : false;\n}", "public static function remove($path)\r\n {\r\n // are we on a windows system prior to NT6?\r\n $is_win = strtolower(substr(PHP_OS, 0, 3)) == 'win';\r\n\r\n /* update by Roy Gu 2010-11-13\r\n * even we are on windows system prior to NT6, i also want to use solar command\r\n if ($is_win && php_uname('r') < 6) {\r\n throw Solar_Symlink::_exception('ERR_WINDOWS_VERSION');\r\n }\r\n */\r\n\r\n // does the path exist for removal?\r\n $is_dir = Solar_Dir::exists($path);\r\n $is_file = Solar_File::exists($path);\r\n if (! $is_dir && ! $is_file) {\r\n throw Solar_Symlink::_exception('ERR_PATH_NOT_FOUND', array(\r\n 'path' => $path,\r\n ));\r\n }\r\n\r\n // how to remove?\r\n if ($is_win) {\r\n // have to double up on removals because windows reports all\r\n // symlinks as files, even if they point to dirs.\r\n // update by Roy Gu 2010-11-11\r\n if ($is_file) @unlink($path);\r\n if ($is_dir) Solar_Dir::rmdir($path);\r\n } else {\r\n // unix file or dir\r\n @unlink($path);\r\n }\r\n }", "private function _is_valid_dir($path)\n\t{\n\t\treturn (is_dir($path) || (is_link($path) && is_dir(readlink($path))));\n\t}", "public function & unLinkPath () {\n if ($this->pathExists->toBoolean () == TRUE) {\n if (unlink ($this->varContainer)) {\n # Return to chain ...\n return $this->returnToChain ();\n }\n }\n }", "function readlink(string $path): string|false {}", "public function isHardLink()\n {\n return ( $this->fileStructure->type == self::IS_LINK );\n }", "public function isRemovable($path)\n\t{\n\t\t$path = $this->resolve($path);\n\n\t\tif (\\is_file($path)) {\n\t\t\treturn \\is_readable($path) && \\is_writable($path);\n\t\t}\n\n\t\t$stack = [$path];\n\n\t\twhile ($dir = \\array_pop($stack)) {\n\t\t\tif (!\\is_readable($dir) || !\\is_writable($dir)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$files = \\array_diff(\\scandir($dir), ['.', '..']);\n\n\t\t\tforeach ($files as $file) {\n\t\t\t\tif (\\is_dir($file)) {\n\t\t\t\t\t$stack[] = PathUtils::resolve($dir, $file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function remove(string $path): bool\n {\n return $this->table()->delete('path = \"' . $this->database->escape($path) . '\"');\n }", "function check_path_file($path)\n{\n if(@filesize($path) == 0)\n {\n @unlink($path);\n return 0;\n }\n else return 1;\n}", "function isValidDocLink($docLink) {\n\tunset($docLink);\n\treturn true;\n}", "public static function removeLinkableObject($obj) {\n\t\tif(in_array($obj, self::$linkable_objects)) {\n\t\t\tunset(self::$linkable_objects[$obj]);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected function validatePath($path) {\n // Absolute local file paths are invalid.\n if ($this->fileSystem->realpath($path) == $path) {\n return FALSE;\n }\n // A path relative to the Drupal root or a fully qualified URI is valid.\n if (is_file($path)) {\n return $path;\n }\n // Prepend 'public://' for relative file paths within public filesystem.\n if (StreamWrapperManager::getScheme($path) === FALSE) {\n $path = 'public://' . $path;\n }\n if (is_file($path)) {\n return $path;\n }\n return FALSE;\n }", "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 }", "public function isValidPathReturnsTrueIfPathExists() {}", "protected function validatePath($path) {\n // Absolute local file paths are invalid.\n if (\\Drupal::service('file_system')->realpath($path) == $path) {\n return FALSE;\n }\n // A path relative to the Drupal root or a fully qualified URI is valid.\n if (is_file($path)) {\n return $path;\n }\n // Prepend 'public://' for relative file paths within public filesystem.\n if (\\Drupal::service('file_system')->uriScheme($path) === FALSE) {\n $path = 'public://' . $path;\n }\n if (is_file($path)) {\n return $path;\n }\n return FALSE;\n }", "function valid_folder($path){\r\n\t$ignore = array('.', '..', '.svn', 'CVS', 'cache', 'install', 'index.html', '.htaccess', '_images');\r\n\tif (isset($path)){\r\n\t\tif (!is_file($path) && !is_link($path) && !in_array(basename($path), $ignore)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}", "protected function isPath(string $string): bool\n {\n return !boolval(filter_var($string, FILTER_VALIDATE_URL));\n }", "static function isDeletable($file_path)\n {\n if ($file_path) {\n if (str_starts_with($file_path, '/storage/defaults')) {\n return false;\n }\n return true;\n }\n return false;\n }", "function unlink_recursive($path, $fail_callback = null) {\n if ($fail_callback === null) {\n $fail_callback = function($path) {\n trigger_error(\"Could not delete \\\"$path\\\".\", E_USER_ERROR);\n };\n }\n if (is_file($path)) {\n if (@unlink($path) === false) {\n $fail_callback($path);\n return false;\n }\n } else {\n foreach (scandir($path) as $node) {\n if ($node === \".\" || $node === \"..\")\n continue;\n if (!unlink_recursive(\"$path/$node\"))\n return false;\n }\n if (@rmdir($path) === false) {\n $fail_callback($path);\n return false;\n }\n }\n return true;\n}", "function sd_is_path_sane($path) {\n\tglobal $sd_error_msg;\n\n\tif (!$path) {\n\t\t$sd_error_msg = 'E:empty';\n\t\treturn $sd_error_msg;\n\t}\n\tif (false !== strpos('..', $path)) {\n\t\t$sd_error_msg = 'E:.. forbidden';\n\t\treturn $sd_error_msg;\n\t}\n\tif (!file_exists(SD_DL_ROOT . $path)) {\n\t\t$sd_error_msg = 'E:non-exist';\n\t\treturn $sd_error_msg;\n\t}\n\treturn true;\n}", "protected function isLink() {}", "function is_needed_delete_dir_link($directory)\n{\n\t// SEE: ternary operator.\n\treturn (is_dir($directory) && $directory != \"../../..//uploads\" && strpos($directory,'uploads'))?TRUE:FALSE;\n}", "public function hasLink(): bool\n {\n return ! is_null($this->link);\n }", "protected function is_valid_path($path) {\n $rp_substr = substr(realpath($path) . DIRECTORY_SEPARATOR, 0, strlen(realpath($this->path_to_files))) . DIRECTORY_SEPARATOR;\n $rp_files = realpath($this->path_to_files) . DIRECTORY_SEPARATOR;\n\n // handle better symlinks & network path - issue #448\n $pattern = ['/\\\\\\\\+/', '/\\/+/'];\n $replacement = ['\\\\\\\\', '/'];\n $rp_substr = preg_replace($pattern, $replacement, $rp_substr);\n $rp_files = preg_replace($pattern, $replacement, $rp_files);\n $match = ($rp_substr === $rp_files);\n\n if (!$match) {\n Log::info('Invalid path \"' . $path . '\"');\n Log::info('real path: \"' . $rp_substr . '\"');\n Log::info('path to files: \"' . $rp_files . '\"');\n }\n return $match;\n }", "protected function isRelativePath(string $path) : bool {\n return !$this->isAbsolutePath($path);\n }", "public function hasUrlPath()\n {\n return $this->url_path !== null;\n }", "public function isUrlLike($path)\n {\n $path = trim($path);\n return substr($path, 0, 4) === 'http' || substr($path, 0, 2) === '//';\n }", "public static function isRelative($path) {\n return !static::isAbsolute($path);\n }", "public function isDirectoryRemoveRecursivelyAllowed() {}", "static function isAbsolutePath($path) {\n\t\tif (0 === strpos ( PHP_OS, 'Linux' )) {\n\t\t\treturn 0 === strpos ( $path, '/' );\n\t\t} elseif (0 === strpos ( PHP_OS, 'WIN' )) {\n\t\t\t$path = strtolower ( $path );\n\t\t\treturn ( bool ) preg_match ( '/[a-z]:(\\/|\\\\)/i', $path );\n\t\t} else {\n\t\t\tuser_error ( 'Unknown OS', E_USER_ERROR );\n\t\t}\n\t}", "function fn_te_check_path($path)\n{\n $path = fn_normalize_path($path);\n $dir_themes = fn_get_theme_path('[themes]/', 'C');\n\n return strpos($path, $dir_themes) === 0;\n}", "function _drush_patchfile_is_url($url) {\n return parse_url($url, PHP_URL_SCHEME) !== NULL;\n}", "private function _delete($path) {\n\t\tif (!file_exists($path)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (!is_dir($path)) {\n\t\t\treturn unlink($path);\n\t\t}\n\n\t\tforeach (scandir($path) as $item) {\n\t\t\tif ($item == '.' || $item == '..') continue;\n\t\t\t\n\t\t\tif (!$this->_delete($this->_sanitize($path. '/'. $item))) return false;\n\t\t}\n\n\t\treturn rmdir($path);\n\t}", "function isPermaLink() {\n\t if (!$this->node->hasAttribute(DOMIT_RSS_ATTR_ISPERMALINK)) {\n\t return true;\n\t }\n\t else {\n\t\t\treturn (strtolower($this->node->getAttribute(DOMIT_RSS_ATTR_ISPERMALINK)) == \"true\");\n\t }\n\t}", "public static function isAbsolutePath(string $path): bool\n {\n return StringType::startsWith($path, [self::UNIX_DIRECTORY_SEPARATOR, self::WINDOWS_DIRECTORY_SEPARATOR]);\n }", "private function isValidFullPath($path)\n {\n $valid = false;\n\n // TODO: Handle network shares?\n if (1 === preg_match('/^[a-z]+:\\\\\\\\/i', $path) && is_file($path)) {\n $valid = true;\n }\n\n return $valid;\n }", "private function _exists(string $link): bool {\n foreach ($this->_links as $linkObject) {\n if($linkObject->getLink() == $link || $linkObject->getLink() == \"$link/\") {\n return true;\n }\n }\n\n return false;\n }", "public static function isAbsolutePath($path) {\n if (self::isWindows()) {\n return (bool)preg_match('/^[A-Za-z]+:/', $path);\n } else {\n return !strncmp($path, DIRECTORY_SEPARATOR, 1);\n }\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 }", "function unlink_if_exists($fn) {\n\tif (file_exists($fn))\n\tunlink($fn);\n}", "public function delete_link(User $user, Link $link)\n {\n return $user->role === 'admin';\n }", "public static function isAbsolutePath($path) {\n if (phutil_is_windows()) {\n return (bool)preg_match('/^[A-Za-z]+:/', $path);\n } else {\n return !strncmp($path, DIRECTORY_SEPARATOR, 1);\n }\n }", "public function unlink() {\n\t\t/** @var WireFileTools $files */\n\t\tif(!strlen($this->basename) || !is_file($this->filename)) return true;\n\t\t$files = $this->wire('files');\n\t\tforeach($this->extras() as $extra) {\n\t\t\t$extra->unlink();\n\t\t}\n\t\treturn $files->unlink($this->filename, true);\n\t}", "public function validatePath($path, $directoryConfig = DirectoryList::MEDIA)\n {\n $realPath = realpath($path);\n // BEGIN EDIT by @erikhansen\n /**\n * Since media directory is a symlink, need to run both paths through realpath in order for the comparison to\n * work.\n * The proper fix for this should involve a STORE > Configuration setting where an admin can choose whether to\n * allow symlinked directories.\n */\n $root = realpath($this->directoryList->getPath($directoryConfig));\n // END EDIT\n\n return strpos($realPath, $root) === 0;\n }", "public function delete($path)\n\t{\n\t\treturn false;\n\t}", "public function validate($link)\n {\n if (!filter_var($link, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED)) {\n throw new UptoboxLinkIsNotValidException($link);\n }\n\n if (!preg_match('/https?:\\/\\/uptobox.com\\/.+/i', $link)) {\n throw new UptoboxLinkIsNotValidException($link);\n }\n\n return true;\n }", "public function symlink($old_path, $new_path): bool\n {\n return ssh2_sftp_symlink($this->_getSFTPResource(), $this->_getPath($old_path), $this->_getPath($new_path));\n }", "public function testUnlink()\n {\n $filename = static::$baseFile . '/fs/tmp.txt';\n\n file_put_contents($filename, 'It works!');\n $this->assertTrue(file_exists($filename));\n\n $this->assertTrue(unlink($filename));\n\n clearstatcache();\n $this->assertFalse(file_exists($filename));\n }", "public function isExternalLink( $link )\n {\n\n // If preview link is a string => localLink\n // If preview link is == false => externalLink\n return $this->getPdfPreviewLink($link) === false ;\n }", "public function isUserAliasesPathValid($path)\n {\n return (is_string($path) && !empty($path))?:false;\n }", "protected static function pathIsRelative($path) {\n\t\treturn !preg_match(\"|^\".DIRECTORY_SEPARATOR.\"|\", $path);\n\t}", "function fn_is_valid_path($base_dir, $path)\n{\n $base_dir = rtrim($base_dir, '/') . '/';\n\n if (strpos($path, $base_dir) !== 0) {\n // relative path\n $path = fn_normalize_path($base_dir . $path);\n }\n\n if (strpos($path, $base_dir) !== 0) {\n return false;\n }\n\n return true;\n}", "public function check_added_path($path){\n\t\t$path = Url::resolve_relative($path);\n\t\tif(isset($this->added_paths[$path])){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function deleteEntry($path)\n {\n if (DIRECTORY_SEPARATOR !== '/') { //Path will always have / (bcs it's http path), no matter on which OS\n $path = str_replace('/', DIRECTORY_SEPARATOR, $path); //...but filesystem differ\n }\n\n $filePath = $path . DIRECTORY_SEPARATOR . 'index.html'; //File path\n\n if (!$this->finder->isReadable($filePath)) {\n return false;\n }\n\n if (!$this->finder->deleteFile($filePath)) {\n return false;\n }\n\n $this->finder->deleteDirectory($path); //This one can fail - if you try to delete entry /sandbox and url /sandbox/test is present /sandbox directory cannot be deleted\n\n return true;\n }", "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 }", "protected function checkAssetsSymlink()\n {\n if (is_null($this->assetsPath)) {\n return;\n }\n if (!\\File::exists($this->assetsPath)) {\n return;\n }\n\n $dir_name = \\File::basename($this->assetsPath);\n $symlink_target = public_path('themes/' . $dir_name);\n if (!\\File::exists(public_path('themes/'))) {\n \\File::makeDirectory(public_path('themes/'));\n }\n if ((!\\File::exists($symlink_target)) && (\\File::exists($this->assetsPath))) {\n symlink($this->assetsPath, $symlink_target);\n }\n }", "function is_absolute_path($path)\n {\n // Optional wrapper(s).\n $regExp =\n // Optional root prefix.\n '%^(?<wrappers>(?:[[:print:]]{2,}://)*)'.\n '(?<root>(?:[[:alpha:]]:/|/)?)'.\n // Actual path.\n '(?<path>(?:[[:print:]]*))$%';\n\n $parts = [];\n\n preg_match($regExp, $path, $parts);\n\n if ('' !== $parts['root']) {\n return true;\n }\n\n return false;\n }", "public function urlExists($url, $path)\n {\n $filename = '/statamic-test-'.time();\n $tmp = $path . $filename;\n touch($tmp);\n\n $resolvedUrl = URL::assemble($this->getAbsoluteUrl($url), $filename);\n\n $headers = get_headers($resolvedUrl);\n\n unlink($tmp);\n\n return (!$headers || strpos($headers[0], '404')) == false;\n }", "public function testUnlinkFile777(): void\n {\n $dirName = 'unlink';\n $basePath = $this->testFilePath . '/' . $dirName . '/';\n $filePath = $basePath . 'file.txt';\n\n $this->createFileStructure([\n $dirName => [\n 'file.txt' => 'test',\n ],\n ]);\n chmod($filePath, 777);\n\n FileHelper::unlink($filePath);\n\n $this->assertFileDoesNotExist($filePath);\n }", "function isAbsPath($path) {\r\n if (preg_match('|^[\\\\\\/]|', $path)) { return true; } // leading slash or backslash (for windows)\r\n if (preg_match('|^[a-zA-Z]:[\\\\\\/]|', $path)) { return true; } // windows drive\r\n if (preg_match('|^\\\\\\\\[a-zA-Z]|', $path)) { return true; } // unc path\r\n return false;\r\n}", "public function checkIsPathExists($path);", "public function delete(): bool\n {\n if (is_writable($this->path)) {\n return unlink($this->path);\n }\n\n return false;\n }", "public static function isAbsolutePath($path)\n {\n if (isset($path[0]) and ($path[0] == '/' or $path[0] == '\\\\')) {\n return true;\n }\n if (preg_match('/^[A-Za-z0-9]+:/', $path) === 1) {\n return true;\n }\n return false;\n }", "function exists($path) \n {\n return is_dir($this->_fs->path()->clean($path));\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 testUnlinkNonExistingFile()\n {\n $this->assertFalse(unlink(static::$baseFile . '/fs/tmp.txt'));\n }", "public function isFullPath( string $path ): bool {\n\t\t\treturn (bool) @preg_match(\n\t\t\t\t'/((\\/|\\\\|\\/\\/|https?:\\\\\\\\|https?:\\/\\/)[a-z0-9 _@\\-^!#$%&+={}.\\/\\\\\\[\\]]+)+\\.[a-z]+$/',\n\t\t\t\t$path\n\t\t\t);\n\t\t}", "public static function isAbsoluteUrl($_path)\n {\n $url = parse_url($_path);\n\n return $url !== false && isset($url['scheme']) && $url['scheme'] != '';\n }", "function scorm_external_link($link) {\n $result = false;\n //將$link轉成小寫\n $link = strtolower($link);\n if (substr($link,0,7) == 'http://') {\n $result = true;\n } else if (substr($link,0,8) == 'https://') {\n $result = true;\n } else if (substr($link,0,4) == 'www.') {\n $result = true;\n }\n return $result;\n}", "public function path_valid() {\n\t\tif (!file_exists($this->path)) return false;\n\t\treturn true;\n\t}", "public function path_valid() {\n\t\tif (!file_exists($this->path)) return false;\n\t\treturn true;\n\t}", "public function getIsAbsolutePath() {}", "public function isValidPath($path)\n\t{\n\t\treturn $this->getPath() == rtrim($path,'/').'/';\n\t}", "function git_is_clean($path) {\n\t$status = GitUtil::getStatus($path);\n\treturn count($status) === 0;\n}", "public function checkPathExists($path);", "public function symlink(string $target, string $link): Promise;", "function path_is_absolute($path)\n {\n }", "public function hasLink() {\n return $this->link!=null;\n }", "public function isReadable(string $path): bool;", "protected function is_path_absolute($path)\n {\n if (defined('STRICT_TYPES') && CAMEL_CASE == '1')\n {\n return (bool) self::parameters(\n [\n 'path' => DT::STRING\n ])\n ->call(__FUNCTION__)\n ->with($path)\n ->returning(DT::BOOL);\n }\n else\n {\n return (bool) is_path_absolute($path);\n }\n }", "public function delete(string $path) : bool\n {\n $path = $this->normalizePath($path);\n\n // Check if the path contains folders we dont want to delete\n if ($this->isAllowedFolder($path)) {\n return true;\n }\n\n $action = 'GetFolderByServerRelativeUrl(\\''.$this->folderPath.$path.'\\')';\n\n $this->requestHeaders['IF-MATCH'] = 'etag';\n\n $this->requestHeaders['X-HTTP-Method'] = 'DELETE';\n\n $options = [\n 'headers' => $this->requestHeaders,\n ];\n\n $response = $this->send('POST', $action, $options);\n\n return $response->getStatusCode() === 200 ? true : false;\n }", "public function verifyLink ($link)\n {\n $map = substr($link,0,3);\n if($map != 'http') {\n $newLink = 'http://' . $link;\n return $newLink;\n }\n }", "private function removeFilesAndDirs(string $projectHomedir, string $symlinkTarget, string $snapshot) : bool\n {\n $this->fileManager->remove($symlinkTarget);\n $this->fileManager->removeFile($snapshot);\n $this->fileManager->remove($projectHomedir);\n\n return !$this->fileManager->fileExists($snapshot)\n && !$this->fileManager->fileExists($projectHomedir);\n }", "function is_absolute($path)\n{\n\treturn ($path[0] == '/' || (DIRECTORY_SEPARATOR == '\\\\' && preg_match('#^[a-z]:[/\\\\\\]#i', $path))) ? true : false;\n}", "protected function isAbsolutePath(string $path) : bool {\n return Str::startsWith($path, DIRECTORY_SEPARATOR . $this->absolutePathPrefix());\n }", "public static function remove_file( $path ) {\n\t\t\tself::call_wp_file_system();\n\t\t\tglobal $wp_filesystem;\n\n\t\t\t$wp_filesystem->delete( $path );\n\n\t\t\treturn true;\n\t\t}" ]
[ "0.7856528", "0.660201", "0.65583813", "0.6549792", "0.6548262", "0.6482006", "0.63904107", "0.62043226", "0.61628944", "0.61554193", "0.61408186", "0.59936845", "0.5987892", "0.5883", "0.585465", "0.58324975", "0.5829509", "0.5818415", "0.5719908", "0.5715086", "0.5679792", "0.5617698", "0.5589179", "0.5584621", "0.55269945", "0.5517767", "0.5516454", "0.5476675", "0.54739994", "0.54459673", "0.5396173", "0.53893846", "0.5386937", "0.5344844", "0.5344031", "0.5339665", "0.5329878", "0.53289884", "0.5320583", "0.5304001", "0.52794975", "0.5279276", "0.5276067", "0.52511406", "0.52241844", "0.52225554", "0.5219772", "0.51961166", "0.5196096", "0.51790285", "0.5174137", "0.51724845", "0.51704234", "0.516716", "0.5148201", "0.51473725", "0.5142849", "0.5130262", "0.5125912", "0.5121375", "0.51200426", "0.51165277", "0.51146734", "0.51096404", "0.51053226", "0.5091623", "0.5064175", "0.50631946", "0.50625265", "0.50612545", "0.5060242", "0.5043455", "0.50422037", "0.50401527", "0.5029903", "0.5025544", "0.50210094", "0.50000805", "0.49944296", "0.49943048", "0.49821773", "0.49678087", "0.49583754", "0.4956551", "0.4956551", "0.49559337", "0.49389583", "0.49378735", "0.49377942", "0.49278697", "0.49259815", "0.49222803", "0.4919357", "0.49178767", "0.49148288", "0.49131694", "0.4910903", "0.49102047", "0.4909216", "0.49063376" ]
0.6751973
1
fin de traitement principal
function etape_1(&$repete) { global $message,$Dossier,$Cabinet, $deval, $self, $tcabinet, $tville, $t_diab; $req="SELECT cabinet, total_diab2, nom_cab, region ". "FROM account ". "WHERE region!='' and infirmiere!='' ". "GROUP BY nom_cab ". "ORDER BY nom_cab "; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $reg=array(); while(list($cab, $total_diab2, $ville, $region) = mysql_fetch_row($res)) { $t_diab[$cab]=0; $tville[$cab]=$ville; $regions[$cab]=$region; $nb_dossiers[$cab]=0; $rcva[$cab]=0; $nb_dossiers[$region]=0; $rcva[$region]=0; if(!in_array($region, $reg)){ $reg[]=$region; } } $nb_dossiers["tot"]=0; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, ". "dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); while(list($cabinet)=mysql_fetch_row($res)){ $nb_dossiers[$cabinet]=$nb_dossiers[$cabinet]+1; $nb_dossiers["tot"]=$nb_dossiers["tot"]+1; $nb_dossiers[$regions[$cabinet]]=$nb_dossiers[$regions[$cabinet]]+1; } $date1an=date("Y"); $date1an--; $date1an=$date1an."-".date("m")."-".date("d"); $date3ans=date("Y"); $date3ans=$date3ans-3; $date3ans=$date3ans."-".date("m")."-".date("d"); echo "<table border='1'><tr><td></td><th>Taux moyen Asalée</th>"; foreach($reg as $region){ echo "<th>$region</th>"; } foreach($tville as $ville){ echo "<th>$ville</th>"; } echo "<tr><td width='150'>Antécédents familiaux<sup>1</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, ". "dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and (antecedants='oui' or antecedants='non') and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>Tabagisme<sup>2</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and (tabac='oui' or tabac='non') and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>Poids<sup>3</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and dpoids>='$date1an' and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>Alcool<sup>4</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and (alcool='oui' or alcool='non') and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>Cholestérol total<sup>5</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and dChol>='$date1an' and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>HDL<sup>6</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and dHDL>='$date1an' and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>LDL<sup>7</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and dLDL>='$date1an' and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>Triglycérides<sup>8</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and dtriglycerides>='$date1an' and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>Glycémie<sup>9</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and dgly>='$date1an' and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>Créatinine<sup>10</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and cardio_vasculaire_depart.dCreat>='$date1an' and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>Kaliémie<sup>11</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and dkaliemie>='$date1an' and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>Protéinurie<sup>12</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and dproteinurie>='$date1an' and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>Fond d'oeil<sup>13</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and dfond>='$date3ans' and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>Fréquence cardiaque<sup>14</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and dpouls>='$date1an' and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>Tension<sup>15</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and dTA>='$date1an' and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>Echocardiogramme Hypertrophie Ventriculaire Gauche<sup>16</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and (HVG='oui' or HVG='non') and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>ECG<sup>17</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and dECG>='$date3ans' and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>A défaut Surcharge ventriculaire gauche<sup>18</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and (surcharge_ventricule='oui' or surcharge_ventricule='non') and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>Sokolov<sup>19</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and dsokolov>='$date1an' and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>Examen cardio-vasculaire<sup>20</sup></td>"; $req="SELECT dossier.cabinet from cardio_vasculaire_depart, dossier, account ". "where dossier.id=cardio_vasculaire_depart.id and ". "dossier.cabinet=account.cabinet and region!='' and infirmiere!='' ". "and exam_cardio>='$date1an' and actif='oui' group by dossier.id"; $res=mysql_query($req) or die("erreur SQL:".mysql_error()."<br>$req"); $nb["tot"]=0; foreach($reg as $region){ $nb[$region]=0; } foreach($tville as $cab=>$ville){ $nb[$cab]=0; } while(list($cabinet)=mysql_fetch_row($res)){ $nb["tot"]=$nb["tot"]+1; $nb[$cabinet]=$nb[$cabinet]+1; $nb[$regions[$cabinet]]=$nb[$regions[$cabinet]]+1; } echo "<td align='right'>".round($nb["tot"]/$nb_dossiers["tot"]*100)." %</td>"; foreach($reg as $region){ if($nb_dossiers[$region]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$region]/$nb_dossiers[$region]*100)." %</td>"; } } foreach($tville as $cab=>$ville){ if($nb_dossiers[$cab]==0){ echo "<td align='right'>ND</td>"; } else{ echo "<td align='right'>".round($nb[$cab]/$nb_dossiers[$cab]*100)." %</td>"; } } echo "<tr><td>Nombre de patients actifs avec au moins un suivi<sup>21</sup></td>"; echo "<td align='right'>".$nb_dossiers["tot"]."</td>"; foreach($reg as $region){ echo "<td align='right'>".$nb_dossiers[$region]."</td>"; } foreach($tville as $cab=>$ville){ echo "<td align='right'>".$nb_dossiers[$cab]."</td>"; } echo "</table><br><br>"; $annee0=2007; $mois0=3; $annee=date('Y'); $mois=date('m'); $mois--; if($mois<3) { $annee--; $mois=12; } elseif(($mois>=3)&&($mois<6)) { $mois=3; } elseif(($mois>=6)&&($mois<9)) { $mois=6; } elseif(($mois>=9)&&($mois<12)) { $mois=9; } $jour[3]=$jour[12]=31; $jour[6]=$jour[9]=30; while(($annee>$annee0)||(($annee==$annee0)&&($mois>=$mois0))) { if($mois<10) { $date=$annee.'-0'.$mois.'-'.$jour[$mois]; } else { $date=$annee.'-'.$mois.'-'.$jour[$mois]; } tableau($date, $regions); $mois=$mois-3; if($mois<=0) { $mois=$mois+12; $annee--; } } echo "<sup>1</sup> Taux de patients pour lesquels les antécédents familiaux ont été renseignés à la date du jour<br>". "<sup>2</sup> Taux de patients pour lesquels le tabagisme a été renseigné à la date du jour<br>". "<sup>3</sup> Taux de patients pour lesquels le poids date de moins d'un an<br>". "<sup>4</sup> Taux de patients pour lesquels la consommation d'alcool a été renseignée<br>". "<sup>5</sup> Taux de patients pour lesquels le cholestérol total date de moins d'un an<br>". "<sup>6</sup> Taux de patients pour lesquels le HDL date de moins d'un an<br>". "<sup>7</sup> Taux de patients pour lesquels le LDL date de moins d'un an<br>". "<sup>8</sup> Taux de patients pour lesquels les triglycérides datent de moins d'un an<br>". "<sup>9</sup> Taux de patients pour lesquels la glycémie date de moins d'un an<br>". "<sup>10</sup> Taux de patients pour lesquels la créatinine date de moins d'un an<br>". "<sup>11</sup> Taux de patients pour lesquels la kaliémie date de moins d'un an<br>". "<sup>12</sup> Taux de patients pour lesquels la protéinurie date de moins d'un an<br>". "<sup>13</sup> Taux de patients pour lesquels le fond d'oeil date de moins de 3 ans<br>". "<sup>14</sup> Taux de patients pour lesquels la fréquence cardiaque date de moins d'un an<br>". "<sup>15</sup> Taux de patients pour lesquels la tension artérielle date de moins d'un an<br>". "<sup>16</sup> Taux de patients pour lesquels l'échocardiogramme hypertrophie ventriculaire gauche a été renseigné<br>". "<sup>17</sup> Taux de patients pour lesquels l'ECG date de moins de 3 ans<br>". "<sup>18</sup> Taux de patients pour lesquels la surcharge ventriculaire gauche a été renseignée<br>". "<sup>19</sup> Taux de patients pour lesquels le sokolov date de moins d'un an<br>". "<sup>20</sup> Taux de patients pour lesquels l'examen cardio-vasculaire date de moins d'un an<br>". "<sup>21</sup> Nombre de patients actifs à la date du jour et ayant eu au moins un questionnaire collecte de données RCVA rempli"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function factures_autoriser(){}", "public function traerCualquiera()\n {\n }", "public function principal(){\n\t if (!ServiceSession::read(\"name\")) {\n\t Redirect::to(\"/login\")->do();\n\t }\n\t $this->view('principal');\n\t }", "public function principal()\n\t {\n\t\t require_once('../../site_media/html/asignar_cursos/ac_Admin.php');\n\t }", "public function principal()\n\t {\n\t\t require_once('../../site_media/html/cursos/cu_Admin.php');\n\t }", "public function Principal(){\r\n // require_once 'view/header.php';\r\n // require_once 'view/Registro/Principal.php';\r\n // require_once 'view/footer.php';\r\n\r\n require_once 'view/medics/create.php';\r\n }", "public function principal()\n {\n return $this->belongsTo(Principal::class);\n }", "function cl_sau_triagemavulsa() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_triagemavulsa\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function contrato()\r\n\t{\r\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 archobjet_autoriser() {\n}", "function recuperarFinalistas(){\n\t\t$votopro = new VotaProfesional();\n\t\t$res = $votopro->recuperarFinalistas();\n\t\treturn $res;\n\t}", "public function partirAuTravail(): void\n\t{\n\t}", "function guardarReclamo()\n\t\t{\n\t\t}", "public function show(Principal $principal)\n {\n //\n }", "private function metodo_privado() {\n }", "function cl_autoriser(){}", "public function attaquerAdversaire() {\n\n }", "public function getPrincipal() {\n return $this->principal;\n }", "public function acessarRelatorios(){\n\n }", "public function AggiornaPrezzi(){\n\t}", "public function pasaje_abonado();", "protected function antes() {\n\t // $accion = str_replace(\"accion_\", '', $this->accion);\n\t\t\t// \n\t // $this->permiso = \\FMT\\Usuarios::getPermiso($_SESSION['iu'])['permiso'];\n // $this->id_puerto = \\FMT\\Usuarios::getMetadata($_SESSION['iu'])['metadata'];\n\t // $permisos_sistema = json_decode(PERMISOS);\n\t // if(isset($permisos_sistema->$control->$accion) && in_array($this->permiso, $permisos_sistema->$control->$accion)) {\n\t // return true;\n\t // } else {\n\t // $control = new \\App\\Controlador\\Error('na');\n\t // $control->procesar();\n\t // $datos = [];\n\t // $datos['session_data'] = $_SESSION['datos_usuario_logueado'];\n\t // \\FMT\\Logger::event('no_autorizado',$datos);\n\t // exit;\n\t\t\t// \n\t // }\n\t return true; \n\t}", "public function index_onPrincipal()\n\t{\n\t\t$model = $this->controller->model;\n\t\tif ( $id = post('id') )\n\t\t{\n\t\t\t$record = $model::find($id);\n\t\t\tif ( !$record->principal)\n\t\t\t{\n\t\t\t\t$record->principal = !$record->principal;\n\t\t\t\t$record->save();\n\t\t\t\t\\Flash::success( trans('axc.framework::lang.columns.principal.updated') );\n\t\t\t\t$this->vars['action'] = 'index';\n\t\t\t\treturn $this->controller->listRefresh();\n\t\t\t}\n\t\t\telse\n\t\t\t\t\\Flash::warning( trans('axc.framework::lang.columns.principal.already_done') );\n\t\t}\n\t}", "public function aprova()\n {\n $this -> estadoAtual -> aprova($this);\n }", "function cl_rhempenhofolharubrica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhempenhofolharubrica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function formulaires_deleguer_verifier_dist() {\n include_spip('inc/saisies');\n // on récupère les saisies\n $mes_saisies = mes_saisies_deleguer();\n // saisies_verifier retourne un tableau des erreurs s'il y en a, sinon traiter() prend le relais\n return saisies_verifier($mes_saisies);\n}", "public function obtener()\n {\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 testPrincipal()\n {\n $this->specify('Tests Principal class and functions.', function () {\n $country = 'Westeros';\n $state = 'The North';\n $locality = 'Winterfell';\n $organization = 'Starks';\n $organizationalUnit = 'The Night\\'s Watch';\n $commonName = 'www.nightswatch.com';\n $email = 'whitewolf_998@nightswatch.com';\n\n $principal = new Principal($country, $state, $locality, $organization, $organizationalUnit, $commonName,\n $email);\n $this->assertEquals($country, $principal->getCountryName());\n $this->assertEquals($state, $principal->getStateOrProvinceName());\n $this->assertEquals($locality, $principal->getLocalityName());\n $this->assertEquals($organization, $principal->getOrganizationName());\n $this->assertEquals($organizationalUnit, $principal->getOrganizationalUnitName());\n $this->assertEquals($commonName, $principal->getCommonName());\n $this->assertEquals($email, $principal->getEmailAddress());\n\n $array = [\n Principal::PROPERTY_KEY_COUNTRY => $country,\n Principal::PROPERTY_KEY_STATE => $state,\n Principal::PROPERTY_KEY_LOCALITY => $locality,\n Principal::PROPERTY_KEY_ORGANIZATION => $organization,\n Principal::PROPERTY_KEY_ORGANIZATIONAL_UNIT => $organizationalUnit,\n Principal::PROPERTY_KEY_COMMON_NAME => $commonName,\n Principal::PROPERTY_KEY_EMAIL => $email\n ];\n $this->assertEquals($array, $principal->toArray());\n\n $principal2 = Principal::fromArray($array);\n $this->assertEquals($country, $principal2->getCountryName());\n $this->assertEquals($state, $principal2->getStateOrProvinceName());\n $this->assertEquals($locality, $principal2->getLocalityName());\n $this->assertEquals($organization, $principal2->getOrganizationName());\n $this->assertEquals($organizationalUnit, $principal2->getOrganizationalUnitName());\n $this->assertEquals($commonName, $principal2->getCommonName());\n $this->assertEquals($email, $principal2->getEmailAddress());\n\n $str = sprintf('/%s=%s/%s=%s/%s=%s/%s=%s/%s=%s/%s=%s/%s=%s', Principal::PROPERTY_KEY_COUNTRY, $country,\n Principal::PROPERTY_KEY_STATE, $state, Principal::PROPERTY_KEY_LOCALITY, $locality,\n Principal::PROPERTY_KEY_ORGANIZATION, $organization, Principal::PROPERTY_KEY_ORGANIZATIONAL_UNIT,\n $organizationalUnit, Principal::PROPERTY_KEY_COMMON_NAME, $commonName, Principal::PROPERTY_KEY_EMAIL,\n $email);\n $this->assertEquals($str, $principal->__toString());\n });\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_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 }", "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 }", "function cl_rechumanorelacao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rechumanorelacao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function elso()\n {\n }", "public function destroy(Principal $principal)\n {\n //\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 livraison_autoriser() {}", "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 }", "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 cl_rhsolicita() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhsolicita\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function telaCadastroUsuario():void {\n $session =(Session::get('USER_AUTH'));\n if (!isset($session)) {\n $this->view('Home/login_viewer.php');\n }\n elseif ((int) Session::get('USER_ID')!==1) {\n Url::redirect(SELF::PAINEL_USUARIO);\n }\n else {\n $this->cabecalhoSistema();\n $this->view('Administrador/usuario/formulario_cadastro_usuario_viewer.php');\n $this->rodapeSistema();\n }\n }", "public function trasnaction(){\n\n\t}", "function cl_traperm() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"traperm\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\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 }", "public function nadar()\n {\n }", "abstract protected function edu_up();", "public function accionPerfilArtista(){\n // (si es que hay alguno logueado)\n $sw = false;\n $codRole = 0;\n \n if(Sistema::app()->Acceso()->hayUsuario()){\n $sw = true;\n \n $nick = Sistema::app()->Acceso()->getNick();\n $codRole = Sistema::app()->ACL()->getUsuarioRole($nick);\n \n }\n \n // Si el usuario que intenta acceder es un restaurante, administrador\n // o simplemente no hay usuario validado, lo mando a una página de\n // error. Los artistas tienen el rol 5\n if(!$sw || $codRole != 5){\n Sistema::app()->paginaError(403, \"No tiene permiso para acceder a esta página.\");\n exit();\n }\n \n // Una vez comprobado que está accediendo un artista, procedo a\n // obtener los datos del artista\n $art = new Artistas();\n \n // El nick del usuario es el correo electrónico. Es un valor\n // único, por lo que puedo buscar al artista por\n // su dirección de correo\n if(!$art->buscarPor([\"where\"=>\"correo='$nick'\"])){\n \n Sistema::app()->paginaError(300,\"Ha habido un problema al encontrar tu perfil.\");\n return;\n \n }\n \n $imagenAntigua = $art->imagen;\n $nombre=$art->getNombre();\n \n // Si se modifican los datos del artista, esta variable\n // pasará a true para notificar a la vista\n $artistaModificado = false;\n if (isset($_POST[$nombre]))\n {\n $hayImagen = true;\n // Si ha subido una nueva imagen, recojo su nombre\n if($_FILES[\"nombre\"][\"name\"][\"imagen\"]!=\"\"){\n $_POST[\"nombre\"][\"imagen\"] = $_FILES[\"nombre\"][\"name\"][\"imagen\"];\n }\n else{\n $hayImagen = false;\n $_POST[\"nombre\"][\"imagen\"] = $art->imagen;\n }\n // El coreo es una clave foránea, así que tengo\n // que cambiar el correo en la tabla ACLUsuarios\n Sistema::app()->ACL()->setNick($nick, $_POST[\"nombre\"][\"correo\"]);\n \n $art->setValores($_POST[$nombre]);\n \n if ($art->validar())\n {\n // Si se ha guardado correctamente, actualizo la imagen de perfil\n // e inicio sesión con el nuevo correo automáticamente\n if ($art->guardar()){\n $artistaModificado = true;\n if($hayImagen){\n // Obtengo la carpeta destino de la imagen\n $carpetaDestino = $_SERVER['DOCUMENT_ROOT'].\"/imagenes/artistas/\";\n // Elimino la imagen antigua\n unlink($carpetaDestino.$imagenAntigua);\n \n // Y guardo la nueva\n move_uploaded_file($_FILES['nombre']['tmp_name']['imagen'], $carpetaDestino.$_POST[\"nombre\"][\"imagen\"]);\n }\n Sistema::app()->Acceso()->registrarUsuario(\n $_POST[\"nombre\"][\"correo\"],\n mb_strtolower($art->nombre),\n 0,\n 0,\n [1,1,1,1,1,0,0,0,0,0]);\n }\n \n }\n }\n \n $this->dibujaVista(\"perfilArtista\",\n [\"art\"=>$art, \"artistaModificado\"=>$artistaModificado],\n \"Perfil\");\n \n }", "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 }", "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 }", "public function index(){\n \n $user = $_SESSION[\"User\"]?? null;\n if(null != $user){\n Header(\"Location:\".URL.\"Principal/principal\");\n }else{\n $this->view->render($this,\"index\");\n }\n // echo \"Metodo index\";\n \n }", "public function masodik()\n {\n }", "public function restaurarComoInferiorDe( $empresa ){\n if( $empresa instanceof empresa ){ $empresa = $empresa->getUID(); }\n return $this->actualizarRelacion( $this->tabla.\"_relacion\", \"papelera\", 0, \"uid_empresa_inferior\", \"uid_empresa_superior\", $empresa );\n }", "function cl_tarefa_lanc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tarefa_lanc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function rang_autoriser(){}", "public function alimentar()\n {\n }", "function cl_rhestagio() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhestagio\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function salida_por_traspaso(){\n\t\t$e= new Salida();\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->cclientes_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}", "function cl_rhlocaltrab() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhlocaltrab\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_rhfolhapagamento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhfolhapagamento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function defiva($subt,$saldoi,$pago){\n $pagoiva;\n $resto = $saldoi -$subt;\n if($resto >0){\n // queda iva por aplicar\n if($resto>$pago){$pagoiva=$pago;}else{$pagoiva=$resto;}\n }else{\n //todo a capital\n $pagoiva = 0;\n }\n return $pagoiva;\n}", "function cl_habitcandidatointeresseprograma() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"habitcandidatointeresseprograma\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\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 cilien_autoriser(){}", "function beSelf(){\r\n\t\t$_SESSION['userid'] = $_SESSION['realUserId'];\r\n\t\t$_SESSION['roleid'] = $_SESSION['realRoleId'];\r\n\t\tunset( $_SESSION['realRoleId'] );\r\n\t\tunset( $_SESSION['realUserId'] );\r\n\t}", "public static function TraerUnUsuario($mail,$clave) \n\t{\n\t\t\n\t\t\t$objetoAccesoDato = AccesoDatos::dameUnObjetoAcceso(); \n\t\t\t$consulta =$objetoAccesoDato->RetornarConsulta(\"select id ,mail, nombre, apellido, perfil from usuario WHERE mail=? AND clave=?\");\n\t\t\t$consulta->execute(array($mail, $clave));\n\t\t\t$UsuarioBuscado= $consulta->fetchObject('usuario');\n \t\treturn $UsuarioBuscado;\t\t\t\t\n\t\t\n\t}", "function cl_empage() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empage\");\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_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_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_pcorcamfornelic() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"pcorcamfornelic\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\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 getPrincipal(): Principal\n {\n if ($this->principal === null && !$this->resume()) {\n $this->principal = Principal::getAnonymous();\n }\n return $this->principal;\n }", "function delete_all_principal() {\n\t$id_user = get_current_user_id();\n\tglobal $wpdb;\n\t$db = $wpdb->update( \n\t\t 'parcours_user', \n\t\t array( \n\t\t 'principal' => 0\n\t\t ),\n\t\t array( 'id_user' => $id_user ), \n\t\t array( \n\t\t '%d'\n\t\t ), \n\t\t array( \n\t\t '%d'\n\t\t )\n\t\t);\n}", "function cl_rhdirfgeracao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhdirfgeracao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_issplan() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"issplan\"); \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 }", "function mainMenu() \r\n\t\t{\r\n\t\t\tif($this->RequestAction('/external_functions/verifiedAccess/'.$this->Auth->user('id').\"/1/mainMenu\") == true)\r\n\t\t\t{\r\n\t\t\t\t$this->set('title_for_layout', 'Fondos por rendir :: Menu Principal');\r\n\t\t\t\t$this->set('userAdmin', $this->Auth->user('admin'));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->Session->setFlash('No tienes permisos para ver esta pagina, consulta con el administrador del sistema.', 'flash_alert');\r\n\t\t\t\t$this->redirect(array('controller' => 'dashboard', 'action' => 'index'));\r\n\t\t\t}\r\n\t\t}", "function eliminar_autonomo()\n\t{\n\t\ttry {\n\t\t\t$this->db->abrir_transaccion();\n\t\t\t$this->db->retrasar_constraints();\n\t\t\t$this->eliminar();\n\t\t\t$this->db->cerrar_transaccion();\n\t\t\t$this->manejador_interface->mensaje(\"El proyecto '{$this->identificador}' ha sido eliminado\");\n\t\t} catch ( toba_error $e ) {\n\t\t\t$this->db->abortar_transaccion();\n\t\t\t$this->manejador_interface->error( \"Ha ocurrido un error durante la eliminacion de TABLAS de la instancia:\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t$e->getMessage() );\n\t\t}\n\t}", "function cl_previden() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"previden\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function delIdentity()\n\t{\n\t\t// Verifier l'adhesion\n\t\t$q = new Bn_query('u2a', '_asso');\n\t\t$q->setFields('u2a_adherentid');\n\t\t$q->addWhere('u2a_userid='. $this->getVal('id', -1));\n\t\t$adheId = $q->getOne();\n\t\t$q->deleteRow();\n\t\t$q->setTables('adherents');\n\t\t$q->deleteRow('adhe_id=' . $adheId);\n\t}", "abstract protected function faireDuSport();", "public function Anular()\n\t{\n\t\tif($this->TieneCobranzasVigentes())\n\t\t\tthrow new Exception('No se puede anular una factura que tiene cobranzas');\n\t\t\n\t\t$conn = Doctrine_Manager::connection();\n\t\t\n\t\t\t//echo 'ejecutar como trans';\n\t\t\t$this->FechaAnulacion = date('Y-m-d');\n\t\t\t\n\t\t\t$q =\tDoctrine_Query::create()\n\t\t\t\t\t\t->from('OrdenDeTrabajo ot')\n ->Update()\n ->Set('FacturaId', 'NULL')\n ->andWhere('ot.ClienteId = ?', $this->ClienteId)\n ->andWhere('ot.FacturaId = ?', $this->Id);\n \n\t\t\t$conn->beginTransaction();\n\t\t\t\n\t\t\t$this->save();\n\t\t\t//actualizar ordenes asociadas la factura\n\t\t\t$q->execute();\n\t\t\t\n\t\t\t$conn->commit();\n\t\t\n\t}", "public function getSedePrincipal()\r\n\t\t{\r\n\t\t\treturn ContribuyenteBase::getEsUnaSedePrincipal($this->_id_contribuyente);\r\n\t\t}", "public function decopersonnel()\n {\n $this->session-> unset_userdata('admin','info','id');\n $this ->session->sess_destroy();\n $this->template->display('acceuil');\n }", "function hal_autoriser() {\n}", "public function ivtd()\n {\n session_start();\n if (!isset($_SESSION[\"Instructor\"])) {\n\n header('Location: ../inicio');\n\n } else {\n\n $this->vista('invitado/menu');\n\n }\n }", "public abstract function Ataca();", "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 }", "function elPlanTieneEstructuraDefinida(){\r\n \r\n $plan_id = $this->data['Anio']['plan_id'];\r\n\r\n $et = $this->Plan->tieneEstructuraDefinida($plan_id);\r\n\r\n return $et;\r\n\r\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 }", "public function accionPerfilRestaurante(){\n // (si es que hay alguno logueado)\n $sw = false;\n $codRole = 0;\n \n if(Sistema::app()->Acceso()->hayUsuario()){\n $sw = true;\n \n $nick = Sistema::app()->Acceso()->getNick();\n $codRole = Sistema::app()->ACL()->getUsuarioRole($nick);\n \n }\n \n // Si el usuario que intenta acceder es un artista, administrador\n // o simplemente no hay usuario validado, lo mando a una página de\n // error. Los restaurantes tienen el rol 6\n if(!$sw || $codRole != 6){\n Sistema::app()->paginaError(403, \"No tiene permiso para acceder a esta página.\");\n exit();\n }\n \n // Una vez comprobado que está accediendo un restaurante, procedo a\n // obtener los datos del restaurante\n $res = new Restaurantes();\n \n // El nick del usuario es el correo electrónico. Es un valor\n // único, por lo que puedo buscar el restaurante por\n // su dirección de correo\n if(!$res->buscarPor([\"where\"=>\"correo='$nick'\"])){\n \n Sistema::app()->paginaError(300,\"Ha habido un problema al encontrar tu perfil.\");\n return;\n \n }\n \n $imagenAntigua = $res->imagen;\n $nombre=$res->getNombre();\n \n // Si se modifican los datos del restaurante, esta variable\n // pasará a true para notificar a la vista\n $resModificado = false;\n if (isset($_POST[$nombre]))\n {\n $hayImagen = true;\n // Si ha subido una nueva imagen, recojo su nombre\n if($_FILES[$nombre][\"name\"][\"imagen\"]!=\"\"){\n $_POST[$nombre][\"imagen\"] = $_FILES[$nombre][\"name\"][\"imagen\"];\n }\n else{\n $hayImagen = false;\n $_POST[\"nombre\"][\"imagen\"] = $res->imagen;\n }\n \n // El coreo es una clave foránea, así que tengo\n // que cambiar el correo en la tabla ACLUsuarios\n Sistema::app()->ACL()->setNick($nick, $_POST[\"nombre\"][\"correo\"]);\n \n $res->setValores($_POST[$nombre]);\n \n if ($res->validar())\n {\n // Si se ha guardado correctamente, actualizo la imagen de perfil\n // e inicio sesión con el nuevo correo automáticamente\n if ($res->guardar()){\n $resModificado = true;\n if($hayImagen){\n // Obtengo la carpeta destino de la imagen\n $carpetaDestino = $_SERVER['DOCUMENT_ROOT'].\"/imagenes/restaurantes/\";\n // Elimino la imagen antigua\n unlink($carpetaDestino.$imagenAntigua);\n \n // Y guardo la nueva\n move_uploaded_file($_FILES['nombre']['tmp_name']['imagen'], $carpetaDestino.$_POST[\"nombre\"][\"imagen\"]);\n }\n Sistema::app()->Acceso()->registrarUsuario(\n $_POST[\"nombre\"][\"correo\"],\n mb_strtolower($res->nombre),\n 0,\n 0,\n [0,0,0,0,0,1,1,1,1,1]);\n }\n \n }\n }\n \n $this->dibujaVista(\"perfilRestaurante\",\n [\"res\"=>$res, \"resModificado\"=>$resModificado],\n \"Perfil\");\n \n }", "function cl_conarquivospad() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conarquivospad\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function act()\n\t{\n\t\n\t}", "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 }", "public function Land(){\n /* nothing yet */\n }", "public function controle()\n\t{ \n\t\tif (isset($_COOKIE[GBA_COOKIE_NAME]))\n\t\t{\n\t\t\tsession_name(GBA_COOKIE_NAME);\n\t\t\tsession_start();\t\n\t\t}\n\t\tif (isset($_SESSION) && isset($_SESSION['sessao']) && isset($_SESSION['sessao']['codsessao']))\n\t\t{\n\t\t\t$boAutenticado = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$boAutenticado = false;\n\t\t}\n\t\tif ($boAutenticado === false)\n\t\t{\n\t\t\theader(\"Location: \" . GBA_URL_SISTEMA . \"login.php\");\n\t\t}\n // Adiciona registro no Historico de navegacao\n // Verificando se a ultima pagina ja nao esta gravada\n\t\t$stUltimaPagina = str_replace(GBA_PATH_SISTEMA, '', $_SERVER['SCRIPT_FILENAME']);\n\n\t\tif (count($_SESSION['historico']) == 0)\n\t\t{\n\t\t\t\t$_SESSION['historico'][] = $stUltimaPagina;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ( isset($_SESSION['historico'][count($_SESSION['historico'])-1]) && ($_SESSION['historico'][count($_SESSION['historico'])-1] != $stUltimaPagina) )\n\t\t\t{\n\t\t\t\t$_SESSION['historico'][] = $stUltimaPagina;\n\t\t\t}\n\t\t}\n\t}", "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 }", "final function velcom(){\n }", "function cl_rechumano() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rechumano\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function reprova()\n {\n $this -> estadoAtual -> reprova($this);\n }" ]
[ "0.6012221", "0.5928925", "0.58840805", "0.58655506", "0.57948005", "0.56317806", "0.5409164", "0.5348811", "0.53366923", "0.5257695", "0.5243187", "0.5241235", "0.52344143", "0.52296406", "0.522285", "0.5214845", "0.520934", "0.5186971", "0.5169508", "0.5156379", "0.51526284", "0.51444876", "0.5132874", "0.5122913", "0.51219916", "0.51187795", "0.5117926", "0.5110978", "0.5102686", "0.5099309", "0.5097394", "0.5094731", "0.50904155", "0.50739783", "0.50659996", "0.5058228", "0.5053005", "0.5051151", "0.5038938", "0.5036754", "0.50357467", "0.50345534", "0.5033465", "0.50322133", "0.50294834", "0.50131476", "0.5008798", "0.50039715", "0.49970654", "0.49937648", "0.49918014", "0.4980825", "0.49794966", "0.49775875", "0.49741164", "0.49711084", "0.49706668", "0.49685848", "0.4968552", "0.49680164", "0.49663118", "0.49658597", "0.49632162", "0.49563983", "0.49548268", "0.4953585", "0.4952551", "0.4952523", "0.49486467", "0.49471086", "0.49453843", "0.49450266", "0.49334502", "0.49329934", "0.49209136", "0.49062377", "0.49006984", "0.4893669", "0.4892571", "0.48852926", "0.48817927", "0.48751155", "0.4869452", "0.48659885", "0.4864315", "0.4852439", "0.4851621", "0.48495692", "0.48493156", "0.48491606", "0.48475733", "0.48437697", "0.48392162", "0.48274598", "0.48223603", "0.48214704", "0.48214668", "0.48195845", "0.48177215", "0.4814524", "0.48138094" ]
0.0
-1
Create a new controller instance.
public function index(){ return view('student.curriculum'); }
{ "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}", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "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 }", "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 }", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\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}", "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 }", "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 }", "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 }", "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.82678324", "0.8173564", "0.78118384", "0.7706353", "0.76816905", "0.7659159", "0.74858105", "0.7406485", "0.7298472", "0.7253435", "0.7196091", "0.7174443", "0.7016074", "0.6989523", "0.69837826", "0.69728553", "0.69640046", "0.69357765", "0.6897687", "0.689282", "0.68775725", "0.6868809", "0.68633306", "0.6839021", "0.6779905", "0.6705274", "0.6670987", "0.66623807", "0.6652613", "0.6643801", "0.6616729", "0.66143125", "0.65891534", "0.6449129", "0.64461046", "0.6429425", "0.6426337", "0.63015336", "0.6298573", "0.6294075", "0.62801653", "0.6259914", "0.62554234", "0.6167662", "0.61630553", "0.61601174", "0.6141946", "0.6137726", "0.6134302", "0.6133732", "0.61287725", "0.6110795", "0.60950965", "0.6089703", "0.60768735", "0.6066286", "0.60595477", "0.6055387", "0.60451794", "0.6028352", "0.60246956", "0.60228956", "0.6019088", "0.6012698", "0.6011448", "0.60113615", "0.60076576", "0.6004189", "0.5998927", "0.5997798", "0.5993557", "0.59863526", "0.59863526", "0.59863526", "0.59706056", "0.59546155", "0.59493065", "0.5940633", "0.59251904", "0.59143347", "0.5913916", "0.59121555", "0.59111917", "0.5909761", "0.59026676", "0.59009403", "0.5899209", "0.58973104", "0.58964044", "0.58933777", "0.5888429", "0.58760023", "0.5869122", "0.5863149", "0.58622074", "0.5849116", "0.5838678", "0.5831741", "0.5824525", "0.58167094", "0.58122987" ]
0.0
-1
/Obtener los idiomas de la base de datos
public function getLanguage() { $queries = \DB::table('languages') ->orderBy('language') ->get(); foreach ($queries as $query) { $results[] = [ 'id' => $query->id, 'value' => $query->language]; } return Response::json($results); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdiomas()\n\t{\n\t\t//Retorna os dados dos banners\n\t\treturn TableFactory::getInstance('WebsiteIdiomas')->getIdiomas();\n\t}", "public function getIdiomas()\n\t{\n\t\treturn TableFactory::getInstance('WebsiteIdiomas')->getIdiomas();\n\t}", "function datos_idioma($id_idioma) {\n\t\t$query = \"SELECT idiomas.*\n\t\tFROM idiomas\n\t\tWHERE idiomas.id_idioma=$id_idioma\";\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$row=mysql_fetch_array($result); \n\t\tmysql_close($connection);\n\t\treturn $row['idioma'];\n\t}", "function listar_idiomas() {\n\t\t$query = \"SELECT idiomas.*\n\t\tFROM idiomas\n\t\tORDER BY idioma\";\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}", "function select_db($base_datos) {\r\n\t\t//\"implementado en la clase <i>\" . get_class($this) . \"</i></h1>\";\r\n\t\treturn FALSE;\r\n\t}", "function geraClassesBDBase(){\n # Abre o template da classe BD e armazena conteudo do modelo\n $modelo = Util::getConteudoTemplate('class.ModeloBDBase.tpl');\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n\n # Varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n $copiaModelo = $modelo;\n $nomeClasse\t = $this->getCamelMode(ucfirst((string)$aTabela['NOME']));\n $objetoClasse = \"\\$o$nomeClasse\";\n # varre a estrutura dos campos da tabela em questao\n $aCampoInsert = $aValorInsert = $aCampoUpdate = $aChaveWhere = $aCampoConsulta = $aFKCampo = array();\n $aChaveAltera = $aChave = $aChaveWhereSel = $aChaveWhereDel = $aFKJoin = $aVerificaPK = array();\n \n $i = 2;\n\n foreach($aTabela as $oCampo){\n $nomeCampo = (string)$oCampo->NOME;\n\n # recupera valores a serem substituidos no modelo\n $aCampoInsert[] = $nomeCampo;\n if((int)$oCampo->CHAVE == 1){\n $aChaveWhere[] = \"$nomeCampo = {\\$reg['$nomeCampo']}\";\n $aChaveWhereSel[] = (string)$aTabela['NOME'].\".$nomeCampo = \\$$nomeCampo\";\n $aChaveWhereDel[] = \"$nomeCampo = \\$$nomeCampo\";\n $aChave[] = \"\\$$nomeCampo\";\n $aVerificaPK[] = $nomeCampo;\n $aChaveAltera[] = \"\\$cv == \\\"$nomeCampo\\\"\";\n if((string)$oCampo->FKTABELA != ''){\n $aCampoUpdate[] = \"$nomeCampo = \\\".\\$reg['$nomeCampo'].\\\"\";\n }\n }\n else{\n $aCampoUpdate[] = ((string)$oCampo->FKTABELA != '') ? \n \"$nomeCampo = \\\".\\$reg['$nomeCampo'].\\\"\" : \n \"$nomeCampo = '\\\".\\$reg['$nomeCampo'].\\\"'\";\t\t\t\t\n }\n\n if((string)$oCampo->FKTABELA != ''){\n $aValorInsert[] = (preg_match(\"#[dD]ata.*[Cc]adastro#is\", $nomeCampo)) ? \"\\\".\\$oConexao->data_cadastro_padrao.\\\"\" : \"\\\".\\$reg['$nomeCampo'].\\\"\";\n $tabelaFK = ((string)$aTabela['SCHEMA'] != \"\") ? (string)$aTabela['SCHEMA'].\".\".(string)$oCampo->FKTABELA : (string)$oCampo->FKTABELA;\n $aFKJoin[] = \"$tabelaFK \\n\\t\\t\\t\\t\\ton (\".(string)$aTabela['NOME'].\".$nomeCampo = \".(string)$oCampo->FKTABELA.\".\".(string)$oCampo->FKCAMPO.\")\";\n \n $i++;\n }\n else{\n $aValorInsert[] = ((int)$oCampo->CHAVE == 1) ? \n \"\\\".\\$reg['$nomeCampo'].\\\"\" : \n \"'\\\".\\$reg['$nomeCampo'].\\\"'\";\n }\n\n // =========== Montagem dos Campos da Consulta =============\n if((int)$oCampo->CHAVE != 1){\n $aCampoConsulta[] = (string)$aTabela['NOME'].\".$nomeCampo like '\\$valor'\";\n }\t\n }\n # =========== Monta demais valores a serem substituidos ========\n $aCampoInsert = join($aCampoInsert, \",\\n\\t\\t\\t\\t\\t\");\n $aValorInsert = join($aValorInsert, \",\\n\\t\\t\\t\\t\\t\");\n $aCampoUpdate = join($aCampoUpdate, \",\\n\\t\\t\\t\\t\\t\");\n $aChaveWhere = join($aChaveWhere, \" \\n\\t\\t\\t\\t\\tand \");\n $aChaveWhereSel = join($aChaveWhereSel, \" \\n\\t\\t\\t\\t\\tand \");\n $aChaveWhereDel = join($aChaveWhereDel, \" \\n\\t\\t\\t\\t\\tand \");\n $sCampoConsulta = join($aCampoConsulta, \" \\n\\t\\t\\t\\t\\tor \");\n $aChave = join($aChave,\t \",\");\n $aColuna = $this->getCamposSelect((string)$aTabela['NOME']);\n $aColuna = join($aColuna, \",\\n\\t\\t\\t\\t\\t\");\n\n $tabelaJoin = (((string)$aTabela['SCHEMA'] != \"\") ? (string)$aTabela['SCHEMA'].\".\".(string)$aTabela['NOME'] : (string)$aTabela['NOME']);\n\n $sVerificaPK = NULL;\n foreach($aVerificaPK as $v){\n $sVerificaPK .= \"\\t\\t\\$reg['$v'] = (\\$reg['$v'] != '') ? \\$reg['$v'] : \\\"null\\\";\\n\";\n }\n\n if(count($aFKJoin) > 0){\n $tabelaJoin .= \" \\n\\t\\t\\t\\tleft join \".join($aFKJoin,\"\\n\\t\\t\\t\\tleft join \");\n }\n \n $nomeTabela = (((string)$aTabela['SCHEMA'] != \"\") ? (string)$aTabela['SCHEMA'].\".\".(string)$aTabela['NOME'] : (string)$aTabela['NOME']);\n $chavesWhereConsulta = (($sCampoConsulta!='') ? $sCampoConsulta : '1=1');\n $sChaveAltera = (count($aChaveAltera)>0) ? \"if(\".implode(\" || \", $aChaveAltera).\") continue;\" : \"\";\n \n # ======== Substitui todas os parametros pelas variaveis ja processadas ==========\n $copiaModelo = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModelo);\n $copiaModelo = str_replace('%%VERIFICA_PK%%', $sVerificaPK, $copiaModelo);\n $copiaModelo = str_replace('%%OBJETO_CLASSE%%', $objetoClasse, $copiaModelo);\n $copiaModelo = str_replace('%%TABELA%%', $nomeTabela, $copiaModelo);\n $copiaModelo = str_replace('%%CAMPOS_INS%%', $aCampoInsert, $copiaModelo);\n $copiaModelo = str_replace('%%VAL_CAMPOS_INS%%', $aValorInsert, $copiaModelo);\n $copiaModelo = str_replace('%%CAMPOS_UPD%%', $aCampoUpdate, $copiaModelo);\n $copiaModelo = str_replace('%%CHAVES_WHERE%%', $aChaveWhere, $copiaModelo);\n $copiaModelo = str_replace('%%LISTA_CHAVES%%', $aChave, $copiaModelo);\n $copiaModelo = str_replace('%%CHAVES_WHERE_SEL%%', $aChaveWhereSel, $copiaModelo);\n $copiaModelo = str_replace('%%CHAVES_WHERE_DEL%%', $aChaveWhereDel, $copiaModelo);\n $copiaModelo = str_replace('%%TABELA_JOIN%%', $tabelaJoin, $copiaModelo);\n $copiaModelo = str_replace('%%CHAVES_WHERE_CONS%%', $chavesWhereConsulta, $copiaModelo);\n $copiaModelo = str_replace('%%COLUNAS%%', $aColuna, $copiaModelo); //Por Enquanto\n $copiaModelo = str_replace('%%CAMPOS_CHAVE_ALTERAR%%', $sChaveAltera, $copiaModelo);\n \n\n unset($sCampoConsulta);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes/core/bdbase\";\n if(!file_exists($dir)) \n mkdir($dir);\n $fp = fopen(\"$dir/class.$nomeClasse\".\"BDBase.php\",\"w\");\n fputs($fp,$copiaModelo); \n fclose($fp);\n }\n return true;\n }", "function ManejoBD(){\n\t\t$this->BaseDatos = \"instituto\"; # aignar valor a la propiedad $BaseDatos\n\t\t$this->Servidor = \"localhost\"; # aignar valor a la propiedad $Servidor\n\t\t$this->Usuario = \"root\"; # aignar valor a la propiedad $Usuario\n\t\t$this->Clave = \"123456\"; # aignar valor a la propiedad $Clave\n\t}", "public function getDataWithTypeDb() {}", "function Readto()\n {\n $conexion=floopets_BD::Connect();\n $conexion->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n\n $consulta=\"SELECT denuncia.*,tipo_denuncia.* FROM tipo_denuncia INNER JOIN denuncia on tipo_denuncia.td_cod_tipo_denuncia=denuncia.td_cod_tipo_denuncia \";\n // $consulta=\"SELECT * FROM citas WHERE Cod_usu=?\";\n $query=$conexion->prepare($consulta);\n $query->execute(array());\n\n\t$resultado=$query->fetchAll(PDO::FETCH_BOTH);\n\n\tfloopets_BD::Disconnect();\n\n\treturn $resultado;\n }", "function mdatosEjercicios(){\n\t\t$conexion = conexionbasedatos();\n\n\t\t$consulta = \"select FE.IDEJERCICIO, FE.NOMBRE_EJERCICIO, FG.NOMBRE_MUSCULO , FE.NIVEL_EJERCICIO, FE.DESCRIPCION, FE.IDFOTO\n\t\t\t\t\tfrom final_ejercicio FE, final_grupo FG\n\t\t\t\t\twhere FE.MUSCULO = FG.IDGRUPO;\";\n\n\t\tif ($resultado = $conexion->query($consulta)) {\n\t\t\treturn $resultado;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\n\t}", "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 getDatosId_ubi()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'id_ubi'));\n $oDatosCampo->setEtiqueta(_(\"id_ubi\"));\n return $oDatosCampo;\n }", "function getAll(){\r\n $sql \t= \"select * from interpretacao \";\r\n\t\t$rs\t\t= Db::sql($sql, \"Interpretacao::getAll()\");\r\n $out \t= array();\r\n while ($r = mysql_fetch_assoc($rs)) {\r\n $out[] = new Interpretacao($r[\"int_id\"]);\r\n }\r\n return $out;\r\n\t}", "function camposBD(){\n//\t\tSELECT idFactura, nombreTienda AS tienda, fecha, numfactura AS Factura FROM tblfacturas \n//\t\tINNER JOIN tbltiendas ON tbltiendas.idtblTienda = tblfacturas.idtblTienda\n\t\t$fields = array();\n\t\t$fields[] = 'idFactura';\t\n\t\t$fields[] = 'fecha';\t\n\t\t$fields[] = 'tienda';\t\n\t\t$fields[] = 'numFactura';\t\n\t\t/*$fields[] = 'opcion';\t*/\n\t\t/*$fields[] = 'comentario';*/\t\n\t\treturn $fields;\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 datos_software_tipo($id_tipo) {\n\t\t$query = \"SELECT software_tipo.*\n\t\tFROM software_tipo\n\t\tWHERE id_tipo_software = '$id_tipo'\";\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\t$row=mysql_fetch_array($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 $row;\n\t\t}\n\t}", "function __construct(){\n // Mapping con la tabla de EJEDISTANCIA\n $mappingString = '{ \n \"dbConnectionClass\":\"AvalesConnection\",\n \"dbTable\" : \"AVALES\",\n \"attributes\" : {\n \"idAval\" : {\"fiedlName\" : \"ID_AVAL\", \"type\" : \"NUMERIC\", \"onInsert\" : \"NO_INSERT\", \"onUpdate\" : \"NO_UPDATE\"},\n \"nroAval\" : {\"fiedlName\" : \"NRO_AVAL\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"nroExpediente\" : {\"fiedlName\" : \"NRO_EXPEDIENTE\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"nroRegistro\" : {\"fiedlName\" : \"REGISTRO\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"idIngeniero\" : {\"fiedlName\" : \"ID_INGENIERO\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"idTitular\" : {\"fiedlName\" : \"ID_TITULAR\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"idVehiculo\" : {\"fiedlName\" : \"ID_VEHICULO\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"fechaAlta\" : {\"fiedlName\" : \"FECHA_ALTA\", \"type\" : \"DATE\", \"onInsert\" : \"NO_INSERT\", \"onUpdate\" : \"NO_UPDATE\"},\n \"pendiente\" : {\"fiedlName\" : \"PENDIENTE\", \"type\" : \"STRING\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"esAlta\" : {\"fiedlName\" : \"ID_INGENIERO\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"tipoAlta\" : {\"fiedlName\" : \"TIPO_ALTA\", \"type\" : \"STRING\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"codPlanta\" : {\"fiedlName\" : \"COD_PLANTA\", \"type\" : \"STRING\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"fechaFinalizacion\" : {\"fiedlName\" : \"FECHA_FINALIZACION\", \"type\" : \"DATE\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"estadoActual\" : {\"fiedlName\" : \"ESTADO_ACTUAL\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"fotos\" : {\"fiedlName\" : \"FOTOS\", \"type\" : \"STRING\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"porAntiguedad\" : {\"fiedlName\" : \"POR_ANTIGUEDAD\", \"type\" : \"STRING\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"},\n \"idUsuarioFinalizacion\" : {\"fiedlName\" : \"USUARIO_FINALIZACION\", \"type\" : \"NUMERIC\", \"onInsert\" : \"INSERT\", \"onUpdate\" : \"UPDATE\"}\n }\n }';\n\n # Initial Values...\n \n parent::__construct(json_decode($mappingString));\n }", "function ReadAll(){\n\n\t\t//Instanciamos y nos conectamos a la bd\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta = \"SELECT tipo_denuncia.*,denuncia.* FROM denuncia INNER JOIN tipo_denuncia ON denuncia.td_cod_tipo_denuncia=tipo_denuncia.td_cod_tipo_denuncia WHERE denuncia.de_estado='Pendiente'\";\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute();\n\t\t//Devolvemos el resultado en un arreglo\n\t\t//Fetch: es el resultado que arroja la consulta en forma de un vector o matriz segun sea el caso\n\t\t//Para consultar donde arroja mas de un dato el fatch debe ir acompañado con la palabra ALL\n\t\t$resultado = $query->fetchALL(PDO::FETCH_BOTH);\n\t\treturn $resultado;\n\t\tfloopets_BD::Disconnect();\n\t}", "public function __construct(){\n \t\t// Criando Conexão\n \t\t$dsn = 'mysql:dbname=db_padrao;host=localhost;port=3336;';\n \t\t$user = 'root';\n \t\t$password = '';\n\t\t$this->connector = new PDO($dsn, $user, $password);\n\t\t$this->connector->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t$this->connector->exec(\"SET CHARACTER SET utf8\");\n \t\t$retornos = [];\n \t}", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "public function getDados() {\n\n \t/**\n \t * Configurações do período informado.\n \t */\n $oDaoPeriodo = db_utils::getDao(\"periodo\");\n $sSqlDadosPeriodo = $oDaoPeriodo->sql_query_file($this->iCodigoPeriodo);\n $rsPeriodo = db_query($sSqlDadosPeriodo);\n $oDadosPeriodo = db_utils::fieldsMemory($rsPeriodo, 0);\n\n /**\n * Configurações do tipo de instituição da prefeitura ou câmara.\n */\n $oDaoDbConfig = db_utils::getDao(\"db_config\");\n $sWhere = \"codigo in({$this->getInstituicoes()})\";\n $sSqlDbConfig = $oDaoDbConfig->sql_query_file(null, 'db21_tipoinstit', null, $sWhere);\n $rsSqlDbConfig = $oDaoDbConfig->sql_record($sSqlDbConfig);\n $INumRowsDbConfig = $oDaoDbConfig->numrows;\n\n $iLimiteMaximo = 0;\n $iLimitePrudencial = 0;\n $nValorDespesaTotalPessoal = 0;\n $nTotalRCL = 0;\n $lTemPrefeitura = false;\n $lTemCamara = false;\n $lTemMinisterio = false;\n\n /**\n * Verifica o db21_tipoinstit para ver se é prefeitura ou câmara.\n */\n for ($iInd = 0; $iInd < $INumRowsDbConfig; $iInd++) {\n\n $oMunicipio = db_utils::fieldsMemory($rsSqlDbConfig, $iInd);\n\n if ($oMunicipio->db21_tipoinstit == 1) {\n $lTemPrefeitura = true;\n } else if ($oMunicipio->db21_tipoinstit == 2) {\n $lTemCamara = true;\n } else if ($oMunicipio->db21_tipoinstit == 101) {\n \t$lTemMinisterio = true;\n }\n }\n\n /**\n * Verifica o limite máximo (incisos I, II e III, art. 20 da LRF) {$iLimiteMaximo}%\n */\n if ($lTemPrefeitura == true && $lTemCamara == true) {\n\n if ($iLimiteMaximo == 0){\n $iLimiteMaximo = 60;\n $iLimiteMaximoAlerta = 54;\n\n }\n } else if ($lTemPrefeitura == true && $lTemCamara == false) {\n\n if ($iLimiteMaximo == 0) {\n\n $iLimiteMaximo = 54;\n $iLimiteMaximoAlerta = 48.6;\n }\n } else if ($lTemPrefeitura == false && $lTemCamara == true) {\n\n if ($iLimiteMaximo == 0) {\n $iLimiteMaximo = 6;\n $iLimiteMaximoAlerta = 5.4;\n }\n } else if ($lTemMinisterio) {\n\n if ($iLimiteMaximo == 0) {\n $iLimiteMaximo = 2;\n }\n }\n\n /**\n * Verifica o limite prudencial (parágrafo único, art. 22 da LRF) {$iLimitePrudencial}%\n */\n if ($iLimitePrudencial == 0) {\n $iLimitePrudencial = $iLimiteMaximo*95/100;\n }\n\n /**\n * Quadro de despesa bruta.\n */\n $oDespesaBruta = new stdClass();\n $oDespesaBruta->quadrodescricao = 'DESPESA BRUTA COM PESSOAL (I)';\n $oDespesaBruta->exercicio = 0;\n $oDespesaBruta->inscritas = 0;\n $oDespesaBruta->linhas = array();\n $oDespesaBruta->colunameses = $this->getDadosColuna();\n $oDespesaBruta->valorapurado = 0;\n $oDespesaBruta->percentuallimite = 0;\n $oDespesaBruta->linhatotalizadora = true;\n\n /**\n * Quadro de despesa não computadas.\n */\n $oDespesaNaoComputada = new stdClass();\n $oDespesaNaoComputada->quadrodescricao = 'DESPESAS NÃO COMPUTADAS (§ 1o do art. 19 da LRF) (II)';\n $oDespesaNaoComputada->exercicio = 0;\n $oDespesaNaoComputada->inscritas = 0;\n $oDespesaNaoComputada->linhas = array();\n $oDespesaNaoComputada->colunameses = $this->getDadosColuna();\n $oDespesaNaoComputada->valorapurado = 0;\n $oDespesaNaoComputada->percentuallimite = 0;\n $oDespesaNaoComputada->linhatotalizadora = true;\n\n /**\n * Quadro de despesa líquida.\n */\n $oDespesaLiquida = new stdClass();\n $oDespesaLiquida->quadrodescricao = 'DESPESA LÍQUIDA COM PESSOAL (III) = (I - II)';\n $oDespesaLiquida->exercicio = 0;\n $oDespesaLiquida->inscritas = 0;\n $oDespesaLiquida->linhas = array();\n $oDespesaLiquida->colunameses = $this->getDadosColuna();\n $oDespesaLiquida->valorapurado = 0;\n $oDespesaLiquida->percentuallimite = 0;\n $oDespesaLiquida->linhatotalizadora = true;\n\n /**\n * Quadro de despesa total com pessoal.\n */\n $oDespesaTotalComPessoal = new stdClass();\n $oDespesaTotalComPessoal->quadrodescricao = 'DESPESA TOTAL COM PESSOAL - DTP(V) = (IIIa + IIIb)';\n $oDespesaTotalComPessoal->exercicio = 0;\n $oDespesaTotalComPessoal->inscritas = 0;\n $oDespesaTotalComPessoal->linhas = array();\n $oDespesaTotalComPessoal->colunameses = array();\n $oDespesaTotalComPessoal->valorapurado = 0;\n $oDespesaTotalComPessoal->percentuallimite = 0;\n $oDespesaTotalComPessoal->linhatotalizadora = true;\n $oDespesaTotalComPessoal->percentualsobrercl = 0;\n\n /**\n * Quadro de receita corrente líquida.\n */\n $oReceitaTotalCorrenteLiquida = new stdClass();\n $oReceitaTotalCorrenteLiquida->quadrodescricao = 'RECEITA CORRENTE LÍQUIDA - RCL (IV)';\n $oReceitaTotalCorrenteLiquida->exercicio = 0;\n $oReceitaTotalCorrenteLiquida->inscritas = 0;\n $oReceitaTotalCorrenteLiquida->linhas = array();\n $oReceitaTotalCorrenteLiquida->colunameses = array();\n $oReceitaTotalCorrenteLiquida->valorapurado = 0;\n $oReceitaTotalCorrenteLiquida->percentuallimite = 0;\n $oReceitaTotalCorrenteLiquida->linhatotalizadora = false;\n\n /**\n * Quadro de despesa total com pessoal sem a RCL.\n */\n $oDespesaTotalComPessoalSemRCL = new stdClass();\n $oDespesaTotalComPessoalSemRCL->quadrodescricao = 'DESPESA TOTAL COM PESSOAL - DTP (V) = (III a + III b)';\n $oDespesaTotalComPessoalSemRCL->exercicio = 0;\n $oDespesaTotalComPessoalSemRCL->inscritas = 0;\n $oDespesaTotalComPessoalSemRCL->linhas = array();\n $oDespesaTotalComPessoalSemRCL->colunameses = array();\n $oDespesaTotalComPessoalSemRCL->valorapurado = 0;\n $oDespesaTotalComPessoalSemRCL->percentuallimite = 0;\n $oDespesaTotalComPessoalSemRCL->linhatotalizadora = false;\n\n /**\n * Quadro de limite máximo.\n */\n $oLimiteMaximo = new stdClass();\n $oLimiteMaximo->quadrodescricao = 'LIMITE MÁXIMO (VI) (incisos I, II e III, art. 20 da LRF)';\n $oLimiteMaximo->exercicio = 0;\n $oLimiteMaximo->inscritas = 0;\n $oLimiteMaximo->linhas = array();\n $oLimiteMaximo->colunameses = array();\n $oLimiteMaximo->valorapurado = 0;\n $oLimiteMaximo->percentuallimite = 0;\n $oLimiteMaximo->linhatotalizadora = false;\n\n /**\n * Quadro de limite prudencial.\n */\n $oLimitePrudencial = new stdClass();\n $oLimitePrudencial->quadrodescricao = 'LIMITE PRUDENCIAL (VII) = (0,95 x VI) (parágrafo único do art. 22 da LRF)';\n $oLimitePrudencial->exercicio = 0;\n $oLimitePrudencial->inscritas = 0;\n $oLimitePrudencial->linhas = array();\n $oLimitePrudencial->colunameses = array();\n $oLimitePrudencial->valorapurado = 0;\n $oLimitePrudencial->percentuallimite = 0;\n $oLimitePrudencial->linhatotalizadora = false;\n\n $oLimiteAlerta = new stdClass();\n $oLimiteAlerta->quadrodescricao = 'LIMITE DE ALERTA (VIII) = (0,90 x VI) (inciso II do §1º do art. 59 da LRF)';\n $oLimiteAlerta->exercicio = 0;\n $oLimiteAlerta->inscritas = 0;\n $oLimiteAlerta->linhas = array();\n $oLimiteAlerta->colunameses = array();\n $oLimiteAlerta->valorapurado = 0;\n $oLimiteAlerta->percentuallimite = 0;\n $oLimiteAlerta->linhatotalizadora = false;\n\n $aDadosMeses = $this->getDadosColuna();\n /**\n * Percorremos as linhas cadastradas no relatorio, e adicionamos os valores cadastrados manualmente.\n */\n $aLinhasRelatorio = $this->oRelatorioLegal->getLinhasCompleto();\n for ($iLinha = 1; $iLinha <= 7; $iLinha++) {\n\n $aLinhasRelatorio[$iLinha]->setPeriodo($this->iCodigoPeriodo);\n $aColunasRelatorio = $aLinhasRelatorio[$iLinha]->getCols($this->iCodigoPeriodo);\n\n /**\n * Monta o Object com os dados de cada linha interna do relatório.\n */\n $oLinha = new stdClass();\n switch ($iLinha) {\n\n \tcase 1:\n \t $sDescricao = ' Pessoal Ativo';\n \t break;\n\n case 2:\n $sDescricao = ' Pessoal Inativo e Pensionistas';\n break;\n\n case 3:\n $sDescricao = ' Outras despesas de pessoal decorrentes de contratos de terceirização (§ 1º do art. 18 da LRF)';\n break;\n\n case 4:\n $sDescricao = ' Indenizações por Demissão e Incentivos à Demissão Voluntária';\n break;\n\n case 5:\n $sDescricao = ' Decorrentes de Decisão Judicial de período anterior ao da apuração';\n break;\n\n case 6:\n $sDescricao = ' Despesas de Exercícios Anteriores de período anterior ao da apuração';\n break;\n\n case 7:\n $sDescricao = ' Inativos e Pensionistas com Recursos Vinculados';\n break;\n }\n\n $oLinha->descricao = $sDescricao;\n $oLinha->inscritas = 0;\n $oLinha->exercicio = 0;\n $oLinha->colunameses = $this->getDadosColuna();\n $oParametros = $aLinhasRelatorio[$iLinha]->getParametros($this->iAnoUsu,\n $this->getInstituicoes());\n /**\n * Verifica nas configurações se possui valores configurados por linha.\n */\n $aValoresColunasLinhas = $aLinhasRelatorio[$iLinha]->getValoresColunas(null, null,\n $this->getInstituicoes(),\n $this->iAnoUsu);\n foreach($aValoresColunasLinhas as $oValor) {\n\n \tif (isset($oLinha->colunameses[$oValor->colunas[0]->o117_valor])) {\n\n $oLinha->colunameses[$oValor->colunas[0]->o117_valor]->nValor += $oValor->colunas[1]->o117_valor;\n $oLinha->exercicio += $oValor->colunas[1]->o117_valor;\n $oLinha->inscritas += $oValor->colunas[2]->o117_valor;\n }\n }\n\n /**\n * Percore as colunas do período dos últimos 12 mêses.\n */\n foreach ($oLinha->colunameses as $sChaveMes => $oDadosMes) {\n\n \t/**\n \t * Informa as datas inicial e final do período.\n \t */\n $sDataInicialPeriodo = \"{$oDadosMes->iAno}-{$oDadosMes->iMes}-01\";\n $sDataFinalPeriodo = \"{$oDadosMes->iAno}-{$oDadosMes->iMes}-{$oDadosMes->iDiaFim}\";\n\n /**\n * Executa o saldo da dotação.\n */\n $sWhereDespesa = \"o58_instit in ({$this->getInstituicoes()})\";\n $rsDespesa = db_dotacaosaldo(8, 2, 3, true, $sWhereDespesa, $oDadosMes->iAno,\n $sDataInicialPeriodo, $sDataFinalPeriodo);\n\n /**\n * Verifica o saldo das contas por linha e mês do relatório\n */\n for ($iDespesa = 0; $iDespesa < pg_numrows($rsDespesa); $iDespesa++) {\n\n $oDespesa = db_utils::fieldsmemory($rsDespesa, $iDespesa);\n\n /**\n * Percorre as contas configuradas.\n */\n foreach ($oParametros->contas as $oConta) {\n\n $oVerificacao = $aLinhasRelatorio[$iLinha]->match($oConta, $oParametros->orcamento, $oDespesa, 2);\n if ($oVerificacao->match) {\n\n $oDespesaValores = clone $oDespesa;\n if ($oVerificacao->exclusao) {\n\n /**\n * Somas apenas os valor liquidados.\n */\n $oDespesaValores->liquidado *= -1;\n\n /**\n * Soma os demais valores\n */\n $oDespesaValores->liquidado_acumulado *= -1;\n $oDespesaValores->empenhado_acumulado *= -1;\n $oDespesaValores->anulado_acumulado *= -1;\n }\n\n $oLinha->colunameses[$sChaveMes]->nValor += $oDespesaValores->liquidado;\n $oLinha->exercicio += $oDespesaValores->liquidado;\n\n /**\n * Verifica totalização das inscritas do último período.\n */\n if ($oDadosPeriodo->o114_sigla == \"3Q\" || $oDadosPeriodo->o114_sigla == \"2S\"\n || $oDadosPeriodo->o114_sigla == \"DEZ\") {\n\n $aChaveMesColunaMeses = array_keys($oLinha->colunameses);\n if (trim($aChaveMesColunaMeses[11]) == trim($sChaveMes)) {\n\n $oLinha->inscritas += round(\n $oDespesaValores->empenhado_acumulado -\n $oDespesaValores->anulado_acumulado -\n $oDespesaValores->liquidado_acumulado, 2);\n }\n }\n }\n }\n }\n }\n\n /**\n * Monta as linhas dos quadros do demostrativo.\n */\n if ($iLinha <= 3) {\n $oDespesaBruta->linhas[$iLinha] = $oLinha;\n } else if ($iLinha >= 4) {\n $oDespesaNaoComputada->linhas[$iLinha] = $oLinha;\n }\n }\n\n /*\n * Calcula linhas totalizadoras da despesa bruta.\n */\n foreach ($oDespesaBruta->linhas as $oDadosLinhaDespesaBruta) {\n\n $oDespesaBruta->inscritas += $oDadosLinhaDespesaBruta->inscritas;\n $oDespesaBruta->exercicio += $oDadosLinhaDespesaBruta->exercicio;\n foreach ($oDadosLinhaDespesaBruta->colunameses as $sChaveMesDespesaBruta => $oDadosMesDespesaBruta) {\n\n \tif (isset($oDespesaBruta->colunameses[$sChaveMesDespesaBruta])) {\n $oDespesaBruta->colunameses[$sChaveMesDespesaBruta]->nValor += $oDadosMesDespesaBruta->nValor;\n \t}\n }\n }\n\n /**\n * Calcula linhas totalizadoras da despesa não computada.\n */\n foreach ($oDespesaNaoComputada->linhas as $oDadosLinhaDespesaNaoComputada) {\n\n $oDespesaNaoComputada->inscritas += $oDadosLinhaDespesaNaoComputada->inscritas;\n $oDespesaNaoComputada->exercicio += $oDadosLinhaDespesaNaoComputada->exercicio;\n foreach ($oDadosLinhaDespesaNaoComputada->colunameses as $sChaveMesDespesaNaoComputada\n => $oDadosMesDespesaNaoComputada) {\n\n if (isset($oDespesaNaoComputada->colunameses[$sChaveMesDespesaNaoComputada])) {\n $oDespesaNaoComputada->colunameses[$sChaveMesDespesaNaoComputada]\n ->nValor += $oDadosMesDespesaNaoComputada->nValor;\n }\n }\n }\n\n /**\n * Calcula linhas totalizadoras da despesa liquída.\n */\n $oDespesaLiquida->inscritas = ($oDespesaBruta->inscritas - $oDespesaNaoComputada->inscritas);\n $oDespesaLiquida->exercicio = ($oDespesaBruta->exercicio - $oDespesaNaoComputada->exercicio);\n foreach ($oDespesaLiquida->colunameses as $sChaveMesDespesaLiquida => $oDadosMesDespesaLiquida) {\n\n \tif (isset($oDespesaLiquida->colunameses[$sChaveMesDespesaLiquida])) {\n \t\t$oDespesaLiquida->colunameses[$sChaveMesDespesaLiquida]->nValor = ( $oDespesaBruta\n \t\t ->colunameses[$sChaveMesDespesaLiquida]\n \t\t ->nValor\n \t\t - $oDespesaNaoComputada\n \t\t ->colunameses[$sChaveMesDespesaLiquida]\n \t\t ->nValor );\n \t}\n }\n\n /**\n * Verifica valor RCL nas configurações da linha 8.\n */\n $aLinhasRelatorio[8]->setPeriodo($this->iCodigoPeriodo);\n $aValoresColunasLinhas = $aLinhasRelatorio[8]->getValoresColunas(null, null,\n $this->getInstituicoes(),\n $this->iAnoUsu);\n foreach($aValoresColunasLinhas as $oValor) {\n\n if (isset($oValor->colunas[0]->o117_valor)) {\n $nTotalRCL += $oValor->colunas[0]->o117_valor;\n }\n }\n\n if ($nTotalRCL == 0) {\n /**\n * Para o cálculo da RCL, a base de cálculo\n * deve ser feita por todas as instituições.\n */\n $rsInstituicoes = db_query(\"SELECT codigo FROM db_config;\");\n $oInstituicoes = db_utils::getCollectionByRecord($rsInstituicoes);\n $aInstituicoes = array();\n foreach ($oInstituicoes as $oInstituicao){\n $aInstituicoes[]= $oInstituicao->codigo;\n }\n $sInstituicoes = implode(\",\",$aInstituicoes);\n\n\t /**\n\t * Calcula RCL - duplicaReceitaaCorrenteLiquida.\n\t */\n $dtInicialAnterior = ($this->iAnoUsu-1).\"-01-01\";\n $dtFinalAnterior = ($this->iAnoUsu-1).\"-12-31\";\n\n duplicaReceitaaCorrenteLiquida($this->iAnoUsu, 81);\n\n $nTotalRCL += calcula_rcl2($this->iAnoUsu, $this->getDataInicial()->getDate(), $this->getDataFinal()->getDate(),\n $sInstituicoes, false, 81);\n $nTotalRCL += calcula_rcl2(($this->iAnoUsu-1), $dtInicialAnterior, $dtFinalAnterior,\n $sInstituicoes, false, 81, $this->getDataFinal()->getDate());\n }\n\n $nValorDespesaTotalPessoal = ($oDespesaLiquida->exercicio + $oDespesaLiquida->inscritas);\n\n /**\n * Verifica valor % despesa total com pessoal - DTP sobre a RCL (VI)=(IV/V)*100.\n */\n if ($nTotalRCL > 0) {\n $nValorDesepesaTotalPessoalSobreRCL = ($nValorDespesaTotalPessoal/$nTotalRCL)*100;\n } else {\n $nValorDesepesaTotalPessoalSobreRCL = 0;\n }\n\n $nPercentualDespesaPessoalSobreRcl = 0;\n if ($nTotalRCL > 0) {\n $nPercentualDespesaPessoalSobreRcl = ($nValorDespesaTotalPessoal * 100) / $nTotalRCL;\n }\n\n /**\n * Soma valores totail do limite maximo (incisos I, II e III, art. 20 da LRF) e\n * do limite prudencial (parágrafo único, art. 22 da LRF).\n */\n $nValorLimiteMaximo = (($nTotalRCL + 0) * $iLimiteMaximo) / 100;\n $nValorLimitePrudencial = (($nTotalRCL + 0) * $iLimitePrudencial) / 100;\n $nValorLimiteAlerta = (($nTotalRCL + 0) * $iLimiteMaximoAlerta) / 100;\n\n $oDespesaTotalComPessoal->valorapurado = $nValorDespesaTotalPessoal;\n $oDespesaTotalComPessoal->percentualsobrercl = $nPercentualDespesaPessoalSobreRcl;\n $oReceitaTotalCorrenteLiquida->valorapurado = $nTotalRCL;\n $oDespesaTotalComPessoalSemRCL->valorapurado = $nValorDesepesaTotalPessoalSobreRCL;\n $oLimiteMaximo->percentuallimite = $iLimiteMaximo;\n $oLimiteMaximo->valorapurado = $nValorLimiteMaximo;\n $oLimitePrudencial->percentuallimite = $iLimitePrudencial;\n $oLimitePrudencial->valorapurado = $nValorLimitePrudencial;\n\n $oLimiteAlerta->percentuallimite = $iLimiteMaximoAlerta;\n $oLimiteAlerta->valorapurado = $nValorLimiteAlerta;\n\n /**\n * Monta Object para retorno com todos os dados por quadro informado.\n */\n $oRetorno = new stdClass();\n $oRetorno->quadrodespesabruta = $oDespesaBruta;\n $oRetorno->quadrodespesanaocomputadas = $oDespesaNaoComputada;\n $oRetorno->quadrodespesaliquida = $oDespesaLiquida;\n $oRetorno->quadrodespesatotalcompessoal = $oDespesaTotalComPessoal;\n $oRetorno->quadroreceitatotalcorrenteliquida = $oReceitaTotalCorrenteLiquida;\n $oRetorno->quadrodespesatotalcompessoalsemrcl = $oDespesaTotalComPessoalSemRCL;\n $oRetorno->quadrolimitemaximo = $oLimiteMaximo;\n $oRetorno->quadrolimiteprudencial = $oLimitePrudencial;\n $oRetorno->quadrolimitealerta = $oLimiteAlerta;\n\n unset($aLinhasRelatorio);\n\n $this->oDados = $oRetorno;\n return $this->oDados;\n }", "public function run()\n {\n foreach($this->identification_types as $shortcut => $text){\n $create_identification_type = new TipoIdentificacion;\n $create_identification_type->abreviatura = $shortcut;\n $create_identification_type->nombre = $text;\n $create_identification_type->save();\n }\n foreach ($this->roles as $rol) {\n $modeloRol = new Rol;\n $modeloRol->nombre = $rol;\n $modeloRol->save();\n }\n foreach ($this->modulos as $nombre) {\n $modulo = new Modulo;\n $modulo->nombre = $nombre;\n $modulo->save();\n foreach ($this->permisos as $p) {\n $permiso = new Permiso;\n $permiso->id_modulo = $modulo->id_modulo;\n $permiso->clave = $p.'_'.$modulo->nombre;\n $permiso->descripcion = 'puede '.$p.' en '.$modulo->nombre;\n $permiso->save();\n }\n }\n foreach($this->roles as $g){\n $grupo = new Grupo;\n $grupo->nombre = $g;\n $grupo->save();\n }\n /**\n * Codigo ciiu\n */\n $data_ciiu = Storage::get('CIIU.json');\n\n $ciiu = json_decode($data_ciiu, true);\n\n foreach($ciiu as $codigo_seccion => $def_seccion){\n $id_seccion = DB::table('ciiu_secciones')->insertGetId(\n [\n 'descripcion' => $def_seccion['titulo'],\n 'codigo' => $codigo_seccion\n ]\n ); \n foreach($def_seccion['divisiones'] as $cod_div => $def_div){\n $id_division = DB::table('ciiu_divisiones')->insertGetId(\n [\n 'id_seccion' => $id_seccion,\n 'descripcion' => $def_div['titulo'],\n 'codigo' => $cod_div\n ]\n ); \n foreach ($def_div['grupos'] as $cod_grupo => $def_grupo) {\n $id_grupo = DB::table('ciiu_grupos')->insertGetId(\n [\n 'id_division' => $id_division,\n 'descripcion' => $def_grupo['titulo'],\n 'codigo' => $cod_grupo\n ]\n ); \n foreach ($def_grupo['actividades'] as $cod_clase => $def_clase) {\n DB::table('ciiu_clases')->insertGetId(\n [\n 'id_grupo' => $id_grupo,\n 'descripcion' => $def_clase,\n 'codigo' => $cod_clase\n ]\n ); \n }\n }\n\n }\n }\n $this->call([\n AdministradorSeeder::class\n ]);\n }", "function datos_internacionalizacion() {\n\t\t$query = \"SELECT * FROM internacionalizacion\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t\n\t\t$result = mysql_query($query);\n\t\t$numrows = mysql_num_rows($result);\n\n\t\tif ($numrows == 0) {\n\t\t\tmysql_close($connection);\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\tmysql_close($connection);\n\t\t\treturn $result;\n\t\t}\n\t}", "function datos_tipo_palabra($id_tipo) {\n\t\t/*$query = \"SELECT tipos_imagen.*\n\t\tFROM tipos_imagen\";*/\n\n\t\t$query = \"SELECT tipos_palabra.*\n\t\tFROM tipos_palabra\n\t\tWHERE id_tipo_palabra='$id_tipo'\";\n\t\t\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\t$row= mysql_fetch_array($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 $row;\n\t\t}\n\t}", "public function get_datos_basededatos($idbd){\n $listar = $this->pdo->prepare(\"SELECT * FROM pa_base_datos WHERE id = \".$idbd);\n $listar->execute();\n return $listar;\n \t}", "public function obtenerViajesplus();", "function tiene_dao($id_desig){\n $sql=\"select * from designacion where id_designacion=$id_desig and id_departamento is not null and id_area is not null and id_orientacion is not null\";\n $res=toba::db('designa')->consultar($sql);\n if(count($res)>0){\n return 1;\n }else{\n return 0;\n }\n }", "public function idDefinitivo($tipo,$id){\n $iddef=0;\n $objA=new admonDAO(); //direcionador =1 mandar a admon\n $objM=new medicoDAO(); //direcionar=2 mandar a medico\n $objP=new pacienteDAO(); //direccionar=3 mandar a paciente\n $resul1=$objA->readOneById($id); //error en datos\n $resul2=$objM->readOneById($id);\n $resul3=$objP->readOneById($id);\n \n if($tipo==1){\n for($i=0;$i<count($resul1);$i++){\n $iddef=$resul1[$i]['id_admon'];\n }\n }\n if($tipo==2){\n for($i=0;$i<count($resul2);$i++){\n $iddef=$resul2[$i]['id_medico'];\n }\n }\n if($tipo==3){\n for($i=0;$i<count($resul3);$i++){\n $iddef=$resul3[$i]['id_paciente'];\n }\n }\n \n return $iddef;\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 }", "public static function invoque(){\n\t\t/*vars*/\n\t\t$host='';\n\t\t$login='';\n\t\t$pwd='';\n\t\t$db='';\n\t\t\n\t\t/*var à changer avant le portage ailleurs*/\n\t\t$portage=\"localhost\";\n\t\t\n\t\t/*hydratation*/\n\t\tswitch($portage){\n\t\t\tcase 'localhost':\n\t\t\t\t$host='localhost';\n\t\t\t\t$login='root';\n\t\t\t\t$db='BLOG';\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t/*retour*/\n\t\treturn self::construit($host, $login, $pwd, $db);\n\t}", "public function serialize() {\n\n // pega o mapeamentp\n $mapping = $this->mapping;\n\n // verifica se existe\n if ( !$mapping ) return;\n\n // seta os dados\n $data = [];\n foreach( $mapping as $atributo => $colunaTabela ) {\n $data[$colunaTabela] = $this->$atributo;\n }\n\n // volta os dados\n return $data;\n }", "function fetchDiario() {\n\n $diarios = array();\n\n $con = new DB();\n $sql = $con->prepare(\"SELECT * FROM diario\");\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 $diario = new Diario($id, $nombre, $descripcion, $id_usuario);\n array_push($diarios, $diario);\n }\n\n return $diarios;\n }", "function listado_temas_idiomas($idioma) {\n\n\t\t$query = \"SELECT * FROM temas ORDER BY tema_$idioma\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\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);\t\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 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function devuelveArrayBarrioCiudad($id, $tipo) {\n $sql = \"SELECT idpiso, descripcion, calle, numero, piso, letra, cp FROM pisos \";\n if ($tipo == \"barrio\") {\n $sql = $sql . \" WHERE idbarrio = '\".$id.\"' INNER JOIN barrios on pisos.idbarrio = barrios.idbarrio\";\n } elseif ($tipo == \"ciudad\") {\n $sql = $sql . \" WHERE idlocalizacion = '\".$id.\"' INNER JOIN localizaciones on pisos.idlocalizcion = localizaciones.idlocalizacion\";\n } else {\n return false;\n }\n\t\treturn $sql;\n }", "function cargar_autonomo()\n\t{\n\t\ttoba_logger::instancia()->debug( \"Cargando PROYECTO {$this->identificador}\");\n\t\t$errores = array();\n\t\ttry {\n\t\t\t$this->db->abrir_transaccion();\n\t\t\t$this->db->retrasar_constraints();\n\t\t\t$errores = $this->cargar();\n\t\t\t$this->instancia->actualizar_secuencias();\n\t\t\t$this->generar_roles_db();\n\t\t\t$this->db->cerrar_transaccion();\n\t\t} catch ( toba_error $e ) {\n\t\t\t$this->db->abortar_transaccion();\n\t\t\tthrow $e;\n\t\t}\n\t\treturn $errores;\n\t}", "function getComentarios(){\n $this->bd->setConsulta(\"select * from comentario\");\n $comentario = array();\n $i=0;\n while ($fila = $this->bd->getFila()){\n $comentario[$i] = new Comentario($fila[\"id\"], $fila[\"descripcion\"],$fila[\"fechacreacion\"],$fila[\"idEntrada\"],$fila[\"idUsuario\"]);\n $i++;\n }\n return $comentario;\n }", "function getModos() {\n // arreglo para la determinacion del tipo de la tabla \n // 1 si se les puede agregar registros 0 si no se puede\n $modos['departamento'] = 1;\n $modos['departamento_region'] = 1;\n $modos['municipio'] = 1;\n $modos['operador'] = 1;\n $modos['pais'] = 1;\n $modos['ciudad'] = 1;\n $modos['familias'] = 1;\n $modos['monedas'] = 1;\n $modos['cuenta'] = 1;\n $modos['cuentas_financiero'] = 1;\n $modos['cuentas_financiero_ut'] = 1;\n $modos['cuentas_financiero_tipo'] = 1;\n $modos['extracto_movimiento'] = 1;\n $modos['centropoblado'] = 1;\n $modos['encuesta_tipo'] = 1;\n $modos['actividades_tipo'] = 1;\n $modos['tipohallazgo'] = 1;\n return $modos;\n }", "public function __construct(){\n\t\t//Invocar el constructor del padre\n\t\tparent::__construct();\n\t\tFactoriaDAO::setTipoBaseDatos(\"MySQL\");\n\t}", "function datos_material_tipo($id_tipo) {\n\t\t$query = \"SELECT material_tipo.*\n\t\tFROM material_tipo\n\t\tWHERE id_tipo_material = '$id_tipo'\";\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\t$row=mysql_fetch_array($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 $row;\n\t\t}\n\t}", "function getAllDatos()\n\t\t\t{\n\t\t\t\t$datos=array(\n\t\t\t\t\"id\"=>$this->id,\n\t\t\t\t\"dni\"=>$this->dni,\n\t\t\t\t\"nombres\"=>$this->nombres,\n\t\t\t\t\"apellidos\"=>$this->apellidos,\n\t\t\t\t\"nombre_empresa\"=>$this->nombre_empresa,\n\t\t\t\t\"id_area\"=>$this->id_area,\n\t\t\t\t\"nombre_area\"=>$this->nombre_area,\n\t\t\t\t\"id_cargo\"=>$this->id_cargo,\n\t\t\t\t\"nombre_cargo\"=>$this->nombre_cargo,\n\t\t\t\t\"activo\"=>$this->activo,\n\t\t\t\t\"correo\"=>$this->correo,\n\t\t\t\t\"password\"=>$this->password);\n\t\t\t\treturn $datos;\n\n\t\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}", "static public function obtenerPaises ()\n {\n $bd = GestorMySQL::obtenerInstancia();\n\n $consulta = \"SELECT id, pais FROM paises ORDER BY pais\";\n\n return $bd->obtener($consulta, 'id');\n }", "function datos_eu_tipo($id_tipo) {\n\t\t$query = \"SELECT eu_tipo.*\n\t\tFROM eu_tipo\n\t\tWHERE id_tipo_eu = '$id_tipo'\";\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\t$row=mysql_fetch_array($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 $row;\n\t\t}\n\t}", "public function findAll(){\n //recupere le nom de la classe et le formate\n $table = strtolower(get_class($this));\n\n //Prepare la requete\n $query = \"SELECT * FROM $table\";\n $results = $this->conn->prepare($query);\n\n //Execution requete et stockage resultats dans une variable\n $results->execute();\n $resultats = $results->fetchAll(PDO::FETCH_ASSOC);\n return $resultats;\n }", "function getDatosId_situacion()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'id_situacion'));\n $oDatosCampo->setEtiqueta(_(\"id_situacion\"));\n return $oDatosCampo;\n }", "function getDatosId_situacion()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'id_situacion'));\n $oDatosCampo->setEtiqueta(_(\"id_situacion\"));\n return $oDatosCampo;\n }", "function allinea_db() {\r\n\t\t\r\n\t\t$in=$this->session_vars;\r\n\t\t$conn=$this->conn;\r\n\t\t$service=$this->service;\r\n\t\t$tb_exist = false;\r\n\t\t$str_synonym=\"select * from USER_SYNONYMS where synonym_name='\" . $this->form ['TABLE'] . \"'\";\r\n\t\t$sql = new query ( $conn );\r\n\t\t$sql->set_sql ( $str_synonym );\r\n\t\t$sql->exec ();//non richiede binding\r\n\t\t$sql->get_row();\r\n\t\tif($sql->row['TABLE_NAME']!='') $this->form ['TABLE']=$sql->row['TABLE_NAME'];\r\n\t\t$query = \"select column_name from user_col_comments where table_name='\" . $this->form ['TABLE'] . \"'\";\r\n\t\t$sql = new query ( $conn );\r\n\t\t$sql->set_sql ( $query );\r\n\t\t$sql->exec ();//non richiede binding\r\n\t\t$all_field_exist = true;\r\n\t\tforeach ( $this->fields as $key => $val ) {\r\n\t\t\tif (isset ( $val ['TYPE'] ) && $val ['TYPE'] != '')\r\n\t\t\t$field_type = \"field_{$val['TYPE']}\";\r\n\t\t\telse\r\n\t\t\t$field_type = \"field\";\r\n\t\t\t\r\n\t\t\tif ($this->config_service['field_lib'] != '' && file_exists ( $this->config_service['field_lib'] . $field_type . \".inc\" )) {\r\n\t\t\t\tinclude_once $this->config_service['field_lib'] . $field_type . \".inc\";\r\n\t\t\t} else\r\n\t\t\tinclude_once \"{$field_type}.inc\";\r\n\t\t\t$this->no_field_value_by_tb=true;\r\n\t\t\t$field_obj = new $field_type ( $this, $key, $this->conn, $this->tb_vals, $this->session_vars, $this->service, $this->errors);\r\n\t\t\t$this->no_field_value_by_tb=false;\r\n\t\t\t$allinea_stmt [$key] = $field_obj->allinea_db ();\r\n\t\t\tif ($field_obj->attributes ['PK'] == 'yes') {\r\n\t\t\t\t$sql_pk_fields .= \"{$field_obj->attributes['VAR']},\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$sql_pk_fields = rtrim ( $sql_pk_fields, \",\" );\r\n\t\tif ($sql->numrows > 0) {\r\n\t\t\t$tb_exist = true;\r\n\t\t\t$i = 0;\r\n\t\t\twhile ( $sql->get_row () ) {\r\n\t\t\t\t$res [$i] = $sql->row ['COLUMN_NAME'];\r\n\t\t\t\t$i ++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($tb_exist) {\r\n\t\t\t$sql_pk = null;\r\n\t\t\t$c = 0;\r\n\t\t\t$all_field_exist = true;\r\n\t\t\tforeach ( $allinea_stmt as $key => $val ) {\r\n\t\t\t\tif ($val != '') {\r\n\t\t\t\t\t$field_exist = false;\r\n\t\t\t\t\tforeach ( $val as $vk => $vval ) {\r\n\t\t\t\t\t\t$nome_campo = explode ( \" \", $vval );\r\n\t\t\t\t\t\t$field_exist [$key] [$vk] = false;\r\n\t\t\t\t\t\tforeach ( $res as $key_res => $val_res ) {\r\n\t\t\t\t\t\t\tif ($val_res == $nome_campo [0] || $nome_campo [0] == '') {\r\n\t\t\t\t\t\t\t\t$field_exist [$key] [$vk] = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tforeach ( $field_exist as $key1 => $val1 ) {\r\n\t\t\t\t\t\tforeach ( $val1 as $vk => $boolval )\r\n\t\t\t\t\t\tif (! $boolval) {\r\n\t\t\t\t\t\t\t$all_field_exist = false;\r\n\t\t\t\t\t\t\t$index = (count ( $this->fields ) * $vk) + $key;\r\n//\t\t\t\t\t\t\t$eq_sql_str [$index] = \"alter table EQ_\" . $this->form ['TABLE'] . \" add {$allinea_stmt[$key][$vk]}\";\r\n\t\t\t\t\t\t\t$s_sql_str [$index] = \"alter table S_\" . $this->form ['TABLE'] . \" add {$allinea_stmt[$key][$vk]}\";\r\n\t\t\t\t\t\t\t$sql_str [$index] = \"alter table \" . $this->form ['TABLE'] . \" add {$allinea_stmt[$key][$vk]}\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$sql_pk_drop = \"alter table \" . $this->form ['TABLE'] . \" drop constraint PK_\" . $this->form ['TABLE'] . \" cascade\";\r\n\t\t\t$sql_pk = \"alter table \" . $this->form ['TABLE'] . \" add constraint PK_\" . $this->form ['TABLE'] . \" primary key ($sql_pk_fields)\";\r\n\t\t\t$sql_fk_coord_drop = \"alter table \" . $this->form ['TABLE'] . \" drop constraint FK_\" . $this->form ['TABLE'] . \"_COORD cascade\";\r\n\t\t\tglobal $config_service;\r\n\t\t\tif ($config_service ['VISITNUM_PROGR'] == 1)\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n\t\t\telse\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n\t\t} else {\r\n\t\t\t$this->body .= \"Table <b>\" . $this->form ['TABLE'] . \"</b> doesn't exist<br/>\";\r\n\t\t\tforeach ( $allinea_stmt as $key => $val ) {\r\n\t\t\t\tforeach ( $val as $key_f => $val_f )\r\n\t\t\t\tif ($val_f != '')\r\n\t\t\t\t$sql_create_fields .= \"{$val_f},\";\r\n\t\t\t}\r\n\t\t\t$sql_create_fields = rtrim ( $sql_create_fields, \",\" );\r\n\t\t\t$sql_str_ini = \"create table \" . $this->form ['TABLE'] . '(';\r\n\t\t\t$sql_str_end = \")\";\r\n\t\t\t$sql_str [0] = $sql_str_ini . $sql_create_fields . $sql_str_end;\r\n\t\t\t$sql_pk = \"alter table \" . $this->form ['TABLE'] . \" add constraint PK_\" . $this->form ['TABLE'] . \" primary key ($sql_pk_fields)\";\r\n\t\t\t$config_service=$this->config_service;\r\n\t\t\tif ($config_service ['VISITNUM_PROGR'] == 1)\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n\t\t\telse\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n//\t\t\t$eq_sql_str [0] = \"create table EQ_\" . $this->form ['TABLE'] . \" (ID NUMBER, COMMENTO varchar2(400),\" . $sql_create_fields . $sql_str_end;\r\n//\t\t\t$eq_sql_str [1] = \"alter table EQ_\" . $this->form ['TABLE'] . \" add constraint EQ_PK_\" . $this->form ['TABLE'] . \" primary key (ID)\";\r\n\r\n\t\t\t$s_sql_str [0] = \"create table S_\" . $this->form ['TABLE'] . \"(USERID VARCHAR2(20),MODDT DATE,MODPROG NUMBER not null,FL_QUERY CHAR(1) not null,ID_QUERY NUMBER,\" . $sql_create_fields . $sql_str_end;\r\n\t\t\t$s_sql_str [1] = \"alter table S_\" . $this->form ['TABLE'] . \" add constraint S_PK_\" . $this->form ['TABLE'] . \" primary key (MODPROG)\";\r\n\r\n\t\t}\r\n\t\tif (isset ( $in ['CREATE'] ) || isset ( $in ['CREATE_' . $this->form ['TABLE']] )) {\r\n\t\t\tforeach ( $sql_str as $key => $val ) {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($val); // bind non necessario\r\n\t\t\t}\r\n\t\t\tforeach ( $eq_sql_str as $key => $val ) {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($val); // bind non necessario\r\n\t\t\t}\r\n\t\t\tforeach ( $s_sql_str as $key => $val ) {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($val); // bind non necessario\r\n\t\t\t}\r\n\t\t\tif ($sql_pk_drop != '') {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($sql_pk_drop); // bind non necessario\r\n\t\t\t}\r\n\t\t\t$sql = new query ( $conn );\r\n\t\t\t$sql->ins_upd ($sql_pk); // bind non necessario\r\n\t\t\tif ($sql_fk_coord_drop != '') {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($sql_fk_coord_drop); // bind non necessario\r\n\t\t\t}\r\n\t\t\t$sql = new query ( $conn );\r\n\t\t\t$sql->ins_upd ($sql_fk_coord); // bind non necessario\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\treturn ($tb_exist && $all_field_exist);\r\n\t}", "function allinea_db(){\n\t\tif ($this->attributes['BYTB']!='' ) $this->fields_value_bytb($this->attributes['BYTB']);\n\t\tif ($this->attributes['TB']!='no'){\n\t\t\t$i=0;\n\t\t\tforeach ($this->values as $key => $val){\n\t\t\t\t$ret[$i]=\"{$key} NUMBER\";\n\t\t\t\t$i++;\n\t\t\t\t$ret[$i]=\"D_{$key} VARCHAR2(200 CHAR)\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $ret;\n\t\t}\n\t\telse return ;\n\t}", "function datos_tipo_imagen($id_tipo) {\n\t\t/*$query = \"SELECT tipos_imagen.*\n\t\tFROM tipos_imagen\";*/\n\n\t\t$query = \"SELECT tipos_imagen.*\n\t\tFROM tipos_imagen\n\t\tWHERE id_tipo='$id_tipo'\";\n\t\t\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\t$row= mysql_fetch_array($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 $row;\n\t\t}\n\t}", "function __construct(){\n // se definen los datos del servidor de base de datos\n $conection['server']=\"localhost\"; //host\n $conection['user']=\"root\"; // usuario\n $conection['pass']=\"admin\"; //password\n $conection['base']=\"INNSADB\"; //base de datos\n\n // crea la conexion pasandole el servidor , usuario y clave\n $conect= mysql_connect($conection['server'],$conection['user'],$conection['pass']);\n mysql_set_charset('utf8',$conect);\n\n if ($conect) {// si la conexion fue exitosa , selecciona la base\n mysql_select_db($conection['base']);\n $this->con=$conect;\n }\n\n }", "function carregarDadosEquip($idSimEquip){\n\n // CRIA UM OBJETO DE DA CLASSE DE CONEXAO\n $connBase = new EficazDB;\n\n // $query = \"SELECT equip.nomeEquipamento, equip.modelo, tipoEquip.tipo_equipamento, simEquip.ambiente,clieInfo.nome AS ´cliente´, fili.nome AS 'filial'\n // FROM tb_equipamento equip\n // JOIN tb_sim_equipamento simEquip ON equip.id = simEquip.id_equipamento\n // JOIN tb_cliente clieInfo ON clieInfo.id = equip.id_cliente\n // LEFT JOIN tb_filial fili ON equip.id_filial = fili.id_matriz\n // JOIN tb_tipo_equipamento tipoEquip ON equip.tipo_equipamento = tipoEquip.id\n // WHERE simEquip.id = '$idSimEquip'\";\n\n // $query = \"SELECT equip.nomeEquipamento, equip.modelo, tipoEquip.tipo_equipamento, simEquip.ambiente,clieInfo.nome AS 'cliente', fili.nome AS 'filial'\n // FROM tb_equipamento equip\n // JOIN tb_sim_equipamento simEquip ON equip.id = simEquip.id_equipamento\n // JOIN tb_cliente clieInfo ON clieInfo.id = equip.id_cliente\n // LEFT JOIN tb_filial fili ON equip.id_filial = fili.id_matriz\n // JOIN tb_tipo_equipamento tipoEquip ON equip.tipo_equipamento = tipoEquip.id\n // WHERE simEquip.id = '$idSimEquip'\";\n\n //QUERY ATUALIZADA\n\n $query = \"SELECT equip.nomeModeloEquipamento, tipoEquip.tipo_equipamento, simEquip.ambiente, clieInfo.nome AS 'cliente', fili.nome AS 'filial'\n FROM tb_equipamento equip\n JOIN tb_sim_equipamento simEquip ON equip.id = simEquip.id_equipamento\n JOIN tb_cliente clieInfo ON clieInfo.id = equip.id_cliente\n LEFT JOIN tb_filial fili ON equip.id_filial = fili.id_matriz\n JOIN tb_tipo_equipamento tipoEquip ON equip.tipo_equipamento = tipoEquip.id\n WHERE simEquip.id = '$idSimEquip'\";\n\n // Monta a result\n $result = $connBase->select($query);\n\n // Verifica se existe valor de retorno\n if (@mysql_num_rows ($result) > 0)\n {\n /* ARMAZENA NA ARRAY */\n while ($row = @mysql_fetch_assoc ($result))\n {\n $retorno[] = $row;\n }\n\n }else{\n // Se nao existir valor de retorno\n // Armazena 0 no vetor\n $retorno[] = 0;\n }\n\n // Fecha a conexao\n $connBase->close();\n\n return $retorno;\n}", "function obtenirIdTypesChambres ($connexion) {\r\n\r\n $req = \"SELECT id FROM TypeChambre\";\r\n $stmt = $connexion -> prepare ($req);\r\n $stmt -> execute ();\r\n return $stmt;\r\n\r\n }", "public function leerDatos($tabla){\r\n\t\t\t$sql = '';\r\n\t\t\tswitch($tabla){\r\n\t\t\t\tcase \"Usuario\":\r\n\t\t\t\t\t$sql = \"\r\n\t\t\t\t\t\tSELECT id, nombre, nacido, sexo, foto from usuario;\r\n\t\t\t\t\t\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"UsuarioDeporte\":\r\n\t\t\t\t\t$sql = \"\r\n\t\t\t\t\t\tSELECT id_usuario, id_deporte from usuario_deporte;\r\n\t\t\t\t\t\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"Deporte\":\r\n\t\t\t\t\t$sql = \"\r\n\t\t\t\t\t\tSELECT id, nombre from deporte;\r\n\t\t\t\t\t\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"Passwd\":\r\n\t\t\t\t\t$sql = \"\r\n\t\t\t\t\t\tSELECT usuario, clave from passwd; \r\n\t\t\t\t\t\";\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t$arrayFilas=$this->conn->query($sql);\r\n\t\t\treturn $arrayFilas;\r\n\t\t}", "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 getModos() {\r\n // arreglo para la determinacion del tipo de la tabla\r\n // 1 si se les puede agregar registros 0 si no se puede\r\n $modos['inventario_equipo']=1;\r\n $modos['inventario_estado']=1;\r\n $modos['inventario_grupo']=1;\r\n $modos['inventario_marca']=1;\r\n $modos['obligacion_clausula']=1;\r\n $modos['obligacion_componente']=1;\r\n $modos['documento_tipo']=1;\r\n $modos['documento_tema']=1;\r\n $modos['documento_subtema']=1;\r\n $modos['documento_estado']=1;\r\n $modos['documento_estado_respuesta']=1;\r\n $modos['documento_actor']=1;\r\n $modos['documento_tipo_actor']=1;\r\n $modos['riesgo_probabilidad']=1;\r\n $modos['riesgo_categoria']=1;\r\n $modos['riesgo_impacto']=1;\r\n $modos['compromiso_estado']=1;\r\n $modos['departamento']=0;\r\n $modos['departamento_region']=0;\r\n $modos['municipio']=0;\r\n $modos['operador']=0;\r\n return $modos;\r\n }", "public function run()\n {\n DB::statement(\"SELECT SETVAL('beneficiarios.bajas_id_seq', COALESCE(MAX(id), 1) ) FROM beneficiarios.bajas;\");\n\t\tDB::statement(\"SELECT SETVAL('beneficiarios.categorias_nacer_id_seq', COALESCE(MAX(id), 1) ) FROM beneficiarios.categorias_nacer;\");\n\t\tDB::statement(\"SELECT SETVAL('beneficiarios.ceb_id_seq', COALESCE(MAX(id), 1) ) FROM beneficiarios.ceb;\");\n\t\tDB::statement(\"SELECT SETVAL('beneficiarios.contacto_id_seq', COALESCE(MAX(id), 1) ) FROM beneficiarios.contacto;\");\n\t\tDB::statement(\"SELECT SETVAL('beneficiarios.embarazos_id_seq', COALESCE(MAX(id), 1) ) FROM beneficiarios.embarazos;\");\n\t\tDB::statement(\"SELECT SETVAL('beneficiarios.periodos_id_seq', COALESCE(MAX(id), 1) ) FROM beneficiarios.periodos;\");\n\t\tDB::statement(\"SELECT SETVAL('beneficiarios.score_id_seq', COALESCE(MAX(id), 1) ) FROM beneficiarios.score;\");\n\t\tDB::statement(\"SELECT SETVAL('cei.grupos_etarios_cei_id_seq', COALESCE(MAX(id), 1) ) FROM cei.grupos_etarios_cei;\");\n\t\tDB::statement(\"SELECT SETVAL('cei.indicadores_calculo_id_seq', COALESCE(MAX(id), 1) ) FROM cei.indicadores_calculo;\");\n\t\tDB::statement(\"SELECT SETVAL('cei.indicadores_calculo_indicador_seq', COALESCE(MAX(indicador), 1) ) FROM cei.indicadores_calculo;\");\n\t\tDB::statement(\"SELECT SETVAL('cei.indicadores_denominadores_id_seq', COALESCE(MAX(id), 1) ) FROM cei.indicadores_denominadores;\");\n\t\tDB::statement(\"SELECT SETVAL('cei.indicadores_detalle_id_seq', COALESCE(MAX(id), 1) ) FROM cei.indicadores_detalle;\");\n\t\tDB::statement(\"SELECT SETVAL('cei.indicadores_id_seq', COALESCE(MAX(id), 1) ) FROM cei.indicadores;\");\n\t\tDB::statement(\"SELECT SETVAL('cei.indicadores_tipo_id_seq', COALESCE(MAX(id), 1) ) FROM cei.indicadores_tipo;\");\n\t\tDB::statement(\"SELECT SETVAL('cei.lineas_cuidado_cei_id_seq', COALESCE(MAX(id), 1) ) FROM cei.lineas_cuidado_cei;\");\n\t\tDB::statement(\"SELECT SETVAL('cei.resultados_id_seq', COALESCE(MAX(id), 1) ) FROM cei.resultados;\");\n\t\tDB::statement(\"SELECT SETVAL('chat.conversaciones_id_seq', COALESCE(MAX(id), 1) ) FROM chat.conversaciones;\");\n\t\tDB::statement(\"SELECT SETVAL('chat.mensajes_id_seq', COALESCE(MAX(id), 1) ) FROM chat.mensajes;\");\n\t\tDB::statement(\"SELECT SETVAL('comprobantes.comprobantes_id_seq', COALESCE(MAX(id), 1) ) FROM comprobantes.comprobantes;\");\n\t\tDB::statement(\"SELECT SETVAL('consultas.automaticas_id_consulta_seq', COALESCE(MAX(id_consulta), 1) ) FROM consultas.automaticas;\");\n\t\tDB::statement(\"SELECT SETVAL('consultas.estandar_id_consulta_seq', COALESCE(MAX(id_consulta), 1) ) FROM consultas.estandar;\");\n\t\tDB::statement(\"SELECT SETVAL('ddjj.backup_id_impresion_seq', COALESCE(MAX(id_impresion), 1) ) FROM ddjj.backup;\");\n\t\tDB::statement(\"SELECT SETVAL('ddjj.doiu9_id_impresion_seq', COALESCE(MAX(id_impresion), 1) ) FROM ddjj.doiu9;\");\n\t\tDB::statement(\"SELECT SETVAL('ddjj.sirge_id_impresion_seq', COALESCE(MAX(id_impresion), 1) ) FROM ddjj.sirge;\");\n\t\tDB::statement(\"SELECT SETVAL('efectores.addendas_id_seq', COALESCE(MAX(id), 1) ) FROM efectores.addendas;\");\n\t\tDB::statement(\"SELECT SETVAL('efectores.categorias_ppac_id_categoria_seq', COALESCE(MAX(id_categoria), 1) ) FROM efectores.categorias_ppac;\");\n\t\tDB::statement(\"SELECT SETVAL('efectores.compromiso_gestion_id_compromiso_seq', COALESCE(MAX(id_compromiso), 1) ) FROM efectores.compromiso_gestion;\");\n\t\tDB::statement(\"SELECT SETVAL('efectores.convenio_administrativo_id_convenio_seq', COALESCE(MAX(id_convenio), 1) ) FROM efectores.convenio_administrativo;\");\n\t\tDB::statement(\"SELECT SETVAL('efectores.efectores_addendas_id_seq', COALESCE(MAX(id), 1) ) FROM efectores.efectores_addendas;\");\n\t\tDB::statement(\"SELECT SETVAL('efectores.efectores_id_efector_seq', COALESCE(MAX(id_efector), 1) ) FROM efectores.efectores;\");\n\t\tDB::statement(\"SELECT SETVAL('efectores.efectores_neonatales_id_seq', COALESCE(MAX(id), 1) ) FROM efectores.efectores_neonatales;\");\n\t\tDB::statement(\"SELECT SETVAL('efectores.efectores_obstetricos_id_seq', COALESCE(MAX(id), 1) ) FROM efectores.efectores_obstetricos;\");\n\t\tDB::statement(\"SELECT SETVAL('efectores.email_id_email_seq', COALESCE(MAX(id_email), 1) ) FROM efectores.email;\");\n\t\tDB::statement(\"SELECT SETVAL('efectores.operaciones_id_operacion_seq', COALESCE(MAX(id_operacion), 1) ) FROM efectores.operaciones;\");\n\t\tDB::statement(\"SELECT SETVAL('efectores.referentes_id_referente_seq', COALESCE(MAX(id_referente), 1) ) FROM efectores.referentes;\");\n\t\tDB::statement(\"SELECT SETVAL('efectores.telefonos_id_telefono_seq', COALESCE(MAX(id_telefono), 1) ) FROM efectores.telefonos;\");\n\t\tDB::statement(\"SELECT SETVAL('efectores.tipo_categorizacion_id_categorizacion_seq', COALESCE(MAX(id_categorizacion), 1) ) FROM efectores.tipo_categorizacion;\");\n\t\tDB::statement(\"SELECT SETVAL('efectores.tipo_dependencia_administrati_id_dependencia_administrativa_seq', COALESCE(MAX(id_dependencia_administrativa), 1) ) FROM efectores.tipo_dependencia_administrativa;\");\n\t\tDB::statement(\"SELECT SETVAL('efectores.tipo_efector_id_tipo_efector_seq', COALESCE(MAX(id_tipo_efector), 1) ) FROM efectores.tipo_efector;\");\n\t\tDB::statement(\"SELECT SETVAL('efectores.tipo_estado_id_estado_seq', COALESCE(MAX(id_estado), 1) ) FROM efectores.tipo_estado;\");\n\t\tDB::statement(\"SELECT SETVAL('efectores.tipo_operacion_id_operacion_seq', COALESCE(MAX(id_operacion), 1) ) FROM efectores.tipo_operacion;\");\n\t\tDB::statement(\"SELECT SETVAL('efectores.tipo_telefono_id_tipo_telefono_seq', COALESCE(MAX(id_tipo_telefono), 1) ) FROM efectores.tipo_telefono;\");\n\t\tDB::statement(\"SELECT SETVAL('estadisticas.graficos_id_seq', COALESCE(MAX(id), 1) ) FROM estadisticas.graficos;\");\n\t\tDB::statement(\"SELECT SETVAL('estadisticas.reportes_id_seq', COALESCE(MAX(id), 1) ) FROM estadisticas.reportes;\");\n\t\tDB::statement(\"SELECT SETVAL('fondos.fondos_id_seq', COALESCE(MAX(id), 1) ) FROM fondos.fondos;\");\n\t\tDB::statement(\"SELECT SETVAL('geo.departamentos_id_seq', COALESCE(MAX(id), 1) ) FROM geo.departamentos;\");\n\t\tDB::statement(\"SELECT SETVAL('geo.entidades_id_seq', COALESCE(MAX(id), 1) ) FROM geo.entidades;\");\n\t\tDB::statement(\"SELECT SETVAL('geo.localidades_id_seq', COALESCE(MAX(id), 1) ) FROM geo.localidades;\");\n\t\tDB::statement(\"SELECT SETVAL('geo.regiones_id_region_seq', COALESCE(MAX(id_region), 1) ) FROM geo.regiones;\");\n\t\tDB::statement(\"SELECT SETVAL('indicadores.indicadores_medica_id_seq', COALESCE(MAX(id), 1) ) FROM indicadores.indicadores_medica;\");\n\t\tDB::statement(\"SELECT SETVAL('indicadores.indicadores_medica_rangos_id_rango_indicador_seq', COALESCE(MAX(id_rango_indicador), 1) ) FROM indicadores.indicadores_medica_rangos;\");\n\t\tDB::statement(\"SELECT SETVAL('indicadores.indicadores_priorizados_anual_id_seq', COALESCE(MAX(id), 1) ) FROM indicadores.indicadores_priorizados_anual;\");\n\t\tDB::statement(\"SELECT SETVAL('indicadores.indicadores_priorizados_id_seq', COALESCE(MAX(id), 1) ) FROM indicadores.indicadores_priorizados;\");\n\t\tDB::statement(\"SELECT SETVAL('indicadores.metas_efectores_priorizados_id_seq', COALESCE(MAX(id), 1) ) FROM indicadores.metas_efectores_priorizados;\");\n\t\tDB::statement(\"SELECT SETVAL('logs.logins_id_seq', COALESCE(MAX(id_inicio), 1) ) FROM logs.logins;\");\n\t\tDB::statement(\"SELECT SETVAL('logs.rechazos_id_seq', COALESCE(MAX(id), 1) ) FROM logs.rechazos;\");\n\t\tDB::statement(\"SELECT SETVAL('mobile.reporte_problemas_id_problema_seq', COALESCE(MAX(id_problema), 1) ) FROM mobile.reporte_problemas;\");\n\t\tDB::statement(\"SELECT SETVAL('mobile.tipo_familiar_id_tipo_familiar_seq', COALESCE(MAX(id_tipo_familiar), 1) ) FROM mobile.tipo_familiar;\");\n\t\tDB::statement(\"SELECT SETVAL('mobile.usuarios_id_usuario_seq', COALESCE(MAX(id_usuario), 1) ) FROM mobile.usuarios;\");\n\t\tDB::statement(\"SELECT SETVAL('prestaciones.prestaciones_id_seq', COALESCE(MAX(id), 1) ) FROM prestaciones.prestaciones;\");\n\t\tDB::statement(\"SELECT SETVAL('prestaciones.rechazos_migracion_id_seq', COALESCE(MAX(id), 1) ) FROM prestaciones.rechazos_migracion;\");\n\t\tDB::statement(\"SELECT SETVAL('puco.obras_sociales_id_osp_seq', COALESCE(MAX(id_osp), 1) ) FROM puco.obras_sociales;\");\n\t\tDB::statement(\"SELECT SETVAL('puco.sss_temp_id_osp_prueba_seq', COALESCE(MAX(id_osp_prueba), 1) ) FROM puco.sss_temp;\");\n\t\tDB::statement(\"SELECT SETVAL('sistema.areas_id_area_seq', COALESCE(MAX(id_area), 1) ) FROM sistema.areas;\");\n\t\tDB::statement(\"SELECT SETVAL('sistema.clases_documento_id_seq', COALESCE(MAX(id), 1) ) FROM sistema.clases_documento;\");\n\t\tDB::statement(\"SELECT SETVAL('sistema.consultas_mensuales_id_seq', COALESCE(MAX(id), 1) ) FROM sistema.consultas_mensuales;\");\n\t\tDB::statement(\"SELECT SETVAL('sistema.entidades_id_seq', COALESCE(MAX(id), 1) ) FROM sistema.entidades;\");\n\t\tDB::statement(\"SELECT SETVAL('sistema.estados_id_estado_seq', COALESCE(MAX(id_estado), 1) ) FROM sistema.estados;\");\n\t\tDB::statement(\"SELECT SETVAL('sistema.lotes_lote_seq', COALESCE(MAX(lote), 1) ) FROM sistema.lotes;\");\n\t\tDB::statement(\"SELECT SETVAL('sistema.menues_id_menu_seq', COALESCE(MAX(id_menu), 1) ) FROM sistema.menues;\");\n\t\tDB::statement(\"SELECT SETVAL('sistema.modulos_id_modulo_seq', COALESCE(MAX(id_modulo), 1) ) FROM sistema.modulos;\");\n\t\tDB::statement(\"SELECT SETVAL('sistema.modulos_menu_id_relacion_seq', COALESCE(MAX(id_relacion), 1) ) FROM sistema.modulos_menu;\");\n\t\tDB::statement(\"SELECT SETVAL('sistema.padrones_id_padron_seq', COALESCE(MAX(id_padron), 1) ) FROM sistema.padrones;\");\n\t\tDB::statement(\"SELECT SETVAL('sistema.parametros_id_parametro_seq', COALESCE(MAX(id_parametro), 1) ) FROM sistema.parametros;\");\n\t\tDB::statement(\"SELECT SETVAL('sistema.regiones_id_region_seq', COALESCE(MAX(id_region), 1) ) FROM sistema.regiones;\");\n\t\tDB::statement(\"SELECT SETVAL('sistema.sexos_id_sexo_seq', COALESCE(MAX(id_sexo), 1) ) FROM sistema.sexos;\");\n\t\tDB::statement(\"SELECT SETVAL('sistema.subidas_id_subida_seq', COALESCE(MAX(id_subida), 1) ) FROM sistema.subidas;\");\n\t\tDB::statement(\"SELECT SETVAL('sistema.sugerencias_id_sugerencia_seq', COALESCE(MAX(id_sugerencia), 1) ) FROM sistema.sugerencias;\");\n\t\tDB::statement(\"SELECT SETVAL('sistema.tipo_documento_id_tipo_documento_seq', COALESCE(MAX(id_tipo_documento), 1) ) FROM sistema.tipo_documento;\");\n\t\tDB::statement(\"SELECT SETVAL('sistema.usuarios_id_usuario_seq', COALESCE(MAX(id_usuario), 1) ) FROM sistema.usuarios;\");\n\t\tDB::statement(\"SELECT SETVAL('solicitudes.estados_id_seq', COALESCE(MAX(id), 1) ) FROM solicitudes.estados;\");\n\t\tDB::statement(\"SELECT SETVAL('solicitudes.grupos_id_seq', COALESCE(MAX(id), 1) ) FROM solicitudes.grupos;\");\n\t\tDB::statement(\"SELECT SETVAL('solicitudes.operadores_id_seq', COALESCE(MAX(id), 1) ) FROM solicitudes.operadores;\");\n\t\tDB::statement(\"SELECT SETVAL('solicitudes.prioridades_id_seq', COALESCE(MAX(id), 1) ) FROM solicitudes.prioridades;\");\n\t\tDB::statement(\"SELECT SETVAL('solicitudes.solicitudes_id_seq', COALESCE(MAX(id), 1) ) FROM solicitudes.solicitudes;\");\n\t\tDB::statement(\"SELECT SETVAL('solicitudes.tipo_solicitud_id_seq', COALESCE(MAX(id), 1) ) FROM solicitudes.tipo_solicitud;\");\n }", "function listar_diccionario() {\n\t\t\t\n\t\t$query = \"SELECT palabras.*\n\t\tFROM palabras\n\t\tORDER BY palabras.id_palabra 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}", "public function BuscarEdicaoId($parametros)\n\t{\n\t\t$array_buscas = array();\n\t\t\n\t\t$dados_idioma = TableFactory::getInstance('WebsiteIdiomas')->getIdiomas();\n\t\t\n $flag = false;\n \n\t\tforeach($dados_idioma as $key => $idioma)\n\t\t{\n\t\t\t//Retorna os dados\n\t\t\t$dados_buscas = TableFactory::getInstance('TextosLayout')->SelectTextoIdRelacaoEdicao($parametros['cod_relacao_idioma'], $idioma['cod_id']);\n\t\t\t\t\n if($dados_buscas != false)\n {\n $flag = true;\n \n\t\t\t$array_buscas[$key]['txt_texto'] = $dados_buscas['txt_texto'];\n\t\t\t$array_buscas[$key]['cod_id'] = $dados_buscas['cod_id'];\n\t\t\t$array_buscas[$key]['cod_idioma'] = $idioma['cod_id'];\n\t\t\t$array_buscas[$key]['cod_relacao_idioma'] = $parametros['cod_relacao_idioma'];\n\t\t\t$array_buscas[$key]['txt_idioma'] = $idioma['txt_idioma'];\n }\n\t\t}\n if($flag == true)\n {\n return $array_buscas;\n } \n else \n {\n return false;\n }\n\t\t\n\t\t//Retorna o resultado da consulta\n\t}", "function findAll() {\n\t\t$query = \"SELECT id, nameEN, nameES FROM saga\";\n\t\t$res = array();\n\t\t\n\t\tforeach(DB::ejecutarConsulta($query) as $row) {\n\t\t\t// Añadimos un objeto por cada elemento obtenido\n\t\t\t$res[] = new SagaDAO($row);\n\t\t}\n\t\treturn $res;\n\t}", "function datos_tipo_software($id_tipo) {\n\t\t$query = \"SELECT software_tipo.*\n\t\tFROM software_tipo\n\t\tWHERE software_tipo.id_tipo_software='$id_tipo'\";\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$row = mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\treturn $row;\n\t}", "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 }", "function _GetDB($Cod=-1,$Campo='id_noticia'){\n\t\t// Cargo campos\n\t\t$this->Registro[$Campo] = $Cod;\n\t\t$this->TablaDB->getRegistro($this->Registro, $Campo);\n\t}", "function table()\n {\n\n $db = $this->getDatabaseConnection();\n $dbtype = $db->phptype; // Database type is stored here. Crazy but true.\n\n return array('user_id' => DB_DATAOBJECT_INT + DB_DATAOBJECT_NOTNULL,\n 'yubikey_id' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL,\n 'created' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME + DB_DATAOBJECT_NOTNULL,\n 'modified' => ($dbtype == 'mysql' || $dbtype == 'mysqli') ?\n DB_DATAOBJECT_MYSQLTIMESTAMP + DB_DATAOBJECT_NOTNULL :\n DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME\n );\n }", "public function getAllCiudades()\n\t{\n\t\t//el parametro es el nombre de la tabla\n\t\t$query = $this->db->get('ciudad');\n\t\t//devuelve un array de filas\n\t\treturn $query->result_array();\n\t\t/*\n\t\tMientras sea una tabla sola, la usamos asi,\n\t\tpero si es un join de varias tablas hay que usar los\n\t\tprepared statements que usamos en la app\n\t\t*/\n\t}", "public function gerarDados() {\n \n if (empty($this->sDataInicial)) {\n throw new Exception(\"Data inicial nao informada!\");\n }\n \n if (empty($this->sDataFinal)) {\n throw new Exception(\"Data final não informada!\");\n }\n /**\n * Separamos a data do em ano, mes, dia\n */\n list($iAno, $iMes, $iDia) = explode(\"-\",$this->sDataFinal);\n $oInstituicao = db_stdClass::getDadosInstit(db_getsession(\"DB_instit\"));\n $sListaInstit = db_getsession(\"DB_instit\");\n $sSqlSubsidio = \"select c16_mes, \";\n $sSqlSubsidio .= \" c16_ano,\";\n $sSqlSubsidio .= \" c16_subsidiomensal,\";\n $sSqlSubsidio .= \" c16_subsidioextraordinario,\";\n $sSqlSubsidio .= \" z01_nome, \";\n $sSqlSubsidio .= \" z01_cgccpf \";\n $sSqlSubsidio .= \" from padsigapsubsidiosvereadores \"; \n $sSqlSubsidio .= \" inner join cgm on z01_numcgm = c16_numcgm \"; \n $sSqlSubsidio .= \" where c16_ano = {$iAno} \";\n $sSqlSubsidio .= \" and c16_mes <= $iMes\"; \n $sSqlSubsidio .= \" and c16_instit = {$sListaInstit}\";\n $sSqlSubsidio .= \" order by c16_ano, c16_mes\";\n $rsSubsidio = db_query($sSqlSubsidio); \n $iTotalLinhas = pg_num_rows($rsSubsidio);\n for ($i = 0; $i < $iTotalLinhas; $i++) {\n \n $sDiaMesAno = \"{$iAno}-\".str_pad($iMes, 2, \"0\", STR_PAD_LEFT).\"-\".str_pad($iDia, 2, \"0\", STR_PAD_LEFT);\n $oSubSidio = db_utils::fieldsMemory($rsSubsidio, $i);\n \n $oRetorno = new stdClass();\n $oRetorno->subCodigoEntidade = str_pad($this->iCodigoTCE, 4, \"0\", STR_PAD_LEFT);\n $oRetorno->subMesAnoMovimento = $sDiaMesAno;\n $iUltimoDiaMes = cal_days_in_month(CAL_GREGORIAN, $oSubSidio->c16_mes, $oSubSidio->c16_ano); \n $oRetorno->subMesAnoReferencia = $oSubSidio->c16_ano.\"-\".str_pad($oSubSidio->c16_mes, 2, \"0\", STR_PAD_LEFT).\"-\".\n str_pad($iUltimoDiaMes, 2, \"0\", STR_PAD_LEFT);\n $oRetorno->subNomeVereador = substr($oSubSidio->z01_nome, 0, 80); \n $oRetorno->subCPF = str_pad($oSubSidio->z01_cgccpf, 11, \"0\", STR_PAD_LEFT); \n $oRetorno->subMensal = $this->corrigeValor($oSubSidio->c16_subsidiomensal, 13); \n $oRetorno->subExtraordinario = $this->corrigeValor($oSubSidio->c16_subsidioextraordinario, 13); \n $oRetorno->subTotal = $this->corrigeValor(($oSubSidio->c16_subsidioextraordinario+\n $oSubSidio->c16_subsidiomensal), 13);\n array_push($this->aDados, $oRetorno); \n }\n return true;\n }", "function getCitas(){\n\t\n\t\treturn conectar()->query( \"SELECT hora, fecha, usuario, motivo FROM citas\");\n\t}", "function getDatosId_nivel()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'id_nivel'));\n $oDatosCampo->setEtiqueta(_(\"id_nivel\"));\n return $oDatosCampo;\n }", "function relatorioDeCelulaPart1Dao(){\r\n require_once (\"conexao.php\");\r\n require_once (\"modelo/objetocelula.php\");\r\n \r\n $objDao = Connection::getInstance(); \r\n $resultado = mysql_query(\"Select c.Codigo,m.Matricula,NomeCelula,c.Rua,c.Casa,c.Bairro,c.DiadaCelula,c.Status,m.Nome as Lider from celulas c join membros m on c.codLider = m.Matricula order by c.NomeCelula\") or die (\"Nao foi possivel realizar a busca 1\".mysql_error());\r\n \r\n $listaCelula = array();\r\n \r\n $i=0;\r\n// Select m.Nome from celulas c join celulamembro e on e.CodCelula = c.Codigo join membros m on e.CodMembro = m.Matricula where e.CodCelula = 7\r\n if($resultado){\r\n \r\n while ($registro = mysql_fetch_assoc($resultado)){ \r\n\t $celula = new objetocelula();\r\n $celula->setId($registro['Codigo']);\r\n $celula->setIdMembro($registro['Matricula']);\r\n $celula->setNome($registro['NomeCelula']); $celula->setRua($registro['Rua']);\r\n $celula->setCasa($registro['Casa']); $celula->setBairro($registro['Bairro']);\r\n $celula->setDia($registro['DiadaCelula']); $celula->setStatus($registro['Status']);\r\n $celula->setNomeMembro($registro['Lider']);\r\n \r\n\t $listaCelula[$i] = $celula;\r\n\t $i++;\r\n\t}\r\n }\r\n return $listaCelula; \r\n\tmysql_free_result($resultado);\r\n $objDao->freebanco(); \r\n \r\n }", "static function getEntradasHoy() {\n\n $ped = new PedidosCab();\n $tablaPedidos = $ped->getDataBaseName() . \".\" . $ped->getTableName();\n $prov = new Proveedores();\n $tablaProveedores = $prov->getDataBaseName() . \".\" . $prov->getTableName();\n\n $rows = array();\n $hoy = date('Y-m-d');\n\n $em = new EntityManager($ped->getConectionName());\n if ($em->getDbLink()) {\n $query = \"select a.PrimaryKeyMD5 as PrimaryKeyMD5,IDPedido,Fecha,RazonSocial,TotalBases from {$tablaPedidos} as a left join {$tablaProveedores} as c on a.IDProveedor=c.IDProveedor where (IDEstado='1') and FechaEntrega='{$hoy}' order by Fecha ASC\";\n $em->query($query);\n $rows = $em->fetchResult();\n }\n unset($em);\n unset($ped);\n unset($prov);\n\n return $rows;\n }", "static function GetAll(){\r\n\t\t\t$str = \"select * from chuyendi\";\r\n\t\t\t$kq = Query($str);\t\r\n\t\t\t$arr=array();\t\t\r\n\t\t\tif($kq>0){\r\n\t\t\t\t$i=0;\r\n\t\t\t\twhile($row=mysql_fetch_array($kq)){\r\n\t\t\t\t\t$arr[$i] = self:: ConversToObject($row);\r\n\t\t\t\t\t$i++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $arr;\r\n\t\t}", "public function __construct() \n {\n $host = 'localhost';\n $db_name = 'trinity';\n $db_username = 'root';\n $db_password = '';\n $options = array( //yaha array lekhnu ko karan chai k ho ??\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, // Error aayo vani... tyo erro lai exception jasari dekhaune\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC //Data Fetch garda default associative array ma fetch garni\n );\n \n //yo tala ko code chai, creating Database connection using PDO\n $this->pdo = new PDO(\"mysql:host=$host;dbname=$db_name\", $db_username, $db_password, $options);\n\n }", "public function findall_motif() {\n $connexion = get_connexion();\n $sql = \"SELECT * FROM motif\";\n\n try {\n $sth = $connexion->prepare($sql);\n $sth->execute();\n $rows = $sth->fetchAll(PDO::FETCH_ASSOC);\n\n } \n catch (PDOException $e) {\n throw new Exception( \"<p>Erreur lors de la requête SQL : \" . $e->getMessage() . \"</p>\");\n }\n $array = array();\n foreach ($rows as $row) {\n $array[] = new DAO_Motif($row);\n }\n return $array;\n\n\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 }", "function listar_traducciones_por_idioma_con_info_es($id_idioma) {\n\n\t\t$query = \"SELECT traducciones_\".$id_idioma.\".*, palabras.*\n\t\tFROM traducciones_\".$id_idioma.\", palabras\n\t\tWHERE traducciones_\".$id_idioma.\".id_palabra=palabras.id_palabra\";\n\t\t\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\t$row= mysql_fetch_array($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}", "private function __construct() {\n $connections = array(\n array(\n \"language\"=>\"de\",\n \"host\"=>\"\",\n \"db\"=>\"\",\n \"username\"=>\"\",\n \"password\"=>\"\"\n ),\n array(\n \"language\"=>\"en\",\n \"host\"=>\"\",\n \"db\"=>\"\",\n \"username\"=>\"\",\n \"password\"=>\"\"\n )\n );\n // Define Default Connection\n ORM::configure('mysql:host='.$connections[0][\"host\"].';dbname='.$connections[0][\"db\"]);\n ORM::configure('username', $connections[0][\"username\"]);\n ORM::configure('password', $connections[0][\"password\"]);\n ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));\n\n // Define Connections for Languages\n foreach($connections as $connection) {\n ORM::configure('mysql:host='.$connection[\"host\"].';dbname='.$connection[\"db\"], null, $connection[\"language\"]);\n ORM::configure('username', $connection[\"username\"], $connection[\"language\"]);\n ORM::configure('password', $connection[\"password\"], $connection[\"language\"]);\n ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'), $connection[\"language\"]);\n }\n }", "function initialize() {\n\n switch ($this->type) {\n case 'sqlite':\n $query[0] = 'CREATE TABLE `enrolled` (\n `sid` INTEGER PRIMARY KEY,\n `first` TEXT ,\n `last` TEXT);';\n\n $query[1] = 'CREATE TABLE `paid` (\n `sid` INTEGER PRIMARY KEY);';\n\n $query[2] = 'CREATE TABLE `admin` (\n `sid` INTEGER PRIMARY KEY);';\n\n $query[3] = 'CREATE TABLE `log` (\n `id` INTEGER PRIMARY KEY AUTOINCREMENT,\n `sid` TEXT,\n `event` TEXT,\n `status` TEXT,\n `timestamp` TEXT);';\n \n $query[4] = 'CREATE TABLE `stage` (\n `id` INTEGER PRIMARY KEY AUTOINCREMENT,\n `sid` TEXT,\n `last` TEXT,\n `first` TEXT,\n `dest` TEXT);';\n\t\t\t\t \n\t\t\t\t$query[5] = 'CREATE TABLE `guest` (\n `sid` INTEGER PRIMARY KEY);';\n\n\t\t\t\t \n break;\n\n case 'mysql':\n\n $query[0] = 'CREATE TABLE IF NOT EXISTS `enrolled` (\n `sid` INT NOT NULL ,\n `first` VARCHAR(45) NULL ,\n `last` VARCHAR(45) NULL ,\n PRIMARY KEY (`sid`) );\n ENGINE = InnoDB;';\n\n $query[1] = 'CREATE TABLE IF NOT EXISTS `paid` (\n `sid` INT NOT NULL ,\n PRIMARY KEY (`sid`) )\n ENGINE = InnoDB;';\n\n $query[2] = 'CREATE TABLE IF NOT EXISTS `admin` (\n `sid` INT NOT NULL ,\n PRIMARY KEY (`sid`) )\n ENGINE = InnoDB;';\n\n $query[3] = 'CREATE TABLE IF NOT EXISTS `log` (\n `id` INT NOT NULL ,\n `sid` VARCHAR(45) NULL ,\n `status` VARCHAR(45) NULL,\n `event` VARCHAR(45) NULL ,\n `timestamp` DATETIME NULL ,\n PRIMARY KEY (`id`) )\n ENGINE = InnoDB;';\n\n break;\n\n default:\n throw new Exception($this->type . \" is not a valid database type.\");\n break;\n\n }\n\n foreach ($query as $insert) {\n $this->query($insert);\n }\n \n /**\n * Integrity Checking goes here\n */\n \n }", "function all2($cod_programa) {\n \n $sql = \"SELECT * FROM inasistencia_grupo_motivos\";\n \n return DB::query($sql);\n }", "abstract function loadDbData($compid);", "protected function createDatabaseStructure() {}", "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}", "private static function initDB(){\n //otvori subor casopis.conf\n $file=fopen(\"casopis.conf\", \"r\",true);\n if(!$file)\n die (\"Nemozem otvorit subor\");\n \n $temp=\"\";\n $id=\"\";\n \n $server=\"\";\n $login=\"\";\n $password=\"\";\n $database=\"\";\n \n //nacitanie konfiguracneho suboru\n \n while(!feof($file)){\n $temp= fgets($file);\n \n //odstranenie bielych znakov zo zaciatku a konca riadku\n $temp=trim($temp);\n //odignoruje prazdne riadky a riadky obsahujuce znak #\n if(strstr($temp,\"#\"))\n continue;\n if(!strcmp($temp, \"\"))\n continue; \n \n list($id,$temp)=explode(\": \", $temp);\n $id=trim($id);\n $temp=trim($temp);\n \n //nastavi premenne server,login, password a database podla hodnot konfiguracneho suboru\n if(!strcmp($id, \"server\")){\n $server=$temp;\n continue;\n }\n if(!strcmp($id,\"login\")){\n $login=$temp;\n continue;\n }\n if(!strcmp($id, \"psswd\")){\n $password=$temp;\n continue;\n }\n if(!strcmp($id,\"dbase\")){\n $database=$temp;\n continue;\n }\n \n }\n fclose($file);\n \n //vytvori instanciu triedy.\n static::$default_database=new CDatabaza($server, $login, $password, $database);\n if(!static::$default_database->connected)\n static::$default_database=null;\n else\n static::$default_database->connected=false;\n \n }", "public function primopiano(){\r\n $query = \"SELECT idev, owner FROM primopiano\";\r\n\t\t$result = self::$conn->query($query);\r\n $id =array();\r\n if($result){\r\n while($row = $result->fetch_assoc()){\r\n $id[] = $row['idev']; \r\n }\r\n }\r\n return $id;\r\n }", "function describir_campos($tabla_x,$bd_x=\"\"){\r\n\t\tif($bd_x!=\"\"){\r\n\t\t\t$bd = $bd_x.\".\";\r\n\t\t}#end if\r\n\t\t$query_x = \"SHOW FIELDS FROM \".$bd.$tabla_x;\r\n\t\t$result = mysqli_query($this->conexion,$query_x);\r\n\t\tif($result){\r\n\t\t\t$n_filas = mysqli_num_rows($result);\r\n\t\t\t$this->serial[$tabla_x] = \"\";\r\n\t\t\tfor ($i=0;$i<$n_filas;$i++){\r\n\t\t\t\t$row_x = mysqli_fetch_array($result);\r\n\t\t\t\tif($i==0){\r\n\t\t\t\t\t$this->campo_clave = $row_x[0];\r\n\t\t\t\t}#end if\r\n\t\t\t\t$this->nombre[$i] = $row_x[0];\r\n\t\t\t\t$this->tipo[$i] = $row_x[1];\r\n\t\t\t\tif($row_x[\"Key\"] == \"PRI\"){\r\n\t\t\t\t\t$this->campo_clave = $row_x[0];\r\n\t\t\t\t}#end if\r\n\t\t\t}#end next i\r\n\t\t}#end if result\r\n\t}", "public function readInfoById() {\t\t\n\t\t$fnName = \"getId\";\n\t\t$_id = -1;\n\t\t\n\t\t$_nombre = get_class( $this ) ;\n\t\t$result = null;\n\t\t$params = array();\n\t\t\n\t\tforeach(get_class_methods( $this ) as $id => $vl){\n\t\t\tif( strtolower( $vl ) == strtolower( $fnName ) ){\n\t\t\t\t$_id = $this->$fnName();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( $_id > 0 ){\n\t\t\t$stmt = null;\n\t\t\t\n\t\t\t$query = \"SELECT * FROM \" . strtolower( $_nombre ) . \" WHERE id = ?\";\n\t\t\tif ($stmt = self::$lnk->prepare($query)) {\n\t\t\t\t$stmt->bind_param(\"i\", $_id);\n\t\t\t $stmt->execute();\n\t\t\t \n\t\t\t\t$meta = $stmt->result_metadata(); \n\t\t\t while ($field = $meta->fetch_field()) {\n\t\t\t \t$params[] = &$row[ $field->name ]; \n\t\t\t } \n\t\t\t\n\t\t\t call_user_func_array(array($stmt, 'bind_result'), $params); \n\t\t\t \n\t\t\t while ($stmt->fetch()) {\n\t\t\t \t$o = new $_nombre();\n\t\t\t foreach($row as $key => $val) {\n\t\t\t $o->{ \"set\" . Singleton::toCap($key)}( $val );\n\t\t\t } \n\t\t\t $result = $o;\t\t\t \n\t\t\t }\n\t\t\t $stmt->close();\n\t\t\t}else{\n\t\t\t\t$this->mensaje_error = self::$lnk->error;\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\treturn $result;\n\t\t\n\t}", "public static function medicamentosApi()\n {\n $medicamentos = \\DB::select('SELECT id_medicamento, nombre_comercial, nombre_compuesto, solucion_tableta, tipo_contenido, dosis \n FROM tb_medicamentos');\n\n return $medicamentos;\n }", "function imagenes_disponibles_idioma_tipo($id_traduccion,$id_tipo,$id_idioma) {\n\t\t$query = \"SELECT traducciones_\".$id_idioma.\".*, \n\t\timagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,imagenes.id_autor,imagenes.tags_imagen,\n\t\timagenes.tipo_pictograma,imagenes.validos_senyalectica,imagenes.original_filename,\n\t\tpalabra_imagen.*\n\t\tFROM traducciones_\".$id_idioma.\", imagenes, palabra_imagen\n\t\tWHERE traducciones_\".$id_idioma.\".id_traduccion = '$id_traduccion'\n\t\tAND traducciones_\".$id_idioma.\".id_palabra=palabra_imagen.id_palabra\n\t\tAND palabra_imagen.id_imagen = imagenes.id_imagen\n\t\tAND imagenes.id_tipo_imagen='$id_tipo'\";\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\tmysql_close($connection);\n\t\treturn $result;\n\t}", "function get_cod_area_telefono($id='',$codigo=''){\n\t\t$sQuery=\"SELECT * FROM cod_area_telefono WHERE 1 = 1 \";\n\t\tif($id) {\t$sQuery.=\"AND id = '$id' \";\t}\n\t\tif($codigo) {\t$sQuery.=\"AND codigo = '$codigo' \";}\n\t\t$sQuery.=\"ORDER BY codigo \";\n\t//\tdie($sQuery);\n\t\t$result=mssql_query($sQuery) or die(mssql_min_error_severity());\n\t\t$i=0;\n\t\twhile($row=mssql_fetch_array($result)){\n\t\t\tforeach($row as $key=>$value){\n\t\t\t\t$res_array[$i][$key]=$value;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn($res_array);\n\t\t\t\n\t}", "function datos_tipo_simbolo($id_tipo) {\n\t\t$query = \"SELECT tipos_simbolos.*\n\t\tFROM tipos_simbolos\n\t\tWHERE tipos_simbolos.id_tipo='$id_tipo'\";\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$row = mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\treturn $row;\n\t}", "function relatorioDeCelulaPart2Dao($idCelula,$idMembro){\r\n require_once (\"conexao.php\");\r\n require_once (\"modelo/objetocelula.php\");\r\n \r\n $objDao = Connection::getInstance();\r\n $resultado = mysql_query(\"Select c.NomeCelula, m.Nome from celulas c join celulamembro e on e.CodCelula = c.Codigo join membros m on e.CodMembro = m.Matricula order by c.NomeCelula\") or die (\"Nao foi possivel realizar a busca 2\".mysql_error());\r\n \r\n $listaMembro = array();\r\n \r\n $i=0;\r\n\r\n if($resultado){\r\n \r\n while ($registro = mysql_fetch_assoc($resultado)){ \r\n\t $celula = new objetocelula();\r\n $celula->setNome($registro['NomeCelula']);\r\n $celula->setNomeMembro($registro['Nome']);\r\n\t $listaMembro[$i] = $celula;\r\n\t $i++;\r\n\t}\r\n }\r\n \r\n\tmysql_free_result($resultado);\r\n $objDao->freebanco(); \r\n return $listaMembro;\r\n }", "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}", "function KodeOtomatis($conn, $tabel, $id, $inisial, $index, $panjang)\n {\n $query\t= \"SELECT max(\".$id.\") as max_id FROM `\".$tabel.\"` WHERE \".$id.\" LIKE '\".$inisial.\"%'\";\n $data\t\t= $conn->query($query)->fetch_array();\n $id_max\t= $data['max_id'];\n\n if($index=='' && $panjang=='')\n {\n $no_urut\t= (int) $id_max;\n }\n else if($index!='' && $panjang=='')\n {\n $no_urut = (int) substr($id_max, $index);\n }\n else\n {\n $no_urut\t= (int) substr($id_max, $index, $panjang);\n }\n $no_urut\t= $no_urut + 1;\n\n if($index=='' && $panjang=='')\n {\n \t $id_baru = $no_urut;\n }\n else if($index!='' && $panjang=='')\n {\n \t $id_baru = $inisial . $no_urut;\n }\n else\n {\n \t $id_baru\t= $inisial . sprintf(\"%0$panjang\".\"s\", $no_urut);\n }\n return $id_baru;\n }", "function getDatosOrden()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'orden'));\n $oDatosCampo->setEtiqueta(_(\"orden\"));\n return $oDatosCampo;\n }", "public function create()\n {\n //******************************************\n //\n // CONEXION A LA BASE DE DATOS DE SAYA IBLU\n //\n //******************************************\n $idSistemaInformacion = 1;\n\n $conexBD = DB::table('sistemainformacion')\n ->select(DB::raw('ipSistemaInformacion, puertoSistemaInformacion, usuarioSistemaInformacion, claveSistemaInformacion, bdSistemaInformacion, motorbdSistemaInformacion'))\n ->where('idSistemaInformacion', \"=\", $idSistemaInformacion)\n ->get();\n\n\n $conexBD = get_object_vars($conexBD[0]);\n // print_r($conexBD);\n \n Config::set( 'database.connections.'.$conexBD['bdSistemaInformacion'], array \n ( \n 'driver' => $conexBD['motorbdSistemaInformacion'], \n 'host' => $conexBD['ipSistemaInformacion'], \n 'port' => $conexBD['puertoSistemaInformacion'], \n 'database' => $conexBD['bdSistemaInformacion'], \n 'username' => $conexBD['usuarioSistemaInformacion'], \n 'password' => $conexBD['claveSistemaInformacion'], \n 'charset' => 'utf8', \n 'collation' => 'utf8_unicode_ci', \n 'prefix' => ''\n )); \n\n $conexion = DB::connection($conexBD['bdSistemaInformacion'])->getDatabaseName();\n\n $documento = DB::connection($conexBD['bdSistemaInformacion'])->select(\n \"SELECT idDocumento as id, nombreDocumento as nombre\n FROM Documento\n ORDER BY nombreDocumento\");\n $documento = $this->convertirArray($documento);\n\n $documentoconcepto = DB::connection($conexBD['bdSistemaInformacion'])->select(\n \"SELECT idDocumentoConcepto as id, nombreDocumentoConcepto as nombre\n FROM DocumentoConcepto\n ORDER BY nombreDocumentoConcepto\");\n $documentoconcepto = $this->convertirArray($documentoconcepto);\n\n $tercero = DB::connection($conexBD['bdSistemaInformacion'])->select(\n \"SELECT idTercero as id, nombre1Tercero as nombre\n FROM Tercero\n WHERE tipoTercero like '%*01*%' or tipoTercero like '%*02*%'\n ORDER BY nombre1Tercero\");\n $tercero = $this->convertirArray($tercero);\n\n $usuario = \\App\\User::where('id', \"=\", \\Session::get('idUsuario'))->lists('id','name');\n $sistemainformacion = \\App\\SistemaInformacion::where('webSistemaInformacion', \"=\", '1')->lists('nombreSistemaInformacion','idSistemaInformacion');\n return view('trasladodocumento',compact('usuario','sistemainformacion','documento','documentoconcepto','tercero'));\n }", "function __construct(PDO &$p_connection, array $param = array())\n {\n $this->connection = $p_connection;\n if (!is_array($this->paramori)) {\n $this->paramori = $param;\n }\n if (!is_array($this->param)) {\n $this->param = $param;\n }\n /*\n * configuration de la connexion\n */\n $this->typeDatabase = $this->connection->getAttribute($p_connection::ATTR_DRIVER_NAME);\n\n $this->connection->setAttribute($p_connection::ATTR_DEFAULT_FETCH_MODE, $p_connection::FETCH_ASSOC);\n /*\n * Preparation des tableaux intermediaires a partir du tableau $colonnes\n */\n if (is_array($this->colonnes)) {\n $this->keys = array();\n $nbcle = 0;\n foreach ($this->colonnes as $key => $value) {\n /*\n * Preparation du tableau des cles\n */\n if ($value[\"key\"] == 1 || $value[\"cle\"] == 1) {\n $this->keys[] = $key;\n $nbcle++;\n $this->cle = $key;\n }\n /*\n * Affectation de l'attribut parent\n */\n if (strlen($value[\"parentAttrib\"]) > 0) {\n $this->parentAttrib = $key;\n }\n }\n\n /*\n * Analyse de la cle\n */\n if ($nbcle < 2) {\n $this->cleMultiple = 0;\n } else {\n $this->cleMultiple = 1;\n $this->cle = \"\";\n }\n }\n /*\n * Integration des parametres utilisateur\n */\n $this->setParam($param);\n /*\n * Integration du codage UTF8\n */\n\n if ($this->UTF8) {\n if ($this->typeDatabase == \"mysql\") {\n $this->connection->exec(\"set names 'utf8'\");\n } else {\n $this->connection->exec(\"SET CLIENT_ENCODING TO UTF8\");\n }\n }\n /*\n * Definition du mode de gestion des erreurs\n */\n if ($this->debug_mode > 0) {\n $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } else {\n $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);\n }\n /*\n * Ajout du identifier quote character\n */\n if ($this->typeDatabase == 'pgsql') {\n $this->quoteIdentifier = '\"';\n } elseif ($this->typeDatabase == 'mysql') {\n $this->quoteIdentifier = '`';\n }\n }", "function getDatosId_schema()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'id_schema'));\n $oDatosCampo->setEtiqueta(_(\"id_schema\"));\n return $oDatosCampo;\n }", "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 conocimiento_idiomas(){\n\t\treturn $this->hasMany('App\\ConocimientoIdioma', 'Idm_ID_Asp');\n\t}", "public function fetchAllForBase3();", "function datos_tipo_eu($id_tipo) {\n\t\t$query = \"SELECT eu_tipo.*\n\t\tFROM eu_tipo\n\t\tWHERE eu_tipo.id_tipo_eu='$id_tipo'\";\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$row = mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\treturn $row;\n\t}", "public function buscarDados()\n\t{\n\t\t$res = array();\n\t\t$cmd = $this->pdo->query(\"SELECT * FROM tbadm ORDER BY id_adm Desc\");\n\t\t$res = $cmd->fetchAll(PDO::FETCH_ASSOC);\n\t\treturn $res;\n\t}", "public function initDatabaseStructure( );" ]
[ "0.6428871", "0.6309934", "0.605969", "0.594305", "0.577778", "0.5770638", "0.57337004", "0.5730534", "0.5636783", "0.5618239", "0.56157583", "0.5567526", "0.5548749", "0.5547696", "0.5542753", "0.55352515", "0.553471", "0.55203784", "0.5517098", "0.5505864", "0.5505292", "0.5503533", "0.5495329", "0.5494829", "0.54770213", "0.5474927", "0.54535264", "0.5453281", "0.5451958", "0.54463583", "0.54459864", "0.543225", "0.5432063", "0.54225534", "0.5415565", "0.54139763", "0.54026085", "0.5398086", "0.53843844", "0.53808993", "0.5374572", "0.5371595", "0.53673697", "0.53670263", "0.5364164", "0.5364164", "0.53576666", "0.53576446", "0.53430355", "0.5337455", "0.53315145", "0.5328251", "0.5324886", "0.53144217", "0.5309146", "0.5308985", "0.5308485", "0.53078705", "0.5306038", "0.53045714", "0.53044283", "0.52903247", "0.52780235", "0.5277643", "0.5274575", "0.5270616", "0.52696365", "0.5269414", "0.5262581", "0.5251114", "0.5240779", "0.523989", "0.523911", "0.5237745", "0.52340084", "0.52298427", "0.5227019", "0.522415", "0.5220068", "0.5218333", "0.521385", "0.52088445", "0.5205546", "0.5192453", "0.5189646", "0.51883066", "0.5182172", "0.5180101", "0.517854", "0.5177608", "0.5175944", "0.5172441", "0.51714706", "0.5163425", "0.5162899", "0.51601416", "0.5159084", "0.5154326", "0.51542765", "0.51522565", "0.5152029" ]
0.0
-1
/Almacenar o actualizar el idioma de un usuario
public function store(LanguageRequest $request) { /*Input oculto para distinguir entre store y update*/ $id_query = $request->input('id'); $language = $request->input(); $language_id = \DB::table('languages')->where('language' , $language['language'])->value('id'); if ($id_query == 0) { try { $queries = \DB::table('studentlanguages') ->join('languages','studentlanguages.language_id','=','languages.id') ->join('students','studentlanguages.student_id','=','students.id') ->where('student_id',$this->student_id) ->insert(['readingComprehension' => $language['readingComprehension'], 'WrittedExpression' => $language['WrittedExpression'], 'listeningComprehension' => $language['listeningComprehension'], 'oralExpression' => $language['oralExpression'], 'language_id' => $language_id, 'student_id' => $this->student_id, 'created_at' => date('YmdHms')]); Session::flash('type',"success"); Session::flash("insert","Idioma guardado"); } catch(\PDOException $e) { if($e->getCode() == 2002) { Session::flash('type',"danger"); Session::flash('insert', "No se ha podido guardar el idioma."); } else { Session::flash('type',"danger"); Session::flash("insert","Ya tienes guardado ese idioma"); } } }else{ try { $queries = \DB::table('studentlanguages') ->join('languages','studentlanguages.language_id','=','languages.id') ->join('students','studentlanguages.student_id','=','students.id') ->where('student_id',$this->student_id) ->where('studentlanguages.id',$id_query) ->update(['readingComprehension' => $language['readingComprehension'], 'WrittedExpression' => $language['WrittedExpression'], 'listeningComprehension' => $language['listeningComprehension'], 'oralExpression' => $language['oralExpression'], 'language_id' => $language_id, 'student_id' => $this->student_id]); Session::flash('type',"success"); Session::flash('insert', "Idioma modificado"); } catch(\PDOException $e) { if($e->getCode() == 2002) { Session::flash('type',"danger"); Session::flash('insert', "No se ha podido guardar el debido a un problema de comunicación."); } } } return redirect('estudiante/curriculum'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveUsuario(){\n\t\t$conexion = new Database();\n if ($this->codigo){\n $query = sprintf('UPDATE agenda_usuario SET usuario = \"%s\" password = \"%s\" WHERE usuario_id = %d',\n $this->usuario,\n $this->password,\n $this->codigo);\n $rows = $conexion->exec( $query );\n }\n else{\n $query = sprintf('INSERT INTO agenda_usuario ( usuario, password) VALUES (\"%s\", \"%s\")',\n $this->usuario,\n $this->password );\n\t\t\t$rows = $conexion->exec( $query );\n $this->codigo = $conexion->lastInsertId();\n }\n }", "function identifyUser() {\n}", "public function agregarUsuario(){\n \n }", "static function setIdioma() {\r\n\r\n $variables = CpanVariables::getVariables('Web', 'Pro');\r\n\r\n $idiomaVisitante = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);\r\n $idiomasPermitidos = explode(\",\", trim($variables['globales']['lang']));\r\n\r\n $idIdioma = array_search($idiomaVisitante, $idiomasPermitidos);\r\n if (!$idIdioma) {\r\n $idIdioma = 0;\r\n }\r\n\r\n foreach ($idiomasPermitidos as $key => $value) {\r\n $idiomas = new Idiomas($value);\r\n $idioma = $idiomas->getTipo();\r\n $idiomasPermitidos[$key] = array(\r\n 'codigo' => $value,\r\n 'codigoLargo' => $idioma['Value'],\r\n 'texto' => $idioma['Texto'],\r\n );\r\n }\r\n unset($idiomas);\r\n\r\n $_SESSION['idiomas']['disponibles'] = $idiomasPermitidos;\r\n $_SESSION['idiomas']['actual'] = $idIdioma;\r\n $_SESSION['LANGUAGE'] = $_SESSION['idiomas']['disponibles'][$idIdioma]['codigo'];\r\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 }", "function set_idioma($code = 'es')\n\t{\n\t\tif ($code != '' && $code != $this->config->item('language'))\n\t\t{\n\t\t\t$this->config->set_item('language', $code);//CAMBIO EL IDIOMA DEL CONFIG\n\t\t}\n\t\t$this->session->set_userdata('idioma',$code); //adicional por hector en 30/10/2013 para sol y luna\n\t\t$this->session->set_userdata('id_idioma',$this->idioma_model->get_id($code));//AGREGADO POR HECTOR\n\t}", "function actualizar_usuario($id_colaborador,$nombre,$primer_apellido,$segundo_apellido,$usuario,$password,$email,$t_ruso,$t_arabe,$t_rumano,$t_chino,$t_polaco,$t_bulgaro,$t_ingles,$t_frances,$t_catalan,$gestion_usuarios,$gestion_palabras,$definicion_palabras,$borrar_palabras,$add_imagenes,$borrar_imagenes,$add_simbolos,$borrar_simbolos,$simbolos_especiales) {\n\n\t\t$UpdateRecords = \"UPDATE colaboradores \n\t\tSET nombre='$nombre', primer_apellido='$primer_apellido', segundo_apellido='$segundo_apellido', login='$usuario', password='$password',\n\t\testado='1', email='$email'\n\t\tWHERE id_colaborador='$id_colaborador'\";\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($UpdateRecords); \t\n\t\tmysql_close($connection);\n\t\t\n\t\t$UpdateRecords2 = \"UPDATE colaboradores_permisos\n\t\tSET traduccion_ruso='$t_ruso', traduccion_arabe='$t_arabe', traduccion_rumano='$t_rumano',\n\t\ttraduccion_chino='$t_chino',traduccion_polaco='$t_polaco',traduccion_bulgaro='$t_bulgaro',\n\t\ttraduccion_ingles='$t_ingles',traduccion_frances='$t_frances',traduccion_catalan='$t_catalan',\n\t\tgestion_usuarios='$gestion_usuarios', gestion_palabras='$gestion_palabras', definicion_palabras='$definicion_palabras', \n\t\tborrar_palabras='$borrar_palabras', add_imagenes='$add_imagenes', borrar_imagenes='$borrar_imagenes', add_simbolos='$add_simbolos',\n\t\tborrar_simbolos='$borrar_simbolos', simbolos_especiales='$simbolos_especiales'\n\t\t WHERE id_colaborador='$id_colaborador'\";\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($UpdateRecords2); \n\t\tmysql_close($connection);\n\t}", "public function testUpdateIdentity()\n {\n }", "function inativaUsuario($id){\n\t\t\ttry{\n\t\t\t\t$conn = Banco::ConectaBanco();\n\t\t\t\t$statm = $conn->prepare(\n\t\t\t\t\"UPDATE Usuario\n\t\t\t\t\tSET usuario_ativo = FALSE\n\t\t\t\t\tWHERE usuario_id = :id AND usuario_ativo = TRUE\n\t\t\t\t\");\n\t\t\t\t$statm->bindValue(\":id\", $id);\n\t\t\t\t$conn = NULL;\n\t\t\t\treturn $statm->execute();\n\t\t\t}catch(Exception $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t}", "function saveUser($sVars)\n{\n require_once($_SERVER[\"DOCUMENT_ROOT\"].\"/config/config.php\");\n require_once($_SERVER[\"DOCUMENT_ROOT\"].\"/class/autoload.php\");\n\n // Récupérer les données\n $aData = json_decode($sVars,true);\n $db = new cMariaDb($Cfg);\n if( $aData[\"User\"][\"id\"] == 0 ){\n // id=0 > Ajoute\n $Columns = \"\";\n $Values = \"\";\n foreach( $aData[\"User\"] as $key => $value )\n {\n if( $key != \"id\"){\n $Columns .= $key.\",\";\n $Values .= \"'\".addslashes($value).\"',\"; \n }\n if( $key == \"sEmail\"){\n $Columns .= \"pMotPasse,\";\n $Values .= \"SHA1('\".$value.\"'),\";\n }\n }\n $Columns = substr($Columns,0,-1);\n $Values = substr($Values,0,-1);\n $sSQL = \"INSERT INTO sys_user ($Columns,dDateInscription) VALUES ($Values,CURRENT_TIMESTAMP);\";\n $aTmp = $db->Query($sSQL);\n $id = $db->getLastId();\n } else {\n $Set = \"\";\n foreach( $aData[\"User\"] as $key => $value )\n {\n if( $key != \"id\"){\n $Set .= $key.\"='\".addslashes($value).\"',\";\n }\n }\n $Set = substr($Set,0,-1);\n $id = $aData[\"User\"][\"id\"];\n $sSQL = \"UPDATE sys_user SET $Set WHERE id=$id;\";\n $aTmp = $db->Query($sSQL);\n }\n // Méthode pas très élégante, mais il faudrait faire un delta entre tableaux \n // et agir en conséquence... \n // On supprime tout et on insert\n // Sauvegarde des droits ($aData[\"Rights\"])\n $sSQL = \"DELETE FROM sys_user_rights WHERE idUser=$id\";\n $db->Query($sSQL);\n foreach($aData[\"Rights\"] as $Right) {\n $sSQL = \"INSERT INTO sys_user_rights SET idRights=$Right, idUser=$id;\";\n $db->Query($sSQL);\n }\n\n // $aRet = [\"Errno\" => 2, \n // \"ErrMsg\" => $sTmp, \n // \"SQL\" => $sSQL ];\n\n return [\"Errno\" => 0, \"ErrMsg\" => \"OK\", \"SQL\" => $sSQL ];\n\n header('content-type:application/json');\n echo json_encode($aRet); \n}", "function idperfil($nombre){\n //busca en la tabla usuarios los campos donde el alias sea igual a lo que recibe del controlaor si no encuentra nada devuelve null\n $usuario = R::findOne('usuarios', 'alias=?', [\n $nombre\n ]);\n //guardo en una sesion la variable usuario y se retorna esa variable al controlador Usuarios.php linea 169 dentro de la carpeta usuario\n $_SESSION['idusuario']=$usuario->id;\n return $usuario;\n }", "public static function idUsuario()\r\n { \r\n if(isset($_SESSION['jn']['ux'])){\r\n $idu=(int)_Crifrado::desencriptar($_SESSION['jn']['ux'],'ux');\r\n if($idu>0)\r\n return $idu;\r\n else\r\n return 0; \r\n }else{\r\n return 0;\r\n }\r\n }", "public function setIdusuario($value){\n $this->idusuario = $value;\n }", "static public function regenerate(){\n \t$_SESSION['TFUser'] = self::$_instance = new TFUserM(array('id'=>self::$_id,'debug'=>self::isDebug()));\n }", "function modificarDatosUsuario($id, $username, $email, $poblacion, $idioma, $telefono, $url, $foto, $textoPresentacion) {\n $sql = \"UPDATE usuario SET username='\" . $username . \"',email='\" . $email . \"',poblacion='\" . $poblacion . \"',\"\n . \"idioma='\" . $idioma . \"',telefono='\" . $telefono . \"',url='\" . $url . \"',foto='\" . $foto . \"',\"\n . \"textoPresentacion='\" . $textoPresentacion . \"' WHERE id='\" . $id . \"'\";\n $con = new DB();\n $result = $con->exec($sql);\n $con = null;\n }", "public function getIdUsuariocalificador()\n {\n return $this->idUsuariocalificador;\n }", "private function _setIdentity(){\n $this->_setUserData($this->getClassUser()->getIdentity());\n }", "static public function ctrIngresoUsuario(){\n\t\t\n\t\tif (isset($_POST['user']) && isset($_POST['pass'])) {\n\t\t\tif (preg_match('/^[a-zA-Z-0-9 ]+$/', $_POST['user'])) {\n\t\t\t\tswitch ($_POST['rol']) {\n\t\t\t\t\tcase 'Encargado':\n\t\t\t\t\t\t$answer = adminph\\Attendant::where('username',$_POST['user'])->first();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'Propietario':\n\t\t\t\t\t\t$answer = adminph\\Propietary::where('username',$_POST['user'])->first();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'Arrendatario':\n\t\t\t\t\t\t$answer = adminph\\Lessee::where('username',$_POST['user'])->first();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$answer = adminph\\User::where('username',$_POST['user'])->first();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$password = $_POST[\"pass\"];\n\t\t\t\tif (is_object($answer)) {\n\t\t\t\t\tif (password_verify($password,$answer->password) ) {\n\t\t\t\t\t\tif ($answer->state == 1) {\n\t\t\t\t\t\t\tif ($_POST['rol'] == 'Otro') {\n\t\t\t\t\t\t\t\tsession(['rank' => $answer->type]);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tsession(['rank' => $_POST['rol']]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsession(['user' => $answer->username]);\n\t\t\t\t\t\t\tsession(['name' => $answer->name]);\n\t\t\t\t\t\t\tsession(['id' => $answer->id]);\n\t\t\t\t\t\t\tsession(['photo' => $answer->photo]);\n\t\t\t\t\t\t\t/*=============================================\n\t\t\t\t\t\t\t= REGISTRAR LOGIN =\n\t\t\t\t\t\t\t=============================================*/\n\t\t\t\t\t\t\tdate_default_timezone_set('America/Bogota');\n\t\t\t\t\t\t\tsession(['log' => date(\"Y-m-d h:i:s\")]);\n\t\t\t\t\t\t\t$answer->last_log = session('log');\n\t\t\t\t\t\t\tif ($answer->save()) {\n\t\t\t\t\t\t\t\techo ' <script>\n\t\t\t\t\t\t\twindow.location = \"inicio\"; </script> ';\n\n\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\techo '<br><div class=\"alert alert-warning\" style=\"text-align: center;\" >Este usuario se encuentra desactivado, por favor contacte al administrador.</div>';\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\techo '<head><style type=\"text/css\" media=\"screen\">body{background:#4a6886;color:#fff;}</style></head><body><div class=\"alert alert-warning\" style=\"text-align: center; font-size: 30px;margin-top:15%\" >Las credenciales ingresadas no son correctas.</div><br><br><div style=\"text-align: center; margin-left: 35%;margin-top:5%; width:30%;background:#E75300; padding: 10px;\"><a href=\"/\"> <span style=\" font-size: 18px; color: #fff\"><b>Volver al inicio</b></span> </a></div></body>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function changeUser($parameters):void\n {\n \n if(isset($parameters['idUser']))$this->idUser = $parameters[\"idUser\"];\n if(isset($parameters['nameUser']))(string) $this->nameUser = $parameters['nameUser'];\n if(isset($parameters['emailUser']))(string) $this->emailUser = $parameters['emailUser'];\n if(isset($parameters['passwordUser']))$this->passwordUser = $parameters[\"passwordUser\"];\n if(isset($parameters['genderUser']))(string) $this->genderUser = $parameters['genderUser'];\n if(isset($parameters['birthDateUser']))$this->birthDateUser = new \\DateTime($parameters['birthDateUser']);\n if(isset($parameters['birthDateUser']))$this->birthDateUser = $this->birthDateUser->format('YYYY-MM-DD');\n if(isset($parameters['dateCreationUser']))(string) $this->dateCreationUser = $parameters['dateCreationUser'];\n if(isset($parameters['permissionUser']))$this->permissionUser = $parameters['permissionUser'];\n \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}", "public function testUpdateNetworkMerakiAuthUser()\n {\n }", "private function preAddUser(){\n $LMS = new LMS();\n $api = $LMS->getDataXUserPass($this->_user, $this->_pass, 'https://www.sistemauno.com/source/ws/uno_wsj_login.php');\n $this->_person = \"\";\n if ($this->isObjectAPI($api)) {\n //validar Permisos\n $FilterAPI = new FilterAPI($api);\n $this->_datPerson = $FilterAPI->runFilter($this->_user, $this->_pass);\n if (is_array($this->_datPerson)) {\n //si el usuario cuenta con un perfil apropiado se le pide que valide sus coreo\n $this->validateEmailUser();\n if($this->validUniqueMail()){\n $this->sendMail();\n $this->_response = \"1|\" . $this->_datPerson[email] . \"|\" . $this->_datPerson[personId] . \"|\" . $this->_code . \"|\" . $this->_datPerson['name'];\n }else{\n $this->_response = \"2|\" . $this->_datPerson[email] . \"|\" . $this->_datPerson[personId] . \"|\" . $this->_code . \"|\" . $this->_datPerson['name'];\n }\n } else {\n $this->_response = $this->_datPerson;\n }\n } else {\n $this->_response = $api;\n }\n }", "public function iniciar() {\r\n session_regenerate_id();\r\n }", "public function actualizarusuario($imagenperfil,$datosuser,$id){\n // NOTE: obtener los usuarios en usuarios.json, transformandolos en un array\n $usuarios = $this->buscarUsuarios();\n // NOTE: recorrer array de todos los usuarios y sobreescribir el registro que corresponda al usuario a editar\n if (!empty($usuarios)) {\n // NOTE: vacio el archivo usuarios.json para poder insertar las modificaciones sin duplicar al usuario\n file_put_contents('usuarios.json', '');\n foreach ($usuarios as $usuario) {\n // NOTE: si encuentro al usuario guardo las modificaciones\n if (strtolower($id) == strtolower($usuario['id'])) {\n $usuario['nombre'] = $datosuser['nombre'];\n $usuario['apellido'] = $datosuser['apellido'];\n $usuario['email'] = $datosuser['email'];\n if ($usuario['password'] != $datosuser['password']) {\n $usuario['password'] = password_hash($datosuser['password'],PASSWORD_DEFAULT);\n }\n if ($imagenperfil['imgperfil']['error'] === UPLOAD_ERR_OK) {\n $ext = strtolower(pathinfo($imagenperfil['imgperfil']['name'], PATHINFO_EXTENSION));\n $hasta = '/images/profileImg/'.'perf'.$id.'.'.$ext;\n $usuario['srcImagenperfil'] = $hasta;\n }\n $userjson = json_encode($usuario);\n file_put_contents('usuarios.json', $userjson . PHP_EOL, FILE_APPEND);\n $this->subirImgPerfil($imagenperfil,$id);\n }else {\n // NOTE: si no encuentro al usuario guardo a los demas sin cambios\n $userjson = json_encode($usuario);\n file_put_contents('usuarios.json', $userjson . PHP_EOL, FILE_APPEND);\n }\n }\n }\n // NOTE: volver a convertir a json y guardar archivo usuarios.json\n //$userjson = json_encode($usuarios);\n //file_put_contents('usuarios2.json', $userjson . PHP_EOL, FILE_APPEND);\n //subirImgPerfil($imagenperfil,$id);\n\n\n }", "function motDePasseOublie($mail) { $userManager = new OpenClassrooms\\DWJP4\\Backend\\Model\\UsersManager();\n $emailExist = $userManager->emailExist($mail);\n if($emailExist){\n //S'il existe, on fabrique le code , on update le code , on envoi le message\n $pseudo=$emailExist[0]['USER_PSEUDO'];\n $code = codeValidation();\n //echo $pseudo;\n // echo \" code : \".$code;\n $updatePassword = $userManager->updatePsswd($code,$pseudo);\n $message = messagePasswdOublie($mail,$code);\n //echo $message;\n }else {\n //echo \"pas de mail exist\";\n }\n // on retourne sur la page d'identification\n require ('view/backend/identificationView.php'); \n}", "public function actualizar(){\r\n\t\t\t$user_table = Config::get()->db_user_table;\r\n\t\t\t$consulta = \"UPDATE $user_table\r\n\t\t\t\t\t\t\t SET \tid='$this->id',\r\n\t\t\t\t\t\t\t \t\tdni='$this->dni',\r\n\t\t\t\t\t\t\t \t\tnom='$this->nom', \r\n\t\t\t\t\t\t\t \t\tcognom1='$this->cognom1', \r\n\t\t\t\t\t\t\t \t\tcognom2='$this->cognom2', \r\n\t\t\t\t\t\t\t \t\tdata_naixement='$this->data_naixement',\r\n\t\t\t\t\t\t\t \t\testudis='$this->estudis',\r\n\t\t\t\t\t\t\t \t\tsituacio_laboral='$this->situacio_laboral',\r\n\t\t\t\t\t\t\t \t\tprestacio='$this->prestacio',\r\n\t\t\t\t\t\t\t \t\ttelefon_mobil='$this->telefon_mobil',\r\n\t\t\t\t\t\t\t \t\ttelefon_fix='$this->telefon_fix',\r\n\t\t\t\t\t\t\t \t\temail='$this->email',\r\n\t\t\t\t\t\t\t \t\tadmin='$this->admin',\r\n\t\t\t\t\t\t\t \t\timatge='$this->imatge'\t\t\t\t \t\t\t\t\t\t\t\t\t \t\t\r\n\t\t\t\t\t\t\t WHERE id='$this->id';\";\r\n\t\t\t\r\n\t\t\treturn Database::get()->query($consulta);\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "public function actualizar(){\r\n\t\t\t$user_table = Config::get()->db_user_table;\r\n\t\t\t$consulta = \"UPDATE $user_table\r\n\t\t\t\t\t\t\t SET password='$this->password', \r\n\t\t\t\t\t\t\t \t\tnombre='$this->nombre', \r\n\t\t\t\t\t\t\t \t\temail='$this->email', \r\n\t\t\t\t\t\t\t \t\timagen='$this->imagen',\r\n apellido1='$this->apellido1',\r\n apellido2='$this->apellido2', \r\n fecha_nacimiento='$this->fecha_nacimiento',\r\n direccion='$this->direccion',\r\n cp='$this->cp',\r\n poblacion='$this->poblacion',\r\n telf_movil='$this->telf_movil',\r\n telf_fijo='$this->telf_fijo',\r\n nivel_estudios='$this->nivel_estudios',\r\n nombre_titulacion='$this->nombre_titulacion',\r\n otros='$this->otros',\r\n observaciones='$this->observaciones',\r\n en_activo=$this->en_activo,\r\n razon_social='$this->razon_social',\r\n puesto_trabajo='$this->puesto_trabajo',\r\n regimen=$this->regimen,\r\n activo=$this->activo\r\n\t\t\t\t\t\t\t WHERE dni='$this->dni';\";\r\n\t\t\treturn Database::get()->query($consulta);\r\n\t\t}", "public function actualizarUsuario()\n {\n //quitamos el id del array y lo guardamos a parte\n $datos = $_POST;\n $ciu = isset($datos['CIU']) ? $datos['CIU'] : $this->session->userdata(\"ciu\");\n unset($datos['CIU']);\n\n //miramos si ha enviado imagen de perfil. de ser asi se procesa en otro metodo aparte y se quita del array\n if (isset($datos['img'])) {\n self::actualizarImagenPerfil($datos['img']);\n unset($datos['img']);\n }\n\n echo $this->Usuarios_model->actualizarUsuario($ciu, $datos);\n }", "public static function updateProfiloPersonale()\n {\n define(\"nome_completo_regexpr\", \"/^[a-zA-Z \\xE0\\xE8\\xE9\\xEC\\xF2\\xF9]{3,64}/\");\n define(\"email_personale_regexpr\", \"/^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$/\");\n define(\"username_regexpr\", \"/^[A-Za-z0-9\\xE0\\xE8\\xE9\\xEC\\xF2\\xF9 ]{3,64}$/\");\n define(\"password_regexpr\", \"/^[a-zA-Z0-9\\xE0\\xE8\\xE9\\xEC\\xF2\\xF9]+$/\");\n $name = trim($_REQUEST['nome_completo_azienda']);\n $task = trim($_REQUEST['tipo_incarichi_id']);\n $mail = trim($_REQUEST['email_personale_azienda']);\n $username = trim($_REQUEST['username_azienda']);\n $pass = trim($_REQUEST['password_azienda']);\n $id = $_SESSION['current_user']->getId();\n $error_rec = 0; //verifica la presenza di un generico errore\n \n $utente = new Azienda();\n // verifica la correttezza dei valori inseriti nella compliazione del form\n if (!empty($name)) {\n unset($_SESSION['nome_completo_azienda']);\n if (1 === preg_match(nome_completo_regexpr, $name)) {\n $utente->setNomeCompleto($name);\n } else {\n $_SESSION['nome_completo_azienda'] = \"<div class='messaggio-errore'>Il campo nome completo contiene caratteri non validi.<br>Verifica eventuali errori di battitura.</div>\";\n $error_rec++;\n }\n } else {\n $_SESSION['nome_completo_azienda'] = \"<div class='messaggio-errore'>Il campo nome completo &egrave; vuoto</div>\";\n $error_rec++;\n }\n if (!empty($task)) {\n unset($_SESSION['tipo_incarichi_id']);\n $utente->setTipo_incarichi_id($task);\n }\n if ($task == \"-1\") {\n $_SESSION['tipo_incarichi_id'] = \"<div class='messaggio-errore'>Il campo tipo di incarico non &egrave; stato schelto</div>\";\n $error_rec++;\n }\n if (!empty($mail)) {\n unset($_SESSION['email_personale_azienda']);\n if (1 === preg_match(email_personale_regexpr, $mail)) {\n $valido = UtenteFactory::cercaEmailUpdate($mail, 1, $id);\n if ($valido == 'SI') {\n $utente->setEmailPersonale($mail);\n } else {\n $_SESSION['email_personale_azienda'] = \"<div class='messaggio-errore'>Questa email &egrave; gi&agrave; stato utilizzata<br></div>\";\n $error_rec++;\n }\n } else {\n $_SESSION['email_personale_azienda'] = \"<div class='messaggio-errore'>Questo indirizzo email non &egrave; valido.<br>Verifica eventuali errori di battitura.<br>Esempio email valida: email@esempio.com</div>\";\n $error_rec++;\n }\n } else {\n $_SESSION['email_personale_azienda'] = \"<div class='messaggio-errore'>Il campo email &egrave; vuoto</div>\";\n $error_rec++;\n }\n if (!empty($username)) {\n unset($_SESSION['username_azienda']);\n if (1 === preg_match(username_regexpr, $username)) {\n $valido = UtenteFactory::cercaUsernameUpdate($username, 1, $id);\n if ($valido == 'SI') {\n $utente->setUsername($username);\n } else {\n $_SESSION['username_azienda'] = \"<div class='messaggio-errore'>Questo Username &egrave; gi&agrave; stato utilizzato<br>scegline un altro</div>\";\n $error_rec++;\n }\n } else {\n $_SESSION['username_azienda'] = \"<div class='messaggio-errore'>Il campo username completo contiene caratteri non validi.<br>Verifica eventuali errori di battitura.</div>\";\n $error_rec++;\n }\n } else {\n $_SESSION['username_azienda'] = \"<div class='messaggio-errore'>Il campo username completo &egrave; vuoto</div>\";\n $error_rec++;\n }\n if (!empty($pass)) {\n unset($_SESSION['password_azienda']);\n if (1 === preg_match(password_regexpr, $pass)) {\n $utente->setPassword($pass);\n } else {\n $_SESSION['password_azienda'] = \"<div class='messaggio-errore'>Il campo password non &egrave; valido.<br>Verifica eventuali errori di battitura.</div>\";\n $error_rec++;\n }\n } else {\n $_SESSION['password_azienda'] = \"<div class='messaggio-errore'>Il campo password &egrave; vuoto</div>\";\n $error_rec++;\n }\n if ($error_rec == 0) {\n $update = UtenteFactory::updateProfiloPersonale($id, $utente);\n if ($update == 'INSUCCESSO') {\n $_SESSION['errore'] = 6;\n } elseif ($update == 'SUCCESSO') {\n $_SESSION['errore'] = 5;\n }\n }\n \n $vd = new ViewDescriptor();\n $vd->setTitolo(\"SardiniaInFood: Profilo\");\n $vd->setLogoFile(\"../view/in/logo.php\");\n $vd->setMenuFile(\"../view/in/menu_modifica_profilo.php\");\n $vd->setContentFile(\"../view/in/azienda/modifica_profilo_personale.php\");\n $vd->setErrorFile(\"../view/in/error_in.php\");\n $vd->setFooterFile(\"../view/in/footer_empty.php\");\n \n require_once '../view/Master.php';\n }", "function actualizarUsuarios($id,$nombre,$apellido,$user,$pass,$rol){\n\t\t$activo = true;\n\t\t$query = \"UPDATE usuarios set nombre = '$nombre', apellido = '$apellido', user = '$user', pass='$pass', rol='$rol' where idUsuario=$id AND activo = $activo\";\n\t\t$link = conectar(); //llama a la funcion conectar de conex.php\n\t\t$result = $link->query($query); //envia el query a la BD\t\t\n\t\t$link->close();\n\t\techo json_encode($result);\n\t}", "public function UserData(){\n\t\t$this->id = \"\"; \n\t\t$this->nombre =null;\n\t\t$this->cc = null;\n $this->email = null; \n\t\t$this->telefono =null;\n\t\t$this->rol = null;\n\t\t$this->user = null; \n\t\t$this->pass = null;\n \n\t}", "function cilien_autoriser(){}", "public function setIdUsuario($n)\n {\n $this->c_id_usuario = $n;\n }", "public function updateAutor(){\n\n\n \tif($this->input->post('pswd_act')!=$this->input->post('pswd')) {\n \t$salt = '5&JDDlwz%Rwh!t2Yg-Igae@QxPzFTSId';\n $hash= $this->input->post('pswd');\n $password= md5($salt.$hash);\n $data = array(\n\t'email_register' => $this->input->post('correo'), \n\t'password_register' => $password,\n\t'ap_paterno_register' => $this->input->post('apellido_p'),\n\t'ap_materno_register' => $this->input->post('apellido_m'), \n\t'nombre_register' => $this->input->post('nombre'), \n\t'fch_nacimiento_register' => $this->input->post('fecha_inicio_hist'), \n\t'genero_register' => $this->input->post('genero'),\n\t'pseudonimo_register' => $this->input->post('pseudonimo'),\n\t'con_avatar_register' => $this->input->post('avatar'),\n\t'id_avatar' => $this->input->post('avatar_sel'),\n\t'foto_register' => $this->input->post('portada_sm'),\n\t'estatus_register' => $this->input->post('estatus'),\n\t'es_lector_register' => 0,\n\t'es_autor_register' => 1,\n\t'id_pais' => $this->input->post('nacionalidad'),\n\t'id_estado' => $this->input->post('estado'),\n\t'id_ciudad' => $this->input->post('ciudad'), \n\t'minibio_register' => $this->input->post('minibio'),\n\t'semblanza_register' => $this->input->post('historia'), \n\t'numero_contrato_register' => $this->input->post('num_contrato'),\t\n\t'usuario_modifica' => $this->session->userdata('user_id'),\n\t'fecha_modifica' => date('Y-m-d H:i:s')\n ); \t \n \t}else{$data = array(\n\t'email_register' => $this->input->post('correo'), \n\t'ap_paterno_register' => $this->input->post('apellido_p'),\n\t'ap_materno_register' => $this->input->post('apellido_m'), \n\t'nombre_register' => $this->input->post('nombre'), \n\t'fch_nacimiento_register' => $this->input->post('fecha_inicio_hist'), \n\t'genero_register' => $this->input->post('genero'),\n\t'pseudonimo_register' => $this->input->post('pseudonimo'),\n\t'con_avatar_register' => $this->input->post('avatar'),\n\t'id_avatar' => $this->input->post('avatar_sel'),\n\t'foto_register' => $this->input->post('portada_sm'),\n\t'estatus_register' => $this->input->post('estatus'),\n\t'es_lector_register' => 0,\n\t'es_autor_register' => 1,\n\t'id_pais' => $this->input->post('nacionalidad'),\n\t'id_estado' => $this->input->post('estado'),\n\t'id_ciudad' => $this->input->post('ciudad'), \n\t'minibio_register' => $this->input->post('minibio'),\n\t'semblanza_register' => $this->input->post('historia'), \n\t'numero_contrato_register' => $this->input->post('num_contrato'),\t\n\t'usuario_modifica' => $this->session->userdata('user_id'),\n\t'fecha_modifica' => date('Y-m-d H:i:s')\n );}\n\n\t$id_comp=$this->input->post('id_obj');\n \n\n \n\n if(is_numeric($id_comp)){\n \t$this->db->where('id_register', $this->input->post('id_obj'));\n \t$this->db->update('ips_register', $data);\n \n\n\t$arrCategoria=$this->input->post('my-categoria');\n\t$this->db->where('id_register', $id_comp); $this->db->delete('ips_topics_register');\n \tif($arrCategoria){\n \tforeach ($arrCategoria as $key => $categoria) {\n\t $data = array(\n\t\t\t'id_categoria' => $categoria,\n\t\t\t'id_register' => $id_comp,\n\t\t\t\n\t ); \n \t\t$insertinvita=$this->db->insert('ips_topics_register', $data);\n \t\t}\n\t}\n\n/*datos fiscales*/\n\t\t/*SELECT id_fiscal, id_tipo_persona, rfc_fiscal, razon_social, domiclio_fiscal, cif_archivo, id_register, fecha_alta, usuario_alta, fecha_modifica, usuario_modifica FROM ips_fiscal WHERE 1*/\n\n\n$this->db->where('id_register', $id_comp); $this->db->delete('ips_fiscal');\n$dataf = array(\n\t'id_tipo_persona' => $this->input->post('tipo_persona'), \n\t'rfc_fiscal' => $this->input->post('rfc'),\n\t'razon_social' => $this->input->post('razons'), \n\t'domiclio_fiscal' => $this->input->post('domiciliof'), \n\t'cif_archivo' => '', \n\t'id_register' => $id_comp,\t\n\t'usuario_alta' => $this->session->userdata('user_id'),\n\t'fecha_alta' => date('Y-m-d H:i:s')\n ); \n\n $insertcomp=$this->db->insert('ips_fiscal', $dataf); \n $id_compf=$this->db->insert_id();\n\n\n\t\t/*datos bancarios*/\n\n\t\t/*SELECT id_dato_bancario, nombre_titular_banco, cuenta_banco, clabe_banco, numero_tarjeta_banco, id_register, id_banco, sucursal_banco, numero_cliente_banco, fecha_alta, usuario_alta, fecha_modifica, usuario_modifica FROM ips_datos_bancarios WHERE 1*/\n\t\t$this->db->where('id_register', $id_comp); $this->db->delete('ips_datos_bancarios');\n$datab = array(\n\t'nombre_titular_banco' => $this->input->post('nombre_cuenta'), \n\t'cuenta_banco' => $this->input->post('num_cuenta'),\n\t'clabe_banco' => $this->input->post('clabe'), \n\t'numero_tarjeta_banco' => $this->input->post('num_tarjeta'), \n\t'sucursal_banco' => $this->input->post('sucursal'), \n\t'numero_cliente_banco' => $this->input->post('num_cliente'), \n\t'id_banco' => $this->input->post('banco'), \n\t'id_register' => $id_comp,\t\n\t'usuario_alta' => $this->session->userdata('user_id'),\n\t'fecha_alta' => date('Y-m-d H:i:s')\n ); \n\n $insertcomp=$this->db->insert('ips_datos_bancarios', $datab); \n $id_compb=$this->db->insert_id();\n \n\n\t}\n return $id_comp;\n}", "public function setLoginId(): void\n {\n }", "protected function loadObjects() { \n parent::loadObjects(); \n $factory = I2CE_FormFactory::instance();\n $user = null;\n $user_map = null;\n if ($this->isPost()) {\n if ($this->creatingNewUser()) {\n if (! ($user = $factory->createContainer( 'user')) instanceof I2CE_User_Form) {\n I2CE::raiseError(\"bad user form\");\n return false;\n }\n $user->load( $this->post );\n $user_map = $factory->createContainer( 'user_map');\n $user_map->load( $this->post );\n if ( !($username = $user->username) ) {\n I2CE::raiseError(\"bad user name\");\n return false;\n }\n $this->setEditing();\n if ( !$this->isSave(false) ) {\n $user->tryGeneratePassword();\n }\n $this->getPrimary()->username = array('user' , $username);\n }\n } else {\n $this->parent = $this->getParent();\n $user = $factory->createContainer( \"user\".'|0');\n if (( ($personObj = $this->getParent()) instanceof iHRIS_Person) && ($personObj->surname)) {\n $username = $this->generateUserName($personObj);\n $accessMech = I2CE::getUserAccess();\n $details = $accessMech->getAllowedDetails();\n $user->username = $username;\n if (in_array('lastname',$details)) {\n $user->lastname = $personObj->surname;\n }\n $role = false;\n if (I2CE::getConfig()->setIfIsSet($role,\"/modules/SelfService/default_user_role\") && I2CE_MagicDataNode::checkKey($role) && I2CE::getConfig()->is_parent(\"/I2CE/formsData/forms/role/$role\")) {\n $user->getField('role')->setFromDB('role|' . $role);\n }\n foreach($details as $detail) {\n if ($personObj->hasField($detail)) {\n $user->getField($detail)->setFromDB( $personObj->getField($detail)->getDBValue());\n }\n }\n if (I2CE_ModuleFactory::instance()->isEnabled('PersonContact')) {\n $contact_form = false;\n if (I2CE::getConfig()->setIfIsSet($contact_form,\"/modules/SelfService/default_user_contact_form\") && $contact_form) {\n $personObj->populateChildren($contact_form);\n foreach ($personObj->getChildren($contact_form) as $contactObj) {\n foreach($details as $detail) {\n if ($contactObj->hasField($detail)) {\n $user->getField($detail)->setFromDB( $contactObj->getField($detail)->getDBValue());\n }\n } \n break;\n }\n }\n }\n }\n }\n if ($user instanceof I2CE_User_Form) {\n $this->userObj = $user;\n $this->userMapObj = $user_map;\n $this->setObject( $user, I2CE_PageForm::EDIT_SECONDARY, 'user_fields');\n } \n return true;\n }", "function modificarHerrajeaccesorio(){\n\t\t$this->procedimiento='snx.ft_herrajeaccesorio_ime';\n\t\t$this->transaccion='SNX_HAC_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_herrajeaccesorio','id_herrajeaccesorio','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('herrajeaccesorio','herrajeaccesorio','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function persist() {\n $bd = BD::getConexion();\n $sql = \"insert into usuarios (nombre, clave) values (:nombre, :clave)\";\n $sthSql = $bd->prepare($sqlInsertUsuario);\n $result = $sthSql->execute([\":nombre\" => $this->nombre, \":clave\" => $this->clave]);\n $this->id = (int) $bd->lastInsertId();\n }", "public function setUser()\n\t{\n\t\t$user = User::getInstance();\n\t\t\n\t\tif ( $this->session->get( 'user_id' ) ) {\n\t\t\t$user->set( 'id', $this->session->get( 'user_id' ) );\n\t\t\t$user->read();\n\t\t}\n\t}", "private function iniciar_perfil(){\n\t\t// if(!isset($_SESSION['id_user'])){\n\t\t// \theader('location : index.php');\n\t\t// }\n\n\t\trequire_once 'inc/clases/procesos/fechas.class.php';\n\t\trequire_once 'inc/clases/perfil/usuarios.class.php';\t\t\t//clase usuarios\n\t\t$this->Modulos = new Modulos();\t\n\t\t$this->Usuario = new Usuarios();\t\t\t\n\t}", "function actualizarUsuario($id,$nombre,$apellidos,$edad){\n $sqlInsercion=\"UPDATE usuario\n SET nombre='\".$nombre.\"',apellidos='\".$apellidos.\"',edad=\".$edad.\n \" WHERE id=\".$id;\n $this->conexion->query($sqlInsercion);\n }", "function adicionaUsuario() {\n $usuarioAtual = array(\n \"usuario\"=>$this->usuario,\n \"senha\"=>$this->senha,\n \"nome\"=>$this->nome,\n \"email\"=>$this->email\n );\n\n $usuarioAtual_str = json_encode($usuarioAtual);\n\n //retira o colchete e coloca a vírgula no arquivo\n $arquivo_str = file_get_contents(\"data/usuarios.json\");\n $arquivo_str_novo = str_replace(\"]\", \",\", $arquivo_str);\n\n //abre o arquivo\n $usuarios = fopen(\"data/usuarios.json\", \"w\"); //sobreescreve\n fwrite($usuarios, $arquivo_str_novo . $usuarioAtual_str . \"]\");\n fclose($usuarios);\n }", "public function telaCadastroUsuario():void {\n $session =(Session::get('USER_AUTH'));\n if (!isset($session)) {\n $this->view('Home/login_viewer.php');\n }\n elseif ((int) Session::get('USER_ID')!==1) {\n Url::redirect(SELF::PAINEL_USUARIO);\n }\n else {\n $this->cabecalhoSistema();\n $this->view('Administrador/usuario/formulario_cadastro_usuario_viewer.php');\n $this->rodapeSistema();\n }\n }", "static public function ctrIngresoUsuario(){\n\n\t\tif(isset($_POST[\"ingUsuario\"])){\n\n\t\t\tif(preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingUsuario\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingPassword\"])){\n\n\t\t\t\t$tabla = \"usuarios\";\n\n\t\t\t\t// $encriptar = crypt($_POST[\"ingPassword\"], '$2a$07$usesomesillystringforsalt$');\n\n\t\t\t\t$item = \"usu_descri\";\n\t\t\t\t$valor = $_POST[\"ingUsuario\"];\n\t\t\t\t$pass = $_POST[\"ingPassword\"];\n\n\t\t\t\t$respuesta = ModeloUsuarios::MdlMostrarUsuarios($tabla, $item, $valor);\n\n\t\t\t\t// var_dump($respuesta);\n\t\t\t\t// die();\n\n\t\t\t\tif($respuesta[\"usu_descri\"] == $_POST[\"ingUsuario\"] && $respuesta[\"clave\"] == $_POST[\"ingPassword\"])\n\t\t\t\t{\n\n\t\t\t\t\tif($respuesta['estado'] == 'A')\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$_SESSION[\"iniciarSesion\"] = \"ok\";\n\t\t\t\t\t\t$_SESSION[\"id\"] = $respuesta[\"id\"];\n\t\t\t\t\t\t// $_SESSION[\"nombre\"] = $respuesta[\"nombre\"];\n\t\t\t\t\t\t$_SESSION[\"usuario\"] = $respuesta[\"usu_descri\"];\n\t\t\t\t\t\t// $_SESSION[\"foto\"] = $respuesta[\"foto\"];\n\t\t\t\t\t\t// $_SESSION[\"perfil\"] = $respuesta[\"perfil\"];\n\n\t\t\t\t\t\techo '<script>\n\t\n\t\t\t\t\t\twindow.location = \"inicio\";\n\t\n\t\t\t\t\t\t</script>';\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 '<br><div class=\"alert alert-danger\">El usuario no esta activo, porfavor, comuniquese con el administrador</div>';\n\t\t\t\t\t}\n\n\t\t\t\t}else{\n\n\t\t\t\t\techo '<br><div class=\"alert alert-danger\">Error al ingresar, vuelve a intentarlo</div>';\n\n\t\t\t\t}\n\n\t\t\t}\t\n\n\t\t}\n\n\t}", "public function actualizar_Datos_Usuario2(){\n\t\t$sql = \"UPDATE usuarios SET Documento=\".$this->usuario->get_Nid().\",\n\t\t\t\t\t\t\t\t\tNombres='\".$this->usuario->get_Nombres().\"',\n\t\t\t\t\t\t\t\t\tApellidos = '\".$this->usuario->get_Apellidos().\"',\n\t\t\t\t\t\t\t\t\tUsuario = '\".$this->usuario->get_Usuario().\"',\n\t\t\t\t\t\t\t\t\tPregunta = '\".$this->usuario->get_Pregunta().\"',\n\t\t\t\t\t\t\t\t\tRespuesta = '\".$this->usuario->get_Respuesta().\"',\n\t\t\t\t\t\t\t\t\tTipo_Documento = '\".$this->usuario->get_TipoId().\"',\n\t\t\t\t\t\t\t\t\tCiudad = '\".$this->usuario->get_Ciudad().\"',\n\t\t\t\t\t\t\t\t\tDireccion = '\".$this->usuario->get_Direccion().\"',\n\t\t\t\t\t\t\t\t\tEdad = '\".$this->usuario->get_Edad().\"',\n\t\t\t\t\t\t\t\t\tFoto = '\".$this->usuario->get_Foto().\"',\n\t\t\t\t\t\t\t\t\tTelefono = '\".$this->usuario->get_Celular().\"',\n\t\t\t\t\t\t\t\t\tCorreo_Electronico = '\".$this->usuario->get_Email().\"',\n\t\t\t\t\t\t\t\t\tGenero = '\".$this->usuario->get_Genero().\"',\n\t\t\t\t\t\t\t\t\tperfiles_Nombre = '\".$this->usuario->get_Perfil().\"'\n\t\t\t WHERE Documento=\".$this->usuario->get_Nid().\"\";\n\n\n\n\t\t//echo $sql;\n\t\t$salida = 0;\n\t\t$valida = new Validacion_Datos(); // <- Para validar los tipos de datos\n\t\t// Validacion de los minimos\n\t\tif(!(strlen($this->usuario->get_Nid()) > 7))\t\t\t$salida = 2;\n\t\telseif(!(strlen($this->usuario->get_Nombres()) > 1))\t$salida = 3;\n\t\telseif(!(strlen($this->usuario->get_Apellidos()) > 1))\t$salida = 4;\n\t\telseif(!(strlen($this->usuario->get_Usuario()) > 4))\t$salida = 5;\n\t\telseif(!(strlen($this->usuario->get_Pregunta()) > 9))\t$salida = 7;\n\t\telseif(!(strlen($this->usuario->get_Respuesta()) > 1))\t$salida = 8;\n\t\telseif(!(strlen($this->usuario->get_Ciudad()) > 1))\t\t$salida = 10;\n\t\telseif(!(strlen($this->usuario->get_Direccion()) > 2))\t$salida = 11;\n\t\telseif(!(strlen($this->usuario->get_Edad()) > 0))\t\t$salida = 12;\n\t\telseif(!(strlen($this->usuario->get_Foto()) > 2))\t\t$salida = 13;\n\t\telseif(!(strlen($this->usuario->get_Celular()) > 7))\t$salida = 14;\n\t\telseif(!(strlen($this->usuario->get_Email()) > 6))\t\t$salida = 15;\n\t\t// Validacion de los tipos de datos (Numérico,Alfabético,Alfanumérico)\n\t\telseif(!($valida->is_Number($this->usuario->get_Nid())))\t\t\t\t$salida = 18;\n\t\telseif(!($valida->is_Alphanumeric($this->usuario->get_Usuario())))\t\t$salida = 19;\n\t\telseif(!($valida->is_Alphabetic($this->usuario->get_Nombres())))\t\t$salida = 20;\n\t\telseif(!($valida->is_Alphabetic($this->usuario->get_Apellidos())))\t\t$salida = 21;\n\t\telseif(!($valida->is_Alphanumeric($this->usuario->get_Respuesta())))\t$salida = 24;\n\t\telseif(!($valida->is_Alphabetic($this->usuario->get_Ciudad())))\t\t\t$salida = 25;\n\t\telseif(!($valida->is_Number($this->usuario->get_Edad())))\t\t\t\t$salida = 26;\n\t\telseif(!($valida->is_Number($this->usuario->get_Celular())))\t\t\t$salida = 28;\n\n\n\t\t///////////////////////////////////////////////////////////////////////////\n\n\t\t\n\t\telseif($this->bd->insertar($sql))\n\t\t\t$salida = true;\n\t\telse $salida = 31;\n\t\t\n\n\t\treturn $salida;\n\t}", "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 persist() {\n $bd = BD::getConexion();\n $sqlInsertUsuario = \"insert into usuarios (nomUsuario, clave) values (:nomUsuario, :clave)\";\n $sthSqlInsertUsuario = $bd->prepare($sqlInsertUsuario);\n $result = $sthSqlInsertUsuario->execute([\":nomUsuario\" => $this->nomUsuario, \":clave\" => $this->clave]);\n $this->id = (int) $bd->lastInsertId();\n }", "static public function ctrIngresoUsuario()\n{ \n if(isset($_POST[\"ingUsuario\"]))\n {\n\n if(preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingUsuario\"]) && preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingPassword\"])) {\n\n\n //$encriptar = crypt($_POST[\"ingPassword\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\t\t\t//print_r($_POST);\n $tabla = \"usuarios\";\n $item= \"codusuario\";\n $valor= $_POST[\"ingUsuario\"];\t\t\t\t\n\n $respuesta = ModeloUsuarios::mdlMostrarUsuarios($tabla, $item, $valor );\n\n if($respuesta[\"codusuario\"] == $_POST[\"ingUsuario\"] && $respuesta[\"clave\"] == $_POST[\"ingPassword\"] ){\n\n if($respuesta[\"bloqueado\"] == 0 ) {\n $_SESSION[\"iniciarSesion\"] = \"ok\";\n $_SESSION[\"id\"] = $respuesta[\"codusuario\"];\n $_SESSION[\"nombre\"] = $respuesta[\"nomusuario\"];\n $_SESSION[\"usuario\"] = $respuesta[\"codusuario\"];\n $_SESSION[\"perfil\"] = $respuesta[\"codperfil\"];\n $_SESSION[\"foto\"] = \"\";\n $_SESSION[\"id_local\"] = 1;\n\n date_default_timezone_set('America/Bogota');\n $fecha = date('Y-m-d');\n $hora = date('H:i:s');\n $fechaActual = $fecha.' '.$hora;\n\n $tabla = 'usuarios';\n $item1 = 'fecingreso';\n $valor1 = $fechaActual ;\n $item2 = 'codusuario';\n $valor2= $respuesta[\"codusuario\"] ;\n $respuestaUltimoLogin = ModeloUsuarios::mdlActualizarUsuario($tabla,$item1, $valor1, $item2, $valor2 );\n\n if($respuestaUltimoLogin == \"ok\")\n {\n echo '<script> window.location = \"inicio\"</script>';\n\n }\n\n } \n else \n echo '<br><div class=\"alert alert-danger\">El usuario no se encuentra activado.</div>';\n\n }else {\n\n echo '<br><div class=\"alert alert-danger\">Error al ingresar vuelve a intentarlo.</div>';\n }\t\t\t\t\n\n }//\n\n }\n\n}", "function identification(){\n\t\t//$db = $connection->testFW;\n\t\t//var_dump($db);\n\t\t$this->display(\"carnet.tpl\");\n\t\t$this->display(\"contact.tpl\");\n\t\t//$user = new M_users();\n\n\t\t$Oident = Oscar_Identification_2::getInstance();\n\t\t\n\t\t//$refUser = $user->findOne( array( \"_id\"=>new MongoId( $Oident->get_private_data( \"id_mongo\" ) ) ));\n\t\t//var_dump($refUser);\n\n\t\t$this->stop_layout();\n\t\t\n\t\t\t\t\n\t\t/*\n\t\t if( ( isset($this->CPOST[\"login_identitfiant\"])) && ( isset ($this->CPOST[\"password_identifiant\"]))){\n\t\t\techo \"il y a bien une valeur\";\n\t\t\t$Oident->identify($login);\t\n\t\t\t$this = new Smarty_factory();\n\n\t\t\t $this->display(\"carnet.html\",array(\n\t\t\t\t\t\"login\" => $login,\n\t\t\t\t\t\"mot_de_pass\" => $mdp,\n\n\t\t\t\t ));\n\t\t}\n\t\telse {\n\t\t\tvar_dump(\"il n'y a pas d'envoie de donnee\");\n\t\t}\n\t\t*/\n\n\n\t}", "static public function ctrEditarUsuario()\n\t{\n\t\tif(isset($_POST['editarUsuario']))\n\t\t{\n\t\t\t//vamos a permitir caracteres especiales con tilde,espacio en blanco y numericos con expresion regular\n\t\t\t// vamos a solo editar el nombre del usuario y no usuario para evitar crear carpeta basura en img/usuarios\n\t\t\tif(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓü ]+$/', $_POST['editarNombre']))\n\t\t\t{\n\t\t\t\t/*=============================================\n\t\t\t\t\t\t\tVALIDAR IMAGEN\n\t\t\t\t=============================================*/\n\n\t\t\t\t// recuperamos la ruta de la imagen del input oculto\n\t\t\t\t$ruta = $_POST['fotoActual'];\n\n\t\t\t\t// si existe la variable $_FILE(en nuestro caso siempre existe) y viene diferente a vacio el archivo temporal de la imagen\n\t\t\t\tif(isset($_FILES['editarFoto']['tmp_name']) && !empty($_FILES['editarFoto']['tmp_name']))\n\t\t\t\t// if(isset($_FILES['editarFoto']['tmp_name']))\n\t\t\t\t{\n\t\t\t\t\t// vamos a recortar la imagen 500 x 500 px\n\n\t\t\t\t\t// list — Asignar variables como si fueran un array\n\t\t\t\t\t// getimagesize — Obtener el tamaño de una imagen\n\t\t\t\t\t//en list() toma el indice 0 de [nuevaFoto][tmp_name](los indice del archivo temporal son medidas de la imagen) y asigna a $ancho y el indice 1 asigna a $alto \n\t\t\t\t\tlist($ancho, $alto) = getimagesize($_FILES['editarFoto']['tmp_name']);\n\n\t\t\t\t\t// redimensionamos\n\t\t\t\t\t$nuevoAncho = 500;\n\t\t\t\t\t$nuevoAlto = 500;\n\n\t\t\t\t\t// creamos la ruta donde se va a guardar la imagen\n\t\t\t\t\t$directorio = 'vistas/img/usuarios/'.$_POST['editarUsuario'];\n\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/*====================================================================\n\t\t\t\t\tPRIMERO PREGUNTAMOS SI EXISTE LA IMAGEN EN LA BD \n\t\t\t\t\t======================================================================*/\n\t\t\t\t\t\n\t\t\t\t\t// si la ruta de la db es diferente a vacio \n\t\t\t\t\tif(!empty($_POST['fotoActual']))\n\t\t\t\t\t{\n\t\t\t\t\t\t// unlink — Borra un fichero\n\t\t\t\t\t\t// vamos a borrar ese archivo en esa carpeta\n\t\t\t\t\t\t// console.log('foto actual');\n\t\t\t\t\t\tunlink($_POST['fotoActual']);\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// en caso de que venga vacio, vamos a crear el directorioo carpeta\n\t\t\t\t\t\tmkdir($directorio, 0755);\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\t/*====================================================================\n\t\t\t\t\tDEACUERDO AL TIPO DE IMAGEN APLICAMOS LAS FUNCIONES POR DEFECTO DE PHP \n\t\t\t\t\t======================================================================*/\n\n\t\t\t\t\tif($_FILES['editarFoto']['type'] == \"image/jpeg\")\n\t\t\t\t\t{\n\t\t\t\t\t\t/*=============================================\n\t\t\t\t\t\t\tGUARDAR LA IMAGEN EN EL DIRECTORIO\n\t\t\t\t\t\t=============================================*/\n\n\t\t\t\t\t\t$aleatorio = mt_rand(100,999);\n\n\t\t\t\t\t\t// le damos nombre a la imagen , y puede ser un nro aleaterio del 100 al 999\n\t\t\t\t\t\t$ruta = \"vistas/img/usuarios/\".$_POST['editarUsuario'].\"/\".$aleatorio.\".jpg\";\n\n\t\t\t\t\t\t// imagecreatefromjpeg — Crea una nueva imagen a partir de un fichero o de una URL\n\t\t\t\t\t\t// imagecreatefromjpeg() devuelve un identificador de imagen que representa la imagen obtenida desde el nombre de fichero dado.\n\t\t\t\t\t\t$origen = imagecreatefromjpeg($_FILES['editarFoto']['tmp_name']);\n\n\t\t\t\t\t\t// imagecreatetruecolor — Crear una nueva imagen de color verdadero\n\t\t\t\t\t\t// imagecreatetruecolor() devuelve un identificador de imagen que representa una imagen en negro del tamaño especificado.\n\t\t\t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\n\n\t\t\t\t\t\t// imagecopyresized — Copia y cambia el tamaño de parte de una imagen\n\t\t\t\t\t\t// imagecopyresized() copia una porción de una imagen a otra imagen. dst_image es la imagen de destino, src_image es el identificador de la imagen de origen.\n\t\t\t\t\t\t// imagecopyresized(resource $dst_image(destino) , resource $src_image(origen) , int $dst_x(eje x izq) , int $dst_y(eje y up) , int $src_x(desde donde el corte) , int $src_y(dese el eje y) , int $dst_w(ancho de corte) , int $dst_h(alto de corte) , int $src_w(ancho de original) , int $src_h(alto original) )\n\t\t\t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\n\t\t\t\t\t\t// imagejpeg — Exportar la imagen al navegador o a un fichero\n\t\t\t\t\t\t// imagejpeg() crea un archivo JPEG desde image.\n\t\t\t\t\t\t// $destino es donde quedo la foto recortada\n\t\t\t\t\t\t//$ruta donde vmos a guardar la foto \n\t\t\t\t\t\timagejpeg($destino, $ruta);\n\t\t\t\t\t}\n\n\t\t\t\t\tif($_FILES['editarFoto']['type'] == \"image/png\")\n\t\t\t\t\t{\n\t\t\t\t\t\t/*=============================================\n\t\t\t\t\t\t\tGUARDAR LA IMAGEN EN EL DIRECTORIO\n\t\t\t\t\t\t=============================================*/\n\n\t\t\t\t\t\t$aleatorio = mt_rand(100,999);\n\n\t\t\t\t\t\t// le damos nombre a la imagen , y puede ser un nro aleaterio del 100 al 999\n\t\t\t\t\t\t$ruta = \"vistas/img/usuarios/\".$_POST['editarUsuario'].\"/\".$aleatorio.\".png\";\n\n\t\t\t\t\t\t// imagecreatefromjpeg — Crea una nueva imagen a partir de un fichero o de una URL\n\t\t\t\t\t\t// imagecreatefromjpeg() devuelve un identificador de imagen que representa la imagen obtenida desde el nombre de fichero dado.\n\t\t\t\t\t\t$origen = imagecreatefrompng($_FILES['editarFoto']['tmp_name']);\n\n\t\t\t\t\t\t// imagecreatetruecolor — Crear una nueva imagen de color verdadero\n\t\t\t\t\t\t// imagecreatetruecolor() devuelve un identificador de imagen que representa una imagen en negro del tamaño especificado.\n\t\t\t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\n\n\t\t\t\t\t\t// imagecopyresized — Copia y cambia el tamaño de parte de una imagen\n\t\t\t\t\t\t// imagecopyresized() copia una porción de una imagen a otra imagen. dst_image es la imagen de destino, src_image es el identificador de la imagen de origen.\n\t\t\t\t\t\t// imagecopyresized(resource $dst_image(destino) , resource $src_image(origen) , int $dst_x(eje x izq) , int $dst_y(eje y up) , int $src_x(desde donde el corte) , int $src_y(dese el eje y) , int $dst_w(ancho de corte) , int $dst_h(alto de corte) , int $src_w(ancho de original) , int $src_h(alto original) )\n\t\t\t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\n\t\t\t\t\t\t// imagejpeg — Exportar la imagen al navegador o a un fichero\n\t\t\t\t\t\t// imagejpeg() crea un archivo JPEG desde image.\n\t\t\t\t\t\t// $destino es donde quedo la foto recortada\n\t\t\t\t\t\t//$ruta donde vmos a guardar la foto \n\t\t\t\t\t\timagepng($destino, $ruta);\n\t\t\t\t\t}\n\n\t\t\t\t\t// var_dump($_FILES['nuevaFoto']['tmp_name']);\n\t\t\t\t\t// var_dump(getimagesize($_FILES['nuevaFoto']['tmp_name']));\n\n\t\t\t\t}\n\n\t\t\t\t$tabla = \"usuarios\";\n\n\t\t\t\t\n\t\t\t\t// si el nuevo pass es diferente a vacio\n\t\t\t\tif($_POST['editarPassword'] != \"\")\n\t\t\t\t{\n\t\t\t\t\tif(preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"editarPassword\"]))\n\t\t\t\t\t{\n\t\t\t\t\t\t//almacenamos en la variable encriptar y encriptamos el nuevo pass y usamos el hash de tipo CRYPT_BLOWFISH\n\t\t\t\t\t\t// crypt — Hash de cadenas de un sólo sentido, se encripta la pass ingresado\n\t\t\t\t\t\t$encriptar = crypt($_POST[\"editarPassword\"], '$2a$07$usesomesillystringforsalt$');\n\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo '<script>\n\t\t\t\t\n\t\t\t\t\t\t\tSwal.fire({\n\t\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\t\ttitle: \"La contrasena no puede ir vacio o lleva caracteres especiales\",\n\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t\t}).then((result)=>{\n\t\t\t\t\t\t\t\tif(result.value)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\twindow.location = \"usuarios\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</script>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse //si editarPassword viene vacio\n\t\t\t\t{\n\t\t\t\t\t$encriptar = $_POST[\"passwordActual\"];\n\t\t\t\t}\n\n\t\t\t\t$datos = array\n\t\t\t\t(\n\t\t\t\t\t\"nombre\"=> $_POST['editarNombre'],\n\t\t\t\t\t\"usuario\"=> $_POST['editarUsuario'],\t\n\t\t\t\t\t\"password\"=> $encriptar,\t\n\t\t\t\t\t\"perfil\"=> $_POST['editarPerfil'],\n\t\t\t\t\t\"ruta\" => $ruta\t\n\t\t\t\t);\n\n\t\t\t\t// llamamos al metodo mdlEditarUsuario de la clase modelo Usuario\n\t\t\t\t$respuesta = ModeloUsuarios::mdlEditarUsuario($tabla, $datos);\n\n\t\t\t\t// mostramos mensaje de edicion exitosa\n\t\t\t\tif($respuesta == \"ok\")\n\t\t\t\t{\n\t\t\t\t\techo '<script>\n\t\t\t\t\n\t\t\t\t\t\tSwal.fire({\n\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\ttitle: \"El usuario se editó correctamente!\",\n\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t}).then((result)=>{\n\t\t\t\t\t\t\tif(result.value)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twindow.location = \"usuarios\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t\t</script>';\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<script>\n\t\t\t\t\n\t\t\t\t\t\tSwal.fire({\n\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\ttitle: \"El nombre no puede ir vacio o lleva caracteres especiales\",\n\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t}).then((result)=>{\n\t\t\t\t\t\t\tif(result.value)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twindow.location = \"usuarios\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t</script>';\t\n\t\t\t}\n\t\t}\n\t}", "public function registrar_usuario($nombre, $apellido, $cedula, $telefono, $email, $direccion, $cargo, $usuario, $password1, $password2, $estado, $permisos)\n {\n $conectar = parent::conexion();\n parent::set_names();\n $sql = \"insert into usuarios \n values(null,?,?,?,?,?,?,?,?,?,?,now(),?);\";\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->execute();\n //obtenemos el valor del id del usuario\n $id_usuario = $conectar->lastInsertId();\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, $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 }", "public function setIdUsuario($idUsuario){\n $this->idUsuario = $idUsuario;\n }", "public function atualizarUsuarios($idusuario, $nome, $email, $senha, $senha_confirma, $telefone, $dtnascimento, $habilitado, $idpermissao){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT count(*) as total from tbusuarios WHERE email = '$email' \";\n $sql = $this->conexao->query($sql);\n $row = $sql->fetch_assoc();\n \n if($senha != $senha_confirma){\n return 2;\n }elseif ($senha == '' || $senha == null && $senha_confirma == '' || $senha_confirma == null ) {\n $sql = \"UPDATE tbusuarios SET nome = '$nome', email='$email', dt_nascimento='$dtnascimento', telefone='$telefone', data_modificado = NOW(), habilitado='$habilitado', idpermissao='$idpermissao' WHERE idusuario = '$idusuario' \";\n echo $this->conexao->query($sql);\n }else{\n $sql = \"UPDATE tbusuarios SET nome = '$nome', email='$email', senha='$senha', senha_confirma='$senha_confirma' dt_nascimento='$dtnascimento', telefone='$telefone', data_modificado = NOW(), habilitado='$habilitado', idpermissao='$idpermissao' WHERE idusuario = '$idusuario' \";\n\n echo $this->conexao->query($sql);\n }\n }", "function Usuario($idUsuario = '')\n\t\t{\n\t\t\t$this->id = \"usuario_id\";\n\t\t\t$this->tabla = \"usuario\";\n\t\t\t\n\t\t\t$this->exitoListar = t(\"User list obtained successfully\");\n\t\t\t$this->errorListar = t(\"Error obtaining user list\");\n\t\t\t$this->exitoInsertar = t(\"User created successfully\");\n\t\t\t$this->exitoActualizar = t(\"User updated successfully\");\n\t\t\t$this->errorInsertar = t(\"Error creating user\");\n\t\t\t$this->errorActualizar = t(\"Error updating user\");\t\n\t\t\t\n\t\t\t$this->campos = array(\n\t\t\t\t'usuario_id' => array('tipo'=>'id','nulo'=>true,'msg'=>t('Invalid user ID'),'valor'=>'','lectura'=>false),\n\t\t\t\t'usuario_nombre' => array('tipo'=>'string','nulo'=>true,'msg'=>t('Invalid user name'),'valor'=>'','lectura'=>false),\n\t\t\t\t'usuario_login' => array('tipo'=>'string','nulo'=>false,'msg'=>t('Invalid user login'),'valor'=>null,'lectura'=>false),\n\t\t\t\t'usuario_password' => array('tipo'=>'string','nulo'=>false,'msg'=>t('Invalid password'),'valor'=>null,'lectura'=>false),\n\t\t\t\t'usuario_rol_id' => array('tipo'=>'int','nulo'=>false,'msg'=>t('Invalid Rol'),'valor'=>null,'lectura'=>false),\n\t\t\t\t'usuario_email' => array('tipo'=>'email','nulo'=>true,'msg'=>t('Invalid email'),'valor'=>'','lectura'=>false),\n\t\t\t\t'usuario_apellido1' => array('tipo'=>'string','nulo'=>true,'msg'=>t('Invalid surname1'),'valor'=>'','lectura'=>false),\n\t\t\t\t'usuario_apellido2' => array('tipo'=>'string','nulo'=>true,'msg'=>t('Invalid surname2'),'valor'=>'','lectura'=>false),\n\t\t\t\t'usuario_detalles' => array('tipo'=>'html','nulo'=>true,'msg'=>t('Invalid details'),'valor'=>'','lectura'=>false)\n\t\t\t);\n\n\t\t\t$this->relaciones = array(\n\t\t\t\n\t\t\t\t'rol' => array (\n\t\t\t\t\t'tabla' => 'rol',\n\t\t\t\t\t'relacion' => '1a1',\n\t\t\t\t\t'soloLectura' => true,\n\t\t\t\t\t'clavePrimaria' => 'usuario_rol_id',\n\t\t\t\t\t'claveAjena1' => 'rol_id',\n\t\t\t\t\t'claveAjena2' => '',\n\t\t\t\t\t'campos' => array(\n\t\t\t\t\t\t'rol_id' => array('tipo'=>'id','nulo'=>true,'msg'=>t('Invalid rol id'),'valor'=>'','lectura'=>true),\t\t\t\t\t\n\t\t\t\t\t\t'rol_nombre' => array('tipo'=>'string','nulo'=>true,'msg'=>t('Invalid rol name'),'valor'=>'','lectura'=>true)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t$this->campos['usuario_id']['valor'] = $idUsuario;\n\t\t}", "function modificarUcedifobracivil(){\n\t\t$this->procedimiento='snx.ft_ucedifobracivil_ime';\n\t\t$this->transaccion='SNX_UDOC_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_ucedifobracivil','id_ucedifobracivil','int4');\n\t\t$this->setParametro('id_ucedifsubgrupo','id_ucedifsubgrupo','int4');\n\t\t$this->setParametro('cantidadobracivil','cantidadobracivil','numeric');\n\t\t$this->setParametro('id_obracivilmoe','id_obracivilmoe','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function alterarUsuario($conexao){\n\t\tif(isset($_POST[\"idusuario\"])){\n\t\t\t/*preenche os dados com as informações vindas do formulário*/\n\t\t\t$nome = $_POST['txtNomeUsuario'];\n\t\t\t$telefone = $_POST['txtTelUsuario'];\n\t\t\t$email = $_POST['txtEmailUsuario'];\n\t\t\t$logradouro = $_POST['txtLograUsuario'];\n\t\t\t$numero = $_POST['txtNumUsuario'];\n\t\t\t$bairro = $_POST['txtBairroUsuario'];\n\t\t\t$cidade = $_POST['txtCidadeUsuario'];\n\t\t\t$estado = $_POST['txtEstadoUsuario'];\n\t\t\t$sexo = isset($_POST['txtSexoUsuario']);\n\t\t\t$dtNasc = $_POST['txtDtnascUsuario'];\n\t\t\t$id = $_POST['idusuario'];\n\n\t\t\t/*Chama a função para alterar no banco passando os novos valores*/\n\t\t\t$retorno = usuario_alterar($conexao,$nome,$telefone,$email,$logradouro,$numero,$bairro,\n\t\t\t\t$cidade,$estado,$sexo,$dtNasc,$id);\n\n\t\t\t/*Se existir algum retorno ele entra coloca uma mensagem de sucesso e chama a pagina para listar os dados*/\n\t\t\tif($retorno){\n\t\t\t\t$retornoExc = \"Contato Alterado com Sucesso!\";\n\t\t\t\t$dados = listarDados($conexao);\n\t\t\t\trequire(\"view_lista.php\");\n\t\t\t}else{\n\t\t\t\t/*retorna mensagem informando que a alteração não foi realizada*/\n\t\t\t\tif(!valida_email($email)){\n\t\t\t\t\t$retornoExc = \"A alteração falhou, digite um email valido!\";\n\t\t\t\t}\n\t\t\t\telse if($nome == \"\"){\n\t\t\t\t\t$retornoExc = \"A alteração falhou o campo nome é obrigatório, tente novamente!\";\n\t\t\t\t}\n\t\t\t\t$dados = listarDados($conexao);\n\t\t\t\trequire(\"view_lista.php\");\n\t\t\t}\n\t\t\t\n\t\t}else if(isset($_GET['codigo'])){\n\t\t\t/*Pega o id passado pela url do contato que deseja excluir*/\n\t\t\t$id = $_GET['codigo'];\n\t\t\t/*Pega os dados do usuário passando a conexão e id*/\n\t\t\t$retorno = usuario_porId($conexao,$id);\n\t\t\t/*Se não existir retorno informa que busca falhou e retorna falso*/\n\t\t\tif(!$retorno){\n\t\t\t\t$retornoExc = \"Falha em buscar o Contato \";\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t/*Cria uma linha com os dados do contato passando para a variavel*/\n\t\t\t$dadosUsuario = mysqli_fetch_row($retorno);\n\t\t\t/*Passa para a variavel dados as informações do array com seus indices*/\n\t\t\t$dados = array(\"id\" => $dadosUsuario[0], \"nome\" => $dadosUsuario[1], \"logradouro\" => $dadosUsuario[2] , \"numero\" => $dadosUsuario[3], \"bairro\" => $dadosUsuario[4], \"cidade\" => $dadosUsuario[5], \"estado\" => $dadosUsuario[6], \"telefone\" => $dadosUsuario[7], \"email\" => $dadosUsuario[8], \"sexo\" => $dadosUsuario[9], \"dtNasc\" => $dadosUsuario[10]);\n\t\t\t/*Chama o formulario para alteração do usuário*/\n\t\t\trequire(\"view_form_cadastro_altera_usuario.php\");\n\t\t}else{\n\t\t\t$dados = listarDados($conexao);\n\t\t\trequire(\"view_lista.php\");\n\t\t}\n\t\t\n\t}", "public function atualizar()\r\n {\r\n return (new Database('instituicao'))->update('id=' . $this->id, [\r\n 'nome' => $this->nome,\r\n 'datacriacao' => $this->datacriacao,\r\n 'tipo' => $this->tipo\r\n\r\n ]);\r\n }", "function actualizar_autor($id_autor,$nombre,$empresa_institucion,$web_autor,$email) {\n\n\t\t$UpdateRecords = \"UPDATE autores SET autor='$nombre', empresa_institucion='$empresa_institucion', web_autor='$web_autor', email_autor='$email'\n\t\tWHERE id_autor='$id_autor'\";\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($UpdateRecords);\n\t\tmysql_close($connection);\n\t}", "function put_id() {\n \n if($this->name == \"\") {\n $this->name = $this->classname;\n }\n \n // if we stop using the session id- we should remove the session id from\n // the current QUERYSTRING/ or the HTTP_GET_VARS ????\n die(\"This has not been coded yet.\");\n }", "public function datos_usuario(){\n\t\t$data = json_decode(json_encode($_SESSION['USER']),true);\n\n\t\t$result = $this->_db->query(\"\n\t\tSELECT a.roleid FROM \".DB_PRE.\"role_assignments a, \".DB_PRE.\"context b \n\t\tWHERE a.userid = '$data[id]' AND a.contextid = b.id AND b.instanceid =\".ID_CURSO\n\t\t);\n\n\t\t$rol = 0;\n\t\tif (!$result) {\n\t\t\tprintf(\"Errormessage datos_usuario: %s\\n\", $this->_db->error);\n\t\t}else{\n\t $rol_user = $result->fetch_all(MYSQLI_ASSOC);\n\t if(count($rol_user) > 0){\n\t \t$rol = $rol_user['0']['roleid'];\n\t }\n \t}\n\n\t\t$usuario = array(\n\t\t\t\"id\" => $data['id'],\n\t\t\t\"nombre\" => $data['firstname'],\n\t\t\t\"apellido\" => $data['lastname'],\n\t\t\t\"codigo_estudiante\" => $data['idnumber'],\n\t\t\t\"rol\" => $rol\n\t\t);\n\n\t\t$datos_add = $this->_db->query(\"\n\t\t\tSELECT e.per_aca, b.id_facultad, a.id_programa, e.idnumber as codigo_curso, a.id_genero, a.idnumber\n\t\t\tFROM am_usuario a, am_programa b, \".DB_PRE.\"course e\n\t\t\tWHERE a.id_programa = b.id_programa\n\t\t\tAND e.id = \".ID_CURSO.\"\n\t\t\tAND id_moodle = \".$data['id']\n\t\t\t);\n\n\t\tif (!$datos_add) {\n\t\t\tprintf(\"Errormessage datos_add: %s\\n\", $this->_db->error);\n\t\t}else{\n\t\t\t$row = $datos_add->fetch_all(MYSQLI_ASSOC);\n\t\t\tforeach ($row as $key) {\n\t\t\t\tforeach ($key as $data => $value) {\n\t\t\t\t\t$usuario[$data] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $usuario;\n\t}", "public function actualizarperfil($id,$nombre,$primer_apellido,$segundo_apellido,$ano,$email,$telefono,$alias,$foto)\n {\n \n //busca en la tabla usuarios los campos donde el id sea el que le ha pasado el controlador\n $usuarios = R::load('usuarios',$id);\n \n //sobreescribe los campos\n $usuarios->nombre=$nombre;\n $usuarios->primer_apellido=$primer_apellido;\n $usuarios->segundo_apellido=$segundo_apellido;\n $usuarios-> fecha_nacimiento=$ano;\n $usuarios->email=$email;\n $usuarios->telefono=$telefono;\n $usuarios->alias=$alias;\n //si la foto exite se guarda en la base de datos se guarda el campo extension como png si la foto no exite se guarda como null\n $sustitutuirespaciosblancos = str_replace(\" \",\"_\",$alias);\n $directorio = \"assets/fotosperfil/usuario-\".$sustitutuirespaciosblancos.\".png\";\n $existefichero = is_file( $directorio );\n \n \n \n if($foto!=null){\n \n if ( $existefichero==true ){\n $extension=\"png\";\n }else{\n \n \n \n \n \n \n \n }}\n $usuarios->foto = $extension;\n // almacena los datos en la tabla usuarios de la base de datos\n R::store($usuarios);\n //rdirege al controlador Usuarios/Bienvenidos_u\n \n redirect(base_url().\"usuario/Usuarios/perfil_usuario\");\n \n \n }", "private function addIdentityFieldsToUser()\n {\n\n /** @var CrudService $service */\n $service = $this->container->get('shopware_attribute.crud_service');\n\n foreach (self::PROVIDERS as $provider) {\n $service->update('s_user_attributes', strtolower($provider) . '_identity', 'string', [\n 'label' => 'Identity ' . $provider,\n\n //user has the opportunity to translate the attribute field for each shop\n 'translatable' => false,\n\n //attribute will be displayed in the backend module\n 'displayInBackend' => true,\n\n //in case of multi_selection or single_selection type, article entities can be selected,\n 'entity' => Customer::class,\n\n //numeric position for the backend view, sorted ascending\n 'position' => 100,\n\n //user can modify the attribute in the free text field module\n 'custom' => false,\n ]);\n }\n\n $models = $this->container->get('models');\n $metaDataCache = $models->getConfiguration()->getMetadataCacheImpl();\n $metaDataCache->deleteAll();\n $models->generateAttributeModels(['s_user_attributes']);\n }", "function actualizarUsuarios($id,$nivel)\n {\n $this->my->query(\"UPDATE usuarios set nivel = $nivel\n WHERE id = $id \")or\n die(\"Problemas al actualizar Usuarios.\".$this->my->error);\n }", "public function ActualizarUsuarios()\n\t{\n\n\t\tif(empty($_POST[\"cedula\"]) or empty($_POST[\"nombres\"]) or empty($_POST[\"usuario\"]) or empty($_POST[\"password\"]))\n\t\t{\n\t\t\techo \"1\";\n\t\t\texit;\n\t\t}\n\t\tself::SetNames();\n\t\t$sql = \" select * from usuarios where codigo != ? and cedula = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_POST[\"codigo\"], $_POST[\"cedula\"]) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 0)\n\t\t{\n\t\t\techo \"2\";\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sql = \" select email from usuarios where codigo != ? and email = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array($_POST[\"codigo\"], $_POST[\"email\"]) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num > 0)\n\t\t\t{\n\t\t\t\techo \"3\";\n\t\t\t\texit;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$sql = \" select usuario from usuarios where codigo != ? and usuario = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->execute( array($_POST[\"codigo\"], $_POST[\"usuario\"]) );\n\t\t\t\t$num = $stmt->rowCount();\n\t\t\t\tif($num == 0)\n\t\t\t\t{\n\t\t\t\t\t$sql = \" update usuarios set \"\n\t\t\t\t\t.\" cedula = ?, \"\n\t\t\t\t\t.\" nombres = ?, \"\n\t\t\t\t\t.\" nrotelefono = ?, \"\n\t\t\t\t\t.\" cargo = ?, \"\n\t\t\t\t\t.\" email = ?, \"\n\t\t\t\t\t.\" usuario = ?, \"\n\t\t\t\t\t.\" password = ?, \"\n\t\t\t\t\t.\" nivel = ?, \"\n\t\t\t\t\t.\" status = ? \"\n\t\t\t\t\t.\" where \"\n\t\t\t\t\t.\" codigo = ?;\n\t\t\t\t\t\";\n\t\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t\t$stmt->bindParam(1, $cedula);\n\t\t\t\t\t$stmt->bindParam(2, $nombres);\n\t\t\t\t\t$stmt->bindParam(3, $nrotelefono);\n\t\t\t\t\t$stmt->bindParam(4, $cargo);\n\t\t\t\t\t$stmt->bindParam(5, $email);\n\t\t\t\t\t$stmt->bindParam(6, $usuario);\n\t\t\t\t\t$stmt->bindParam(7, $password);\n\t\t\t\t\t$stmt->bindParam(8, $nivel);\n\t\t\t\t\t$stmt->bindParam(9, $status);\n\t\t\t\t\t$stmt->bindParam(10, $codigo);\n\n\t\t\t\t\t$cedula = strip_tags($_POST[\"cedula\"]);\n\t\t\t\t\t$nombres = strip_tags($_POST[\"nombres\"]);\n\t\t\t\t\t$nrotelefono = strip_tags($_POST[\"nrotelefono\"]);\n\t\t\t\t\t$cargo = strip_tags($_POST[\"cargo\"]);\n\t\t\t\t\t$email = strip_tags($_POST[\"email\"]);\n\t\t\t\t\t$usuario = strip_tags($_POST[\"usuario\"]);\n\t\t\t\t\t$password = sha1(md5($_POST[\"password\"]));\n\t\t\t\t\t$nivel = strip_tags($_POST[\"nivel\"]);\n\t\t\t\t\t$status = strip_tags(strtoupper($_POST[\"status\"]));\n\t\t\t\t\t$codigo = strip_tags(strtoupper($_POST[\"codigo\"]));\n\t\t\t\t\t$stmt->execute();\n\n################## SUBIR FOTO DE USUARIOS ######################################\n//datos del arhivo \n\t\t\t\t\tif (isset($_FILES['imagen']['name'])) { $nombre_archivo = $_FILES['imagen']['name']; } else { $nombre_archivo =''; }\n\t\t\t\t\tif (isset($_FILES['imagen']['type'])) { $tipo_archivo = $_FILES['imagen']['type']; } else { $tipo_archivo =''; }\n\t\t\t\t\tif (isset($_FILES['imagen']['size'])) { $tamano_archivo = $_FILES['imagen']['size']; } else { $tamano_archivo =''; } \n//compruebo si las características del archivo son las que deseo \n\t\t\t\t\tif ((strpos($tipo_archivo,'image/jpeg')!==false)&&$tamano_archivo<50000) \n\t\t\t\t\t{ \n\t\t\t\t\t\tif (move_uploaded_file($_FILES['imagen']['tmp_name'], \"fotos/\".$nombre_archivo) && rename(\"fotos/\".$nombre_archivo,\"fotos/\".$_POST[\"cedula\"].\".jpg\"))\n\t\t\t\t\t\t{ \n## se puede dar un aviso\n\t\t\t\t\t\t} \n## se puede dar otro aviso \n\t\t\t\t\t}\n################## FINALIZA SUBIR FOTO DE USUARIOS ######################################\n\n\t\t\t\t\techo \"<div class='alert alert-info'>\";\n\t\t\t\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\t\t\t\techo \"<span class='fa fa-check-square-o'></span> EL USUARIO FUE ACTUALIZADO EXITOSAMENTE\";\n\t\t\t\t\techo \"</div>\";\t\t\n\t\t\t\t\texit;\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo \"4\";\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function modeloUserUpdate ($userid,$userdat){\n if ( isset($_SESSION['tusuarios'][$userid])){\n $_SESSION['tusuarios'][$userid]= $userdat;\n \n $user = new Usuario();\n $user->id = $userid;\n $user->nombre = $userdat['nombre'];\n $user->password = $userdat['password'];\n $user->correo = $userdat['correo'];\n $user->plan = $userdat['plan'];\n $user->estado = $userdat['estado'];\n $db = AccesoDatos::getModelo();\n $db->modUsuario($user);\n \n echo \"<script>modificarUser();</script>\"; \n\n }\n return false;\n}", "function getIdusuario(){\n\t\treturn $this->idusuario;\n\t}", "function modificarEmpresa(){\n\t\t$this->procedimiento='dir.f_empresa_ime';\n\t\t$this->transaccion='DIR_EMP_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_empresa','id_empresa','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('tipo_sociedad','tipo_sociedad','varchar');\n\t\t$this->setParametro('objeto','objeto','text');\n\t\t$this->setParametro('dir_comercial','dir_comercial','varchar');\n\t\t$this->setParametro('nit','nit','varchar');\n\t\t$this->setParametro('clase','clase','varchar');\n\t\t$this->setParametro('domicilio','domicilio','text');\n\t\t$this->setParametro('matricula','matricula','int8');\n\t\t$this->setParametro('renovado','renovado','int4');\n\t\t$this->setParametro('domicilio_legal','domicilio_legal','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('seccion','seccion','varchar');\n\t\t$this->setParametro('telefono','telefono','varchar');\n\t\t$this->setParametro('divission','divission','varchar');\n\t\t$this->setParametro('estado_matricula','estado_matricula','varchar');\n\t\t$this->setParametro('mail','mail','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function actualizar_usuario_admin()\n {\n \n $nombre = $_REQUEST['Name'];\n $password = $_REQUEST['Password'];\n $type = $_REQUEST['Type'];\n $code = $_REQUEST['Code'];\n\n if (isset($nombre) && isset($password) && isset($type) && isset($code)) {\n\n //creacion de token de contraseña\n $token = bin2hex( openssl_random_pseudo_bytes(20) );\n\n $token_clave= hash('ripemd160', $password);\n\n //data que se enviar a la tabla MA_LOGIN_ADMIN\n $data_updt_admin = array(\n\n 'clave' => $token_clave,\n 'tipo' => $type,\n 'description' => $nombre\n\n );\n\n //query para actualizar datos en base de datos segun el usuario que este llegano\n $this->db->where('num_registro', $code);\n\n if ($this->db->update('MA_LOGIN_ADMIN', $data_updt_admin)) {\n \n $respuesta = '1';\n\n $response = array(\n\n 'respuesta' => $respuesta\n\n );\n\n echo json_encode($response);\n\n } else {\n \n $respuesta = '2';\n\n $response = array(\n\n 'respuesta' => $respuesta\n\n );\n\n echo json_encode($response);\n\n }\n \n\n }\n\n }", "private function usrsave() {\n $id = 0;\n $resultado = 0;\n $pass = '';\n if ($this->UTILITY->validate_email($this->email)) {\n $arrjson = $this->UTILITY->error_wrong_email();\n } else {\n if ($this->id > 0) {\n //se verifica que el email está disponible\n $q = \"SELECT usr_id FROM ass_usuario WHERE usr_email = '\" . $this->email . \"' AND usr_id != $this->id \";\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $resultado = mysql_num_rows($con);\n if ($resultado == 0) {\n //actualiza la informacion\n $q = \"SELECT usr_id FROM ass_usuario WHERE usr_id = \" . $this->id;\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n while ($obj = mysql_fetch_object($con)) {\n $id = $obj->usr_id;\n if (strlen($this->pass) > 2) {\n $pass = $this->UTILITY->make_hash_pass($this->email, $this->pass);\n }\n $table = \"ass_usuario\";\n $arrfieldscomma = array(\n 'usr_nombre' => $this->nombre,\n 'usr_apellido' => $this->apellido,\n 'usr_email' => $this->email,\n 'usr_pass' => $pass,\n 'usr_cargo' => $this->cargo,\n 'usr_identificacion' => $this->identificacion,\n 'usr_celular' => $this->celular,\n 'usr_telefono' => $this->telefono,\n 'usr_habilitado' => $this->habilitado,\n 'usr_contacto' => $this->contacto);\n $arrfieldsnocomma = array('mzt_proveedor_pro_id' => $this->idprov, 'mzt_cliente_cli_id' => $this->idcli, 'usr_dtcreate' => $this->UTILITY->date_now_server());\n $q = $this->UTILITY->make_query_update($table, \"usr_id = '$id'\", $arrfieldscomma, $arrfieldsnocomma);\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $arrjson = array('output' => array('valid' => true, 'id' => $id));\n }\n } else {\n $arrjson = $this->UTILITY->error_user_already_exist();\n }\n } else {\n //se verifica que el email está disponible\n $q = \"SELECT usr_id FROM ass_usuario WHERE usr_email = '\" . $this->email . \"'\";\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $resultado = mysql_num_rows($con);\n if ($resultado == 0) {\n if (strlen($this->pass) > 2) {\n $pass = $this->UTILITY->make_hash_pass($this->email, $this->pass);\n }\n $this->pass = $pass;\n $q = \"INSERT INTO ass_usuario (usr_dtcreate, mzt_cliente_cli_id, mzt_proveedor_pro_id, usr_habilitado, usr_nombre, usr_apellido, usr_cargo, usr_email, usr_pass, usr_identificacion, usr_celular, usr_telefono, usr_contacto) VALUES (\" . $this->UTILITY->date_now_server() . \", $this->idcli, $this->idprov, '$this->habilitado', '$this->nombre', '$this->apellido', '$this->cargo', '$this->email', '$this->pass', '$this->identificacion', '$this->celular', '$this->telefono', '$this->contacto')\";\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $id = mysql_insert_id();\n $arrjson = array('output' => array('valid' => true, 'id' => $id));\n } else {\n $arrjson = $this->UTILITY->error_user_already_exist();\n }\n }\n }\n $this->response = ($arrjson);\n }", "public function autentificacion($username,$password){\n $userService = new UsuariosServiceImp();\n //objeto de tipo usuario\n $usuario = new Usuarios();\n //llamdo al metodo definido en la capa de servicio\n $usuario = $userService->buscarPorUsernamePassword($username,$password);\n if ( is_object($usuario)){\n /*\n variable de sesion mediante variables locales\n \n $_SESSION['nombre'] = $usuario->getNombre();\n $_SESSION['correo'] = $usuario->getEmail();\n $_SESSION['id'] = $usuario->getId();\n */\n /* variable de sesion mediante un arreglo asociado\n */\n $_SESSION['miSesion'] = array();\n $_SESSION['miSesion']['nombre'] = $usuario->getNombre();\n $_SESSION['miSesion']['correo'] = $usuario->getEmail();\n $_SESSION['miSesion']['id'] = $usuario->getId();\n \n //echo \"<br>El usuario es valido\";\n header(\"location:../view/productos.class.php\");\n }else{\n //echo \"<br>Este usuario no esta registrado en la base de datos\";\n header(\"location:../view/formLogin.html\");\n }\n }", "public function getIdUsuario(){\n return $this->idUsuario;\n }", "function actualizar($id_usuario, $nombre_usuario, $nick_usuario, $clave, $apellido_usuario, $direccion_usuario, $telefono_usuario, $email_usuario, $genero_usuario, $id_rol){\n\n\t\tinclude 'data_bd.inc';\n\t\tinclude 'databaseClass.php';\n\t\t//creo mi cadena de conexion\n\t\t$conexion = new DB($host, $user, $pass, $bd);\n\t\t//Creo mi conexión\n\t\t$status = $conexion->conectar();\n\t\t//En caso de que devuelva una falla\n\t\tif($status === FALSE){\n\t\t\tdie('No se pudo conectar');\n\t\t}\n\t\t//Creo mi query\n\t\t$consulta = \"UPDATE\n\t\t\t\t\tusuario\n\t\t\t\t\tSET nombre_usuario = '$nombre_usuario',\n\t\t\t\t\t\tnick_usuario = '$nick_usuario',\n\t\t\t\t\t\tclave = '$clave',\n\t\t\t\t\t\tapellido_usuario = '$apellido_usuario',\n\t\t\t\t\t\tdireccion_usuario = '$direccion_usuario',\n\t\t\t\t\t\ttelefono_usuario = '$telefono_usuario',\n\t\t\t\t\t\temail_usuario = '$email_usuario',\n\t\t\t\t\t\tgenero_usuario = '$genero_usuario',\n\t\t\t\t\t\tid_rol = '$id_rol'\n\t\t\t\t\tWHERE id_usuario='$id_usuario'\n\t\t\t\t\t\t\";\n\t\t//Ejecuto la consulta\n\t\t$resultado = $conexion -> ejecutarConsulta($consulta);\n\t\t//Si fue una falla\n\t\tif($conexion === FALSE){\n\t\t\t$conexion -> cerrar();\t\n\t\t\treturn FALSE;\n\t\t}\n\t\t//Cierro la conexion\n\t\t$conexion -> cerrar();\n\t\tif($resultado == TRUE)\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\telse {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function loguear($usuario) {\n $_SESSION[\"idUser\"] = $usuario[\"id\"];\n }", "public function actualizarInfoUsuario(){\n \n if(isset($_PUT[\"editFname\"])){\n \n $datos = array(\n \"id\" => $_PUT[\"\"],\n \"Fname\" => $_PUT[\"\"],\n \"Lname\" => $_PUT[\"\"],\n \"Pass\" => $_PUT[\"\"],\n \"Area\" => $_PUT[\"\"],\n );\n\n $actualizar = UsersModel::actualizarInfoUsuario($datos, \"usuario\");\n\n if($actualizar){\n header(\"location: \".URL_PAGE.\"viewUser/\".$_PUT[\"\"]);\n }; \n \n\n }\n\n }", "function post_conectar()\n\t{\n\t\t//En este metodo antiguamente se incluia codigo para asegurarse que el esquema de auditoria\n\t\t//guardara el usuario conectado.\n\t}", "function modify_user($ci, $grado, $espe, $nombres, $paterno, $materno, $fec_nac, $lugar, $direccion, $fono, $celular, $gsanguineo, $gestion, $curso) {\n\n // If $password is blank, make no changes to the current password\n \t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n $qUpdate = \"UPDATE alumno SET ci='$ci', grado='$grado', espe='$espe', nombres='$nombres', paterno='$paterno', materno='$materno', fec_nac='$fec_nac', lugar='$lugar', direccion='$direccion', fono='$fono', celular='$celular', gsanguineo='$gsanguineo', gestion='$gestion', curso='$curso' WHERE ci = '$ci'\";\n\t\t\t$result = mysql_query($qUpdate); \n\t\t\treturn 1;\n // }\n\t}", "function gen_id() {\n\t\t$this->id = get_uid();\n\t\t$this->mk_paths($this->id);\n\t}", "public function setIduser($value)\n {\n $this->iduser = $value;\n }", "function setUsuario($usuario, $contraseña, $nombre, $apellidos, $telefono, $movil){\n\t\t\n\t\t$resultado = conectar()->query( \"SELECT * FROM usuarios WHERE usuario LIKE '$usuario'\");\n\t\tif($resultado->num_rows == 0){\n\t\t\tconectar()->query(\"INSERT INTO usuarios (usuario, contrasenia, nombre, apellidos, telefono, movil) VALUES ('\" . $usuario . \"','\" . $contraseña . \"','\" . $nombre . \"','\" . $apellidos .\"','\" . $telefono . \"','\" . $movil .\"')\");\n\t\t\techo \"<script>alert('Te has registrado correctamente!');document.location.reload();\";\t\n\t\t}else{\n\t\t\techo \"<script>alert('Ya existe ese nombre de usuario!');</script>\";\n\t\t}\n\t}", "public function buscarUsuarios(){\n\t\t}", "public function getIdUsuarioAcalificar()\n {\n return $this->idUsuarioAcalificar;\n }", "public function getID()\n {\n return $this->idUsuario;\n }", "function crearUsuario($correo,$nombre,$contrasenya){\n require (\"../configuracion/conexion.php\");\n \n //COMPROBAR SI EL CORREO YA ESTA EN USO\n $comprobarCorreo =\"SELECT correo FROM Usuarios WHERE correo='$correo'\";\n $resultCorreo = mysqli_query($conn, $comprobarCorreo);\n \n $filasCorreo=mysqli_num_rows($resultCorreo);\n if($filasCorreo==0){\n \n //COMPROBAR SI YA EXISTE EL NOMBRE DE USUARIO\n \n $comprobarNombre =\"SELECT nombre_usuario FROM Usuarios WHERE nombre_usuario='$nombre'\";\n $resultNombre = mysqli_query($conn, $comprobarNombre);\n \n $filasNombre=mysqli_num_rows($resultNombre);\n if($filasNombre==0){\n \n //AUTOINCREMENTAR ID\n $cons = \"SELECT ID_usuario FROM Usuarios ORDER BY ID_usuario DESC LIMIT 1;\";\n $result = mysqli_query($conn, $cons);\n \n while($fila = mysqli_fetch_array($result)){\n \n $ID = $fila[0] + 1;\n }\n //METER USUARIO\n $addUsuario = \"INSERT INTO Usuarios VALUES('$ID','$nombre','$contrasenya','$correo');\";\n $result = mysqli_query($conn, $addUsuario);\n \n \n //INICIAR SESION DESPUES DE CREARLO\n \n $cons=\"SELECT * FROM Usuarios WHERE correo='$correo' and password='$contrasenya'\";\n $result = mysqli_query($conn, $cons);\n \n if ($fila = mysqli_fetch_array($result)) {\n \n session_start();\n \t $_SESSION[\"correo\"] = $fila['correo'];\n \t $_SESSION[\"usuario\"] = $fila['nombre_usuario'];\n \t $_SESSION[\"id\"] = $fila['ID_usuario'];\n \t $_SESSION[\"idAlbum\"] = \"\";\n\t $_SESSION[\"nombre_album\"] = \"\";\n }\n \n return 0;\n \n }else{\n return 2;\n }\n }else{\n return 1;\n }\n \n mysqli_free_result($result);\n mysqli_close($conn);\n\n //LISTA DE ERRORES Y CORRECTO:\n //0 Funciona todo bien\n //1 Correo en uso\n //2 Nombre en uso\n }", "public function salvar_meu_cadastro($dados,$password = true){\n\n #seta o endereço, se tiver sido preenchido\n if (_v($dados,\"bairro\") != \"\"){\n $end = [\"bairro\"=>$dados[\"bairro\"], \"cidade\"=>$dados[\"cidade\"], \"uf\"=>$dados[\"uf\"]];\n $CI =& get_instance();\n $CI->load->model('Endereco_model');\n $endereco = $CI->Endereco_model->getOrCreate($end);\n $dados[\"idbairro\"] = $endereco[\"idbairro\"];\n } else {\n $dados[\"idbairro\"] = null;\n }\n \n #transforma o nome dos campos que vem do formulário para o nome no db\n $fields = [\"id\",\"nome_completo\",\"nome_social\",\"email\",\"cpf\",\"tipoInscricao\",\n \"curriculo\",\"lattes\",\"telefone\",\"foto\",\n \"instituicao\"=>\"idinstituicao\",\n \"curso\"=>\"idcurso\",\"pago\",\"logradouro\",\"idnivelcurso\",\n \"cep\",\"numero\",\"idbairro\",\"outra_instituicao\"];\n\n $tratados = $this->replaceNames($dados,$fields);\n if (!isset($dados[\"id\"])){\n $tratados[\"id\"] = null;\n }\n \n\n #caso ele tenha marcado outra instituicao\n if (isset($tratados[\"idinstituicao\"])){\n if ($tratados[\"idinstituicao\"] == \"outra\"){\n $tratados[\"idinstituicao\"] = null;\n } else {\n $tratados[\"outra_instituicao\"] = null;\n }\n }\n\n if (_v($dados,\"password\") != \"\"){\n if (_v($dados,\"id\") == \"\" && !isset($dados[\"password\"])){\n $tratados[\"password\"] = sha1(\"12345678\");\n } else {\n $tratados[\"password\"] = sha1($dados[\"password\"]);\n\n #se eu estiver alterando a minha propria senha na area de perfil\n if (isset($_SESSION[\"user\"]) && _v($_SESSION[\"user\"],\"id\") == $dados[\"id\"]){\n $tratados[\"email_confirmado\"] = true;\n }\n }\n if ($password == false){\n $tratados[\"password\"] = null;\n }\n }\n\n #todo mundo terá pago por padrão\n $tratados['pago'] = true;\n\n #todo mundo é participante por padrão\n if (_v($dados,\"id\") == \"\"){\n $tratados['nivel'] = NIVEL_PARTICIPANTE;\n }\n \n \n return parent::salvar($tratados);\n }", "public function persitiRequesicao() : UsuarioAdaptadorInterface\n {\n $this->usuario->setNome(head($this->only([\"nome\"])))\n ->setEmail(head($this->only([\"email\"])))\n ->setPassword(head($this->only([\"password\"])))\n ->setRamal(head($this->only([\"ramal\"])))\n ->setStatus(head($this->only([\"status\"])));\n\n $this->usuario->repositorio()->create([\n \"nome\" => $this->usuario->getNome(),\n \"email\" => $this->usuario->getEmail(),\n \"password\" => $this->usuario->getPassword(),\n \"ramal\" => $this->usuario->getRamal(),\n \"status\" => $this->usuario->getStatus()\n ]);\n\n return $this->usuario;\n }", "function a_edit() {\n\t\tif (isset($_POST[\"btSubmit\"])) {\n\t\t\t$_POST['use_passw']=password_hash($_POST['use_passw'], PASSWORD_DEFAULT);\n\t\t\t$u=new User();\n\t\t\t$u->chargerDepuisTableau($_POST);\n\t\t\t$u->sauver();\n\t\t\theader(\"location:index.php?m=documents\");\n\t\t} else {\t\t\t\t\n\t\t\t$id = isset($_GET[\"id\"]) ? $_GET[\"id\"] : 0;\n\t\t\t$u=new User($id);\n\t\t\textract($u->data);\t\n\t\t\trequire $this->gabarit;\n\t\t}\n\t}", "public function initadminpassword() {\n if (isAuthorized('utilisateurs', 'initpassword')) :\n $this->Utilisateur->id = 1;\n $record = $this->Utilisateur->read();\n unset($record['Utilisateur']['password']); \n unset($record['Utilisateur']['created']);\n unset($record['Utilisateur']['modified']);\n $record['Utilisateur']['password']='@DMIN'; \n $record['Utilisateur']['created'] = $this->Utilisateur->read('created');\n $record['Utilisateur']['modified'] = date('Y-m-d'); \n if ($this->Utilisateur->save($record)) {\n $this->save_history(1,'<b style=\"color:red;\">Initialisation du mot de passe administrateur</b>');\n $this->Session->setFlash(__('Mot de passe de l\\'administrateur initialisé',true),'flash_success');\n $this->History->goBack(1);\n } \n $this->Session->setFlash(__('Mot de passe de l\\'administrateur <b>NON</b> initialisé',true),'flash_failure');\n $this->History->goBack(1);\n else :\n $this->Session->setFlash(__('Action non autorisée, veuillez contacter l\\'administrateur.',true),'flash_warning');\n throw new UnauthorizedException(\"Vous n'êtes pas autorisé à utiliser cette fonctionnalité de l'outil\");\n endif; \n }", "public function getUsuarioUni($idusuario) {\n }", "function setId_ubi($iid_ubi = '')\n {\n $this->iid_ubi = $iid_ubi;\n }", "abstract protected function getUserId() ;", "function saveUser() {\n\n //datos desde el formulario\n $nombres = $this->input->post('nombres');\n $apellidos = $this->input->post('apellidos');\n $email = $this->input->post('email');\n $marca_favorita = $this->input->post('marca_favorita');\n $modelo_favorito = $this->input->post('modelo');\n $profesion = $this->input->post('profesion');\n $pais = $this->input->post('pais');\n $telefono = $this->input->post('telefono');\n\n //re-verificamos si el user existe\n $exi = $this->Secure_model->checkEmail($email);\n if ($exi == TRUE) {\n redirect(base_url() . 'index.php/site/aviso/2');\n }\n //se enviara a usuario\n //$temp_clave = \"hola\";\n $temp_clave = $this->Secure_model->generateClave($nombres);\n $clave = md5(utf8_encode($temp_clave));\n $tipo_usuario = '2';\n $estado = md5($email);\n $datos = array(\n 'nombres' => $nombres,\n 'apellidos' => $apellidos,\n 'email' => $email,\n 'pais' => $pais,\n 'clave' => $clave,\n 'tipo_usuario' => $tipo_usuario,\n 'estado' => $estado,\n 'primium' => '0',\n 'fecha_registro' => date('Y-m-d'),\n );\n //$this->session->set_userdata('temp_data',$datos);\n // GUARDAMOS QUE ACABAMOS DE CREAR Y OBTENEMOS EL ULTIMO ID\n $last_id = $this->savedata_model->guardar('cq_usuario', $datos);\n //Guardamos numero de telefono\n $dato_tel = array(\n //'id_telefono' => '',\n 'id_usuario' => $last_id,\n 'telefono' => $telefono,\n 'codigo_pais' => $pais\n );\n\n $this->savedata_model->guardar('cq_telefonos', $dato_tel);\n\n // EVIAMOS NOTIFICACION DE CORREO\n $nombre = $nombres . \" \" . $apellidos;\n\n $datos = array('tipo' => 'registro',\n 'to' => $email,\n 'clave' => $temp_clave,\n 'nombre' => $nombre);\n\n\n if ($this->function_model->enviarMail($datos)) {\n\n redirect(base_url() . 'index.php/site/aviso/1');\n } else {\n redirect(base_url() . 'index.php/site/aviso/3');\n }\n }", "public function dedicate(){ // only use during install\n global $USER;\n checkCapabilities('install:dedicate', $USER->role_id);\n $db = DB::prepare('UPDATE users SET creator_id = ?');\n return $db->execute(array($this->creator_id));\n }", "static public function ctrEditUser(){\n\t\t\tif(isset($_POST[\"editarUsuario\"])){\n\t\t\t\tif(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/',$_POST[\"editarNombre\"]) ){\n\n\t\t\t\t\t/*==========================================================\n\t\t\t\t\t\tV A L I D A R I M A G E N\n\t\t\t\t\t==========================================================*/\n\t\t\t\t\t$ruta = $_POST[\"fotoActual\"];\n\t\t\t\t\tif(isset($_FILES[\"editarFoto\"][\"tmp_name\"]) && $_FILES[\"editarFoto\"][\"tmp_name\"] != \"\"){\n\t\t\t\t\t\tlist($ancho, $alto) = getimagesize($_FILES[\"editarFoto\"][\"tmp_name\"]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$nuevoAncho = 500;\n\t\t\t\t\t\t$nuevoAlto = 500;\n\n\t\t\t\t\t\t/*---------------------------------------------\n\t\t\t\t\t\t\tCREAR DIRECTORIO DONDE SE GUARDA LA FOTO\n\t\t\t\t\t\t---------------------------------------------*/\n\t\t\t\t\t\t$directorio = \"view/img/usuarios/\".$_POST[\"editarUsuario\"];\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*--------------------------------------------\n\t\t\t\t\t\t\tPREGUNTAR SI EXISTE FOTO EN LA DB\n\t\t\t\t\t\t--------------------------------------------*/\n\t\t\t\t\t\tif(!empty($_POST[\"fotoActual\"])){\n\t\t\t\t\t\t\tunlink($_POST[\"fotoActual\"]);\n\t\t\t\t\t\t}else{//Creamos Directorio\n\t\t\t\t\t\t\tmkdir($directorio, 0755);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/*---------------------------------------------\n\t\t\t\t\t\t\tDE ACUERDO AL TIPO DE IMAGEN ACCIONES\n\t\t\t\t\t\t---------------------------------------------*/\n\t\t\t\t\t\t$rand = mt_rand(100, 999);\n\n\t\t\t\t\t\t//------------------ IMAGEN JPEG ------------------\n\t\t\t\t\t\tif($_FILES[\"editarFoto\"][\"type\"] == \"image/jpeg\"){\n\t\t\t\t\t\t\t//Guardamos Imagen en el Directorio\n\t\t\t\t\t\t\t$ruta = \"view/img/usuarios/\".$_POST[\"editarUsuario\"].\"/\".$rand.\".jpeg\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$origen = imagecreatefromjpeg($_FILES[\"editarFoto\"][\"tmp_name\"]);\n\t\t\t\t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\n\t\t\t\t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\t\t\t\t\t\t\timagejpeg($destino, $ruta);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($_FILES[\"editarFoto\"][\"type\"] == \"image/png\"){\n\t\t\t\t\t\t\t//Guardamos Imagen en el Directorio\n\t\t\t\t\t\t\t$ruta = \"view/img/usuarios/\".$_POST[\"editarUsuario\"].\"/\".$rand.\".png\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$origen = imagecreatefrompng($_FILES[\"editarFoto\"][\"tmp_name\"]);\n\t\t\t\t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\n\t\t\t\t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\t\t\t\t\t\t\timagepng($destino, $ruta);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\t\t\t\t\t//Posible Cambio de Contraseña\n\t\t\t\t\t$crPassword = \"\";\n\t\t\t\t\tif($_POST[\"editarPassword\"] != \"\"){\n\t\t\t\t\t\tif(preg_match('/^[a-zA-Z0-9]+$/',$_POST[\"editarPassword\"])){\n\t\t\t\t\t\t\t$crPassword = crypt($_POST[\"editarPassword\"], '$2a$08$abb55asfrga85df8g42g8fDDAS58olf973adfacmY28n05$');\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\techo '<script>\n\t\t\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t\t\ttype: \"warning\",\n\t\t\t\t\t\t\t\t\t\ttitle: \"La contraseña no puede llevar caracteres especiales\",\n\t\t\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t\t\t\t}).then((result=>{\n\t\t\t\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\t\t\t\twindow.location = \"users\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}))\n\t\t\t\t\t\t\t\t</script>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\t//Editar Password viene vacio, no se modificara contraseña\n\t\t\t\t\t\t$crPassword = $_POST[\"passwordActual\"];\n\t\t\t\t\t}\n\t\t\t\t\t$tabla = \"usuarios\";\n\t\t\t\t\t$datos = array(\n\t\t\t\t\t\t\"nombre\"=>$_POST[\"editarNombre\"],\n\t\t\t\t\t\t\"usuario\" => $_POST[\"editarUsuario\"],\n\t\t\t\t\t\t\"password\" => $crPassword,\n\t\t\t\t\t\t\"perfil\" => $_POST[\"editarPerfil\"],\n\t\t\t\t\t\t\"foto\" => $ruta);\n\t\t\t\t\t\n\t\t\t\t\t$respuesta = ModelUsers::mdlEditarUsuario($tabla, $datos);\n\n\t\t\t\t\tif($respuesta){//Usuario guardado con exito\n\t\t\t\t\t\techo '<script>\n\t\t\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\t\t\t\ttitle: \"Usuario guardado con exito\",\n\t\t\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t\t\t\t}).then((result=>{\n\t\t\t\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\t\t\t\twindow.location = \"users\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}))\n\t\t\t\t\t\t\t\t</script>';\n\t\t\t\t\t}else{//Error al guardar usuario\n\t\t\t\t\t\techo '<script>\n\t\t\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\t\t\t\ttitle: \"Error al guardar usuario '.$respuesta.'\",\n\t\t\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t\t\t\t}).then((result=>{\n\t\t\t\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\t\t\t\twindow.location = \"users\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}))\n\t\t\t\t\t\t\t\t</script>';\n\t\t\t\t\t}\n\t\t\t\t}else{//Nombre no valido\n\t\t\t\t\techo '<script>\n\t\t\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t\t\ttype: \"warning\",\n\t\t\t\t\t\t\t\t\t\ttitle: \"Nombre no puede ir vacio o llevar caracteres especiales\",\n\t\t\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t\t\t\t}).then((result=>{\n\t\t\t\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\t\t\t\twindow.location = \"users\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}))\n\t\t\t\t\t\t\t\t</script>';\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function actualizaSoloUsuario($dataArray){\n //deleted, created_at y updated_at son comunes, pero estos jamas se actualizaran por acá\n if (array_key_exists('password',$dataArray))\n $dataArray['password'] = bcrypt($dataArray['password']);\n \n $this->model->update($dataArray); //set data only in its PersonaNatural model\n }", "function ins_apoderado_joomla(){\n\n define('_JEXEC', 1);\n define('DS', DIRECTORY_SEPARATOR);\n define('JPATH_BASE', $_SERVER[\"DOCUMENT_ROOT\"]);\n require_once JPATH_BASE.DS.'includes'.DS.'defines.php';\n require JPATH_LIBRARIES.DS.'import.php';\n require JPATH_LIBRARIES.DS.'cms.php';\n\n JLoader::import('joomla.user.authentication');\n JLoader::import('joomla.application.component.helper');\n\n $mainframe = JFactory::getApplication('site');\n $mainframe->initialise();\n jimport( 'joomla.user.helper');\n\n $no_email = false;\n if(empty($_POST[\"email_apoderado\"])){\n $no_email = true;\n $_POST[\"email_apoderado\"] = $_POST[\"run_apoderado\"].\"@mail.cl\";\n }\n\n $apoderado = new Apoderado();\n $apoderado->set_run($_POST[\"run_apoderado\"]);\n $apoderado->set_nombre1($_POST[\"nombre1_apoderado\"]);\n $apoderado->set_email($_POST[\"email_apoderado\"]);\n\n $result[\"result\"] = \"0\";\n $result[\"msg\"] = \"Lo sentimos, ocurrió un error fatal y el apoderado no pudo ser ingresado al sistema.\";\n\n $validar = true;\n if(!$apoderado->validar_run()){$validar = false;}\n if(!$apoderado->validar_nombre1()){$validar = false;}\n if(!$apoderado->validar_email()){$validar = false;}\n\n $existencia = false;\n if($validar){\n $db = JFactory::getDBO();\n $db->setQuery(\"SELECT id FROM z_users WHERE username = '\" . $apoderado->get_run().\"'\");\n $db->query();\n $data = $db->loadResult();\n\n //print_r(\"SELECT id FROM z_users WHERE username = \" . $apoderado->get_run());\n if(!empty($data)){\n $result[\"result\"] = \"3\";\n $result[\"msg\"] = \"El apoderado ya existe en el sistema.\";\n $existencia = true;\n }else{\n $db->setQuery(\"SELECT id FROM z_users WHERE email = '\" . $apoderado->get_email().\"'\");\n $db->query();\n $data = $db->loadResult();\n\n if(!empty($data)){\n $result[\"result\"] = \"1\";\n $result[\"msg\"] = \"El mail del apoderado es usado por otro usuario.\";\n $existencia = true;\n }\n }\n }else{\n $result[\"result\"] = \"1\";\n $result[\"msg\"] = \"Fallo de validacion\";\n }\n\n\n if(!$existencia) {\n $data = array(\n \"name\" => $apoderado->get_nombre1(),\n \"username\" => $apoderado->get_run(),\n \"password\" => $apoderado->get_run(),\n \"password2\" => $apoderado->get_run(),\n \"email\" => $apoderado->get_email(),\n \"block\" => 0,\n \"groups\" => array(\"1\", \"2\")\n );\n //print_r($data);\n $save = true;\n $user = new JUser;\n if (!$user->bind($data)) {\n $save = false;\n }\n if (!$user->save()) {\n $save = false;\n }\n\n if (!$save) {\n $result[\"result\"] = \"1\";\n $result[\"msg\"] = \"Error Fatal\";\n }else{\n if($no_email){\n $result[\"result\"] = \"2\";\n $result[\"msg\"] = \"Ingreso exitoso al sistema. Se asigno el email \".$_POST['run_apoderado'].\"@mail.cl. Recuerde cambiarlo más tarde.\";\n }else{\n $result[\"result\"] = \"3\";\n $result[\"msg\"] = \"Ingreso exitoso al sistema.\";\n }\n }\n\n }\n $result = json_encode($result, JSON_UNESCAPED_UNICODE);\n print_r($result);\n\n}", "public function testUpdateUser()\n {\n }", "function updateUser($mysqli, $parametres){\r\n\t$idUser=$parametres[0];\r\n\t$token=$parametres[1];\r\n\t$direccio=$parametres[2];\r\n\t$municipi=$parametres[3];\r\n\t$codi_postal=$parametres[4];\r\n\t$user=$parametres[5];\r\n\t$telf=$parametres[6];\r\n\t$email=$parametres[7];\r\n\t$n=0;\r\n\t$n2=0;\r\n\tif($user!=-1)\r\n\t{\r\n\t\t$actualiza=\"user='\".$user.\"'\";\r\n\t\t$n=1;\r\n\t}\r\n\tif($telf!=-1)\r\n\t{\r\n\t\tif($n==0)\r\n\t\t{\r\n\t\t\t$actualiza=\"mobil='\".$telf.\"'\";\r\n\t\t\t$n=1;\r\n\t\t}else{\r\n\t\t\t$actualiza=$actualiza.\", mobil='\".$telf.\"'\";\t\r\n\t\t}\r\n\t}\r\n\tif($email!=-1)\r\n\t{\r\n\t\tif($n==0)\r\n\t\t{\r\n\t\t\t$actualiza=\"mail='\".$email.\"'\";\r\n\t\t\t$n=1;\r\n\t\t}else{\r\n\t\t\t$actualiza=$actualiza.\", mail='\".$email.\"'\";\t\r\n\t\t}\r\n\t} \r\n\tif($direccio!=-1)\r\n\t{\r\n\t\t$actualiza2=\"direccio='\".$direccio.\"'\";\r\n\t\t$n2=1;\r\n\t}\r\n\tif($municipi!=-1)\r\n\t{\r\n\t\tif($n2==0)\r\n\t\t{\r\n\t\t\t$actualiza2=\"municipi='\".$municipi.\"'\";\r\n\t\t\t$n2=1;\r\n\t\t}else{\r\n\t\t\t$actualiza2=$actualiza2.\", municipi='\".$municipi.\"'\";\t\r\n\t\t}\r\n\t}\r\n\tif($codi_postal!=-1)\r\n\t{\r\n\t\tif($n2==0)\r\n\t\t{\r\n\t\t\t$actualiza2=\"codi_postal='\".$codi_postal.\"'\";\r\n\t\t\t$n2=1;\r\n\t\t}else{\r\n\t\t\t$actualiza2=$actualiza2.\", codi_postal='\".$codi_postal.\"'\";\t\r\n\t\t}\r\n\t}\r\n\tif(validarUser($mysqli, $idUser, $token, &$idAlumne))\r\n\t{\r\n\t\tif($n==1)\r\n\t\t{\r\n\t\t\t$sql=\"UPDATE users SET \".$actualiza.\" WHERE idUser=\".$idUser;\r\n\t\t\taccessBBDD($mysqli, $sql);\r\n\t\t}\r\n\t\tif($n2==1)\r\n\t\t{\r\n\t\t\t$sql=\"UPDATE alumnes SET \".$actualiza2.\" WHERE idAlumne=\".$idAlumne;\r\n\t\t\taccessBBDD($mysqli, $sql);\r\n\t\t}\r\n\t}\r\n\treturn json_encode($ret);\r\n}", "private function usr(){\r\n\r\n if(defined(\"USER_ID\")){ return true;}else{return false;}\r\n\r\n }", "public function updatedUsuario()\n {\n // Notificamos al otro componente el cambio\n $this->emit('cambioUsuario', $this->usuario);\n }", "function editUsersManagement($id_users, $pseudo, $lastname, $firstname, $email, $roleusers){\n $managementUsersEdition = new \\Project\\Models\\ManagementUserManager();\n $managementEditionUsers = $managementUsersEdition->usersManagementEdition($id_users, $pseudo, $lastname, $firstname, $email, $roleusers); \n\n header(\"Location: administration.php?action=managementUsers&id=$id_users\");\n \n }", "public function ctrIngresoUsuario(){\n\n\t\tif(isset($_POST[\"user01\"])){\n\n\t\t//\t if(preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"ingresoEmail\"]) && preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingresoPassword\"])){\n\n\t\t\t \t//$encriptar = crypt($_POST[\"ingresoPassword\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\t\t\t\t$encriptar = crypt($_POST[\"passwords01\"], '$2a$07$asxx54ahjppf17sd87a5a4dDDGsystemdevmybebe$');\n\n\t\t\t \t$tabla = \"genusuario\";\n\t\t\t \t$item = \"usunombre\";\n\t\t\t \t$valor = $_POST[\"user01\"];\n\n\t\t\t \t$respuesta = UserModel::mdlMostrarUsuarios($tabla, $item, $valor);\n\n\t\t\t\t//echo \"<pre>\".print_r($respuesta).\"</pre>\";\n\n\t\t\t \tif($respuesta[\"usunombre\"] == $_POST[\"user01\"] && $respuesta[\"usuclave\"] == $encriptar){\n\n\t\t\t \t\tif($respuesta[\"usuverific\"] == 0){\n\n\t\t\t \t\t\techo'<script>\n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\t\t\t \ttitle: \"¡ERROR!\",\n\t\t\t\t\t\t\t\t \ttext: \"¡El correo electrónico aún no ha sido verificado, por favor revise la bandeja de entrada o la carpeta SPAM de su correo electrónico para verificar la cuenta, o contáctese con nuestro soporte a info@valientesdigitales.com.co!\",\n\t\t\t\t\t\t\t\t \tshowConfirmButton: true,\n\t\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\t\t\t\tif(result.value){ \n\t\t\t\t\t\t\t\t\t history.back();\n\t\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t</script>';\n\n\t\t\t\t\t\treturn;\n\n\t\t\t \t\t}else{\n\n\t\t\t \t\t\t$_SESSION[\"validarSesion\"] = \"ok\";\n\t\t\t \t\t\t$_SESSION[\"id\"] = $respuesta[\"oid\"];\n\n\t\t\t \t\t\t$ruta = RouteController::ctrRoute();\n\n\t\t\t \t\t\techo '<script>\n\t\t\t\t\t\n\t\t\t\t\t\t\twindow.location = \"'.$ruta.'backoffice\";\t\t\t\t\n\n\t\t\t\t\t\t</script>';\n\n\t\t\t \t\t}\n\n\t\t\t \t}else{\n\n\t\t\t \t\techo'<script>\n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\t\t \ttitle: \"¡ERROR!\",\n\t\t\t\t\t\t\t \ttext: \"¡El email o contraseña no coinciden!\",\n\t\t\t\t\t\t\t \tshowConfirmButton: true,\n\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\t\t\tif(result.value){ \n\t\t\t\t\t\t\t\t history.back();\n\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t});\n\n\t\t\t\t\t</script>';\n\n\t\t\t \t}\n\n\n\t\t/*\t }else{\n\n\t\t\t \techo '<script>\n\n\t\t\t\t\tswal({\n\n\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\ttitle: \"¡CORREGIR!\",\n\t\t\t\t\t\ttext: \"¡No se permiten caracteres especiales en ninguno de los campos!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\tif(result.value){\n\n\t\t\t\t\t\t\thistory.back();\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\t\n\n\t\t\t\t</script>';\n\n\t\t\t }*/\n\n\t\t}\n\n\t}" ]
[ "0.6308505", "0.611441", "0.59041864", "0.5889915", "0.5869512", "0.5841992", "0.5839715", "0.5833855", "0.58307433", "0.5811085", "0.5803951", "0.5793719", "0.5764676", "0.5761687", "0.57488644", "0.57398325", "0.5717253", "0.5703978", "0.5692041", "0.56799996", "0.56711644", "0.5669851", "0.5653081", "0.5651298", "0.56448287", "0.5625686", "0.5624912", "0.560626", "0.56020135", "0.55898756", "0.55806446", "0.5563852", "0.5560144", "0.554819", "0.55463105", "0.55108684", "0.55045915", "0.55028677", "0.54975903", "0.54956007", "0.5493898", "0.5493019", "0.5480213", "0.5479276", "0.54746747", "0.54743683", "0.5473809", "0.54691863", "0.5468947", "0.545975", "0.5459526", "0.54565775", "0.5455059", "0.5452205", "0.5449371", "0.54427046", "0.5437356", "0.5436907", "0.543371", "0.54334784", "0.5432335", "0.5431794", "0.5425706", "0.5421094", "0.5420133", "0.5418308", "0.5417442", "0.5410989", "0.54072446", "0.5406497", "0.54035914", "0.54014313", "0.5398669", "0.53816676", "0.5381319", "0.5379722", "0.5377319", "0.5374394", "0.5365682", "0.53615624", "0.5359586", "0.53595096", "0.53480417", "0.5347401", "0.53455454", "0.5344001", "0.5340532", "0.53375393", "0.53360087", "0.53269553", "0.5316111", "0.5315282", "0.53141385", "0.53124386", "0.530834", "0.53071874", "0.5303431", "0.5303277", "0.5295442", "0.5293979", "0.529039" ]
0.0
-1
Eliminar un idioma de un usuario
public function destroy($lang) { $language_id = \DB::table('languages')->where('language',$lang)->value('id'); $queries = \DB::table('studentlanguages')->where('language_id',$language_id)->where('student_id',$this->student_id)->delete(); Session::flash('type',"warning"); Session::flash('insert', "Idioma eliminado."); return view('student.curriculum'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eliminar_autonomo()\n\t{\n\t\ttry {\n\t\t\t$this->db->abrir_transaccion();\n\t\t\t$this->db->retrasar_constraints();\n\t\t\t$this->eliminar();\n\t\t\t$this->db->cerrar_transaccion();\n\t\t\t$this->manejador_interface->mensaje(\"El proyecto '{$this->identificador}' ha sido eliminado\");\n\t\t} catch ( toba_error $e ) {\n\t\t\t$this->db->abortar_transaccion();\n\t\t\t$this->manejador_interface->error( \"Ha ocurrido un error durante la eliminacion de TABLAS de la instancia:\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t$e->getMessage() );\n\t\t}\n\t}", "function eliminarUcedifobracivil(){\n\t\t$this->procedimiento='snx.ft_ucedifobracivil_ime';\n\t\t$this->transaccion='SNX_UDOC_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_ucedifobracivil','id_ucedifobracivil','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function EliminarRegistro()\n\t{\n\t\t$usuario = UsuarioFacebook::ObtenerUsuarioActivo();\n\t\tif(!$usuario->EsSuperUsuario)\n\t\tthrow new Exception('No eres súper usuario, así que no puedes eliminar a otros usuarios');\n\t\tif($usuario->IdFacebook == $this->IdFacebook)\n\t\tthrow new Exception('No puedes auto-eliminarte');\n\t\t/*\n\t\t * NOTA: Las claves foráneas que no se eliminan son obligatorias\n\t\t * para los datos del club. Si alguna clave restringe la eliminación del usuario,\n\t\t * entonces será imposible realizar dicha acción.\n\t\t * Para esto puede usar la suspensión dle usuario.\n\t\t */\n\t\t$conexionBd = new ConectorBaseDatos();\n\t\t$idFacebook = $conexionBd->Escapar($this->IdFacebook);\n\t\t$conexionBd->IniciarTransaccion();\n\t\t// Eliminar ítems vendidos\n\t\t$conexionBd->EjecutarComando(sprintf(\"DELETE FROM Venta WHERE IdUsuario = %s\", $idFacebook));\n\t\t// Eliminar álbumes\n\t\t$conexionBd->EjecutarComando(sprintf(\"DELETE FROM LaminaAlbum WHERE Album IN (SELECT Id FROM Album WHERE IdUsuario = %s)\", $idFacebook));\n\t\t$conexionBd->EjecutarComando(sprintf(\"DELETE FROM Album WHERE IdUsuario = %s\", $idFacebook));\n\t\t// Eliminar historial de puntos\n\t\t$conexionBd->EjecutarComando(sprintf(\"DELETE FROM Puntos WHERE IdUsuario = %s\", $idFacebook));\n\t\t// Eliminar membresía de grupos\n\t\t$conexionBd->EjecutarComando(sprintf(\"DELETE FROM UsuarioGrupo WHERE Usuario = %s\", $idFacebook));\n\t\t// Eliminar cambio de nivel\n\t\t$conexionBd->EjecutarComando(sprintf(\"DELETE FROM CambioNivel WHERE IdUsuario = %s\", $idFacebook));\n\t\t// Eliminar permisos concedidos\n\t\t$conexionBd->EjecutarComando(sprintf(\"DELETE FROM PermisoUsuario WHERE Usuario = %s\", $idFacebook));\n\t\t// Eliminar asistencias\n\t\t$conexionBd->EjecutarComando(sprintf(\"DELETE FROM Asistencia WHERE IdUsuario = %s\", $idFacebook));\n\t\t// Heredar los usuarios validados por el próximo a eliminarse\n\t\t$conexionBd->Sentencia = sprintf(\"UPDATE UsuarioFacebook SET ValidadoPor = %s WHERE ValidadoPor = %s\",\n\t\t$conexionBd->Escapar($usuario->IdFacebook),\n\t\t$idFacebook\n\t\t);\n\t\t$conexionBd->EjecutarComando();\n\t\t// Eliminarlo.\n\t\t$conexionBd->EjecutarComando();\n\t\t$conexionBd->Sentencia = sprintf(\"DELETE FROM UsuarioFacebook WHERE IdFacebook = %s\",\n\t\t$idFacebook\n\t\t);\n\t\t$conexionBd->EjecutarComando();\n\t\t$conexionBd->ConfirmarTransaccion();\n\t\t$conexionBd->Desconectar();\n\t}", "public function delIdentity()\n\t{\n\t\t// Verifier l'adhesion\n\t\t$q = new Bn_query('u2a', '_asso');\n\t\t$q->setFields('u2a_adherentid');\n\t\t$q->addWhere('u2a_userid='. $this->getVal('id', -1));\n\t\t$adheId = $q->getOne();\n\t\t$q->deleteRow();\n\t\t$q->setTables('adherents');\n\t\t$q->deleteRow('adhe_id=' . $adheId);\n\t}", "function eliminarDiaryUser($id) {\n $sql = \"DELETE FROM diario WHERE id='\" . $id . \"'\";\n $con = new DB();\n $result = $con->exec($sql);\n $con = null;\n }", "function opcion__eliminar()\n\t{\n\t\t$id_proyecto = $this->get_id_proyecto_actual();\n\t\tif ( $id_proyecto == 'toba' ) {\n\t\t\tthrow new toba_error(\"No es posible eliminar el proyecto 'toba'\");\n\t\t}\n\t\ttry {\n\t\t\t$p = $this->get_proyecto();\n\t\t\tif ( $this->consola->dialogo_simple(\"Desea ELIMINAR los metadatos y DESVINCULAR el proyecto '\"\n\t\t\t\t\t.$id_proyecto.\"' de la instancia '\"\n\t\t\t\t\t.$this->get_id_instancia_actual().\"'\") ) {\n\t\t\t\t$p->eliminar_autonomo();\n\t\t\t}\n\t\t} catch (toba_error $e) {\n\t\t\t$this->consola->error($e->__toString());\n\t\t}\n\t\t$this->get_instancia()->desvincular_proyecto( $id_proyecto );\n\t}", "function remove_existing(){\n $db = DB::connect(DB_CONNECTION_STRING);\n \n $sql = \"delete from user \n where postcode = \" . $db->quote($this->postcode) . \"\n and email = \" . $db->quote($this->email) .\"\n and user_id <> \" . $db->quote($this->user_id);\n $db->query($sql); \n }", "public function eliminarderivoAction()\n {\n $this->disableAutoRender();\n\n /* Recibo la lista de Ids separado por comas */\n $idList = $this->_getParam('id');\n\n if ($idList) {\n /* Convierto la lista a un Array */\n $idArray = explode (\",\", $idList);\n\n /* Recorro el array eliminando cada Id */\n foreach ($idArray as $id) {\n try {\n $resultado = $this->_modeloDerivotemporal->eliminar($id, $this->_usuario);\n\t\t\t\t\t\n if($resultado == 0) { /* Si no se eliminó */\n echo 'error|No está autorizado a eliminar este registro'; \n exit;\n }\n\t\t\t\t\n\t\t} catch(Exception $ex) {\n $message = $ex->getMessage();\n echo 'error|'.$message;\n }\n }\n }\n }", "private function eliminarEmpleadoRepetido()\n {\n //Sino me los trata como strings\n $this->empleados = array_unique($this->empleados, SORT_REGULAR);\n }", "static public function ctrBorrarUsuario(){\n\t\tif (isset($_POST['idUsuario'])) {\n\t\t\tif ($_POST['fotoUsuario'] != \"\") {\n\t\t\t\tunlink($_POST[\"fotoUsuario\"]);\n\t\t\t\trmdir('Views/img/usuarios/'.$_POST['usuario']);\n\t\t\t}\n\t\t$answer=adminph\\User::find($_POST['idUsuario']);\n\t\t$answer->delete();\n\t\t}\n\t}", "function SupprimerProfil($pseudonyme){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"DELETE FROM allinformations WHERE Pseudo='$pseudonyme'\";\r\n\t\t$ligne= mysqli_query($conn, $requete);\t\r\n\t\tmysqli_close($conn);\t\t\r\n\t\t}", "public function deleteUser()\n {\n\n $this->displayAllEmployees();\n $id = readline(\"Unesite broj ispred zaposlenika kojeg želite izbrisati :\");\n $check = readline(\"Jeste li sigurni? da/ne: \");\n\n if ($check === 'da'){\n $this->employeeStorage->deleteEmployee($id);\n }\n\n }", "public function Eliminar(){\n\t\t\t$enlace = AccesoBD::Conexion();\n\n\t\t\t$sql = \"DELETE FROM denuncia WHERE ID_DENUNCIA = '$this->idDenuncia'\";\n\n\t\t\tif ($enlace->query($sql) !== TRUE) {\n \t\t\techo \"Error al eliminar la denuncia\";\n \t\t\texit();\n\t\t\t}\n\t\t\techo \"Denuncia eliminada\";\n\t\t}", "public function eliminar() {\n\t\t\n\t\t\n\t\t$juradodni = $_GET[\"dniJurado\"];\n\t\t\n\t\t$this -> JuradoMapper -> delete($juradodni);\n\n\t\t\n\t\t$this -> view -> redirect(\"jurado\", \"listar\");\n\t\t//falta cambiar\n\t}", "function eliminarpermiso()\n {\n $oconexion = new conectar();\n //se establece conexión con la base de datos\n $conexion = $oconexion->conexion();\n //consulta para eliminar el registro\n $sql = \"UPDATE permiso SET eliminado=1 WHERE id_permiso=$this->id_permiso\";\n // $sql=\"DELETE FROM estudiante WHERE id=$this->id\";\n //se ejecuta la consulta\n $result = mysqli_query($conexion, $sql);\n return $result;\n }", "public static function Eliminar($idUsuario)\n\t\t{\n\t\t\t$bd = BD::Instancia();\n\t\t\t$consulta = \"\";\n\t\t\t$res = new Comunicacion();\n\t\n\t\t\tif($idUsuario == '')\n\t\t\t{\t\n\t\t\t\t$res->exito = false;\n\t\t\t\t$res->mensaje = t(\"Error deleting user\");\n\t\t\t\t$res->errores = t(\"User not defined\");\n\t\t\t\treturn $res;\n\t\t\t}\n\t\n\t\t\t// si se elimina un administrador hay que asegurarse de que no es el único, sino nadie más podría administrar\n\t\t\t$consulta = \"SELECT COUNT(*) FROM usuario WHERE usuario_id!= '\". $idUsuario .\"' AND usuario_rol_id = '1' \";\n\t\n\t\t\t$numFilas = $bd->ContarFilas($consulta); \n\t\t\tif ( $numFilas == 0 )\n\t\t\t{\n\t\t\t\t$res->exito = false;\n\t\t\t\t$res->mensaje = t(\"Error deleting user\");\n\t\t\t\t$res->errores = t(\"This is the only administrator account. You can't delete it\");\n\t\t\t\treturn $res;\n\t\t\t}\n\t\t\t\n\t\t\t$consulta = \"DELETE FROM usuario WHERE usuario_id='\". $idUsuario .\"'\";\n\t\t\t$bd->Ejecutar($consulta);\n\t\t\t\n\t\t\t// los registros que eran propiedad de este usuario ahora pasan a ser del administrador\n\t\t\t$bd->Ejecutar(\"UPDATE profesional SET profesional_usuario_id='1' WHERE profesional_usuario_id='\".$idUsuario.\"' \");\n\t\t\t$bd->Ejecutar(\"UPDATE documento SET documento_usuario_id='1' WHERE documento_usuario_id='\".$idUsuario.\"' \");\n\t\t\t$bd->Ejecutar(\"UPDATE obra SET obra_usuario_id='1' WHERE obra_usuario_id='\".$idUsuario.\"' \");\n\t\t\t$bd->Ejecutar(\"UPDATE bibliografia SET bibliografia_usuario_id='1' WHERE bibliografia_usuario_id='\".$idUsuario.\"' \");\n\t\t\t$bd->Ejecutar(\"UPDATE intervencion SET intervencion_usuario_id='1' WHERE intervencion_usuario_id='\".$idUsuario.\"' \");\n\t\t\t\n\t\t\t// si todo ha ido bien construimos la respuesta JSON y la devolvemos\n\t\t\tif( $bd->ObtenerErrores() == \"\" )\n\t\t\t{\t\t\t\t\n\t\t\t\t$res->exito = true;\n\t\t\t\t$res->mensaje = t(\"User deleted successfully\");\n\t\t\t\t$res->errores = \"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$res->exito = false;\n\t\t\t\t$res->mensaje = t(\"Error deleting user\");\n\t\t\t\t$res->errores = $bd->ObtenerErrores();\n\t\t\t}\n\t\t\treturn $res;\n\t\t}", "function eraseUserById($var)\n {\n $bdd = connexMedoo();\n $bdd->delete(\"utilisateurs\", [\n 'id' => $var\n ]);\n }", "private function idiomas_del_anuncio($id){\n\t\t$return = '';\n\t\t$this->where('anuncio',$id);\n\t\tif($salida_idiomas = $this->get('anuncios_idiomas', NULL, 'idioma')){\n\t\t\tforeach ($salida_idiomas as $value) {\n\n\t\t\t\t$return .= $value['idioma'].' ';\n\t\t\t}\n\t\t}\n\t\treturn $return;\n\t}", "protected function avantSuppression() {\n $passagers = $this->getListePassagers();\n foreach ($passagers as $passager) {\n $passager->supprimer();\n }\n }", "public function remove() {\n\n // Updates DB (data & metadata)\n $this->attributes->removeAll($this->get(\"id\"));\n $this->db->delete(XCMS_Tables::TABLE_USERS, array(\n \"id\" => $this->get(\"id\")\n ));\n\n }", "function del_compte()\r\n\t{\r\n\t\tglobal $nuked, $user, $language, $repertoire;\r\n\r\n\t\tif($user[1] >= \"1\")\r\n\t\t{\r\n\t\t\t$del=mysql_query(\"DELETE FROM \".ESPACE_MEMBRE_TABLE.\" WHERE user_id='\".$user[0].\"' \");\r\n\t\t\t$del=mysql_query(\"DELETE FROM \".ESPACE_MEMBRE_GALERY_TABLE.\" WHERE user_id='\".$user[0].\"' \");\r\n\r\n\t\t\tif ($rep = @opendir($repertoire.$user[0]))\r\n\t\t\t{\r\n\t\t\t\twhile ($file = readdir($rep)) \r\n\t\t\t\t{\r\n\t\t\t\t\tif($file != \"..\") \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($file != \".\") \r\n\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t@unlink($repertoire.$user[0].\"/\".$file);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t@rmdir($repertoire.$user[0]);\r\n\t\t\techo\"<div style=\\\"text-align: center;\\\"><br /><br /><b>\"._COMTPEDELETE.\"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\",3);\r\n\t\t}else{\r\n\t\t\techo\"\t<div style=\\\"text-align: center;\\\"><br /><br /><b>\" . _NOTACCES . \"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\", 3);\r\n\t\t}\r\n\t}", "public function eliminarAction()\n {\n $this->disableAutoRender();\n\n /* Recibo la lista de Ids separado por comas */\n $idList = $this->_getParam('id');\n\n if ($idList) {\n /* Convierto la lista a un Array */\n $idArray = explode (\",\", $idList);\n\n /* Recorro el array eliminando cada Id */\n foreach ($idArray as $id) {\n try {\n $resultado = $this->_modeloMovimiento->eliminar($id, $this->_usuario);\n \n if($resultado == 0) { /* Si no se eliminó */\n echo 'error|No está autorizado a eliminar este registro'; \n exit;\n }\n \n \n } catch(Exception $ex) {\n $message = $ex->getMessage();\n echo 'error|'.$message;\n }\n }\n }\n }", "public function EliminarUsuarios()\n{\n\n\t$sql = \" select codigo from ventas where codigo = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codigo\"])) );\n\t$num = $stmt->rowCount();\n\tif($num == 0)\n\t{\n\n\t\t$sql = \" delete from usuarios where codigo = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codigo);\n\t\t$codigo = base64_decode($_GET[\"codigo\"]);\n\t\t$stmt->execute();\n\n\t\theader(\"Location: usuarios?mesage=1\");\n\t\texit;\n\n\t}else {\n\n\t\theader(\"Location: usuarios?mesage=2\");\n\t\texit;\n\t}\n\n}", "public function deleteUsuario(){\n $conexion = new Database();\n\t\tif ($this->codigo){\n $sql = sprintf('DELETE FROM agenda_usuario WHERE usuario_id = %d',\n $this->codigo);\n $conexion->exec( $sql );\n }\n }", "function eliminarUser($id) {\n $sql = \"DELETE FROM usuario WHERE id='\" . $id . \"'\";\n $con = new DB();\n $result = $con->exec($sql);\n $con = null;\n }", "function eliminarHerrajeaccesorio(){\n\t\t$this->procedimiento='snx.ft_herrajeaccesorio_ime';\n\t\t$this->transaccion='SNX_HAC_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_herrajeaccesorio','id_herrajeaccesorio','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function eliminarViajeroInterno(){\n\t\t$this->procedimiento='obingresos.ft_viajero_interno_ime';\n\t\t$this->transaccion='OBING_CVI_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_viajero_interno','id_viajero_interno','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function make_remove($id){\n\t\tfor ($i=0;$i<count($this->table_names_modify);$i++){\n\t\t\t$this->modify_all_id_service($id,$this->table_names_modify[$i]);\n\t\t}\n\t\t//borramos todos aquellos registros en los que hay un id_user;\t\t\n\t\tfor ($i=0;$i<count($this->table_names_delete);$i++){\n\t\t\t$this->delete_all_id_service($id,$this->table_names_delete[$i]);\n\t\t}\n\t\n\t}", "public function eliminarPorDominio($dominio)\n {\n }", "function eliminarPresupuesto(){\n\t\t$this->procedimiento='pre.ft_presupuesto_ime';\n\t\t$this->transaccion='PRE_PRE_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_presupuesto','id_presupuesto','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function eliminarUsuario()\n {\n $bd = new Bd($this->tabla);\n $sql = \"DELETE FROM usuarios WHERE id=\" . $_GET['id'];\n\n $resultado = $bd->consulta($sql);\n if ($resultado == true) {\n header('location: gestionUsuarios.php');\n }\n }", "function supprimer($userID)\n{\n require('_connexionbdd.php');\n\n if ($userID != null) {\n $bdd = my_pdo_connexxionWeCon();\n $req = $bdd->prepare(\"DELETE FROM sousmembres WHERE identifiant = ?\");\n $req -> execute(array($userID));\n }\n}", "function eliminarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_ime';\n\t\t$this->transaccion='GEM_GEMETO_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_metodologia','id_metodologia','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function removePerm($aid){\n\t\t//$arr=array('uid'=>$uid,'rid'=>$rid);\n\t\t$this->db->delete('user_admin',array('ID'=>$aid));\n\t}", "function eliminarEmpresa(){\n\t\t$this->procedimiento='dir.f_empresa_ime';\n\t\t$this->transaccion='DIR_EMP_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_empresa','id_empresa','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function rmUser($user){\n\tglobal $dbLink;\n\t\n\t$sqlgetInfo = \"SELECT main_group FROM users WHERE uid='$user'\";\n\t\n\tif($getInfo = $dbLink->query($sqlgetInfo)){\n\t\twhile($getResult = $getInfo->fetch_assoc()){\n\t\tif($getResult['main_group'] != 'student'){\n\t\t\n\t\t\t$sqlSelectClass = \"SELECT c_id FROM classes WHERE t_uid='$user'\";\n\t\t\tif($SelectClass = $dbLink->query($sqlSelectClass)){\n\t\t\t\twhile($ArrayClass = $SelectClass->fetch_assoc()){\n\t\t\t\t\tforeach($ArrayClass as $class){\n\t\t\t\t\t\t$sqlDeleteReg = \"DELETE FROM registrar WHERE c_id='$class'\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!$dbLink->query($sqlDeleteReg)){\n\t\t\t\t\t\t\t$_SESSION['error_message'] = \"Could not delete the class\";\n\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$sqlSelectFiles = \"SELECT fid FROM file_registrar WHERE c_id='$class'\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($getFid = $dbLink->query($sqlSelectFiles)){\n\t\t\t\t\t\t\twhile($ArrFid = $getFid->fetch_assoc()){\n\t\t\t\t\t\t\t\tforeach($ArrFid as $fid){\n\t\t\t\t\t\t\t\t\t$sqlDeleteFiles = \"DELETE FROM edu_files WHERE fid='$fid'\";\n\t\t\t\t\t\t\t\t\tif(!$dbLink->query($sqlDeleteFiles)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$_SESSION['error_message'] = \"Could not delete files\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t\t\t\t}//delete files where the fid is stated\n\t\t\t\t\t\t\t\t}//end of foreach($ArrFid\n\t\t\t\t\t\t\t}//end of while loop to get FID's\n\t\t\t\t\t\t}//end of if statement to select file ID's\n\t\t\t\t\t\t$sqlDeleteFReg = \"DELETE FROM file_registrar WHERE c_id='$class'\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!$dbLink->query($sqlDeleteFReg)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$_SESSION['error_message'] = \"Could not delete from File Registrar\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t}\n\t\t\t\t\t}//end of foreach($Array\n\t\t\t\t}//end of while\n\t\t\t}//end of if to remove class data\n\t\t\t$sqlDeleteClass = \"DELETE FROM classes WHERE t_uid='$user'\";\n\t\t\tif(!$dbLink->query($sqlDeleteClass)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$_SESSION['error_message'] = \"Could not delete from the classes table\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdie();\n\t\t\t}//end of if to remove class from the classes table\t\n\t\t\t\n\t\t\t$sqlrmStudent = \"DELETE FROM users WHERE uid='$user'\";\n\t\t\t$sqlrmTorrent = \"DELETE FROM `xbt_users` WHERE uid='$user'\";\n\t\t\tif(!$dbLink->query($sqlrmStudent)){\n\t\t\t\t\t\t\t\n\t\t\t}//end of remove student if statement\n\n\t\t\tif(!$dbLink->query($sqlrmTorrent)){\n\t\t\t\t\t\t\t$_SESSION['error_message'] = \"The user has not been deleted\";\n\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\tdie();\n\t\t\t}//end of remove student if statement\n\t\t\telse{\n\t\t\t\t\t\t\t$_SESSION['error_message'] = \"The user has been deleted\";\n\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\tdie();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif($getResult['main_group'] == 'student'){\n\t\t\t$sqlrmStudent = \"DELETE FROM users WHERE uid='$user'\";\n\t\t\t$sqlrmTorrent = \"DELETE FROM `xbt_users` WHERE uid='$user'\";\n\t\t\tif(!$dbLink->query($sqlrmStudent)){\n\t\t\t\t\t\t\t\n\t\t\t}//end of remove student if statement\n\t\t\t\n\t\t\tif(!$dbLink->query($sqlrmTorrent)){\n\t\t\t\t\t\t\t$_SESSION['error_message'] = \"The user has not been deleted\";\n\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\tdie();\n\t\t\t}//end of remove student if statement\n\t\t\telse{\n\t\t\t\t\t\t\t$_SESSION['error_message'] = \"The user has been deleted\";\n\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\tdie();\n\t\t\t}\n\t\t}\n\t\t\n\t\t}//end of while getInfo Array\n\t}//end of if(sqlgetInfo\n}", "function user_remove($user_info)\n {\n }", "public function eliminarAnuncio($id){\n\t\t\t\n\t\t\tif(!$this->filtrarInt($id)){/**Comprobamos que nos pasan un id desde la vista*/\n \t$this->redireccionar('administrador');/**Si no lo pasan, nos devuelve a la pantalla administrador*/\n \t}\n\t\t\t\t\t\t\n\t\t\t $this->_administrador->eliminarAnuncio(/**Si nos pasan el id desde la vista, llamamos a la funcion del modelo para eliminar el usuario*/\n \n\t\t\t\t\t$this->filtrarInt($id)/** Con esta linia le pasamos a la funcion el id del usuario que se borrara*/\n\t\t\t);\n\t\t\t\n\t\t\t$this->redireccionar('administrador');/**Cuando se haya borrado, nos devolvera a la vista del administrador*/\n\t\t\n\t\t}", "public function eliminar ($idpersona)\n\t{\n\t\t$sql=\"DELETE FROM persona WHERE idpersona='$idpersona';\";\n/*echo \"<pre><br>Elin¡minas:<br>\";\nprint_r($sql);\necho \"</pre>\";\ndie();*/\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function excluirUsuarios($idusuario){\n //$conexao = $c->conexao();\n\n $sql = \"DELETE FROM tbusuarios WHERE idusuario = '$idusuario' \";\n\n return $this->conexao->query($sql);\n }", "function remove_mask()\n\t{\n\t\t//-----------------------------------------\n\t\t// Check for a valid ID\n\t\t//-----------------------------------------\n\n\t\tif ($this->ipsclass->input['id'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Нельзя изменить ID пользователя, попытайтесь снова\");\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Get, check and reset\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, org_perm_id', 'from' => 'members', 'where' => \"id=\".intval($this->ipsclass->input['id']) ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\tif ( ! $mem = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Нельзя изменить ID пользователя, попытайтесь снова\");\n\t\t}\n\n\t\tif ( $this->ipsclass->input['pid'] == 'all' )\n\t\t{\n\t\t\t$this->ipsclass->DB->do_update( 'members', array( 'org_perm_id' => 0 ), 'id='.intval($this->ipsclass->input['id']));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ipsclass->input['pid'] = intval($this->ipsclass->input['pid']);\n\n\t\t\t$pid_array = explode( \",\", $this->ipsclass->clean_perm_string($mem['org_perm_id']) );\n\n\t\t\tif ( count($pid_array) < 2 )\n\t\t\t{\n\t\t\t\t$this->ipsclass->DB->do_update( 'members', array( 'org_perm_id' => 0 ), 'id='.intval($this->ipsclass->input['id']));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$new_arr = array();\n\n\t\t\t\tforeach( $pid_array as $sid )\n\t\t\t\t{\n\t\t\t\t\tif ( $sid != $this->ipsclass->input['pid'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$new_arr[] = $sid;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$this->ipsclass->DB->do_update( 'members', array( 'org_perm_id' => implode(\",\",$new_arr) ), 'id='.intval($this->ipsclass->input['id']));\n\t\t\t}\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Get all members using that ID then!\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"100%\" );\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Результат\" );\n\n\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"Удалить созданные параметры доступа у <b>{$mem['name']}</b>.\" ) );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n\t\t$this->ipsclass->admin->print_popup();\n\t}", "function deleteuser_vizitki($user_id) {\n\tglobal $database;\n\n\t// DELETE vizitki ENTRIES AND COMMENTS\n\t$database->database_query(\"DELETE FROM se_vizitkientries, se_vizitkicomments USING se_vizitkientries LEFT JOIN se_vizitkicomments ON se_vizitkientries.vizitkientry_id=se_vizitkicomments.vizitkicomment_vizitkientry_id WHERE se_vizitkientries.vizitkientry_user_id='$user_id'\");\n\n\t// DELETE COMMENTS POSTED BY USER\n\t$database->database_query(\"DELETE FROM se_vizitkicomments WHERE vizitkicomment_authoruser_id='$user_id'\");\n\n\t// DELETE STYLE\n\t$database->database_query(\"DELETE FROM se_vizitkistyles WHERE vizitkistyle_user_id='$user_id'\");\n\n}", "function eliminarCuentaBancaria(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_ime';\n\t\t$this->transaccion='TES_CTABAN_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria','id_cuenta_bancaria','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function EliminarMascotas($nombres, $primer_apellido, $segundo_apellido, $fehca_nacimiento, $lugar_nacimiento, $iddepartamento, $idmunicipio, $telefono_casa, $celular, $direccion, $foto){\n $conexion = Conectar();\n $sql = \"DELETE FROM padrinos WHERE id=:id\";\n $statement = $conexion->prepare($sql);\n $statement->bindParam(':idpadrinos', $idpadrinos);\n $statement->execute();\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $res=$statement->fetchAll();\n return $res;\n}", "public function delete($usuario_has_hojaruta);", "public function utilisateurSupprimerUn($id)\n\t{\n\t\tGestion::supprimer(\"Utilisateur\",\"idUtilisateur\",$id);// votre code ici\n\t}", "final public function borrar() {\n global $config;\n # Verificar que no se borre a sí mismo.\n if ($this->id != $this->id_user) {\n \n # Se borra al usuario\n $this->db->delete('users',\"id_user='$this->id'\", 'LIMIT 1');\n\n # Directorio real\n $dir = str_replace('{{id_user}}',$this->id,\n str_replace('../', '', self::AVATARS_DIR));\n\n # Si tiene archivos, los borramos\n if (is_dir($dir)) {\n Files::rm_dir($dir);\n }\n }\n\n # Volvemos a la vista\n $this->functions->redir($config['site']['url'].'admins/?success=true');\n\n }", "public function eliminarusuario($codigo){\r\n\t//Preparamos la conexion a la bdd:\r\n\t$pdo=Database::connect();\r\n\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t$sql=\"delete from usuario where codigo=?\";\r\n\t$consulta=$pdo->prepare($sql);\r\n//Ejecutamos la sentencia incluyendo a los parametros:\r\n\t$consulta->execute(array($codigo));\r\n\tDatabase::disconnect();\r\n}", "function removeuserfromteam(){\n $this->auth(COMP_ADM_LEVEL);\n $key_id = $this->uri->segment(3);\n $team_id = $this->uri->segment(4);\n $contest_id = $this->uri->segment(5);\n $this->m_key->removeUserByKeyId($key_id);\n $this->teamedit($team_id);\n }", "public function postEliminarcfamiliar(){\n $cfamiliar=Cuadrofamiliar::find(Input::get('id'));\n $id=$cfamiliar->user->id;\n CuadroFamiliar::destroy(Input::get('id'));\n return $this->recargarFormularios('users.psico.inicio.vermas.formularios.step-22',$id);\n }", "function eliminar_empresa($empresa_id) {\n\t\t$this -> db -> where('empresa_id', $empresa_id);\n\t\t//La empresa owner no se puede eliminar\n\t\t$this -> db -> where('owner', 0);\n\t\t$data['activated'] = 0;\n\n\t\t//Audit field\n\t\t$data['user'] = $this->auth_frr->is_logged_in();\n\n\t\tif ($this -> db -> update('empresas', $data)) {\n\t\t\t//Eliminamos los usuarios que hayan pertenecido a esa empresa\n\t\t\t$this -> db -> where('empresa_id', $empresa_id);\n\t\t\tif ($this -> db -> update('users', $data))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t} else\n\t\t\treturn false;\n\t}", "function eliminarClientes($idCliente){\n\t\t\t\t\n\t\t\t//SQL\n\t\t\t$query = \"DELETE FROM users WHERE id = $idCliente;\";\n\t\t\t$rst = $this->db->enviarQuery($query,'CUD');\n\t\t\treturn $rst;\n\t\t}", "public function EliminarCaja()\n\t\t{\n\n\t\t\t$sql = \" select codcaja from ventas where codcaja = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codcaja\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0)\n\t\t\t{\n\n\t\t\t\t$sql = \" delete from cajas where codcaja = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->bindParam(1,$codcaja);\n\t\t\t\t$codcaja = base64_decode($_GET[\"codcaja\"]);\n\t\t\t\t$stmt->execute();\n\n\t\t\t\theader(\"Location: cajas?mesage=1\");\n\t\t\t\texit;\n\n\t\t\t}else {\n\n\t\t\t\theader(\"Location: cajas?mesage=2\");\n\t\t\t\texit;\n\t\t\t}\n\n\t\t}", "function eliminarCuentaBancaria(){\n\t\t$this->procedimiento='sigep.ft_cuenta_bancaria_ime';\n\t\t$this->transaccion='SIGEP_CUEN_BAN_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria_boa','id_cuenta_bancaria_boa','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function EliminarId()\n\t{\n\t\theader (\"content-type: application/json; charset=utf-8\");\n\t\tif($this->_Method == \"POST\")\n\t\t{\n\t\t\t// Validaciones\n\t\t\tif(validarTokenAntiCSRF(\"_JS\"))\n\t\t\t{\n\t\t\t\t//Creamos una instancia de nuestro \"modelo\"\n\t\t\t\t$item = $this->ObtenModelPostId();\n\t\t\t\tif($item != null && $item->Eliminar())\n\t\t\t\t{\n\t\t\t\t\techo json_encode( array(\"Estado\"=>1) );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo json_encode( array(\"Estado\"=>0, \"Error\"=>\"No eliminador\" ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo json_encode( array(\"Estado\"=>0, \"Error\"=>\"No permitido, por fallo de Token anti CSRF.\" ) );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo json_encode( array(\"Estado\"=>0, \"Error\"=>\"No permitido, solo por POST.\") );\n\t\t}\n\t}", "public function eliminar($objeto){\r\n\t}", "function eliminarPer(){\n require \"app/Views/eliminarP.php\";\n $usuario = new Usuario();\n //Mandar datps\n $usuario->id=$_POST['id'];\n $usuario->contrasenia=$_POST['password'];\n $usuario->eliminar();\n if(isset($_SESSION['Usuarios']))\n unset($_SESSION['Usuarios']);\n $_SESSION['Usuarios']=false;\n\n header(\"Location:/Proyecto/index.php?controller=Usuario&action=star\");\n }", "static function ctrBorrarUsuario()\n\t{\n\n\t\tif(isset($_GET['idUsuario']))\n\t\t{\n\t\t\t$tabla = \"usuarios\";\n\t\t\t$datos = $_GET['idUsuario'];\n\n\t\t\t// vamos a eliminar la foto\n\t\t\t//si hay una foto entonces eliminamos \n\t\t\tif($_GET['fotoUsuario'] != \"\")\n\t\t\t{\n\t\t\t\t// unlink — Borra un fichero\n\t\t\t\t// vamos a borrar ese archivo o imagen en esa carpeta\n\t\t\t\t// unlink($_POST['fotoUsuario']);\n\t\t\t\tunlink($_GET['fotoUsuario']);\n\n\t\t\t\t//rmdir borra directorio\n\t\t\t\trmdir('vistas/img/usuarios/'.$_GET[\"usuario\"]);\n\t\t\t}\n\n\t\t\t// solicitamos una repuesta al modelo de usuario en el metodo mdlBorrarUsuario\n\t\t\t$respuesta = ModeloUsuarios::mdlBorrarUsuario($tabla,$datos);\n\n\t\t\tif($respuesta)\n\t\t\t{\n\t\t\t\techo '<script>\n\t\t\t\t\n\t\t\t\t\t\tSwal.fire({\n\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\ttitle: \"El usuario se elimino correctamente!\",\n\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t}).then((result)=>{\n\t\t\t\t\t\t\tif(result.value)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twindow.location = \"usuarios\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t\t</script>';\n\t\t\t}\n\t\t}\n\t}", "function borrar(){\n $id=$_POST[\"id\"];\n $consulta=\"DELETE FROM usuarios WHERE id = \".$id.\"\";\n echo $consulta. \"<br>\";\n \n\n $resultado = $conector->query($consulta);\n mostrarListado();\n }", "function removePacote($campos){\n\t\t\t$listDel = $campos['InputDelPacote'];\t\t\t\n\t\t\t\t\n\t\t\t\tif(!empty($listDel)){\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<sizeof($listDel);$i++){\n\t\t\t\t\t\tif($listDel[$i] != 0){\n\t\t\t\t\t\t\t\t$sql = \" DELETE FROM vekttor_venda_pacote WHERE pacotes_id = '$listDel[$i]' AND vekttor_venda_id = '$campos[venda_id]'\";\n\t\t\t\t\t\t\t\t//echo $sql;\n\t\t\t\t\t\t\t\tmysql_query($sql);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t/*Seleciona os pacote para trazer os modulos */\n\t\t\t\t\t$sqlPacote = mysql_query($tn=\" SELECT * FROM pacote_item WHERE pacote_id = '$listDel[$i]' \");\n\t\t\t\t\t\twhile($pct=mysql_fetch_object($sqlPacote)){\n\t\t\t\t\t\t\t\t$modulos[] = $pct->sis_modulo_id;\n\t\t\t\t\t\t}\n\t\t\t\t} /*Fim de For*/\n\t\t\t\t\n\t\t\t\t\tfor($j=0;$j<sizeof($modulos);$j++){\n\t\t\t\t\t\t\t$sqlModulos = \" DELETE FROM usuario_tipo_modulo WHERE modulo_id = '$modulos[$j]' AND usuario_tipo_id = '$campos[id_usuario_tipo]'\";\n\t\t\t\t\t\t\tmysql_query($sqlModulos);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n}", "protected\n function eliminar($id)\n {\n }", "protected function eliminar($id)\n {\n }", "public function removeUser()\n\t{\n\t\tif(isset($this->primarySearchData[$this->ref_user]))\n\t\t{\n\t\t\tunset($this->primarySearchData[$this->ref_user]);\n\t\t}\n\t}", "function modeloUserDel($userid){\n\n if (isset($_SESSION['tusuarios'][$userid])){ \n $db = AccesoDatos::getModelo();\n $tuser = $db->borrarUsuario($userid);\n unset($_SESSION['tusuarios'][$userid]);\n return true;\n }\n return false;\n\n}", "public function destroy()\n {\n $id=$this->seguridad->verificateInt($_REQUEST['delete_id']);\n $token = $_REQUEST['token'];\n $usuario = parent::showImgUser($id);\n if($id && $token)\n {\n if($usuario->img_usuario != 'assets/uploud/profile/default.svg')\n {\n unlink($usuario->img_usuario);\n }\n parent::deleteUser($id,$token);\n }\n }", "public function unsetUser($user){\n if($user->type == 'client'){\n if(isset($this->tokenIdMap[$user->token])){\n $offset = array_search($user->id, $this->tokenIdMap[$user->token]);\n unset($this->tokenIdMap[$user->token][$offset]);\n }\n }else{\n $offset = array_search($user->id, $this->adminID);\n unset($this->adminID[$offset]);\n }\n \n }", "function eliminarAnalisisPorqueDet(){\n\t\t$this->procedimiento='gem.ft_analisis_porque_det_ime';\n\t\t$this->transaccion='GM_DET_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_analisis_porque_det','id_analisis_porque_det','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public static function remove_self() {\n\t\tglobal $I2_SQL;\n\t\t$tjstarid = $I2_SQL->query('SELECT boxid FROM intrabox WHERE name=\"tjstar\";')->fetch_single_value();\n\t\t$users = $I2_SQL->query('SELECT uid FROM intrabox_map WHERE boxid=%d;', $tjstarid)->fetch_all_arrays(Result::ASSOC);\n\t\tforeach ($users as $user) {\n\t\t\t$order = $I2_SQL->query('SELECT box_order FROM intrabox_map WHERE boxid=%d AND uid=%d;', $tjstarid, $user['uid'])->fetch_single_value();\n\t\t\t$I2_SQL->query('DELETE FROM intrabox_map WHERE uid=%d AND boxid=%d;', $user['uid'], $tjstarid);\n\t\t\t$I2_SQL->query('UPDATE intrabox_map SET box_order=box_order-1 WHERE uid=%d AND box_order>%d;', $user['uid'], $order);\n\t\t}\n\t\t$I2_SQL->query('DELETE FROM intrabox WHERE name=\"tjstar\";');\n\t\t\n\t}", "function deletefinite($val1,$val2)\t// elimina la identificacion\n\t{\n $obj_Gurpo=new Conexion();\n $query=\"delete from fin where id_exp=$val1 and id_fin=$val2\";\n\t\t\t$obj_Gurpo->consulta($query); // ejecuta la consulta para borrar la identificacion\n\t\t\treturn '<div id=\"mensaje\"><p/><h4>Se Habilito el Expediente</h4></div>'; // retorna todos los registros afectados\n\n }", "function eliminarImagenSusQ($campo, $tabla, $idAsignacion)\n {\n $data=$this->analisisRiesgo->getNombreImagen($campo, $tabla, $idAsignacion);\n //Delete el nombre de la imagen de la base de datos\n $borrar=Array($campo => null);\n $this->analisisRiesgo->deleteImagen($borrar, $tabla, $idAsignacion);\n //Unlink el nombre de la imagen del servidor\n foreach($data as $row)\n {\n $nombreImagen=$row[$campo];\n unlink(\"assets/img/fotoAnalisisRiesgo/fotoSustanciasQuimicas/$nombreImagen\");\n echo \"OK\";\n }\n\n }", "protected function removeAllUsers() {\n global $DB;\n\n if ($this->mayI(EDIT)) {\n $DB->query(\"TrunCATE TABLE `\".self::$DBTable.\"`;\");\n }\n }", "function eliminarPrograma(){\n\t\t$this->procedimiento='sigep.ft_programa_ime';\n\t\t$this->transaccion='SIGEP_PRO_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_programa_boa','id_programa_boa','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function elimina(&$valores)\n {\n $this->iniVar();\n if (isset($this->bvictimacolectiva->_do->id_grupoper)) {\n $this->eliminaVic($this->bvictimacolectiva->_do, true);\n $_SESSION['fvc_total']--;\n }\n }", "public function eliminar($id){\r\n //se eliminan todos los datos de este usuario de la tabla asignación\r\n return $this->db->delete('user', array('id' => $id));\r\n }", "function removeHard()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\t$userid = ($this->user) ? $this->user->id : $this->owner_id;\r\n\r\n\t\tUserFilesRemoveFile($dbh, $this->id, $userid, false, true);\r\n\t}", "static function removeUser() : string\n {\n return \"DELETE\n FROM users\n WHERE id = :id;\";\n }", "function del($ar){\n $p = new XParam($ar, array());\n $oid = $p->get('oid');\n $lnkuser = selectQuery('select lnkuser from '.$this->xset->getTable().' where KOID=\\''.$oid.'\\'')->fetch(PDO::FETCH_COLUMN);\n // satus du compte \n updateQuery('update '.$this->xset->getTable().' set STATUS=\\'INACTIVE\\' where KOID=\\''.$oid.'\\'');\n // date du users\n updateQuery('update USERS set DATET=\\''.date('Y-m-d').'\\' where KOID=\\''.$lnkuser.'\\'');\n }", "public function EliminarMesas()\n\t{\n\n\t\t$sql = \" select codmesa from ventas where codmesa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codmesa\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num == 0)\n\t\t{\n\n\t\t\t$sql = \" delete from mesas where codmesa = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codmesa);\n\t\t\t$codmesa = base64_decode($_GET[\"codmesa\"]);\n\t\t\t$stmt->execute();\n\n\t\t\theader(\"Location: mesas?mesage=1\");\n\t\t\texit;\n\n\t\t}else {\n\n\t\t\theader(\"Location: mesas?mesage=2\");\n\t\t\texit;\n\t\t}\n\n\t}", "function delUser_ant () // Renomeada para n�o ser usada. Antiga delUser() \n{\n\tglobal $xoopsDB, $myts, $xoopsConfig, $xoopsModule;\n\n\t$query = \"SELECT * FROM \". $xoopsDB->prefix('xmail_newsletter') .\" WHERE user_email='\" . $myts->makeTboxData4Save($_POST['user_mail']) . \"' \";\n\t$result = $xoopsDB->query($query);\n\t$myarray = $xoopsDB->fetchArray($result);\n\n\t$mymail = $myts->makeTboxData4Save($_POST['user_mail']);\n\tif ($myarray) {\n\t\tif ($myarray['confirmed'] == '0')\n\t\t\treturn -1;\n\n\t\t$query = \"UPDATE \" . $xoopsDB->prefix('xmail_newsletter') . \" SET confirmed='0' WHERE user_email='$mymail'\";\n\t\t$result = $xoopsDB->queryF($query);\n\t\t\n\t\t// eliminar o perfil\n\t\t$sql=' delete from '.$xoopsDB->prefix('xmail_perfil_news').' where user_id='.$myarray['user_id'];\n\t\t$result2=$xoopsDB->queryf($sql);\n\t\tif(!$result2){\n\t\t\txoops_error('Erro ao eliminar perfil'.$xoopsDB->error());\n\t\t}\n\t\t\t\n\t\t\n\t\treturn 1;\n\t} else {\n\t\treturn -2;\n\t}\n}", "function delete_all_principal() {\n\t$id_user = get_current_user_id();\n\tglobal $wpdb;\n\t$db = $wpdb->update( \n\t\t 'parcours_user', \n\t\t array( \n\t\t 'principal' => 0\n\t\t ),\n\t\t array( 'id_user' => $id_user ), \n\t\t array( \n\t\t '%d'\n\t\t ), \n\t\t array( \n\t\t '%d'\n\t\t )\n\t\t);\n}", "public function delete($id_user){\n\t\t\t \n\t\t\t$this -> query = \"DELETE FROM usuari WHERE id='$id_user'\";\n\t\t\t$this -> executa_query();\n\t\t}", "public function eliminarPermiso(Applicausuario $usuapp) {\n $con = Conexion::getConexion();\n try {\n $query = $con->prepare(\"DELETE FROM applicausuario WHERE cod_app =? AND cod_usu=?\"); //Sentecia sql\n // Se pasan todos los parametros a la sentencia SQL\n $query->bindParam(1, $usuapp->getCod_app());\n $query->bindParam(2, $usuapp->getCod_usu());\n $query->execute(); //Ejecuta la senecia sql\n return \"(S)Cambios realizados con existo.\";\n ; //Se retrona mensaje de confirmacion del registro\n } catch (Exception $ex) {\n echo (\"(E) \") . $ex->getMessage(); // imprime el mensaje si ocurrio un error en el proceso\n }\n }", "public function eliminarAerolinea($idaero) {\n//Se obtiene la conexion\n $conn = Conexion::obtenerConexion();\n\n $mensaje = \"\";\n try {\n //Consulta para la eliminacion de datos\n $query = $conn->prepare(\"DELETE FROM tbl_aerolinea where id=?\");\n $query->bindParam(1, $idaero);\n\n $query->execute();\n $mensaje = \"Registro eliminado\";\n }\n catch (Exception $ex) {\n\n $mensaje = $ex->getMessage();\n }\n\n $conn = null;\n return $mensaje;\n }", "public function deleteAction(){\n \n $req=$this->getRequest();\n $user=Doctrine::getTable('Users')->find($req->getParam('id')); \n\n // Gli utenti developer non possono essere eliminati \n if ($user->Role->developer){\n $this->errors->addError(\"L'utente Developer non pu&ograve; essere cancellato.\");\n $this->emitSaveData();\n return;\n }\n \n $q=Doctrine_Query::create()\n ->delete()\n ->from('Users')\n ->addWhere('ID = ?',$this->getRequest()->getParam('id'))\n ->execute();\n \n $this->emitJson(array(\"success\"=>true));\n }", "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 }", "public function eliminarUsuario(){\r\n $sql =\"DELETE FROM usuarios WHERE IdUsuario = '{$this->idUsuario}';\";\r\n $res = $this->conexion->setQuery($sql);\r\n return $res;\r\n}", "public function removeusers() {\r\n \tif (isset($_SESSION['userid'])) {\r\n \t\t$users=$this->model->getusersprojects($_GET['p']);\r\n \t\t$this->view->set('users',$users);\r\n \t\t$project=$this->model->getproject($_GET['p']);\r\n \t\t$this->view->set('project',$project[0]);\r\n \t\t$this->view->removeusers();\r\n \t} else {\r\n \t\t$this->redirect('?v=index&a=show');\r\n \t}\r\n }", "public static function copyempresa_borra($user_id)\n {\n DB::table('user_modulo')->where('user_id', '=', $user_id)->where('propietario', '=', 'asesor')->delete();\n DB::table('user_claves')->where('user_id', '=', $user_id)->where('propietario', '=', 'asesor')->delete();\n DB::table('user_parrafos')->where('user_id', '=', $user_id)->where('propietario', '=', 'asesor')->delete();\n DB::table('user_imagenes')->where('user_id', '=', $user_id)->where('propietario', '=', 'asesor')->delete();\n\n /*\n DB::table('proyecto_modulo')\n ->whereIn('proyecto_modulo.proyecto_id', function($query) use($user_id) {\n $query->select('proyectos.id')\n ->from('proyectos')\n ->where('proyectos.user_id', '=', $user_id);\n })\n ->where('proyecto_modulo.propietario', '=', 'asesor')\n ->delete();\n\n DB::table('proyectos_claves')\n ->whereIn('proyectos_claves.proyecto_id', function($query) use($user_id) {\n $query->select('proyectos.id')\n ->from('proyectos')\n ->where('proyectos.user_id', '=', $user_id);\n })\n ->where('proyectos_claves.propietario', '=', 'asesor')\n ->delete();\n\n DB::table('proyectos_parrafos')\n ->whereIn('proyectos_parrafos.proyecto_id', function($query) use($user_id) {\n $query->select('proyectos.id')\n ->from('proyectos')\n ->where('proyectos.user_id', '=', $user_id);\n })\n ->where('proyectos_parrafos.propietario', '=', 'asesor')\n ->delete();\n\n DB::table('proyectos_imagenes')\n ->whereIn('proyectos_imagenes.proyecto_id', function($query) use($user_id) {\n $query->select('proyectos.id')\n ->from('proyectos')\n ->where('proyectos.user_id', '=', $user_id);\n })\n ->where('proyectos_imagenes.propietario', '=', 'asesor')\n ->delete();\n */\n }", "function delUser() // Renomeada para n�o ser usada. Antiga delUser() \n{\n\tglobal $xoopsDB, $myts, $xoopsConfig, $xoopsModule;\n\n\t$query = \"SELECT * FROM \". $xoopsDB->prefix('xmail_newsletter') .\" WHERE user_email='\" . $myts->makeTboxData4Save($_POST['user_mail']) . \"' \";\n\t$result = $xoopsDB->query($query);\n\t$myarray = $xoopsDB->fetchArray($result);\n\n\t$mymail = $myts->makeTboxData4Save($_POST['user_mail']);\n\tif ($myarray) {\n\t\tif ($myarray['confirmed'] == '0')\n\t\t\treturn -1;\n\n\t\t$query = \"DELETE from \" . $xoopsDB->prefix('xmail_newsletter') . \" WHERE user_email='$mymail'\";\n\t\t$result = $xoopsDB->queryF($query);\n\t\t\n\t\t// eliminar o perfil\n\t\t$sql=' delete from '.$xoopsDB->prefix('xmail_perfil_news').' where user_id='.$myarray['user_id'];\n\t\t$result2=$xoopsDB->queryf($sql);\n\t\tif(!$result2){\n\t\t\txoops_error('Erro ao eliminar perfil'.$xoopsDB->error());\n\t\t}\n\t\t\t\n\t\t\n\t\treturn 1;\n\t} else {\n\t\treturn -2;\n\t}\n}", "function borrarInscrito() {\n //Creamos la evaluacion\n leerClase('Evaluacion');\n leerClase('Estudiante');\n leerClase('Proyecto_dicta');\n $estudiante = new Estudiante($this->estudiante_id);\n $evaluacion = new Evaluacion($this->evaluacion_id);\n $protecto=$estudiante->getProyecto();\n $sql = \"select p.id as id from \" . $this->getTableName('Proyecto_dicta') . \" as p where p.proyecto_id = '$protecto->id' and p.dicta_id = '$this->dicta_id' \";\n $resultado = mysql_query($sql);\n\n $proyecto_array = mysql_fetch_array($resultado);\n $proyecto_dicta = new Proyecto_dicta($proyecto_array);\n $proyecto_dicta->delete();\n $evaluacion->delete();\n $this->delete();\n }", "function eliminarSolicitudMayor500000(){\n\t\t$this->procedimiento='mat.ft_solicitud_mayor_500000_ime';\n\t\t$this->transaccion='MAT_SMI_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_sol','id_sol','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function eliminarImagenServidor($campo, $tabla, $idAsignacion)\n {\n $data=$this->analisisRiesgo->getNombreImagen($campo, $tabla, $idAsignacion);\n //Delete el nombre de la imagen de la base de datos\n $borrar=Array($campo => null);\n $this->analisisRiesgo->deleteImagen($borrar, $tabla, $idAsignacion);\n //Unlink el nombre de la imagen del servidor\n foreach($data as $row)\n {\n $nombreImagen=$row[$campo];\n unlink(\"assets/img/fotoAnalisisRiesgo/$nombreImagen\");\n echo \"OK\";\n }\n\n }", "function EliminarConceptopago($id) {\n $sql = \"UPDATE `conceptopago` SET `estado` = 'INACTIVO' WHERE `id` = '$id'\";\n\n\t$db = new conexion();\n\t$result = $db->consulta($sql);\n $num = $db->encontradas($result);\n\n\t$respuesta->datos = [];\n\t$respuesta->mensaje = \"\";\n\t$respuesta->codigo = \"\";\n\n\tif ($result) {\n\n\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t$respuesta->datos[] = mysql_fetch_array($result);\n\t\t}\n\n\t\t$respuesta->mensaje = \"Registro eliminado con éxito!\";\n\t\t$respuesta->codigo = 1;\n\t} else {\n\t\t$respuesta->mensaje = \"Ha ocurrido un error!\";\n\t\t$respuesta->codigo = 0;\n\t}\n\n\treturn json_encode($respuesta);\n}", "public function eliminar_empresa_controlador(){\n\n\t\t$codigo=mainModel::decryption($_POST['codigo-del']);\n\t\t$Privilegio=mainModel::decryption($_POST['privilegio-admin']);\n\n\t\t$codigo=mainModel::limpiar_cadena($codigo);\n\t\t$Privilegio=mainModel::limpiar_cadena($Privilegio);\n\n\t\tif($Privilegio==1){\n\n\t\t\t$consulta1=mainModel::ejecutar_consulta_simple(\"SELECT EmpresaCodigo FROM libro WHERE EmpresaCodigo='$codigo'\");\n\n\t\t\t\n\t\t\tif($consulta1->rowCount()<=0){\n\t\t\t\t$ElimEmp=empresaModelo::eliminar_empresa_modelo($codigo);\n\t\t\t\t\n\t\t\t\tif($ElimEmp->rowCount()==1){\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\"Alertas\"=>\"recargar\",\n\t\t\t\t\t\t\t\"Titulo\"=>\"Empresa Eliminada\",\n\t\t\t\t\t\t\t\"Texto\"=>\"Se elimino la empresa de manera satisfactoria\",\n\t\t\t\t\t\t\t\"Tipo\"=>\"success\"\n\t\t\t\t\t\t];\t\n\t\t\t\t}else{\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"Lo sentimos no se puede eliminar la empresa, \",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t];\n\t\t\t\t}\t\n\t\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\"Texto\"=>\"No se puede eliminar la empresa, teniendo en cuenta que hay libros asociados a esta empresa\",\n\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t];\n\t\t\t}\n\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\"Texto\"=>\"No se puede eliminar la empresa.\",\n\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t];\n\t\t}\n\t\treturn mainModel::sweet_alert($alerta);\n\t\t\n\t}", "function deletepanier($user, $product){\t\t// Fonction pour supprimer un produit du panier\n\n\t\tinclude(\"../../modele/modele.php\");\n\n\t\t$sql = 'SELECT * FROM detailcommande WHERE id_product= \"'.$product.'\" AND id_user= \"'.$user.'\" AND actif = 1';\n\t\t$reponse = $bdd->query($sql);\n\t\t\n\t\twhile ($donnees = $reponse->fetch())\n\t\t{\n\t\t\t$sql2 = 'DELETE FROM commande WHERE id_user = \"'.$user.'\" AND id_detailCommande = \"'.$donnees['id'].'\" AND actif = 1 ';\n\t\t\t$reponse2 = $bdd->prepare($sql2);\n\t\t\t$reponse2 ->execute();\n\t\t}\n\t\t$sql3 = 'DELETE FROM detailcommande WHERE id_product= \"'.$product.'\" AND id_user= \"'.$user.'\" AND actif = 1 ';\n\t\t$reponse3 = $bdd->prepare($sql3);\n\t\t$reponse3 ->execute();\n\n\t}", "public function eliminarUsuarioAction($id){\n\t\t//Conectar con la base de datos.\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t$usuario = $em->getRepository('TheClickCmsAdminBundle:Usuarios')->find($id);\n\t\t$em->remove($usuario);\n\t\t$em->flush();\n\t\treturn new Response('Usuario Eliminado');\n\t}", "public function eliminar($id)\n {\n $user = User::findOrFail($id) and $companies = Company::all() and $branch_office = BranchOffice::with('company')->get();\n $anuncios = Adds::all();\n if ($anuncios->first()) {\n return view('users.delete', compact('user'), [\"companies\" => $companies, \"branch_office\" => $branch_office, 'anuncios' => $anuncios->random(1)]); //generala vista\n\n } else {\n return view('users.delete', compact('user'), [\"companies\" => $companies, \"branch_office\" => $branch_office, 'anuncios' => null]); //generala vista\n }\n }", "public function eliminar($id)\n {\n }", "public function eliminar($id)\n {\n }", "public function eliminar($id)\n {\n }", "function eliminar($id_autor){\n\n\t\tinclude 'data_bd.inc';\n\t\tinclude 'databaseClass.php';\n\t\t//creo mi cadena de conexion\n\t\t$conexion = new DB($host, $user, $pass, $bd);\n\t\t//Creo mi conexión\n\t\t$status = $conexion->conectar();\n\t\t//En caso de que devuelva una falla\n\t\tif($status === FALSE){\n\t\t\tdie('No se pudo conectar');\n\t\t}\n\t\t//Creo mi query\n\t\t$consulta = \"DELETE FROM\n\t\t\t\t\tautor\n\t\t\t\t\tWHERE(id_autor='$id_autor'\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\";\n\t\t//Ejecuto la consulta\n\t\t$resultado = $conexion -> ejecutarConsulta($consulta);\n\t\t//Si fue una falla\n\t\tif($conexion === FALSE){\n\t\t\t$conexion -> cerrar();\t\n\t\t\treturn FALSE;\n\t\t}\n\t\t//Cierro la conexion\n\t\t$conexion -> cerrar();\n\t\tif($resultado == TRUE)\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse {\n\t\t\treturn FALSE;\n\t\t}\n\t}" ]
[ "0.6489756", "0.6451372", "0.6387446", "0.63840175", "0.63604814", "0.62771523", "0.62402207", "0.6188455", "0.6179664", "0.617", "0.61413926", "0.61274296", "0.61265564", "0.6125673", "0.6123372", "0.6109999", "0.6107757", "0.60867316", "0.6054584", "0.6054547", "0.6041617", "0.60374475", "0.60312307", "0.60288876", "0.6017802", "0.60169226", "0.6012114", "0.6011881", "0.6006376", "0.59843737", "0.59827393", "0.59777415", "0.5954707", "0.59520125", "0.5907982", "0.5903782", "0.58993423", "0.58907235", "0.5886181", "0.5878196", "0.58661467", "0.5860288", "0.5859263", "0.5858198", "0.5852875", "0.58466697", "0.58464885", "0.5841997", "0.5841783", "0.5839439", "0.5838559", "0.58375716", "0.5832312", "0.5831472", "0.58202904", "0.5816167", "0.5815312", "0.58084786", "0.58076537", "0.5799621", "0.57963705", "0.5792112", "0.5791725", "0.5791123", "0.57838583", "0.57825714", "0.57771343", "0.57675314", "0.5763654", "0.57406753", "0.57352155", "0.573087", "0.5730205", "0.57239723", "0.57042164", "0.5703032", "0.56976074", "0.5695609", "0.5694554", "0.56886977", "0.5681799", "0.56783473", "0.56772745", "0.5677248", "0.5676748", "0.56714135", "0.5669846", "0.56689805", "0.56667274", "0.56664157", "0.5661197", "0.56589884", "0.56554127", "0.56539875", "0.56526005", "0.5650596", "0.5649985", "0.5643892", "0.5643892", "0.5643892", "0.5643463" ]
0.0
-1
Ajoute un commentaire dans la base
public function ajouterCommentaire($auteur, $contenu, $idBillet) { $sql = 'insert into t_commentaire(COM_DATE, COM_AUTEUR, COM_CONTENU, BIL_ID)' . ' values(?, ?, ?, ?)'; $date = date('Y-m-d H:i:s'); // Récupère la date courante $this->executerRequete($sql, array($date, $auteur, $contenu, $idBillet)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newComment() {\n $datas['chapter_id'] = abs((int) $_GET['id']);\n $datas['author'] = trim(htmlspecialchars((string) $_POST['newCommentAuthor']));\n $datas['content'] = trim(htmlspecialchars((string) $_POST['newCommentContent']));\n\n if (!empty($datas['content']) && !empty($datas['author'])) {\n $commentMngr = new CommentManager();\n $commentMngr->add($datas);\n \n $_SESSION['commentsPseudo'] = $datas['author'];\n } else {\n $GLOBALS['error']['newComment'] = \"Un commentaire ne peut pas être vide et doit impérativement être associé à un pseudo.\";\n }\n }", "public function addOneComment(){\n\t\tif (!empty($_POST['user_name']) && !empty($_POST['content'])){\n\t\t\t$values = array(\n \t\t'user_name' => $_POST['user_name'],\n\t\t\t'content' => $_POST['content'],\n\t\t\t'post_id' => $_POST['post_id']\n\t\t);\n\n\t\t$sqlfuncs = array(\n \t\t'date_creation' => 'NOW()',\n\t\t);\n\n\t$this->pInsertFunc(\"INSERT INTO\", \"comment\", $values, $sqlfuncs);\n\t\t\techo '<script>alert(\"Le commentaire a bien été envoyé.\")</script>';\n\t\t}\n\n\t}", "public function addComment() {\n $body = $this->getData();\n\n $comentario = $body->comentario;\n $usuario = $body->usuario;\n $fecha = $body->fecha;\n $puntaje = $body->puntaje;\n $id_jugador = $body->id_jugador;\n $id_comentario = $this->model->insert($comentario, $usuario, $fecha, $puntaje, $id_jugador);\n\n if($id_comentario) {\n $this->view->response(\"Se agrego el comentario nùmero: {$id_comentario}\", 200);\n } else {\n $this->view->response(\"El comentario no se pudo agregar \", 500);\n }\n\n }", "public function addComment()\n {\n session_start();\n $superglobalsPost = $this->getSuperglobals()->get_POST();\n $newComment = new CommentManager;\n $superglobalsPost['status'] = \"waiting\";\n $newComment->createComment($superglobalsPost);\n if (isset($superglobalsPost['post_id'])) {\n $post_id = $superglobalsPost['post_id'];\n }\n $titleAction = \"Confirmation d'enregistrement\"; //confirmation message\n $actionConfirmation = \"/post?id=\" . $post_id;\n $textConfirmation = \"Votre commentaire a bien été enregistré\";\n echo $this->getRender()->render('confirmationTemplate.twig', [\n 'titleAction' => $titleAction,\n 'actionConfirmation' => $actionConfirmation,\n 'textConfirmation' => $textConfirmation,\n 'session' => $this->getSuperglobals()->get_SESSION()\n ]);\n }", "function addComment(){\n\t\t$this->Article->Comment->create();\n\t\tif ($this->Article->Comment->save($this->data)) {\n\t\t\techo __('Your comment has been added successfully, and will be viewed soon after approving.', true);\n\t\t} else {\n\t\t\techo __('Your comment could not be added.', true);\n\t\t\techo '<br />';\n\t\t\tforeach($this->Article->Comment->validationErrors as $key=>$val){\n\t\t\t\techo $val.',<br />';\n\t\t\t}\n\t\t\techo 'and try again.';\n\t\t}\n\t\t$this->autoRender = false;\n\t}", "public function addComment(): void\n {\n $this->articleId = $_GET['articleId'];\n $this->content = $_POST['comment'];\n $this->author = $_POST['nickname'];\n $datetime = new DateTime();\n $this->date = $datetime->format('Y-m-d H:i:s');\n\n $this->commentModel->addComment($this->content, $this->date, $this->author, $this->articleId);\n\n // Redirect to the article page\n Router::redirectTo('articleDetails&id=' . $this->articleId);\n exit();\n }", "public function addComment()\r\n {\r\n $pdoStatment = $this->pdo->prepare(\r\n 'INSERT INTO `comment`(`content`, `id_User`, `id_Article`) \r\n VALUES(:content, :id_User, :id_Article)'\r\n );\r\n $pdoStatment->bindValue(':content', $this->content, PDO::PARAM_STR);\r\n $pdoStatment->bindValue(':id_User', $this->id_User, PDO::PARAM_INT);\r\n $pdoStatment->bindValue(':id_Article', $this->id_Article, PDO::PARAM_INT);\r\n $pdoStatment->execute();\r\n return $this->pdo->lastInsertId();\r\n }", "abstract protected function add(Comment $comment);", "public function addComment()\n {\n $this->isConnect();\n\n $post = $this->token->check($_POST);\n\n $formMessage = $this->commentsValidationForm->checkForm($post);\n\n if(!$formMessage)\n {\n $post['user_id'] = $_SESSION['id'];\n $post['validated'] = ($_SESSION['statut'] === 'admin') ? 1 : null;\n $this->comments->add($post);\n header('Location: index.php?route=front.postById&id=' . $_POST['post_id'] . '&success=' . $_SESSION['statut'] . '#comments');\n exit;\n }\n else\n {\n $postAddUnvalid = $post;\n $post = $this->posts->postById($_GET['id']);\n $comments = $this->comments->commentsById($_GET['id']);\n $this->render('postById', compact('formMessage', 'postAddUnvalid', 'post', 'comments'));\n }\n }", "public function add(Comment $comments)\n {\n $query = $this->db->pdo->prepare('INSERT INTO comments(idnews, idparent, niveau, moderate, content, membre, addDate) VALUES (:idnews, :idparent, :niveau, :moderate, :content, :membre, NOW())');\n $query->bindValue(':idnews', $comments->idnews(), PDO::PARAM_INT);\n $query->bindValue(':idparent', $comments->idparent(), PDO::PARAM_INT);\n $query->bindValue(':niveau', $comments->niveau(), PDO::PARAM_INT);\n $query->bindValue(':moderate', $comments->moderate(), PDO::PARAM_INT);\n $query->bindValue(':content', $comments->content(), PDO::PARAM_STR);\n $query->bindValue(':membre', $comments->membre(), PDO::PARAM_STR);\n\n $query->execute();\n }", "public function record_comment(){\n\t\t\t\n\t\t}", "public function NewCommentManga(){\r\n $this->comment(); \r\n $this->pseudoPost();\r\n $this->contentPost();\r\n $this->_commentManager->AddComment($this->_pseudoPostSecure, $this->_contentPostSecure, $_GET['id'],true,false); \r\n header('location: Tome&id='.$_GET[\"id\"]); \r\n }", "public function comment($comment)\n {\n $this->comments[] = $comment;\n }", "public function add() {\n $post_id = $this->request->data['Comment']['post_id'];\n $user_id = $this->Auth->user('id');\n \n \n if ($this->request->is('post')) {\n \n //Post id is not numeric (avoid SQL injection)\n if (!is_numeric($post_id)) {\n $this->Flash->setError(__(\"Vous ne pouvez pas commenter ce post\"));\n return $this->redirect($this->referer());\n }\n \n //Everything is ok, create the comment\n $this->Comment->create();\n $this->request->data['Comment']['user_id'] = $user_id;\n if ($this->Comment->save($this->request->data)) {\n return $this->redirect($this->referer());\n }\n \n $this->Flash->error(__('Ajout de commentaire impossible.'));\n }\n }", "public function commenting() {\n if(strlen($this->request->getParameter(\"content\")) > 10)\n {\n $postId = $this->request->getParameter(\"id\");\n $author = $this->request->getParameter(\"author\");\n $content = $this->request->getParameter(\"content\");\n \n $this->comment->addComment($author, $content, $postId);\n $this->redirect('Post','index/'.$postId);\n }\n else {\n echo \"Commentaire trop court\";\n }\n \n // Execute the default action to reload and display the Posts list\n $this->executeAction(\"index\");\n\n }", "public function addComment(): void{\n Quizzes::addComment($_SESSION[\"quizID\"], $_SESSION[\"email\"], $_POST[\"commentText\"]);\n\n $qfa = new QuizFinishUser($_SESSION[\"q\"], $_SESSION[\"ua\"], $_SESSION[\"aa\"]);\n $qfa->generateHTML();\n }", "private function add_comment()\n\t{\n\t\tif(!$this->owner->logged_in())\n\t\t\treturn new View('public_forum/login');\n\t\t\n\t\tif(empty($_POST['body']))\n\t\t\treturn 'Reply cannot be empty.';\n\t\t\n\t\t$post_id = $this->filter;\n\t\t$new_comment = ORM::Factory('forum_cat_post_comment');\n\t\t$new_comment->forum_cat_post_id = $post_id;\n\t\t$new_comment->owner_id\t= $this->owner->get_user()->id;\n\t\t$new_comment->body\t\t\t= $_POST['body'];\n\t\t$new_comment->save();\n\t\treturn 'Thank you, your comment has been added!';\t\t\n\t}", "function Comment($content) {\n\n /* Variablen initialisieren */\n $this->content = $content;\n }", "public function addCommentAction()\n {\n $this->confirmSession();\n\n $this->view->disable();\n if ($this->request->isPost()) {\n $validator = new CommentValidation();\n $errorMessages = $validator->validate($this->request->getPost());\n \n if (count($errorMessages)) {\n $this->redirect('/index/notFound');\n return;\n }\n\n $postId = $this->request->getPost('postId');\n\n $post = News::findFirst([\n 'conditions' => 'id = ?0 AND isDeleted = 0',\n 'bind' => [\n $postId\n ]\n ]);\n \n if (!$post) {\n $this->redirect('/index/notFound');\n return;\n }\n\n $comment = new Comments();\n\n $comment->userId = $this->session->get('user')['id'];\n $comment->newsId = $postId;\n $comment->content = $this->request->getPost('content');\n $comment->createdAt = date('Y-m-d H:i:s');\n\n $comment->save();\n\n $this->redirect(\"/index/postDetails?id={$postId}\");\n }\n }", "function addComment($id){\n $newComment = $this->commentManager->postComment($id, $_POST['author'], $_POST['comment']);\n if($newComment === false){\n throw new \\Exception(\"Impossible d'ajouter le commentaire\");\n } else {\n header('Location: /episode/'.$id);\n }\n }", "public function create($comment)\n {\n\n }", "public function ajouterCommentaire($auteur, $contenu, $idBillet) {\n $auteur = htmlspecialchars($auteur);\n $contenu = htmlspecialchars($contenu);\n $sql = 'insert into T_COMMENTAIRE(COM_DATE, COM_AUTEUR, COM_CONTENU, BIL_ID)'\n . ' values(?, ?, ?, ?)';\n $date = date('Y-m-d H:i:s'); // Récupère la date courante\n $this->executerRequete($sql, array($date, $auteur, $contenu, $idBillet));\n }", "public function InsertComment($details)\n {\n $this->comments[] = $details;\n }", "public function AddComment($param){\n $param=$param = $this->_check_param($param,array(SERVICE_PARAM_INT,SERVICE_PARAM_INT,SERVICE_PARAM_STRING));\n $user_id=$param[0];\n $article_id=$param[1];\n $comment_contents=$param[2];\n $time=time();\n $this->comment_model->AddComment($user_id,$article_id,$time,$comment_contents); //把评论加入\n $this->article_model->UpdateCommentCount($article_id); //把article_model中的comment_count+1\n return $this->output(true,1000);\n }", "abstract public function comment();", "public function add_comm()\n {\n $this->comments++;\n }", "public function ajoutCommentaire(SetUpComment $ajout)\n {\n\n $message = $ajout->getMessage();\n $note = $ajout->getNote();\n $login = $_SESSION['login'];\n $film = $ajout->getFilm();\n try\n {\n $bdd= new PDO('mysql:host=localhost;dbname=cinemaphp;charset=utf8','root','');\n }\n catch(Exception $e)\n {\n die('Erreur:'.$e->getMessage());\n }\n\n $req = $bdd->prepare('INSERT INTO comment (message,login,note,film) VALUES (?,?,?,?)');\n $req -> execute(array($message,$login,$note,$film));\n\n\n }", "public function add_comment()\n { \n $data = $this->input->post();\n unset($data['url']);\n $data['postid'] = $data['postid'];\n $comment_id = $this->mention_model->add_comment($data); \n $success = false; \n $success = ($comment_id !== false ? true : false);\n $comment = '';\n if ($comment_id) {\n $comment = $this->comment_single($this->mention_model->get_comment($comment_id, true));\n }\n\n echo json_encode([\n 'success' => $success,\n 'comment' => $comment,\n 'comment_id' => $comment_id\n ]);\n }", "public function createCommentaire($id){\n $bdd = $this->bdConnect();\n $req = $bdd->prepare('INSERT INTO commentaires(id_jeu)VALUE(?)');\n $req->execute(array($id));\n return $req;\n }", "public function addComment($body){\n // Comment::create([\n // 'body' => $body,\n // 'post_id' => $this->id\n // ]);\n\n\t\t$this->comments()->create(compact('body'));\n\t}", "function set_comment() {\n $this->sale_lib->set_comment($this->input->post('comment'));\n }", "function set_comment($new_comment)\n {\n $this->comment = $new_comment;\n }", "function addComment($chapterId)\r\n\t{\r\n\t\t$commentManager = new CommentManager();\r\n\t\t\r\n\t\trequire_once('view/insertCommentView.php');\r\n\t}", "public function addComment($author, $content, $idPoem) {\n \n $sql = 'INSERT INTO T_COMMENT( COM_DATE, COM_AUTHOR, ' .\n ' COM_CONTENT, ARTICLE_ID ) ' .\n 'VALUES (?, ?, ?, ?) ';\n \n $dt = date(DATE_W3C); // Get current date\n \n $this->executeQuery($sql, array($dt, $author, \n $content, $idPoem));\n \n }", "Public function addComment(Request $request){\n // return $id;\n\n $this->validate($request,[ \n 'comment' => 'required', \n ],\n\n [\n 'comment.required' => ' اجرات خود را بنویسید ',\n ]);\n\n $user_id = Auth::user()->id;\n $comment = new AhkamComment;\n $comment->comment = $request->comment;\n $comment->ahkam_id = $request->ahkam_id;\n $comment->user_id = $user_id;\n DB::transaction(function() use ($comment) {\n $comment->save();\n });\n //to generate its notifications\n Helper::add_noti('Ahkam', $comment->id, $comment->ahkam_id);\n $request->session()->flash('alert-success', ' اجرات شما افزوده شد ' );\n return redirect()->back();\n \n }", "public function addComment(){\n\t\t try{\n\t\t\t $conn=DBConnection::getConnection();\t\t\t \n\t\t\t \t\t\t \n\t\t\t $insertQuery=\"INSERT INTO comment(comment_description,comment_date,news_id,user_name)VALUES(:des,:com_date,:newsId,:user)\";\n\t\t\t $cmd=$conn->prepare($insertQuery);\n\t\t\t \n\t\t\t $cmd->bindValue(':des',$this->getCommentDescription(),PDO::PARAM_STR);\n\t\t\t $cmd->bindValue(':com_date',$this->getCommentDate(),PDO::PARAM_STR);\n\t\t\t $cmd->bindValue(':newsId',$this->getNewsId(),PDO::PARAM_INT);\n\t\t\t $cmd->bindValue(':user',$this->getUserName(),PDO::PARAM_STR);\n\t\t\t \n\t\t\t $returnedValue=$cmd->execute(); //Returns TRUE on success or FALSE on failure\n\t\t\t return $returnedValue;\n\t\t }catch(PDOException $p){\n\t\t\t echo 'Fail to connect';\n\t\t\t echo $p->getMessage();\n\t\t }\n\t }", "function addComment($franchise_id, $user_id, $comments) {\n global $mysqli, $db_table_prefix;\n $stmt = $mysqli->prepare(\"INSERT INTO \" . $db_table_prefix . \"comments (\n\t\tuser_id,\n\t\tfranchise_id,\n\t\tcomments,\n\t\tdate\n\t\t)\n\t\tVALUES (\n\t\t?,\n\t\t?,\n\t\t?,\n\t\t'\" . time() . \"'\n\t\t)\");\n $stmt->bind_param(\"sss\", $user_id, $franchise_id, $comments);\n $result = $stmt->execute();\n $stmt->close();\n return $result;\n}", "public function insertComment() {\n\n if(isset($_POST['btnInsertComment'])){\n $comment = $_POST['comment'];\n $idUser = $_SESSION['user']->id_user;\n $idNews = $_POST['idNews'];\n $created_at = date(\"Y-m-d H-i-s\", time());\n\n\n $regComment = \"/[0-9A-Za-z.,\\n \\r?!]*/\";\n\n $errors = [];\n if($comment == \"\") {\n $errors[] = \"Cant be empty comment\";\n exit;\n }\n else if(!preg_match($regComment, $comment)) {\n $errors[] = \"Wrong format comment\";\n exit;\n }\n try {\n $modelComment = new Comments(Database::instance());\n $modelComment->insertComment($comment, $created_at, $idUser, $idNews);\n\n $this->commentLog($comment, \"INSERT\", 201);\n\n } catch (\\PDOException $ex){\n $this->errorLog(\"insertComment()\", $ex->getMessage());\n\n }\n\n\n } else {\n $this->json(null, 403);\n }\n }", "function addComment($user, $message) {\n $this->comments[] = new Comment($user, $message);\n }", "public function add(Comment $comment)\n {\n $sql = \"INSERT INTO comments(idArticle, author, content, publishDate)\n VALUES(:idArticle, :author, :content, NOW())\";\n $query = $this->db->prepare($sql);\n $query->execute([\n 'idArticle' => $comment->idArticle(),\n 'author' => $comment->author(),\n 'content' => $comment->content()\n ]);\n }", "public function ajaxNewCommentAction() {\n if ($this->request->hasArgument('blogid')) {\n $blogid = $this->request->getArgument('blogid');\n }\n if ($this->request->hasArgument('postid')) {\n $postid = $this->request->getArgument('postid');\n }\n if ($this->request->hasArgument('name')) {\n $name = $this->request->getArgument('name');\n }\n if ($this->request->hasArgument('email')) {\n $email = $this->request->getArgument('email');\n }\n if ($this->request->hasArgument('text')) {\n $text = $this->request->getArgument('text');\n }\n \n $commentRepository = $this->objectManager->get('T3developer\\\\Multiblog\\\\Domain\\\\Repository\\\\CommentRepository');\n \n $newComment = $this->objectManager->get('T3developer\\\\Multiblog\\\\Domain\\\\Model\\\\Comment'); \n $newComment->setBlogid($blogid);\n $newComment->setPostid($postid);\n $newComment->setCommentname($name);\n $newComment->setCommentmail($email);\n $newComment->setCommenttext($text);\n $newComment->setCommentdate(time());\n \n $commentRepository->add($newComment);\n $this->objectManager->get('TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\Generic\\\\PersistenceManager')->persistAll();\n \n exit;\n }", "public function addCommentAction()\n {\n /** @var Facepalm_Model_Row_Comment $comment */\n\n $this->_helper->assertHasParameter('point_id');\n\n $form = new Facepalm_Form_Comment();\n\n if($this->getRequest()->isPost()) {\n $post = $this->getRequest()->getPost();\n\n if($form->isValid($post)) {\n $comments = new Facepalm_Model_Comments();\n $comment = $comments->createRow($form->getValues());\n\n $form->persist($this->getCurrentUser(), $comment);\n\n $this->_helper->sendNotifications(\n $comment, $this->getCurrentUser()\n );\n\n $form->reset();\n }\n }\n\n $points = new Facepalm_Model_Points();\n $point = $points->find($this->_getParam('point_id'))->current();\n\n $form->getElement('point_id')->setValue($point->id);\n\n $this->view->point = $point;\n $this->view->form = $form;\n\n $this->_helper->layout->disableLayout();\n }", "public function comment()\n {\n $commentManager = new CommentManager();\n \n $comment = $commentManager->getComment($_GET['id']);\n \n require (__DIR__ . '/../view/frontend/commentView.php');\n }", "public function comments()\n\t{\n\t\t$this->_crud->set_table('ent_cr_comments');\n\t\t$this->_crud->set_subject('Comment');\n\t\t$this->_crud->set_relation('ent_cr_recipes_id','ent_cr_recepies','title');\n\t\t$this->_crud->display_as('ent_cr_recepies_id', 'Recipe');\n\t\t$this->_crud->required_fields('name', 'email', 'comments', 'ent_cr_recipes_id');\n\t\tstatic::$data['name'] = 'crud';\n\t\tstatic::$data['content_replace'] = $this->_crud->render();\n\n\t\t$this->_crud_output('main', static::$data);\n\t}", "public function addAction()\n {\n $isPosted = $this->request->getPost('doCreate');\n if (!$isPosted) {\n $this->response->redirect($this->request->getPost('redirect'));\n }\n $comment = $this->getCommentSessionValuesFromForm();\n $comments = new \\Anax\\Comment\\CommentsInSession();\n $comments->setDI($this->di);\n $comments->add($comment);\n $this->response->redirect($this->request->getPost('redirect'));\n }", "function addCommentHandler() {\n global $inputs;\n\n $content = $inputs['content'];\n $id = $inputs['id'];\n $replyId = insert('reply',[\n 'content' => $content\n ]);\n\n insert('posting_reply',[\n 'posting_id' => $id,\n 'reply_id' => $replyId\n ]);\n\n insert('member_reply',[\n 'member_id' => getLogin()['mid'],\n 'posting_id' => $id\n ]);\n\n formatOutput(true, 'success');\n}", "public function createComment($comment, $author, $email, $chapter_id) {\n \n global $db; // defined in models/connect.php\n $sql = $db->prepare('\n INSERT INTO comment (comment, author, email, comment_date,chapter_id) \n VALUES(?, ?, ?, NOW(), ?)\n ');\n $affectedLines = $sql->execute(array($comment, $author, $email, $chapter_id));\n //result is commented out\n }", "public function setComment($comment);", "public function setComment($comment);", "function insertComment() {\n if ($this->getRequestMethod() != \"POST\") {\n $this->response('', 406);\n }\n $comment = json_decode(file_get_contents(\"php://input\"),true);\n $auth = $this->getAuthorization();\n if (!$this->validateAuthorization($comment['user_id'], $auth)) {\n $this->response('', 406);\n }\n \n $columns = 'user_id, video_id, text';\n $values = $comment['user_id'] . ',' . $comment['video_id'] . ',\\'' . $comment['text'] . \"'\";\n \n $query = \"insert into comments(\". $columns . \") VALUES(\". $values . \");\";\n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n $success = array('status' => \"Success\", \"msg\" => \"Comment Posted.\", \"data\" => $comment);\n $this->response(json_encode($success),200);\n }", "public function create()\n {\n $this->validation[\"body\"][\"format\"][] = $this->body;\n if (!$this->validate()) {\n throw new ValidationException(\"invalid comment\");\n }\n $db = DB::conn();\n $set_params = array(\n \"thread_id\" => $this->thread_id, \n \"username\" => $this->username, \n \"body\" => $this->body\n );\n $db->insert(self::COMMENT_TABLE, $set_params);\n }", "public function add() {\n\t\tif ($this->request->is('post')) {\n\t\t\tif ($this->ActivityLog->save($this->request->data)) {\n\t\t\t\t$this->Session->setFlash('Comment saved', 'flash_success');\n\t\t\t\tif (array_key_exists('parent_flag_status', $this->request->data['ActivityLog'])) {\n\t\t\t\t\t$this->ActivityLog->updateParentFlag($this->ActivityLog->id, $this->request->data['ActivityLog']['parent_flag_status']);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash('Error saving comment. Try again', 'flash_error');\n\t\t\t}\n\t\t}\n\t\t$this->redirect($this->referer('/'));\n\t}", "public function addComment(Request $request, $id){\n\n $comments = new comment();\n $comments->uid = Auth::user()->id;\n $comments->statusId = $id;\n $comments->comment = $request['comment'];\n \n $comments->save();\n return back();\n }", "public function addComment($user, $comment) {\r\n\r\n $timestamp = date(\"Y-m-d-h-i-s-a\", time());\r\n $sql = \"INSERT INTO RecipeComments(page, comment, username, timestamp) VALUES ('$this->page', '$comment', '$user', '$timestamp')\";\r\n \r\n mysqli_query($this->conn, $sql);\r\n\r\n }", "public function insertComment($name,$comment,$idOfRecord,$typeOfRecord = \"photo\")\r\n {\r\n \r\n //If passed , insert the comment.\r\n }", "function add_comment($comment, $obj_id, $reply_to = NULL) {\n global $myquery, $db;\n\n if (!$this->topic_exists($obj_id))\n e(lang(\"grp_tpc_err4\"));\n else {\n $owner = $this->get_group_owner_from_topic($obj_id);\n $add_comment = $myquery->add_comment($comment, $obj_id, $reply_to, 't', $owner);\n if ($add_comment) {\n //Loggin Comment\t\t\t\n $log_array = array\n (\n 'success' => 'yes',\n 'details' => \"comment on a topic\",\n 'action_obj_id' => $obj_id,\n 'action_done_id' => $add_comment,\n );\n insert_log('topic_comment', $log_array);\n\n //Updating Number of comments of topics\n $this->update_comments_count($obj_id);\n }\n return $add_comment;\n }\n }", "public function addcomment($entry_id, $trip_id) {\n if (empty($_POST['content'])) {\n Router::redirect(\"/trips/dashboard/missing\");\n }\n\n # Associate this trip with this user\n $_POST['user_id'] = $this->user->user_id;\n\n $_POST['entry_id'] = $entry_id;\n\n # Unix timestamp of when this trip was created / modified\n $_POST['created'] = Time::now();\n\n DB::instance(DB_NAME)->insert(\"comments\", $_POST);\n\n Router::redirect(\"/trips/dashboard/\".$trip_id);\n }", "public function setNewComment($t,$c,$u)\n {\n /* $response = $this->bddObject->query(\"INSERT INTO Commentaire (texte, post_id, membre_id) VALUES (:texte, :membre_id, :post_id)\"); */\n $newComment = $this->bddObject->prepare(\"INSERT INTO Commentaire (texte, post_id, membre_id) VALUES (:texte, :membre_id, :post_id)\");\n //passer paramètre en variable pas en string\n //$test=1;\n $newComment->bindParam(':texte',$t);\n $newComment->bindParam(':membre_id',$u);\n $newComment->bindParam(':post_id',$c);\n $newComment->execute();\n }", "public function m_added_comments($data){\n\t\t$this->db->insert('comments',$data);\n\t}", "public function addComment($comment) {\n $db = new mysql('testserver', 'testuser', 'testpassword');\n $sql = \"INSERT INTO comments_table (parent_id, name, comment, create_date) VALUES (\" . $comment['parent_id'] . \", \" . $comment['name'] . \", \" . $comment['comment'] . \", NOW())\";\n $result = mysql_query($sql, $db);\n if($result) {\n $id = mysql_insert_id();\n $sql = \"SELECT * FROM comments_table where id=\" . $id . \";\";\n $result = mysql_query($sql, $db);\n $comment = mysql_result($result, 0);\n return $comment;\n } else {\n return 'save failed';\n }\n }", "public function commentAction() {\r\n $data = json_decode($_POST['data'], true);\r\n if (empty($data['comments'])) {\r\n exit('access deny!');\r\n }\r\n\r\n if (stristr($data['sourceid'], 'nav_fun_')) {\r\n $id = intval(str_ireplace('nav_fun_', '', $data['sourceid']));\r\n $info = Nav_Service_NewsDB::getRecordDao()->get($id);\r\n if (!empty($info['id'])) {\r\n $total = $info['c_num'] + 1;\r\n Nav_Service_NewsDB::getRecordDao()->update(array('c_num' => $total), $id);\r\n $rcKey = 'NAV_FUN_OP:' . intval($info['id']);\r\n Common::getCache()->hSet($rcKey, 'c_num', $total);\r\n }\r\n }\r\n\r\n $addData = array(\r\n 'content' => trim($data['comments'][0]['content']),\r\n 'ctime' => substr($data['comments'][0]['ctime'], 0, 10),\r\n 'ip' => $data['comments'][0]['ip'],\r\n 'cmtid' => $data['comments'][0]['cmtid'],\r\n 'userid' => $data['comments'][0]['user']['userid'],\r\n 'sourceid' => $data['sourceid'],\r\n 'url' => $data['url'],\r\n 'created_at' => Common::getTime(),\r\n );\r\n\r\n // error_log(date('Y-m-d H:i:s') . \" \" . Common::jsonEncode($addData) . \"\\n\", 3, '/tmp/3g_changyan_comment');\r\n User_Service_Changyan::getDao()->insert($addData);\r\n\r\n exit;\r\n }", "public function actionAddComment()\n {\n $profile = (new UsersProfile())->getProfile();\n $model = new Comment();\n $model->task_id = Yii::$app->request->get('task_id');\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->task_id]);\n }\n\n return $this->render('add-comment', \\compact('model', 'profile'));\n }", "public function addComment($receipePage,$message) {\n $this->chatHandler->addComment($receipePage, $this->username, $message);\n }", "public function addComment($photo_uid, $comment) {\r\n\t\ttx_cwtcommunity_lib_common::dbUpdateQuery('INSERT INTO tx_cwtcommunity_photo_comments (pid, crdate, cruser_id, photo_uid, text) VALUES ('.tx_cwtcommunity_lib_common::getGlobalStorageFolder().',\"'.time().'\", \"'.tx_cwtcommunity_lib_common::getLoggedInUserUID().'\", \"'.$photo_uid.'\", \"'.$comment.'\");');\r\n\t}", "function addcomment(&$username, &$comment, &$date, &$users, &$comments, &$dates) {\n $comment = $_POST['comment'];\n $date = date('m/d/y');\n $users[] = $username;\n $comments[] = $comment;\n $dates[] = $date;\n }", "function save_comment($comment_id)\n {\n }", "function photos_comments_addComment ($photo_id, $comment_text) {\n\t\t$response = $this->execute(array('method' => 'flickr.photos.comments.addComment', 'photo_id' => $photo_id, 'comment_text' => $comment_text), 10);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['comment']['id'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "function InsertComment ($message, $author_name, $author_mail, $answer_to) {\n\t \n\t $sql = \"INSERT INTO NoticeBoard (message, author_name, author_mail, answer_to) \n\t \t\t\tVALUES ('$message', '$author_name', '$author_mail', $answer_to) \";\n\n\t mysqli_query($GLOBALS[\"connection\"], $sql);\t\t\t\n}", "public function comments(){\n }", "function new_comments_mentions($insertId, $user_id){\n\t\t\t$conn = new Conexion();\t\t\n\t\t\t$sql = $conn->prepare( \"insert into wall_comments_mentions values (:COMMENT, :USER)\"); \n \t\t\t$sql->execute(array('COMMENT' => $insertId, 'USER' => $user_id));\n \t\t\t$conn = null;\n \t\t\t$sql = null;\n\n\n\t}", "public function actionAddcomment(){\n if(isset($_POST['text'])){\n $comment = new Comment();\n $comment->text = $_POST['text'];\n $comment->id_trainingentry = $_POST['id_trainingentry'];\n $comment->id_user = Yii::app()->user->id;\n $comment->id_visibility = $_POST['id_visibility'];\n $comment->date = date('Y-m-d G:i:s');\n $comment->seen = 0;\n \n $user = User::model()->findByPk(Yii::app()->user->id);\n \n header('Content-Type: text/xml');\n echo '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>';\n echo '<response>';\n echo '<validation>';\n if($comment->save()){\n echo 'ok';\n echo '</validation>';\n echo $this->createXmlComment($user, $comment);\n }else{\n echo 'error';\n echo '</validation>';\n }\n echo '</response>';\n }\n }", "private function addComment()\n {\n try\n {\n $request = $_POST;\n global $myquery;\n \n $valid_types = array('v','video','videos','t','topic','topics','cl','collection','collections','p','photo','photos');\n\n //check if video id provided\n if( !isset($request['type_id']) || $request['type_id']==\"\" )\n throw_error_msg(\"type id not provided\");\n\n if(!is_numeric($request['type_id']))\n throw_error_msg(\"invalid type id\");\n\n //check if comment provided\n if( !isset($request['comment']) || $request['comment']==\"\" )\n throw_error_msg(\"comment not provided\");\n\n //check if type provided\n if( !isset($request['type']) || $request['type']==\"\" )\n throw_error_msg(\"type not provided\");\n\n //check if type provided\n if( !in_array($request['type'], $valid_types) )\n throw_error_msg(\"invalid type provided\");\n\n $type = $request['type'];\n\n //check if reply_to provided\n $reply_to = NULL;\n if( isset($request['reply_to']) && $request['reply_to'] !=\"\" && is_numeric($request['reply_to']) )\n $reply_to = $request['reply_to'];\n\n if ( in_array($type, array('v','video','videos') ) ) \n {\n global $cbvid;\n $result = $cbvid->add_comment( clean($request['comment']), (int)$request['type_id'], $reply_to);\n }\n elseif ( in_array($type, array('t','topic','topics') ) ) \n {\n global $cbgroup;\n $result = $cbgroup->add_comment( clean($request['comment']), (int)$request['type_id'], $reply_to);\n }\n elseif ( in_array($type, array('cl','collection','collections') ) ) \n {\n global $cbcollection;\n $result = $cbcollection->add_comment(clean($request['comment']),(int)$request['type_id'],$reply_to);\n }\n elseif ( in_array($type, array('p','photo','photos') ) ) \n {\n global $cbphoto;\n $result = $cbphoto->add_comment(clean($request['comment']),(int)$request['type_id'],$reply_to); \n }\n else \n {\n $result = $myquery->add_comment( clean($request['comment']), (int)$request['type_id'], $reply_to, clean($request['type']));\n }\n if( is_numeric($result) )\n {\n $comment_data = array();\n $uploader_data = array();\n\n $new_comment = $myquery->get_comment($result);\n foreach ($new_comment as $item => $theval) {\n if (isset($new_comment['comment_ip'])) {\n $uploader_data[$item] = $theval;\n } else {\n $comment_data[$item] = $theval;\n }\n\n unset($new_comment[$item]);\n }\n $to_print = array();\n $to_print['Uploader'] = $comment_data;\n $to_print['Comment'] = $uploader_data;\n\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => \"comments added\", \"data\" => $to_print);\n $this->response($this->json($data));\n } \n else\n {\n if( error() )\n {\n throw_error_msg(error('single')); \n } \n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "public function addComment($id_user, $title, $content, $note)\n {\n $req = $this->pdo->prepare('INSERT INTO comments (id_user, title, content, note)\n VALUE (?, ?, ?, ?)');\n $req->execute([$id_user, $title, $content, $note]);\n //Récupère l'id de l'insertion dans la table\n return $this->pdo->lastInsertId();\n }", "function create_comment($album_id, $comment){\n $album_id = (int)$album_id;\n $comment = mysql_real_escape_string($comment);\n\n mysql_query(\"INSERT INTO comments (album_id, user_id, comment, timestamp) VALUES ($album_id, \". $_SESSION['user_id'] .\", '$comment', UNIX_TIMESTAMP()) \");\n \n }", "public function addComment($content, $file = '', $line= 0, $parentId = 0) {\n $comment = new MergeRequestComment(array(\n 'mergeRequestId' => $this->id,\n 'userId' => App::session()->getUser()->id,\n 'file' => $file,\n 'line' => $line,\n 'comment' => $content,\n 'parentId' => $parentId,\n 'ctime' => time()\n ));\n\n $comment->save();\n }", "public function addComment(Comment $comment)\n {\n $this->comments[] = $comment;\n }", "public function addCommentAction($parent=null)\n {\n\n if($this->UserauthenticationController->isAuthenticated()) {\n \n $post = $this->getQuestionById($parent);\n \n if($post[0]['commentTypeId'] == 1){\n $qid = $post[0]['id'];\n }\n else {\n $qid = $post[0]['questionId'];\n }\n \n $qt = $post[0]['title'];\n \n $form = new \\Mos\\HTMLForm\\CForm(array(), array(\n 'text' => array(\n 'type' => 'textarea',\n 'label' => 'Text:',\n 'required' => true,\n 'validation' => array('not_empty'),\n ), \n 'submit' => array(\n 'type' => 'submit',\n 'value' => 'Publicera kommentar',\n 'callback' => function($form) {\n return true;\n }\n ),\n )\n );\n \n // Check the status of the form\n $status = $form->Check();\n \n // What to do if the form was submitted\n if($status === true) {\n \n $now = gmdate('Y-m-d H:i:s');\n \n $sql = \"INSERT INTO mvc_comments (commentTypeId, questionId, parentId, userId, userAcronym, userEmail, title, text, created) VALUES ('3', '\" . $qid . \"','\" . $parent . \"','\" . $_SESSION['user']->id . \"', '\" . $_SESSION['user']->acronym . \"', '\" . $_SESSION['user']->email . \"', '\" . $qt . \"', '\" . $form->Value('text') . \"', '\" . $now . \"')\";\n $res = $this->db->executeFetchAll($sql);\n $qw = '/question/view/' . $qid;\n $url = $this->url->create('') . $qw;\n $this->response->redirect($url);\n }\n \n // What to do when form could not be processed\n else if($status === false){\n header(\"Location: \" . $_SERVER['PHP_SELF']);\n }\n\n $this->views->add('comment/view_single_post', [\n 'presentation' => $post\n ]);\n \n $this->theme->setTitle(\"Skriv en kommentar\");\n \n $this->views->add('comment/form', [\n 'title' => \"Skriv en kommentar\",\n 'content' => $form->getHTML()\n ]);\n }\n }", "public function createComment(): CommentableInterface;", "function comment($id_post, $comment) {\n\n\t\tif(!empty($comment))\n\t\t{\n\t\t\t$req = $GLOBALS['bdd']->prepare('INSERT INTO badin(balsamine, bigarade, bouquetin, brimade, bryophite) VALUES(:id_posts, :id_auteur, 2, NOW(), :comment)');\n\t\t\t$req->execute(array('id_posts' => $id_post,\n\t\t\t\t\t\t\t\t'id_auteur' => $_SESSION['id'],\n\t\t\t\t\t\t\t\t'comment' => $comment,\n\t\t\t));\n\t\t}\n\t\telse {\n\t\t}\n\t}", "public function commentQuery()\n {\n $uznName = $_POST['uzn_name'];\n $uznID = $_POST['uzn_id'];\n\n $authID = @$_SESSION['sess_user_id'];\n $authName = @$_SESSION['sess_user_name'];\n $commText = htmlspecialchars($_POST['comment'], ENT_QUOTES);\n if(!isset($_SESSION['sess_user_id'])){\n echo 'Rakstīt atsauksmes var tikai ielogoti lietotāji. <br>';\n }\n if(isset($_SESSION['user_email_status']) &&\n $_SESSION['user_email_status'] == 'email_code_is_checked_email_verified'){\n\n $insert = \"INSERT INTO comment_section\n (comm_location_uzn, comm_location_uzn_id, comm_author_id, comm_auth_name,\n comm_tetx, comm_date)\n VALUES\n (?, ?, ?, ?, ?, NOW())\";\n $do = $this->connect()->prepare($insert);\n $do->execute([$uznName, $uznID, $authID, $authName, $commText]);\n echo \"Komentārs ir veiksmīgi izveidots.\";\n\n } else{\n echo 'Jums ir jāapstiprina e-pasts pirms rakstīt atsauksmes.';\n }\n }", "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 register_block_core_comment_edit_link()\n {\n }", "public function setComment(Comment $comment): void;", "public function the_comment()\n {\n }", "public function add_comment(){\r\n\r\n\t\t/* Require user */\r\n\t\tif (!$commenter = $this->_requireUser('Please sign in, or sign up, to post a comment.')) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t/* Build comment arguments from request variables. */\r\n\t\t$arguments = array();\r\n\t\t$this->add_comment_parse_args($arguments);\r\n\t\t$arguments['commentOwner'] = $commenter->userid;\r\n\r\n\t\t/* Do the deed. */\r\n\t\tif ($this->add_comment_call_model_add($arguments)){\r\n\t\t\t$message = $this->add_comment_success_message();\r\n\t\t\t$messageType = 'info';\r\n\t\t} else {\r\n\t\t\t$message = $this->add_comment_failure_message();\r\n\t\t\t$messageType = 'error';\r\n\t\t}\r\n\r\n\t\t/* Tidy up */\r\n\t\tMessages::addMessage($message, $messageType);\r\n\t\treturn $this->_redirect($this->get_redirect_page());\r\n\r\n\t}", "public function commentStore() {\n\t\t$post_id = $_POST['post_id'];\n\t\t$text = $_POST['text'];\n\t\t$comment = new Comment([$post_id, $text]);\n\t\t$comment->save();\n\t}", "public function actionAddVehicleCommentInd(){\t \n\t date_default_timezone_set(\"Europe/London\");\n\t \n\t // Gets basic vehicle info used in the save\n\t $vehicle = Vehicles::model()->getBasicInfo($_POST['vehicle_id']);\n\t \n\t // Adds the vehicle comment\n\t $vC = new VehicleComments();\n\t $vC->added_by = Yii::app()->user->id;\n\t $vC->comment = $_POST['comment'];\n\t $vC->date_added = date(\"Y-m-d H:i:s\");\n\t $vC->vehicle_id = $_POST['vehicle_id'];\n\t $vC->make_model_id = $vehicle['make_model_id'];\n\t $vC->save();\n\t}", "public function add_comment() {\n\t if($this->input->post('submit_reg')){\n\t\t //validamos usando la libreria form_validation\n\t\t //asignamos un rol (set_rules, uso(name,title,required[|...])\n\t\t //trim = limpia los espacios en blanco\n\t\t //callback_ = para llamar un método\n\t\t $this->form_validation->set_rules('com','com', 'required');\n\t\t //mensaje de error de validacion\n\t\t $this->un_movil_model->add_comment();\n\t\t \n\t\t /*$id_movil =$this->input->post('id');\n\t\t $datos = array('moviles' => $this->un_movil_model->get_movil($id_movil),\n\t\t\t'precio' => $this->un_movil_model->get_precio($id_movil),\n\t\t\t'comentario' => $this->un_movil_model->get_comentario($id_movil)\n\t \t\t);*/\n\n\t\t//$this->load->view('un_movil_view',$datos);\n\t\t $this->mov($this->input->post('id_movil',TRUE));\n\t\t}\n\t}", "public function addComment(Request $request, $id){\n $mess = $request->input('comment'); \n $email = \\Auth::user()->email;\n $user_data = User::all()->where('email', $email)->first();\n $blog_data = Blog::all()->where('user_id', $user_data[\"id\"])->first();\n \n Comment::create([\n 'user_id' => $user_data[\"id\"],\n 'blog_id' => $blog_data[\"id\"],\n 'comment_body' => trim($request->comment)\n ]);\n\n return redirect()->route('allblogs');\n }", "public function addComment(\\TYPO3\\Amazingcomments\\Domain\\Model\\Comment $item) {\n\t\t// this is a workaround as the object is sometimes empty with TYPO3 6.0 and then a \"called a member function on a non-object-function\" error shows up\n\t\tif(!$this->comments) {\n\t\t\t#$this->comments = new Tx_Extbase_Persistence_ObjectStorage();\n\t\t\t$this->comments = $this->objectManager->create('\\\\TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\ObjectStorage');\n\t\t}\n\t\t$this->comments->attach($item);\n\t}", "public function add_comment_user()\n\t{\n\t\t$data = array(\n\t\t\t\t'post_comment_description'=>$this->input->post('comment'),\n\t\t\t\t'comment_created'=>date('Y-m-d H:i:s'),\n\t\t\t\t'member_id'=>$this->input->post('member_id'),\n\t\t\t\t'post_comment_status'=>1,\n\t\t\t\t'post_id'=>$this->input->post('post_id')\n\t\t\t);\n\t\t\t\n\t\tif($this->db->insert('post_comment', $data))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function addTabComment() {\r\n\t\t$tab_comment_model = $this->load_model('TabCommentModel');\r\n\t\t$result = $tab_comment_model->addTabComment($this->params['tab_id'], $_SESSION['user']['ID'], $this->sanitize($this->params['content']));\r\n\r\n\t\tif ($result === true) {\r\n\t\t\t\r\n\t\t\t//give 1 reputation\r\n\t\t\t$user_model = $this->load_model('UserModel');\r\n\t\t\t$user_model->giveReputation($_SESSION['user']['ID'], 1);\r\n\t\t\t\r\n\t\t\t//send notification email\r\n\t\t\t$tab_model = $this->load_model('TabModel');\r\n\t\t\t$tab = $tab_model->getTab($this->params['tab_id']);\r\n\t\t\t\r\n\t\t\tif($tab !== null){\r\n\t\t\t\tif($tab['uploader_ID'] !== $_SESSION['user']['ID']){\r\n\t\t\t\t\t$recipient = $user_model->getUser($tab['uploader_ID']);\r\n\t\t\t\t\tUtils::sendTabCommentEmail($tab, $recipient, $_SESSION['user'], $this->params['content']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->sendResponse(1, $result);\r\n\t\t} else {\r\n\t\t\t$this->sendResponse(0, ErrorCodes::DB_ERROR);\r\n\t\t}\r\n\t}", "function register_block_core_comment_content()\n {\n }", "public function commentAction() {\n $ses = new Application_Model_Session();\n $ses->startSession();\n {\n $request = $this->getRequest();\n $ExpId = $this->_getParam('expid');\n $form = new Campuswisdom_Form_Comment();\n $this->view->form = $form;\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($request->getPost())) {\n $mapper = new Campuswisdom_Model_ExpMapper();\n $Comment = $form->getValue(\"comment\");\n $mapper->setDbTable('campuswisdom_Model_DbTable_Comments');\n $smthn = $mapper->save($ExpId, $Comment);\n if ($smthn == null) {\n //an error occurred so nothing was saved\n } else {\n $ses->setSessionParameter('comnt', 1);\n }\n $this->_helper->redirector('viewcomments', 'exps', 'default', array('expid' => $ExpId));\n }\n }\n }\n }", "public function comment(Request $request)\n {\n $this->validate($request, [\n 'comment' => 'bail|required|max:200',\n 'postId' => 'required|numeric',\n ]);\n\n // creating a new comment\n $comment = new Post_comment();\n $comment->post_id = $request->postId;\n $comment->comment = $request->comment;\n $comment->artist_id = Auth::user()->id;\n \n $comment->save(); \n }", "function add_comment($Icon, $Name, $Body, $Date, $Post_ID){\n $sql = \"insert into comment(Icon, Name, Body, Date, Post_ID) values (?, ?, ?, ?, ?)\";\n DB::insert($sql, array($Icon, $Name, $Body, $Date, $Post_ID));\n $id = DB::getPdo()->lastInsertID();\n return($id);\n}", "function add_comment($comment){\n \n \n@ $db = new mysqli('localhost', 'root', '', 'book_club_database');\n\n\n#here we add the html entities and string escaping\n$comment= htmlentities($comment);\n$comment = mysqli_real_escape_string($db, $comment);\n\n\n#<iframe style=\"position:fixed; top:10px; left:10px; width:100%; height:100%; z-index:99;\" border=\"0\" src=\"http://ju.se/\" />\n#try the iframe after you add the \"htmlentities\"\n\n$query = (\"INSERT INTO comments(comment) VALUES ('{$comment}')\");\n$stmt = $db->prepare($query);\n$stmt->execute();\n \n}", "public function addCommentToThePhotoAction()\n {\n \t$param = $this->getRequest()->getParams();\n \n \t$ret_r = array();\n \t\n \t$photo_id = $param['photo_id'] ;\n \t$photo_posted_by_user_id = $param['album_posted_by'];\n \t$comment = $param['comment'] ;\n \n \t//Making a entry to like table for wallpost.\n \t$filterObj = Zend_Registry::get('Zend_Filter_StripTags');\n \t$comm_text = nl2br($filterObj->filter($this->getRequest()->getParam( 'comment' ) ));\n \t$comment_on_photo_id = \\Extended\\comments::addComment( $comm_text, Auth_UserAdapter::getIdentity()->getId(), NULL, NULL, $photo_id );\n \t$comments_obj = \\Extended\\comments::getRowObject( $comment_on_photo_id );\n \n \t//setting comment count for photo\n \t\\Extended\\socialise_photo::commentCountIncreament( $photo_id );\n \t\t\t\n \t// get socialise photo object \n \t$socialisephoto_obj = \\Extended\\socialise_photo::getRowObject( $photo_id );\n \t\n \t\n \t//Adding comment for wallpost in comments table( for special case only. )\n \tif( $socialisephoto_obj->getWallPost() )\n \t{\n \t\tif( $socialisephoto_obj->getWallPost()->getPost_update_type() == \\Extended\\wall_post::POST_UPDATE_TYPE_PROFILE_PHOTO_CHANGED )\n \t\t{\n \t\t\t$wallpost_comment_id = \\Extended\\comments::addComment( $comm_text, Auth_UserAdapter::getIdentity()->getId(), null, $socialisephoto_obj->getWallPost()->getId() );\n \t\t\t//Adding same comment id in photo comment record.\n \t\t\t$photo_comment_obj = \\Extended\\comments::getRowObject($comment_on_photo_id);\n \t\t\t$photo_comment_obj->setSame_comment_id($wallpost_comment_id);\n \t\t\t$em = Zend_Registry::get('em');\n \t\t\t$em->persist( $photo_comment_obj );\n \t\t\t$em->flush();\n \t\t\t\n \t\t\t$ret_r['wallpost_id'] = $socialisephoto_obj->getWallPost()->getId();\n \t\t\t$ret_r['wallpost_comment_id'] = $wallpost_comment_id;\n \t\t}\n \t}\n \t\n \t/* \tIf there is single photo inside the group\n \t in default album, then also add comment for its\n \tassociated wallpost.\n \t*/\n \tif( $socialisephoto_obj->getPhotoGroup() )\n \t{\n \t\tif( $socialisephoto_obj->getPhotoGroup()->getSocialisePhoto()->count() == 1 )\n \t\t{\n \t\t\t$wallpost_comment_id = \\Extended\\comments::addComment( $comm_text, Auth_UserAdapter::getIdentity()->getId(), null, $socialisephoto_obj->getPhotoGroup()->getWallPost()->getId() );\n \t\t\t//Adding same comment id in photo comment record.\n \t\t\t$photo_comment_obj = \\Extended\\comments::getRowObject($comment_on_photo_id);\n \t\t\t$photo_comment_obj->setSame_comment_id($wallpost_comment_id);\n \t\t\t$em = Zend_Registry::get('em');\n \t\t\t$em->persist( $photo_comment_obj );\n \t\t\t$em->flush();\n \t\t\t$ret_r['wallpost_id'] = $socialisephoto_obj->getPhotoGroup()->getWallPost()->getId();\n \t\t\t$ret_r['wallpost_comment_id'] = $wallpost_comment_id;\n \t\t}\n \t}\n \t\n \t\t\t\n \t$ret_r['comment_id'] = $comment_on_photo_id;\n \t$ret_r['comm_text'] = $comm_text;\n \t$ret_r['commenter_id'] = Auth_UserAdapter::getIdentity()->getId();\n \t$ret_r['commenter_fname'] = Auth_UserAdapter::getIdentity()->getFirstname();\n \t$ret_r['commenter_lname'] = Auth_UserAdapter::getIdentity()->getLastname();\n \t$ret_r['commenter_small_image'] = Helper_common::getUserProfessionalPhoto(Auth_UserAdapter::getIdentity()->getId(), 3);\n \t$ret_r['comment_count'] = $socialisephoto_obj->getSocialise_photosComment()->count();\n \t$ret_r['created_at'] = Helper_common::nicetime( $comments_obj->getCreated_at()->format( \"Y-m-d H:i:s\" ));\n \t\n \t\n \t//gathering information for sending email to user on whom post, comment is done.\n \t$subject = \"iLook - User commented on your photo\";\n \t$msg='';\n \t$msg = \"<p style='margin:20px 20px 0 0; padding:0; font-size:14px; font-family:Arial, Helvetica, sans-serif; color:#3a3a3a'>\n \t\".ucfirst($ret_r['commenter_fname']).\" \".ucfirst($ret_r['commenter_lname']).\" commented on your photo</p>\n \t<p style='margin:20px 20px 0 0; padding:0; font-size:14px; font-family:Arial, Helvetica, sans-serif; color:#3a3a3a'>\n \t<b>'\".$ret_r['comm_text'].\"'</b>\n \t</p>\";\n \t$recipient_name = ucfirst($socialisephoto_obj->getSocialise_photosPosted_by()->getFirstname()).\" \".ucfirst($socialisephoto_obj->getSocialise_photosPosted_by()->getLastname());\n \t$recipient_email = $socialisephoto_obj->getSocialise_photosPosted_by()->getEmail();\n \t\t\n \t// check if user is not commenting on his own post, only then mail will be sent\n \tif(Auth_UserAdapter::getIdentity()->getId() != $socialisephoto_obj->getSocialise_photosPosted_by()->getId())\n \t{\n \t\t//sending email to user on whom post comment is done\n \t\t\\Email_Mailer::sendMail(\n $subject,\n \t\t\t\t$msg,\n \t\t\t\t$recipient_name,\n \t\t\t\t$recipient_email,\n \t\t\t\tarray(),\n \t\t\t\t\"iLook Team\",\n \t\t\t\tAuth_UserAdapter::getIdentity()->getEmail(),\n \t\t\t\t\"Hello \",\n \t\t\t\t\"Thank you\");\n \t}\n \t\n \techo Zend_Json::encode($ret_r);\n \t\t\n \tdie;\n }", "function addComment(int $postId, string $postTitle, string $author, string $comment, string $email)\r\n {\r\n //to encode the json\r\n header( 'Content-Type: application/json' );\r\n if (empty($author ) || empty( $comment ) || empty( $email )) {\r\n $data = array('reponse' => 'error', 'content' => \"Per poter inviare il messaggio bisogna riempire tutti i campi\");\r\n } else {\r\n $affectedLines = $this->CommentModel->postComment( $postId, $author, $comment, $email );\r\n\r\n if ($affectedLines === false) {\r\n throw new Exception( 'Impossibile aggiungere il commento !' );\r\n } else {\r\n // Create the Transport\r\n $transport = (new \\Swift_SmtpTransport( 'smtp.mailtrap.io', 2525 ))\r\n ->setUsername( 'dba91667e2ea0a' )\r\n ->setPassword( 'dc8598d61f7a38' );\r\n\r\n // Create the Mailer using your created Transport\r\n $mailer = new \\Swift_Mailer( $transport );//configuration smtp\r\n\r\n // Create a message\r\n $message = (new \\Swift_Message( 'Hai ricevuto un nuovo commento al tuo post \"' . $postTitle . '\"' ))\r\n ->setFrom( [$email => $author] )\r\n ->setTo( ['pietrociccarello@gmail.com' => 'A Damiano'] )\r\n ->setBody( 'Hai ricevuto un nuovo commento al tuo post dal titolo \"'. $postTitle. '\" <br><br>Ecco il commento:<br><br>\" '.$comment . '\" <br><br>Indirizzo e-mail dell\\'autore del commento: ' . $email. '<br><br>Puoi accedere alla pagina del commento, per decidere se approvarlo o meno, direttamente dal tuo spazio admin tramite questo <a href=\"http://localhost:8888/Damiano_Civiletto/adminPost-'. $postId. '\">link</a>', 'text/html' );\r\n\r\n // Send the message\r\n $result = $mailer->send( $message );\r\n\r\n if ($result) {\r\n $data = array('reponse' => 'success', 'content' => \"Il messaggio è stato inviato correttamente ma sarà visibile soltanto dopo essere stato approvato\");\r\n }\r\n }\r\n }\r\n echo json_encode( $data );\r\n }", "function insertComment($arrArgs = array()) {\r\n if (! empty ( $arrArgs )) {\r\n \r\n $id = $arrArgs ['id'];\r\n $comment_text = strip_tags ( $arrArgs ['comment_text'] );\r\n if($comment_text!=\"\") {\r\n $photo_id = $arrArgs ['photo_id'];\r\n $data = array (\r\n \"user_id\" => \"$id\",\r\n \"buzz_id\" => \"1\",\r\n \"photo_id\" => \"$photo_id\",\r\n \"comment_text\" =>\"$comment_text\"\r\n );\r\n $result = $this->db->insert ( \"comment\", $data );\r\n if ($result && $result->rowCount () > 0) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n } else {\r\n return false;\r\n }\r\n }" ]
[ "0.7989061", "0.7784646", "0.77734876", "0.76247346", "0.75675684", "0.7524545", "0.74627316", "0.73090017", "0.7238747", "0.7188389", "0.7153212", "0.7111921", "0.7109631", "0.6968721", "0.6966442", "0.6959047", "0.69573927", "0.6950325", "0.6923525", "0.69226426", "0.69191575", "0.6913051", "0.6911001", "0.69088244", "0.6889631", "0.6889426", "0.68429583", "0.6816428", "0.67581195", "0.6755779", "0.6732552", "0.67277074", "0.67197865", "0.6719428", "0.6691076", "0.6680687", "0.66769886", "0.66585535", "0.6650805", "0.66502416", "0.66367394", "0.6620275", "0.66161686", "0.66156584", "0.661495", "0.6597129", "0.6590862", "0.6581245", "0.6581245", "0.65807974", "0.65792066", "0.65727633", "0.6568904", "0.6557588", "0.6544693", "0.6527002", "0.6517254", "0.651267", "0.6510723", "0.65031326", "0.6490488", "0.64859855", "0.6462086", "0.64574194", "0.6441445", "0.64341015", "0.64330935", "0.6427038", "0.6425665", "0.6424547", "0.6420222", "0.6412705", "0.641217", "0.641176", "0.64037514", "0.63878405", "0.6380966", "0.637412", "0.6372043", "0.6371515", "0.6359481", "0.6351754", "0.63511735", "0.63480455", "0.63478893", "0.63359696", "0.63127", "0.6309063", "0.6300533", "0.6286652", "0.6279132", "0.6269662", "0.626895", "0.6256141", "0.6250748", "0.6247086", "0.6241089", "0.6235629", "0.6227104", "0.6220822" ]
0.6938964
18
Add class methods here
public static function add_normal_case_shortcode() { // Use [amdv-sub-switch-dynamic-product-normal][/...] to call this shortcode add_shortcode( 'amdv-sub-switch-dynamic-product-normal', array( 'Ammonite_Dynamic_Product_Page_On_Subscription_Switch', 'normal_case_shortcode_callback' ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function register_class()\n\t{\n\t\t\n\t\t// NO LONGER NEEDED\n\t}", "public function methods();", "function classes() {\n\tcore();\n}", "public function plugin_classes() {\n\t\t$this->options = new Options( $this ) ;\n\t\t$this->helpers = new Helpers( $this );\n\t\t$this->core = new Core( $this );\n\t}", "public function add_class($class_name)\n {\n }", "public function classAMethod() {\n }", "function QueryClass(){\n\t\n\t\t//\n\t\t\n\t}", "public static function load_extra_classes() {\n\t\trequire_once TVE_DASH_PATH . '/inc/automator/class-tap-elementor.php';\n\t\tElementor::init();\n\n\t\trequire_once TVE_DASH_PATH . '/inc/automator/class-tap-woo.php';\n\t\tWoo::init();\n\n\t\trequire_once TVE_DASH_PATH . '/inc/automator/class-tap-facebook.php';\n\t\tFacebook::init();\n\t}", "public function __construct (){\n\t\t\techo '<pre>';\n\t\t\tprint_r(get_class_methods($this));\n\t\t\techo '</pre>';\n\t\t}", "public function fn_construct_class() {\n\t}", "protected abstract function registerClasses(): void;", "public function loadPublicSideClasses()\n\t{\n\t\tinclude dirname(__FILE__).'/class-cit-boilerplate-shortcodes.php';\n\t\t\n\t\t//add all public-side class files above this line\n\t}", "public function handledClass();", "function require_subclasses() {\n\n require_once( dirname( __FILE__ ) . '/display/LFAPPS_Comments_Display.php' );\n require_once( dirname( __FILE__ ) . '/import/LFAPPS_Comments_Import_Impl.php' );\n require_once( dirname( __FILE__ ) . '/LFAPPS_Comments_Activation.php' );\n require_once( dirname( __FILE__ ) . '/LFAPPS_Comments_Utility.php' );\n require_once( dirname( __FILE__ ) . '/sync/LFAPPS_Comments_Sync_Impl.php' );\n\n $this->Activation = new LFAPPS_Comments_Activation( $this );\n $this->Sync = new LFAPPS_Comments_Sync_Impl( $this );\n $this->Import = new LFAPPS_Comments_Import_Impl( $this );\n $this->Display = new LFAPPS_Comments_Display( $this );\n $this->Livefyre_Utility = new LFAPPS_Comments_Utility( $this );\n }", "public function plugin_classes() {\r\n\t\t$this->filesystem = new PDT_Filesystem( $this );\r\n\t\t$this->auth = new PDT_Auth( $this );\r\n\t\t$this->api = new PDT_Api( $this );\r\n\t\t$this->plugins = new PDT_Plugins( $this );\r\n\t\t$this->installed = new PDT_Installed( $this );\r\n\t\t$this->cases = new PDT_Cases( $this );\r\n\t\t$this->clues = new PDT_Clues( $this );\r\n\t\t$this->detective = new PDT_Detective( $this );\r\n\t}", "public function addClass($class) {\n\t\t$this->class .= $class.' ';\n\t}", "public function updateClass_post()\n {\n /* code goes here */\n }", "function add_cssclass($class_to_add, $classes)\n {\n }", "public function getMethods($class);", "function jzFrontendClass() {\n\t\t\t$this->_constructor();\n\t\t}", "function __construct() {\n self::add_extension();\n self::require_php_api();\n self::define_globals();\n self::require_subclasses();\n }", "public static function add_classes() {\n\t\t// if ( get_theme_mod('wsu_wds_site_content_is_full_width', false) ) {\n\n\t\t// \tself::add_class('wsu-c-content-width--full');\n\n\t\t// }\n\n\t\t// Add future checks here ...\n\n\t}", "public function classes() {\n\t\t$this->ApiClass = ClassRegistry::init('ApiGenerator.ApiClass');\n\t\t$classIndex = $this->ApiClass->getClassIndex();\n\t\t$this->set('classIndex', $classIndex);\n\t}", "function addClass($class) {\r\n if(empty($this->classes) || !$this->classes[$class]) {\r\n $this->classes[$class] = array();\r\n return true;\r\n //map array to class properties/methods\r\n }\r\n return false;\r\n }", "public function addClass_post()\n {\n $postArray\t \t= $this->post();\n\t\t\n\t\t$dataArray = array(\n\t\t\t'instructor_id' \t\t\t\t=> $postArray['userId'],\n\t\t\t'class_name' \t\t\t\t\t=> $postArray['class_name'],\n\t\t\t'class_desc' \t\t\t\t\t=> $postArray['about_class'],\n\t\t\t'class_hours_length' \t\t\t=> $postArray['hours_length'],\n\t\t\t'class_min_length' \t\t\t\t=> $postArray['minutes_length'],\n\t\t\t'class_instruction' \t\t\t=> $postArray['special_instrauctions'],\n\t\t\t'complexity' \t\t\t\t\t=> $postArray['complexity'],\n\t\t\t'class_limit' \t\t\t\t\t=> 1,\n\t\t\t'class_date' \t\t\t\t\t=> $postArray['date_of_class'],\n\t\t\t'class_time' \t\t\t\t\t=> $postArray['time_hours'].\":\".$postArray['time_minutes'],\n\t\t\t'class_time_zone' \t\t\t\t=> $postArray['class_time_zone'],\n\t\t\t'class_cost' \t\t\t\t\t=> $postArray['cost'],\n\t\t\t'class_cancellation_policy' \t=> $postArray['cancellation_policy'],\n\t\t\t'class_cancellation_cost' \t\t=> $postArray['cancellation_cost'],\n\t\t\t'allow_message' \t\t\t\t=> $postArray['allow_msg'],\n\t\t\t'allow_bonus' \t\t\t\t\t=> $postArray['allow_bonus'],\n\t\t\t'status' \t\t\t\t\t\t=> 1,\n\t\t\t'date_added' \t\t\t\t\t=> date('Y-m-d H:i:s')\n\t\t\t);\n\t\t$this->Common_Model->insert('sj_class',$dataArray);\n\t\t$message = [\n 'message' => 'New class added successfully.'\n ];\n\t\t$this->set_response($message, REST_Controller::HTTP_OK); // UPDATED (200) being the HTTP response code\n }", "public function include_classes() {\n\t\trequire MOP__PLUGIN_DIR . 'includes/class-cpt-student.php';\n\t\trequire MOP__PLUGIN_DIR . 'includes/class-student-widget.php';\n\t}", "public function __construct(){\n $this->__classname = get_class($this); \n $this->_methods['default'] = $this->__classname.\"Init\";\n $this->registerMethodAlias(\"createUrl\", array(\"Vimerito\", \"createUrl\"));\n $this->registerMethodAlias(\"loadJsLibrary\", array(\"VLayout\", \"registerUserJavaScriptLibraries\"));\n }", "public function load_method_class() {\n\t\trequire_once( 'class-enda-shipping-bundle-rate.php' );\n\t}", "protected function add() {\n\t}", "public function addClass(){\n return view(\"Admin.ClassSec.addclass\");\n }", "function __construct(){\n\t\t$this->add_hooks();\n\t}", "public function __construct()\n {\n $this->extendableConstruct();\n }", "public function addClasses() {\n\t\t$classes = func_get_args();\n\n\t\tif (is_array($classes[0])) {\n\t\t\t$classes = $classes[0];\n\t\t}\n\n\t\tforeach ($classes as $class) {\n\t\t\teval('$tableName = '.$class.'::$table;');\n\t\t\t$this->_tableMap[$tableName] = $class;\n\t\t}\n\t}", "public function classBMethod() {\n }", "public function testAddClass()\n {\n $opts = [\n 'class' => 'class-1',\n ];\n $opts = $this->trait->addClass($opts, ' class-1 class-2 ');\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2',\n ]);\n // Test with an array\n $opts = $this->trait->addClass($opts, ['class-1', 'class-3']);\n $this->assertEquals($opts, [\n 'class' => 'class-1 class-2 class-3',\n ]);\n }", "public function __construct()\n {\n $this->initClasses();\n }", "private function parseMethods(): void\n {\n $methods = $this->extractMethods();\n\n foreach ($methods as $method)\n {\n if ($method['docblock']===null)\n {\n $docId = null;\n }\n else\n {\n $docId = PhpAutoDoc::$dl->padDocblockInsertDocblock($method['docblock']['doc_line_start'],\n $method['docblock']['doc_line_end'],\n $method['docblock']['doc_docblock']);\n }\n\n $mthId = PhpAutoDoc::$dl->padClassInsertMethod($this->clsId,\n $docId,\n $method['name'],\n Cast::toManInt($method['is_abstract']),\n Cast::toManInt(mb_strtolower($method['name'])=='__construct'),\n Cast::toManInt(mb_strtolower($method['name'])=='__destruct'),\n Cast::toManInt($method['is_final']),\n Cast::toManInt($method['is_static']),\n $method['visibility'],\n $method['start'],\n $method['end']);\n\n $this->parseMethodArguments($mthId, $method['tokens']);\n }\n }", "function runkit_method_add($classname, $methodname, $args, $code, $flags = RUNKIT_ACC_PUBLIC)\n{\n}", "function __construct(){\n\t\t// nowt much...\n\t}", "protected function __construct() {\r\n $types = Array('classes', isset($_SERVER['SHELL']) ? 'classes_shell' : 'classes_web');\r\n foreach($types as $type) {\r\n foreach(self::$config->$type as $class) {\r\n $class = __NAMESPACE__ . \"\\\\\" . $class;\r\n $this->add(new $class());\r\n }\r\n }\r\n }", "public function setClass($class){\n $this->_class = $class;\n }", "public function add_class( $class = null ) {\n\t\t\n\t\tif ( !is_string( $class ) ) return;\n\t\t\n\t\t$this->classes = Halp::_add_class( $class, $this->classes );\n\t\n\t}", "public function add_class($class)\n\t{\n\t\t$this->config['class'] .= ' '.$class;\n\t\treturn $this;\n\t}", "public function __construct()\r\n\t{\r\n\t\techo \"Implements Function overloading\";\r\n\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(){}", "public function register($class);", "public function init() {\n\t\t// Overwrite/Extend in Sub-classes do not add anything here!\n\t\t// Use __constructor() or another method in __constructor().\n\t}", "function classMethod($param1, $param2) \r\n {\r\n // CODE\r\n }", "function classMethod($param1, $param2) \r\n {\r\n // CODE\r\n }", "function __construct()\n {\n\n #echo get_class($this) . \"<br />\";\n\n $this->helper = new Helper();\n $this->storage = new Storage();\n\n }", "protected function call($class){\n\t\t$this->plow( new $class );\n }", "function MapClass(&$aClass) {\r\n\tparent::MapClass($aClass);\r\n }", "public function custom()\n\t{\n\t}", "public function writeClassMethods($class)\n {\n $text = array();\n \n $list = array(\n 'public' => array(),\n 'protected' => array(),\n 'private' => array(),\n );\n \n foreach ($this->api[$class]['methods'] as $name => $info) {\n \n $summ = trim($info['summ']);\n if (! $summ) {\n $summ = '-?-';\n }\n $list[$info['access']][] = \"[[$class::$name() | `$name()`]]\\n: $summ\\n\";\n }\n \n foreach ($list as $access => $methods) {\n \n $text[] = $this->_title2(ucfirst($access));\n \n if ($methods) {\n $text = array_merge($text, $methods);\n } else {\n $text[] = 'None.';\n $text[] = '';\n }\n \n $text[] = '';\n }\n \n $this->_write(\"class\", \"$class/Methods\", $text);\n }", "function __construct(){}", "function __construct(){}", "function __construct(){}", "function __construct() {\n\t\t\n\t//TODO - Insert your code here\n\t}", "function register_tool($class)\n {\n }", "public function someStuff()\n {\n \n }", "function setLoggerMethods($srcClassName, $destClassName, $methods) {\n // This will allow us to invoke __call().\n foreach ($methods as $method => $data) {\n debugMsg(\"Removing $srcClassName::$method()\");\n if ($data['isStatic'] != true) {\n runkit_method_remove($srcClassName, $method);\n }\n }\n\n // Clone the constructor from LogHelper to class with original name,\n // while preserving arguments\n injectLogHelper($srcClassName, $methods);\n\n}", "function __autoload($class){\n require \"classes/\".$class.\".php\";\n }", "public function method() {\n\t}", "private function __construct(){ \r\n $this->includes();\r\n $this->hooks();\r\n }", "public function __construct() {\n\t /*\n\t $this->set_methods([])\n ->set_namespace('')\n ->set_args([])\n ->set_callback([])\n ->set_is_override(false)\n ->set_permissions_callback([])\n ->set_route('');\n\t */\n\t}", "public function setClass($class);", "function RegisterMyClasses(array $classes)\n{\n $PublicClassName = PublicLibManager::getInstance();\n $PublicClassName->RegisterMyClasses($classes);\n}", "function quadro_header_extras_class($classes) {\n\t\t$classes[] = 'header-extras-on';\n\t\treturn $classes;\n\t}", "protected function classes()\n {\n $this->label_attributes['class'] = ['columns'];\n $this->label_attributes['style']['float'] = 'left';\n $this->input_attributes['class'] = ['btn'];\n parent::classes();\n }", "public function __construct($class)\r\n {\r\n parent::__construct($class);\r\n }", "public function __construct()\n\t{\n\t\t$this->options = array(\n\t\t\t'class.first' => 'first',\n\t\t\t'class.last' => 'last',\n\t\t\t'class.single' => 'single',\n\t\t);\n\t}", "public function method()\n {\n\n }", "public function classAlias() {}", "function __construct (){\n\t\t}", "function classMethod($param1, $param2) \n {\n // CODE\n }", "function classMethod($param1, $param2) \n {\n // CODE\n }", "function classMethod($param1, $param2) \n {\n // CODE\n }", "function classMethod($param1, $param2) \n {\n // CODE\n }", "function classMethod($param1, $param2) \n {\n // CODE\n }", "function classMethod($param1, $param2) \n {\n // CODE\n }", "public static function extendConsoleWithClass($class){\n static::$extendedCommands[] = $class;\n }", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}" ]
[ "0.6671783", "0.658291", "0.65529877", "0.6362824", "0.6269494", "0.6081705", "0.60578036", "0.6022318", "0.60070044", "0.59741086", "0.59491765", "0.58120143", "0.5807766", "0.57921344", "0.57774514", "0.576427", "0.57633924", "0.57556885", "0.5743431", "0.57398343", "0.5729288", "0.5726865", "0.5706874", "0.5690472", "0.5682763", "0.56750095", "0.5670846", "0.56658566", "0.5665137", "0.56576854", "0.56294674", "0.56246173", "0.5617266", "0.5611011", "0.5599838", "0.5595775", "0.55724925", "0.55662775", "0.5544949", "0.55383396", "0.5535004", "0.55305034", "0.55229133", "0.5499312", "0.5488621", "0.5488621", "0.5488621", "0.5488621", "0.5488621", "0.5488621", "0.5488621", "0.5488621", "0.5488621", "0.5488621", "0.5488621", "0.5488621", "0.5488621", "0.5488621", "0.5488621", "0.5488621", "0.5488621", "0.54856294", "0.54808635", "0.5474363", "0.5474363", "0.54720354", "0.5467494", "0.546398", "0.5463436", "0.5458896", "0.5455909", "0.5455909", "0.5455909", "0.54548526", "0.5451206", "0.5449091", "0.54473835", "0.5439588", "0.5431757", "0.54213643", "0.5415624", "0.54150224", "0.5408254", "0.54081184", "0.54065096", "0.540274", "0.54025006", "0.54010564", "0.54004204", "0.539593", "0.5395549", "0.5395549", "0.5395549", "0.5395549", "0.5395549", "0.5395549", "0.5395356", "0.5394887", "0.5394887", "0.5394887", "0.5394887" ]
0.0
-1
Use [amdvsubswitchdynamicproductswitch][/...] to call this shortcode
public static function add_switch_case_shortcode() { add_shortcode( 'amdv-sub-switch-dynamic-product-switch', array( 'Ammonite_Dynamic_Product_Page_On_Subscription_Switch', 'switch_case_shortcode_callback' ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function add_normal_case_shortcode() {\n // Use [amdv-sub-switch-dynamic-product-normal][/...] to call this shortcode\n add_shortcode( 'amdv-sub-switch-dynamic-product-normal', array( 'Ammonite_Dynamic_Product_Page_On_Subscription_Switch', 'normal_case_shortcode_callback' ) );\n }", "function my_account_endpoint_content() {\n echo do_shortcode('[wcj_product_add_new]');\n }", "function hsc_product_slider_shortcode( $atts){\n\t$atts = shortcode_atts(array( 'feature' => 'true', 'exclude' => ''), $atts);\n \n if($atts['feature'] == true){\n $args = array(\n 'post_type' => 'product',\n 'posts_per_page' => '-1',\n 'post__in' => wc_get_featured_product_ids(),\n );\n }else{\n $args = array(\n 'post_type' => 'product',\n 'posts_per_page' => '-1',\n );\n }\n \n $products = new WP_Query($args);\n $html = '';\n if($products->have_posts()){ \n $html .= '<div class=\"hsc-product-slider\">';\n while($products->have_posts()){$products->the_post();\n $title = get_the_title(get_the_ID());\n $image = get_the_post_thumbnail_url(get_the_ID(), 'medium');\n if(!$image){\n $image = '/wp-content/uploads/woocommerce-placeholder-600x600.png';\n }\n $link = get_the_permalink(get_the_ID());\n $html .= '<div class=\"product-slide\">';\n $html .= '<div class=\"text-center\">';\n $html .= '<a href=\"'.$link.'\"><img src=\"'.$image.'\">';\n $html .= $title.'</a>';\n $html .= '</div>';\n $html .= '</div>';\n }\n $html .= '</div>';\n }\n wp_reset_postdata();\n\t\n\t$script = \"<script>/** Website Prouct Slider */\n jQuery('.hsc-product-slider').slick({\n dots: true,\n arrows: true,\n infinite: true,\n slidesToShow: 4,\n slidesToScroll: 1\n });</script>\";\n $style = \"<!-- Product slider style --><style>\n .hsc-product-slider{\n max-width: 100%;\n }\n .hsc-product-slider .slick-prev:before, .hsc-product-slider .slick-next:before{\n color: #000;\n font-weight: 700;\n }\n .hsc-product-slider .slick-dots{\n right: 0;\n width: auto;\n top: -30px;\n }\n .product-slide{\n padding:0 20px;\n border-right: 1px solid #ccc;\n }\n .hsc-product-slider .slick-prev {\n left: -5px;\n }\n .hsc-product-slider .slick-next {\n right: -5px;\n }\n .hsc-product-slider .product-slide img{\n margin-bottom: 20px;\n }\n </style><!-- End Product slider style -->\";\n add_action( 'wp_footer', function() use( $script ){\n echo $script;\n });\n add_action( 'wp_footer', function() use( $style ){\n echo $style;\n });\n\treturn $html;\n}", "function mt_shortcode_portfolio_customer_support_single($params, $content) {\n extract( shortcode_atts( \n array(\n 'order_element1' =>'',\n 'animation' =>'',\n ), $params ) );\n\n $html = ''; \n\n $active = '';\n if($order_element1 == 1) {\n $html .= '<div class=\"tab-content\">';\n $active = 'in active';\n }\n\tglobal $post;\n\t\n\t$post_id = $post->ID;\n\t\n\t\n\t\n $html .= '<div id=\"customer-support\" class=\"tab-pane fade '.$active.'\">';\n \n\t if(!empty(tikidocs('support_section'))) {\n $html .= '<div class=\"row\">';\n // $html .= tikidocs('support_section');\n\t\t $html .= get_field(\"screenshots\",$post_id);\n\t\t $html .= '</div>';\n }\n $html .= '</div>';\n if($order_element1 == 2) {\n $html .= '</div>';\n }\n\n return $html;\n}", "function add_shortcode_interface() {\n\tob_start();\n?>\n\t<a href=\"#TB_inline?width=600&height=700&inlineId=select-shortcode-form\" class=\"thickbox button\" id=\"add-shortcode\" title=\"Add Shortcode\">Add Shortcode</a>\n<?php\n\techo ob_get_clean();\n}", "function HM_PB_4_FM($component) {\n if ($component['parent_device_interface'] == 'BidCos-RF' && $component['visible'] == 'true' && isset($component['PRESS_SHORT'])) {\n return '<div class=\"hh\">'\n . '<div class=\"pull-left\"><img src=\"../assets/icons/' . $component[\"icon\"] . '\" class=\"icon\">' . $component['name'] . '</div>'\n . '<div class=\"pull-right\">'\n . '<span class=\"set btn-text\" data-set-id=\"' . $component['PRESS_SHORT'] . '\" data-set-value=\"1\">Kurz</span>'\n . '<span class=\"set btn-text\" data-set-id=\"' . $component['PRESS_LONG'] . '\" data-set-value=\"1\">Lang</span>'\n . '</div>'\n . '<div class=\"clearfix\"></div>'\n . '</div>';\n }\n}", "function echotheme_jquerycycle_shortcode( $atts ){\n\tob_start();\n\tget_template_part('part', 'jquerycycle-gallery');\n\treturn ob_get_clean();\n}", "public function render_content()\n {\n CustomizerAddon::view( 'controls.switch', ['control' => &$this] );\n }", "function dcs_dropship_product_info_page_shortcode($atts, $content=null)\r\n{\r\n\t$retval = dcs_dropship_product_info_page($_GET['sku']);\r\n\r\n\treturn $retval;\r\n}", "function tanvas_product_showcase_table_shortcode($args, $content=''){\n $out = '<table class=\"product-info\"><tbody>';\n $out .= do_shortcode($content);\n $out .= '</tbody></table>';\n return $out;\n}", "function trebi_shortcode_handler($atts, $content=null, $code=\"\") {\n\t\t\t\n\t\t\t$ifstart = '<iframe src=\"https://portali.3bmeteo.com/3bm_meteo.php?';\n\t\t\t$ifend = '</iframe>';\n\t\t\t\n\t\t\tswitch ($code) {\n/* BLOCCO A (A1, A2, A3) */\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&tm=xssmall&c1=ffffff&b1=93c1db&b2=3a8ebd\" width=\"200\" height=\"220\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-a1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'xssmall',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc((int)$loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&b1='.$b1.'&b2='.$b2.'\" width=\"200\" height=\"175\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&tm=lsmall&new=1&c1=999999&c2=ffffff&b1=93c1db&b2=f0f0f0&b3=2a7fae\" width=\"195\" height=\"340\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-a2':\n\t\t\t\t\textract( shortcode_atts( array(\n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lsmall',\n\t\t\t\t\t 'new' => '1',\n\t\t\t\t\t 'c1' => '999999', \n\t\t\t\t\t 'c2' => 'ffffff', \n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => 'f0f0f0', \n\t\t\t\t\t 'b3' => '2a7fae',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&new='.$new.'&c1='.$c1.'&c2='.$c2.'&b1='.$b1.'&b2='.$b2.'&b3='.$b3.'\" width=\"185\" height=\"330\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&tm=lbigor&new=1&c1=ffffff&c2=888888&b1=93c1db&b2=3a8ebd&b3=f0f0f0\" width=\"455\" height=\"195\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-a3':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lbigor',\n\t\t\t\t\t 'new' => '1',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'c2' => '888888',\n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd', \n\t\t\t\t\t 'b3' => 'f0f0f0',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&new='.$new.'&c1='.$c1.'&c2='.$c2.'&b1='.$b1.'&b2='.$b2.'&b3='.$b3.'\" width=\"455\" height=\"195\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* Blocco B (B1, B2) */\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&tm=treale&c1=ffffff&b1=93c1db&b2=3a8ebd\" width=\"195\" height=\"202\" frameborder=\"0\"></iframe>*/\n\t\t\t\tcase 'trebi-b1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'treale',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&b1='.$b1.'&b2='.$b2.'\" width=\"195\" height=\"165\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&p=1&tm=ssmall&new=1&c1=ffffff&c2=aaaaaa&b1=93c1db&b2=3a8ebd&b3=f0f0f0\" width=\"245\" height=\"405\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-b2':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'p' => '1',\n\t\t\t\t\t 'tm' => 'ssmall',\n\t\t\t\t\t 'new' => '1',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'c2' => 'aaaaaa',\n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd', \n\t\t\t\t\t 'b3' => 'f0f0f0',\t\t\t\t\t \n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&p='.$p.'&tm='.$tm.'&new='.$new.'&c1='.$c1.'&c2='.$c2.'&b1='.$b1.'&b2='.$b2.'&b3='.$b3.'\" width=\"245\" height=\"380\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* BLOCCO C (C1, C2) */\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&tm=lbig&new=1&c1=777777&c2=FFFFFF&c3=93C1DB&b1=93C1DB&b2=3A8EBD\" width=\"460\" height=\"405\" frameborder=\"0\"></iframe>*/\n\t\t\t\tcase 'trebi-c1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lbig',\n\t\t\t\t\t 'new' => '1',\n\t\t\t\t\t 'c1' => '777777', \n\t\t\t\t\t 'c2' => 'FFFFFF',\n\t\t\t\t\t 'c3' => '93C1DB', \n\t\t\t\t\t 'b1' => '93C1DB',\n\t\t\t\t\t 'b2' => '3A8EBD',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&new='.$new.'&c1='.$c1.'&c2='.$c2.'&c3='.$c3.'&b1='.$b1.'&b2='.$b2.'\" width=\"460\" height=\"380\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?loc=6&tm=oraxora&c1=FFFFFF&c2=777777&c3=93C1DB&b1=93C1DB&b2=3A8EBD\" width=\"455\" height=\"505\" frameborder=\"0\"></iframe>*/\n\t\t\t\tcase 'trebi-c2':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'oraxora',\n\t\t\t\t\t 'c1' => 'FFFFFF', \n\t\t\t\t\t 'c2' => '777777',\n\t\t\t\t\t 'c3' => '93C1DB',\n\t\t\t\t\t 'b1' => '93C1DB',\n\t\t\t\t\t 'b2' => '3A8EBD',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&c2='.$c2.'&c3='.$c3.'&b1='.$b1.'&b2='.$b2.'\" width=\"455\" height=\"500\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* BLOCCO D (D1, D2) */\n/* <iframe src=\"http://portali.3bmeteo.com/3bm_meteo.php?idreg=1&new=1&tm=msmall&c1=ffffff&b1=93c1db&b2=3a8ebd\" width=\"190\" height=\"310\" frameborder=\"0\"></iframe> */\t\n\t\t\t\tcase 'trebi-d1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'idreg' => '1',\n\t\t\t\t\t 'new' => '1',\n\t\t\t\t\t 'tm' => 'msmall',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlRegione($idreg);\n\t\t\t\t\treturn $ifstart.'idreg='.$idreg.'&tm='.$tm.'&new='.$new.'&c1='.$c1.'&b1='.$b1.'&b2='.$b2.'\" width=\"190\" height=\"300\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://www.3bmeteo.com/3bm_meteo.php?idreg=1&tm=msmacro&c1=FFFFFF&c2=555555&c3=93C1DB&b1=93C1DB&b2=3A8EBD\" width=\"660\" height=\"542\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-d2':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'idreg' => '1',\n\t\t\t\t\t 'tm' => 'msmacro',\n\t\t\t\t\t 'c1' => 'FFFFFF', \n\t\t\t\t\t 'c2' => '555555',\n\t\t\t\t\t 'c3' => '93C1DB',\n\t\t\t\t\t 'b1' => '93C1DB',\n\t\t\t\t\t 'b2' => '3A8EBD',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlRegione($idreg);\n\t\t\t\t\treturn $ifstart.'idreg='.$idreg.'&tm='.$tm.'&c1='.$c1.'&c2='.$c2.'&c3='.$c3.'&b1='.$b1.'&b2='.$b2.'\" width=\"660\" height=\"515\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* BLOCCO E (E1, E2) */\n/* <iframe src=\"http://www.3bmeteo.com/3bm_meteo.php?loc=6&tm=lsmari&c1=ffffff&b1=93c1db&b2=3a8ebd\" width=\"190\" height=\"260\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-e1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lsmari',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&b1='.$b1.'&b2='.$b2.'\" width=\"190\" height=\"260\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://www.3bmeteo.com/3bm_meteo.php?loc=6&tm=lmari&c1=FFFFFF&c3=93C1DB&b1=93C1DB&b2=3A8EBD\" width=\"460\" height=\"390\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-e2':\n\t\t\t\t\textract( shortcode_atts( array(\n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lmari',\n\t\t\t\t\t 'c1' => 'FFFFFF', \n\t\t\t\t\t 'b1' => '93C1DB',\n\t\t\t\t\t 'b2' => '3A8EBD',\n\t\t\t\t\t 'c3' => '93C1DB',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&c3='.$c3.'&b1='.$b1.'&b2='.$b2.'\" width=\"460\" height=\"380\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* BLOCCO F (F1, F2) */\n/* <iframe src=\"http://www.3bmeteo.com/3bm_meteo.php?idreg=1&tm=mmari&c1=FFFFFF&c2=555555&c3=93C1DB&b1=93C1DB&b2=3A8EBD\" width=\"650\" height=\"515\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-f1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'idreg' => '1', \n\t\t\t\t\t 'tm' => 'mmari',\n\t\t\t\t\t 'c1' => 'FFFFFF',\n\t\t\t\t\t 'c2' => '555555',\n\t\t\t\t\t 'c3' => '93C1DB', \n\t\t\t\t\t 'b1' => '93C1DB',\n\t\t\t\t\t 'b2' => '3A8EBD',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlRegione($idreg);\n\t\t\t\t\treturn $ifstart.'idreg='.$idreg.'&tm='.$tm.'&c1='.$c1.'&c2='.$c2.'&b1='.$b1.'&b2='.$b2.'&c3='.$c3.'\" width=\"650\" height=\"515\" frameborder=\"0\">'.$ifend.$wloc;\n/* BLOCCO G (G1, G2) */\n/* <iframe src=\"http://www.3bmeteo.com/3bm_meteo.php?loc=6&tm=lsneve&c1=ffffff&b1=93c1db&b2=3a8ebd\" width=\"190\" height=\"235\" frameborder=\"0\"></iframe> */\t\n\t\t\t\tcase 'trebi-g1':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lsneve',\n\t\t\t\t\t 'c1' => 'ffffff', \n\t\t\t\t\t 'b1' => '93c1db',\n\t\t\t\t\t 'b2' => '3a8ebd',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&b1='.$b1.'&b2='.$b2.'\" width=\"210\" height=\"240\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n/* <iframe src=\"http://www.3bmeteo.com/3bm_meteo.php?loc=6&tm=lneve&c1=FFFFFF&c3=93C1DB&b1=93C1DB&b2=3A8EBD\" width=\"490\" height=\"425\" frameborder=\"0\"></iframe> */\n\t\t\t\tcase 'trebi-g2':\n\t\t\t\t\textract( shortcode_atts( array( \n\t\t\t\t\t 'loc' => '6', \n\t\t\t\t\t 'tm' => 'lneve',\n\t\t\t\t\t 'c1' => 'FFFFFF', \n\t\t\t\t\t 'c3' => '93C1DB', \n\t\t\t\t\t 'b1' => '93C1DB',\n\t\t\t\t\t 'b2' => '3A8EBD',\n\t\t\t\t\t), $atts ) );\n\t\t\t\t\t$wloc=trebi_getUrlLoc($loc);\n\t\t\t\t\treturn $ifstart.'loc='.$loc.'&tm='.$tm.'&c1='.$c1.'&c3='.$c3.'&b1='.$b1.'&b2='.$b2.'\" width=\"490\" height=\"420\" frameborder=\"0\">'.$ifend.$wloc;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}", "public function show_component($atts)\r\n\t{\r\n\r\n\t\t$atts = shortcode_atts(array(\r\n\t\t\t'id' => ''\r\n\t\t), $atts);\r\n\r\n\t\twp_enqueue_style('poll');\r\n\t\twp_enqueue_script('poll');\r\n\t\twp_localize_script(\r\n\t\t\t'poll',\r\n\t\t\t'wppoll',\r\n\t\t\tarray(\r\n\t\t\t\t'url' => admin_url('admin-ajax.php'),\r\n\t\t\t\t'nonce' => wp_create_nonce(\"wppoll_nonce\"),\r\n\t\t\t\t'data' => $this->get_poll_data($atts['id']),\r\n\t\t\t\t'poll_id' => $atts['id']\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\tob_start();\r\n?>\r\n\r\n<div id=\"wppoll\" class=\"poll\" v-cloak>\r\n\r\n\t<div v-if=\"items\">\r\n\t\t<p>{{ main_question }}</p>\r\n\t\t<ul class=\"poll__list\">\r\n\t\t\t<li class=\"poll__item\" v-for=\"(item, index) in items\" @click=\"registerVote({index})\" :class=\"['poll__item--' + item.percentage]\">\r\n\t\t\t\t<span class=\"poll__choice-question\">{{ item[0] }}</span>\r\n\t\t\t\t<span class=\"poll__choice-votes\" v-if=\"showPollData\">{{ item[1] }}</span>\r\n\t\t\t</li>\r\n\t\t</ul>\r\n\r\n\t\t<p class=\"poll__total\" v-if=\"showPollData\"><?php _e('Total votes:', 'wppolls'); ?> {{ totalVotes }}</p>\r\n\t\t<p class=\"poll__message poll__message--success\" v-if=\"isVoted\"><?php _e('Thanks for the feedback.', 'wppolls'); ?></p>\r\n\t\t<p class=\"poll__message poll__message--fail\" v-if=\"!canVote\"><?php _e('Only one vote is possible and you have already voted.', 'wppolls'); ?></p>\r\n\r\n\t</div>\r\n</div>\r\n\r\n<?php\r\n\t\treturn ob_get_clean();\r\n\t}", "function pm_services_box_shortcode( $atts, $content = null) {\n\textract(shortcode_atts(array(\n\t\t'service_title'\t=> '',\n\t\t'service_desc'\t=> '',\n\t\t'services_icon'\t=> '',\n\t\t'class'\t\t\t=> '',\n\t), $atts));\n\n\t$result = '';\n\n\tob_start(); \n\n\t// Assigning a master css class and hooking into KC\n\t$master_class = apply_filters( 'kc-el-class', $atts );\n\t$master_class[] = 'pm-service';\n\n\t// Retrieving user define classes\n\t$classes = array( 'row' );\n\t(!empty($class)) ? $classes[] = $class : ''; ?>\n\n\t<div class=\"<?php echo esc_attr( implode( ' ', $master_class ) ); ?>\">\n <div class=\"<?php echo esc_attr( implode( ' ', $classes ) ); ?>\">\n\t \t<div class=\"service-list bgrid-third s-bgrid-half mob-bgrid-whole\">\n\t \t\t<div class=\"pm-bgrid\">\n\t <div class=\"icon-part\">\n\t \t<span class=\"<?php echo esc_attr( $services_icon ); ?>\"></span>\n\t </div>\n\t <h3><?php echo esc_html( $service_title ); ?></h3>\n\t <div class=\"service-content\">\t \n\t\t <p> <?php echo esc_html( $service_desc ); ?> </p> \n\t </div> \n\t </div> <!-- /bgrid --> \n\t \t</div> <!-- /service-list -->\n </div> <!-- /row --> \n </div> <!-- /services --> \t\t\n\n\t<?php \n\t$result .= ob_get_clean();\n\treturn $result;\n\n}", "function sp_framework_toggle_content_sc( $atts, $content = null ) {\n\n\t\textract( shortcode_atts( array(\n\t\t\t'title' => ''\n\t\t), $atts ) );\n\t\t\n\t\t$output = '<div class=\"toggle-wrap\">';\n\t\t$output .= '<span class=\"trigger\"><a href=\"#\">' . esc_attr( $title ) . '</a></span><div class=\"toggle-container\">';\n\t\t$output .= $content; \n\t\t$output .= '</div></div>';\n\n\t\treturn $output;\n\t\n\t}", "function wpscSupportTickets_mainshortcode($atts) {\r\n global $wpdb;\r\n\r\n $table_name = $wpdb->prefix . \"wpscst_tickets\";\r\n\r\n $devOptions = $this->getAdminOptions();\r\n\r\n extract(shortcode_atts(array(\r\n 'display' => 'tickets'\r\n ), $atts));\r\n\r\n if (session_id() == '') {\r\n @session_start();\r\n }\r\n\r\n if ($display == null || trim($display) == '') {\r\n $display = 'tickets';\r\n }\r\n\r\n $output = '';\r\n switch ($display) {\r\n case 'tickets': // =========================================================\r\n if ($devOptions['allow_guests'] == 'true' && !is_user_logged_in() && !$this->hasDisplayed) {\r\n if (@isset($_POST['guest_email'])) {\r\n $_SESSION['wpsct_email'] = esc_sql($_POST['guest_email']);\r\n }\r\n\r\n $output .= '<br />\r\n <form name=\"wpscst-guestform\" id=\"wpscst-guestcheckoutform\" action=\"#\" method=\"post\">\r\n <table>\r\n <tr><td>' . __('Enter your email address', 'wpsc-support-tickets') . ': </td><td><input type=\"text\" name=\"guest_email\" value=\"' . $_SESSION['wpsct_email'] . '\" /></td></tr>\r\n <tr><td></td><td><input type=\"submit\" value=\"' . __('Submit', 'wpsc-support-tickets') . '\" class=\"wpsc-button wpsc-checkout\" /></td></tr>\r\n </table>\r\n </form>\r\n <br />\r\n ';\r\n }\r\n if (is_user_logged_in() || @isset($_SESSION['wpsct_email']) || @isset($_POST['guest_email'])) {\r\n if (!$this->hasDisplayed) {\r\n global $current_user;\r\n\r\n $searchstuff = $this::search('form');\r\n $searchresults = $this::search('search');\r\n \r\n $output .= '<div id=\"wpscst_top_page\" ';\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"display:inline;\"';\r\n } $output.='></div><button class=\"wpscst-button\" id=\"wpscst-new\" onclick=\"jQuery(\\'.wpscst-table\\').fadeIn(\\'fast\\');jQuery(\\'#wpscst-new\\').fadeOut(\\'fast\\');jQuery(\\'#wpscst_edit_div\\').fadeOut(\\'fast\\');jQuery(\\'html, body\\').animate({scrollTop: jQuery(\\'html\\').offset().top}, 100);try { jQuery(\\'#wpscst-search-form\\').fadeOut(\\'fast\\'); } catch (e) {};try {jQuery(\\'#wpscst_search_results\\').fadeOut(\\'fast\\');} catch (e) {};return false;\"><img ';\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"float:left;border:none;margin-right:5px;\"';\r\n } $output.=' src=\"' . plugins_url('/images/Add.png', __FILE__) . '\" alt=\"' . $devOptions['custom_new_ticket_button_text'] . '\" /> ' . $devOptions['custom_new_ticket_button_text'] . '</button> '.$searchstuff.'<br /><br />';\r\n $output.= '<form action=\"' . get_admin_url().'admin-post.php\" method=\"post\" enctype=\"multipart/form-data\">';\r\n $output.= \"<input type='hidden' name='action' value='submit-new-support-ticket' />\"; \r\n if (@isset($_POST['guest_email'])) {\r\n $output .= '<input type=\"hidden\" name=\"guest_email\" value=\"' . esc_sql($_POST['guest_email']) . '\" />';\r\n }\r\n $output .= '<table class=\"wpscst-table\" ';\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"width:100%\"';\r\n } \r\n $output .='><tr><th><img src=\"' . plugins_url('/images/Chat.png', __FILE__) . '\" alt=\"' . $devOptions['custom_new_ticket_button_text'] . '\" /> ' . $devOptions['custom_new_ticket_button_text'] . '</th></tr>';\r\n\r\n if($devOptions['custom_field_position'] == 'before everything') {\r\n $output .= wpsctPromptForCustomFields();\r\n } \r\n \r\n $output .= '<tr><td><h3>' . $devOptions['custom_title'] . '</h3><input type=\"text\" name=\"wpscst_title\" id=\"wpscst_title\" value=\"\" ';\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"width:100%\"';\r\n } $output .=' /></td></tr>';\r\n \r\n if($devOptions['custom_field_position'] == 'before message') {\r\n $output .= wpsctPromptForCustomFields();\r\n } \r\n \r\n $output .= '<tr><td><h3>' . $devOptions['custom_message'] . '</h3><div id=\"wpscst_nic_panel\" ';\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"display:block;width:100%;\"';\r\n } $output.='></div> <textarea name=\"wpscst_initial_message\" id=\"wpscst_initial_message\" ';\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"display:inline;width:100%;margin:0 auto 0 auto;\" rows=\"5\"';\r\n } $output.='></textarea></td></tr>'; \r\n \r\n if($devOptions['custom_field_position'] == 'after message') {\r\n $output .= wpsctPromptForCustomFields();\r\n }\r\n \r\n if ($devOptions['allow_uploads'] == 'true') {\r\n $output .= '<tr><td><h3>' . __('Attach a file', 'wpsc-support-tickets') . '</h3> <input type=\"file\" name=\"wpscst_file\" id=\"wpscst_file\"></td></tr>';\r\n }\r\n //$exploder = explode('||', $devOptions['departments']);\r\n\r\n if($devOptions['custom_field_position'] == 'after everything') {\r\n $output .= wpsctPromptForCustomFields();\r\n } \r\n \r\n $output .= '<tr><td><h3>' . __('Department', 'wpsc-support-tickets') . '</h3><select name=\"wpscst_department\" id=\"wpscst_department\">';\r\n $dep_results = $wpdb->get_results(\"SELECT * FROM `{$wpdb->prefix}wpscst_departments` WHERE `enabled`=1;\", ARRAY_A);\r\n foreach ($dep_results as $dep_result) {\r\n $output .= '<option value=\"'.$dep_result['primkey'].'\">'.base64_decode($dep_result['name']).'</option>';\r\n } \r\n $output .= '</select> \r\n <h3';\r\n if ($devOptions['display_severity_on_create'] == 'false') {\r\n $output .=' style=\"display:none;\" '; \r\n } \r\n $output .='>' . __('Severity', 'wpsc-support-tickets') . '</h3><select name=\"wpscst_severity\" id=\"wpscst_severity\"';\r\n if ($devOptions['display_severity_on_create'] == 'false') {\r\n $output .=' style=\"display:none;\" '; \r\n }\r\n $output .='>';\r\n $output .= '<option value=\"Low\">'. __('Low', 'wpsc-support-tickets') . '</option> \r\n <option value=\"Normal\">' . __('Normal', 'wpsc-support-tickets') . '\r\n </option>\r\n <option value=\"High\">' . __('High', 'wpsc-support-tickets') . '\r\n </option> \r\n <option value=\"Urgent\">' . __('Urgent', 'wpsc-support-tickets') . '\r\n </option> \r\n <option value=\"Critical\">' . __('Critical', 'wpsc-support-tickets') . '\r\n </option>'; \r\n $output .= '</select> \r\n\r\n <button class=\"wpscst-button\" id=\"wpscst_cancel\" onclick=\"cancelAdd();return false;\" ';\r\n \r\n \r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"float:right;\"';\r\n } $output.=' ><img ';\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"float:left;border:none;margin-right:5px;\"';\r\n } $output.=' src=\"' . plugins_url('/images/stop.png', __FILE__) . '\" alt=\"' . __('Cancel', 'wpsc-support-tickets') . '\" /> ' . __('Cancel', 'wpsc-support-tickets') . '</button><button onclick=\"if(jQuery(\\'#wpscst_title\\').val().length === 0 || jQuery(\\'#wpscst_initial_message\\').val().length === 0) {alert(\\'' . __('You cannot leave the description or title of your ticket empty!', 'wpsc-support-tickets') . '\\');return false;} \" class=\"wpscst-button\" type=\"submit\" name=\"wpscst_submit\" id=\"wpscst_submit\" ';\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"float:right;\"';\r\n }$output.='><img ';\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"float:left;border:none;margin-right:5px;\"';\r\n } $output.=' src=\"' . plugins_url('/images/page_white_text.png', __FILE__) . '\" alt=\"' . __('Submit Ticket', 'wpsc-support-tickets') . '\" /> ' . __('Submit Ticket', 'wpsc-support-tickets') . '</button></td></tr>';\r\n\r\n\r\n $output .= '</table></form>';\r\n\r\n $output .= '<form action=\"' . get_admin_url().'admin-post.php\" method=\"post\" enctype=\"multipart/form-data\">';\r\n $output .= \"<input type='hidden' name='action' value='reply-support-ticket' />\";\r\n \r\n $output .= '<input type=\"hidden\" value=\"0\" id=\"wpscst_edit_primkey\" name=\"wpscst_edit_primkey\" />';\r\n if (@isset($_POST['guest_email'])) {\r\n $output .= '<input type=\"hidden\" name=\"guest_email\" value=\"' . esc_sql($_POST['guest_email']) . '\" />';\r\n }\r\n\r\n $output .= '<div id=\"wpscst_edit_ticket\"><div id=\"wpscst_edit_ticket_inner\"><center><img src=\"' . plugins_url('/images/loading.gif', __FILE__) . '\" alt=\"' . __('Loading', 'wpsc-support-tickets') . '\" /></center></div>\r\n <table ';\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"width:100%\"';\r\n } $output.=' id=\"wpscst_reply_editor_table\"><tbody>\r\n <tr id=\"wpscst_reply_editor_table_tr1\"><td><h3>' . __('Your reply', 'wpsc-support-tickets') . '</h3><div id=\"wpscst_nic_panel2\" ';\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"display:block;width:100%;\"';\r\n }$output.='></div> <textarea name=\"wpscst_reply\" id=\"wpscst_reply\" ';\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"display:inline;width:100%;margin:0 auto 0 auto;\" rows=\"5\"';\r\n } $output .='></textarea></td></tr>\r\n <tr id=\"wpscst_reply_editor_table_tr2\"><td>';\r\n\r\n if ($devOptions['allow_uploads'] == 'true') {\r\n $output .= '<h3>' . __('Attach a file', 'wpsc-support-tickets') . '</h3> <input type=\"file\" name=\"wpscst_file\" id=\"wpscst_file\">';\r\n }\r\n\r\n if ($devOptions['allow_closing_ticket'] == 'true') {\r\n $output .= '\r\n <select name=\"wpscst_set_status\" id=\"wpscst_set_status\">\r\n <option value=\"Open\">' . __('Open', 'wpsc-support-tickets') . '</option>\r\n <option value=\"Closed\">' . __('Closed', 'wpsc-support-tickets') . '</option>\r\n </select> \r\n ';\r\n }\r\n\r\n $output .= '<button class=\"wpscst-button\" ';\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"float:right;\"';\r\n } $output.=' onclick=\"cancelEdit();return false;\"><img src=\"' . plugins_url('/images/stop.png', __FILE__) . '\" alt=\"' . __('Cancel', 'wpsc-support-tickets') . '\" ';\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"float:left;border:none;margin-right:5px;\"';\r\n } $output.=' /> ' . __('Cancel', 'wpsc-support-tickets') . '</button><button class=\"wpscst-button\" type=\"submit\" name=\"wpscst_submit2\" id=\"wpscst_submit2\" ';\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"float:right;\"';\r\n } $output.='><img ';\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"float:left;border:none;margin-right:5px;\"';\r\n } $output.=' src=\"' . plugins_url('/images/page_white_text.png', __FILE__) . '\" alt=\"' . __('Submit Reply', 'wpsc-support-tickets') . '\" /> ' . __('Submit Reply', 'wpsc-support-tickets') . '</button></td></tr>\r\n </tbody></table>\r\n </div>';\r\n $output .= '</form>';\r\n\r\n // Guest additions here\r\n if (is_user_logged_in()) {\r\n $wpscst_userid = $current_user->ID;\r\n $wpscst_email = $current_user->user_email;\r\n $wpscst_username = $current_user->display_name;\r\n } else {\r\n $wpscst_userid = 0;\r\n $wpscst_email = esc_sql($_SESSION['wpsct_email']);\r\n if ($devOptions['hide_email_on_frontend_list']=='true') {\r\n $wpscst_username = __('Guest', 'wpsc-support-tickets') . ' (' . $wpscst_email . ')';\r\n } else {\r\n $wpscst_username = __('Guest', 'wpsc-support-tickets');\r\n }\r\n }\r\n\r\n if($searchresults!='') {\r\n $output .= '<div id=\"wpscst_search_results\">';\r\n $output .= '<h3>' . __('Search Results', 'wpsc-support-tickets') . ':</h3>';\r\n $output.= $searchresults;\r\n $output .= '</div>';\r\n }\r\n $output .= '<div id=\"wpscst_edit_div\">';\r\n\r\n if ($devOptions['allow_all_tickets_to_be_viewed'] == 'true') {\r\n $sql = \"SELECT * FROM `{$table_name}` ORDER BY `last_updated` DESC;\";\r\n }\r\n if ($devOptions['allow_all_tickets_to_be_viewed'] == 'false') {\r\n $sql = \"SELECT * FROM `{$table_name}` WHERE `user_id`={$wpscst_userid} AND `email`='{$wpscst_email}' ORDER BY `last_updated` DESC;\";\r\n }\r\n\r\n $results = $wpdb->get_results($sql, ARRAY_A);\r\n if (isset($results) && isset($results[0]['primkey'])) {\r\n $output .= '<h3>' . __('View Previous Tickets:', 'wpsc-support-tickets') . '</h3>';\r\n $output .= '<table class=\"widefat\" ';\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"width:100%\"';\r\n }$output.='><tr><th>' . __('Ticket', 'wpsc-support-tickets') . '</th><th>' . __('Status', 'wpsc-support-tickets') . '</th><th>' . __('Last Reply', 'wpsc-support-tickets') . '</th></tr>';\r\n foreach ($results as $result) {\r\n if (trim($result['last_staff_reply']) == '') {\r\n if ($devOptions['allow_all_tickets_to_be_viewed'] == 'false') {\r\n $last_staff_reply = __('you', 'wpsc-support-tickets');\r\n } else {\r\n if ($devOptions['hide_email_on_frontend_list']=='true') {\r\n $last_staff_reply = __('Guest', 'wpsc-support-tickets') . ' (' . $wpscst_email . ')';\r\n } else {\r\n $last_staff_reply = __('Guest', 'wpsc-support-tickets');\r\n } \r\n \r\n }\r\n } else {\r\n if ($result['last_updated'] > $result['last_staff_reply']) {\r\n $last_staff_reply = __('you', 'wpsc-support-tickets');\r\n } else {\r\n $last_staff_reply = '<strong>' . __('Staff Member', 'wpsc-support-tickets') . '</strong>';\r\n }\r\n }\r\n if ($devOptions['allow_closing_ticket'] == 'true') {\r\n if ($result['resolution'] == 'Closed') {\r\n $canReopen = 'Reopenable';\r\n } else {\r\n $canReopen = $result['resolution'];\r\n }\r\n } else {\r\n $canReopen = $result['resolution'];\r\n }\r\n $output .= '<tr><td><a href=\"\" onclick=\"loadTicket(' . $result['primkey'] . ',\\'' . $canReopen . '\\');return false;\" ';\r\n if ($result['resolution'] == strtolower('open') ) {\r\n $resresolution = __('Open', 'wpsc-support-tickets');\r\n } elseif ($result['resolution'] == strtolower('closed') ) {\r\n $resresolution = __('Closed', 'wpsc-support-tickets');\r\n } else {\r\n $resresolution = $result['resolution'];\r\n }\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.='style=\"border:none;text-decoration:none;\"';\r\n }$output.='><img';\r\n if ($devOptions['disable_inline_styles'] == 'false') {\r\n $output.=' style=\"float:left;border:none;margin-right:5px;\"';\r\n }$output.=' src=\"' . plugins_url('/images/page_edit.png', __FILE__) . '\" alt=\"' . __('View', 'wpsc-support-tickets') . '\" /> ' . base64_decode($result['title']) . '</a></td><td>' . $resresolution . '</td><td>' . date_i18n( get_option( 'date_format' ), $result['last_updated']) . ' ' . __('by', 'wpsc-support-tickets') . ' ' . $last_staff_reply . '</td></tr>';\r\n }\r\n $output .= '</table>';\r\n }\r\n $output .= '</div>';\r\n }\r\n } else {\r\n if ($devOptions['show_login_text']=='true') {\r\n $output .='<div id=\"wpscSupportTicketsRegisterMessage\">'. __('Please', 'wpsc-support-tickets') . ' <a href=\"' . wp_login_url(get_permalink()) . '\">' . __('log in', 'wpsc-support-tickets') . '</a> ' . __('or', 'wpsc-support-tickets') . ' <a href=\"' . site_url('/wp-login.php?action=register&redirect_to=' . get_permalink()) . '\">' . __('register', 'wpsc-support-tickets') . '</a>.</div>';\r\n }\r\n }\r\n\r\n\r\n\r\n break;\r\n }\r\n\r\n // Jetpack incompatibilities hack\r\n if (@!file_exists(WP_PLUGIN_DIR . '/jetpack/jetpack.php')) {\r\n $this->hasDisplayed = true;\r\n } else {\r\n @include_once( ABSPATH . 'wp-admin/includes/plugin.php' );\r\n if (@is_plugin_active(WP_PLUGIN_DIR . '/jetpack/jetpack.php')) {\r\n\r\n if ($this->hasDisplayedCompat == true) {\r\n if ($this->hasDisplayedCompat2 == true) {\r\n $this->hasDisplayed = true;\r\n }\r\n $this->hasDisplayedCompat2 = true;\r\n }\r\n $this->hasDisplayedCompat = true;\r\n } else {\r\n $this->hasDisplayed = true;\r\n }\r\n }\r\n\r\n\r\n return $output;\r\n }", "function add_shortcode( $atts, $content = null, $name = null ) {\n\n\t\tif ( ! $this->validate_shortcode( $atts, $content, $name ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$options = $this->set_options( $atts );\n\n\t\tob_start();\n\t\t\n\t\t?><div id=\"<?php echo esc_attr($options['selector']); ?>\" class=\"<?php echo esc_attr($options['classes']); ?>\" <?php do_action(\"oxygen_vsb_component_attr\", $options, $this->options['tag']); ?>><iframe scrolling=\"no\" frameborder=\"no\" src=\"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/<?php echo $options[\"soundcloud_track_id\"]; ?>&amp;color=<?php echo urlencode($options[\"soundcloud_color\"]); ?>&amp;auto_play=<?php echo urlencode($options[\"soundcloud_auto_play\"]); ?>&amp;hide_related=<?php echo urlencode($options[\"soundcloud_hide_related\"]); ?>&amp;show_comments=<?php echo urlencode($options[\"soundcloud_show_comments\"]); ?>&amp;show_user=true&amp;show_reposts=false&amp;show_teaser=true&amp;visual=true\"></iframe></div><?php\n\n\t\treturn ob_get_clean();\n\t}", "public function add_activate_switch()\n {\n if (OptinCampaignsRepository::is_split_test_variant($this->optin_campaign_id)) return;\n\n $input_value = OptinCampaignsRepository::is_activated($this->optin_campaign_id) ? 'yes' : 'no';\n $checked = ($input_value == 'yes') ? 'checked=\"checked\"' : null;\n $tooltip = __('Toggle to activate and deactivate optin.', 'mailoptin');\n\n $switch = sprintf(\n '<input id=\"mo-optin-activate-switch\" type=\"checkbox\" class=\"tgl tgl-light\" value=\"%s\" %s />',\n $input_value,\n $checked\n );\n\n $switch .= '<label id=\"mo-optin-active-switch\" for=\"mo-optin-activate-switch\" class=\"tgl-btn\"></label>';\n $switch .= '<span title=\"' . $tooltip . '\" class=\"mo-tooltipster dashicons dashicons-editor-help\" style=\"margin: 9px 5px;font-size: 18px;cursor: pointer;\"></span>';\n ?>\n <script type=\"text/javascript\">\n jQuery(function () {\n jQuery('#customize-header-actions').prepend(jQuery('<?php echo $switch; ?>'));\n });\n </script>\n <?php\n }", "function call_update_slider() {\n\t\tglobal $post_id;\n\t\tif(strstr($_POST['shortcode'],'gallery')) :\n\t\t\tif($_POST['post_id']) $post_id = $_POST['post_id'];\n\t\t\t\n\t\t\t$shortcode = str_replace('gallery','tw-update-slider',stripslashes($_POST['shortcode']));\n\t\t\techo do_shortcode($shortcode);\n\t\tendif;\n\t\t\n\t\tdie();\n\t}", "function Bitly_mcp( $switch = TRUE )\n\t{\n\t\t$this->EE =& get_instance(); \n\t\t$this->base\t \t = BASE.AMP.'C=addons_modules'.AMP.'M=show_module_cp'.AMP.'module='.$this->module_name;\n\t\t$this->form_base = 'C=addons_modules'.AMP.'M=show_module_cp'.AMP.'module='.$this->module_name;\n\t\t\n\t}", "function stock_shortcode($params = array())\n{\n $stockFool = new stockFool();\n extract(shortcode_atts(array(\n 'symbol' => 'symbol',\n 'display' => 'display',\n 'type' => 'type'\n ), $params));\n\n $stockArray = array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n 'symbol' => $symbol,\n 'display' => $display,\n 'type' => $type,\n 'apikey' => $stockFool->get_setting('financialmodelingprep_API')\n );\n\n wp_register_script('stock_shortcode', plugin_dir_url(__FILE__) . 'inc/scripts.js', array('jquery'), '1.1', true);\n\n wp_enqueue_script('stock_shortcode');\n\n wp_localize_script('stock_shortcode', 'stockFool_ajax_object', $stockArray);\n if ($type == 'bar') {\n return \"<span class='activeSymbol stock highlight' data-symbol='\" . $symbol . \"' data-type='\" . $type . \"'>\" . $display . \"</span>\";\n } elseif ($type == 'box') {\n return '<div class=\"stockBoxContainer\">\n\t\t\t\t<div class=\"stockBoxHeader\">\n\t\t\t\t</div>\n\t\t\t\t<div class=\"stockBoxHeader\">\n\t\t\t\t\t<div id=\"box-chart-heading\"><h4>Stock Profile</h4><h5><span class=\"boxData\" id=\"companyName\"></span> - <span class=\"boxData\" id=\"symbol\"></span></h5></div>\n\t\t\t\t\t<ul class=\"flex-container\">\n\t\t\t\t\t\t<li class=\"flex-item\"><span class=\"boxHeader\">Price</span><br><span class=\"boxData\" id=\"price\"></span></li>\n\t\t\t\t\t\t<li class=\"flex-item\"><span class=\"boxHeader\">Changes</span><br><span class=\"boxData\" id=\"changes\"></span></li>\n\t\t\t\t\t\t<li class=\"flex-item\"><span class=\"boxHeader\">Change Percentage</span><br><span class=\"boxData\" id=\"changePercentage\"></span></li>\n\t\t\t\t\t\t<li class=\"flex-item\"><span class=\"boxHeader\">52 Week Range</span><br><span class=\"boxData\" id=\"range\"></span></li>\n\t\t\t\t\t\t<li class=\"flex-item\"><span class=\"boxHeader\">Beta</span><br><span class=\"boxData\" id=\"beta\"></span></li>\n\t\t\t\t\t\t<li class=\"flex-item\"><span class=\"boxHeader\">Volume Average</span><br><span class=\"boxData\" id=\"volAvg\"></span></li>\n\t\t\t\t\t\t<li class=\"flex-item\"><span class=\"boxHeader\">Market Capitalisation</span><br><span class=\"boxData\" id=\"mktCap\"></span></li>\n\t\t\t\t\t\t<li class=\"flex-item\"><span class=\"boxHeader\">Last Dividend</span><br><span class=\"boxData\" id=\"lastDiv\"></span></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</div>';\n }\n}", "public function run_shortcode($content)\n {\n }", "public function productsubtab_render_main_screen_function() {\n\t\t\\add_action( 'bp_template_content', array( $this, 'bp_productssubnav_tab_action' ) );\n\t\t\\bp_core_load_template( \\apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t}", "function wp_stripe_shortcode( $atts ){\n\n $options = get_option('wp_stripe_options');\n\n if ( $options['stripe_address_switch'] == 'Yes' ) {\n $settings = '?keepThis=true&TB_iframe=true&height=460&width=800';\n } else {\n $settings = '?keepThis=true&TB_iframe=true&height=580&width=400';\n }\n $path = WP_STRIPE_PATH . '/includes/stripe-iframe.php'. $settings;\n $count = 1;\n\n if ( $options['stripe_modal_ssl'] == 'Yes' ) {\n $path = str_replace(\"http\", \"https\", $path, $count);\n }\n\n extract(shortcode_atts(array(\n 'cards' => 'true'\n ), $atts));\n\n if ( $cards == 'true' ) {\n $payments = '<div id=\"wp-stripe-types\"></div>';\n }\n\n return '<a class=\"thickbox\" id=\"wp-stripe-modal-button\" title=\"' . $options['stripe_header'] . '\" href=\"' . $path . '\">' . $options['stripe_header'] . '</a>' . $payments;\n\n}", "function initialize_shortcode() {\n\tif ( ! ( shortcode_exists( shortcode_slug ) ) ) {\n\t\tadd_shortcode( shortcode_slug, __NAMESPACE__ . '\\\\replacement' );\n\t}\n}", "function block_shortcode($atts) {\r\n extract(shortcode_atts(array(\r\n\t\t'url' \t=> 'https://www.google.com/',\r\n\t\t'image'\t=> get_stylesheet_directory_uri().'/assets/img/feature_img_swf.png',\r\n\t\t'text'\t=> 'Run A Startup',\r\n\t\t'color'\t=> '#186677',\r\n\t\t), $atts, 'block_shortcode'));\r\n\t\r\n return \r\n\t\t\t'<div class=\"col-md-3 col-lg-3 col-sm-6 col-xs-6 cd-block-row\">\r\n\t\t\t\t<a href=\"'.$url.'\">\r\n\t\t\t\t\t<div id=\"cd-block-id\" class=\"cd-block\">\r\n\t\t\t\t\t\t<img id=\"block-img\" src=\"'.$image.'\" alt=\"\" />\r\n\t\t\t\t\t\t<p style=\"color:'.$color.';\">'.$text.'</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</a>\r\n\t\t\t</div>'\r\n\t;\r\n}", "function tz_toggle( $atts, $content = null ) {\n\t\n extract(shortcode_atts(array(\n\t\t'title' \t => 'Title goes here',\n\t\t'state'\t\t => 'open'\n ), $atts));\n\n\t$out = '';\n\t\n\t$out .= \"<div data-id='\".$state.\"' class=\\\"toggle\\\"><h4>\".$title.\"</h4><div class=\\\"toggle-inner\\\">\".do_shortcode($content).\"</div></div>\";\n\t\n return $out;\n\t\n}", "function _static9($options)\n\t{\n\t?>\n <div id=\"slideshow\" class=\"nobg\">\n\n <div class=\"container\">\n \t<div class=\"static-content simple\">\n \t\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"span12\">\n\t\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t\t\techo do_shortcode($options['sc_sc']);\n\n\t\t\t\t\t\t\t\t\tif (!empty( $options['sc_button_text'] ) && !empty( $options['sc_button_link']['url'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\techo '<a href=\"'.$options['sc_button_link']['url'].'\" target=\"'.$options['sc_button_link']['url'].'\" class=\"btn btn-large btn-flat\">'.$options['sc_button_text'].'</a><span class=\"line\"></span>';\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t?>\n \n \n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div><!-- end row -->\n </div><!-- end static content -->\n </div>\n\n </div><!-- end slideshow -->\n\t<?php\n\t}", "function vslider_short_code($atts) {\r\n\tob_start();\r\n extract(shortcode_atts(array(\r\n\t\t\"name\" => ''\r\n\t), $atts));\r\n\tvslider($name);\r\n\t$output = ob_get_clean();\r\n\treturn $output;\r\n}", "public function bp_settingssubnav_tab_action() {\n\t\techo \\do_shortcode( '[wcfm endpoint=\"wcfm-settings\"]' );\n\t}", "public abstract function do_shortcode( $atts, $content, $tag );", "public function MyExecute()\r\n\t{\r\n Utility::turnDebugOn();\r\n //config switch\r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",1);\r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",2); \r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",3); \r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",4); \r\n// \r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",1);\r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",2); \r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",3);\r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",4); \r\n \r\n// $this->apRadioControl($this->scenario->GetDevice('AP2'),\"Disabled\");\r\n// \r\n// Utility::insertBreakPoint(); \r\n// \r\n// $this->apRadioControl($this->scenario->GetDevice('AP2'),\"Enabled\");\r\n// \r\n// $this->syncAPs();\r\n \r\n// if($this->checkPage()==TRUE)\r\n// {\r\n// Utility::insertBreakPoint(\"hahahahaha\"); \r\n// }\r\n// else\r\n// {\r\n// system(\"banner baga\");\r\n// }\r\n \r\n\r\n $MYVSC=new VSC(\"V2\",\"V2\",\"WPA2(AES/CCMP)\",\"802.1X\");\r\n $MYVSC->commit();\r\n \r\n// $MYVSC=new VSC(\"V3\",\"V3\",\"WEP\",\"HTML\");\r\n// $my_wireless=new WirelessProtection();\r\n// $my_wireless->setWirelessProtectionType(\"WEP\");\r\n// $my_wireless->setKeySource(\"STATIC\");\r\n// $my_wireless->setKey(array( \"c67347dd12a787b7a132f690d0\", \"c67347dd12a797b7a132f690d1\", \"c673a7dd12a787b7a132f690d2\", \"c67347dd16a787b7a132f690d3\", \"2\", \"HEX\"));\r\n// $MYVSC->configureWirelessProtection($my_wireless); \r\n// $MYVSC->commit();\r\n \r\n $MYVSC=new VSC(\"V3\",\"V3\",\"WPA(TKIP)\",\"HTML\");\r\n $my_wireless=new WirelessProtection();\r\n $my_wireless->setWirelessProtectionType(\"WPA(TKIP)\");\r\n $my_wireless->setKeySource(\"STATIC\");\r\n $my_wireless->setKey(\"26d4a5f7cf549710a7aae2db4e712027\");\r\n $MYVSC->configureWirelessProtection($my_wireless); \r\n $MYVSC->commit();\r\n \r\n \r\n \r\n// $MYVSC=new VSC(\"V4\",\"V4\",\"None\",\"MAC\");\r\n// $MYVSC->commit();\r\n// \r\n// $MYVSC=new VSC(\"V5\",\"V5\",\"None\",\"HTML_MAC\");\r\n// $MYVSC->commit();\r\n// \r\n // $MYVSC=new VSC(\"V6\",\"V6\",\"WEP\",\"802.1X\");\r\n// $MYVSC->commit();\r\n// \r\n// $MYVSC=new VSC(\"V7\",\"V7\",\"WPA2(AES/CCMP)\",\"802.1X\");\r\n// $MYVSC->commit();\r\n// \r\n// $MYVSC=new VSC(\"V8\",\"V8\",\"WPA/WPA2\",\"802.1X\");\r\n// $MYVSC->commit();\r\n// $MYVSC=new VSC(\"V2\",\"V2\",\"WEP\");\r\n// $MYVSC->commit(); \r\n// \r\n// $MYVSC=new VSC(\"V3\",\"V3\",\"WEP\",\"HTML\"); \r\n// $MYVSC->commit(); \r\n// \r\n \r\n Utility::insertBreakPoint(); \r\n return \"passed\";\r\n \r\n\t}", "function TS_VCSC_RegisterAllShortcodes() {\r\n\t\t\tif ($this->TS_VCSC_PluginSupport == \"true\") {\r\n\t\t\t\t// Standard Elements\r\n\t\t\t\tforeach ($this->TS_VCSC_Visual_Composer_Elements as $ElementName => $element) {\r\n\t\t\t\t\tif ($this->TS_VCSC_Visual_Composer_Elements[$ElementName]['active'] == \"true\") {\r\n\t\t\t\t\t\tif ($element['type'] == 'internal') {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (($this->TS_VCSC_VCFrontEditMode == \"true\") || (is_admin() == false) || ($this->TS_VCSC_PluginAJAX == \"true\") || ($this->TS_VCSC_PluginAlways == \"true\")) {\r\n\t\t\t\t\t\t\t\trequire_once($this->shortcode_dir.'ts_vcsc_shortcode_' . $element['file'] . '.php');\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Load Inter-Dependent Shortocdes\r\n\t\t\t\tif ((($this->TS_VCSC_Visual_Composer_Elements['TS Icon Info Box']['active'] == \"true\") || ($this->TS_VCSC_Visual_Composer_Elements['TS Panel Flip']['active'] == \"true\")) && ($this->TS_VCSC_Visual_Composer_Elements['TS Creative Link']['active'] == \"false\")) {\r\n\t\t\t\t\tif (($this->TS_VCSC_VCFrontEditMode == \"true\") || (is_admin() == false) || ($this->TS_VCSC_PluginAJAX == \"true\") || ($this->TS_VCSC_PluginAlways == \"true\")) {\r\n\t\t\t\t\t\trequire_once($this->shortcode_dir.'ts_vcsc_shortcode_' . $this->TS_VCSC_Visual_Composer_Elements['TS Creative Link']['file'] . '.php');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t// Demo Elements\r\n\t\t\t\tforeach ($this->TS_VCSC_Visual_Composer_Demos as $ElementName => $element) {\r\n\t\t\t\t\tif ($this->TS_VCSC_Visual_Composer_Demos[$ElementName]['active'] == \"true\") {\r\n\t\t\t\t\t\tif (($this->TS_VCSC_VCFrontEditMode == \"true\") || (is_admin() == false) || ($this->TS_VCSC_PluginAJAX == \"true\") || ($this->TS_VCSC_PluginAlways == \"true\")) {\r\n\t\t\t\t\t\t\trequire_once($this->shortcode_dir.'ts_vcsc_shortcode_' . $element['file'] . '.php');\r\n\t\t\t\t\t\t}\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t\t// Extended Row + Columns + Iconicum\r\n\t\t\t\tif (($this->TS_VCSC_VCFrontEditMode == \"true\") || (is_admin() == false) || ($this->TS_VCSC_PluginAJAX == \"true\") || ($this->TS_VCSC_PluginAlways == \"true\")) {\r\n\t\t\t\t\t// Extended Row Settings\r\n\t\t\t\t\tif ($this->TS_VCSC_UseExtendedRows == \"true\") {\r\n\t\t\t\t\t\trequire_once($this->shortcode_dir . 'ts_vcsc_shortcode_row.php');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Extended Column Settings\r\n\t\t\t\t\tif ($this->TS_VCSC_UseExtendedColumns == \"true\") {\r\n\t\t\t\t\t\trequire_once($this->shortcode_dir . 'ts_vcsc_shortcode_column.php');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// bbPress Elements\r\n\t\t\t\tif ($this->TS_VCSC_bbPressActive == \"true\") {\r\n\t\t\t\t\t// Shortcodes Defined by bbPress itself\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "function wpaddons_shortcode( $atts ) {\n\n\t// Register and enqueues styles\n\tadd_action( 'wp_enqueue_scripts', array( 'WP_Addons_IO', 'enqueue_styles' ) );\n\n\t$atts = shortcode_atts(\n\t\tarray(\n\t\t\t'debug_mode' => 0,\n\t\t\t'plugin' => '',\n\t\t\t'view' => 'cover-grid-third',\n\t\t),\n\t\t$atts,\n\t\t'wpaddons'\n\t);\n\n\t// Load wpAddons SDK\n\t//require_once plugin_dir_path( __FILE__ ) . '/wpaddons-io-sdk/wpaddons-io-sdk.php';\n\n\t// Set addon parameters\n\t$plugin_data = array(\n\t\t'parant_plugin_slug' => $atts['plugin'],\n\t\t'view' => plugin_dir_path( __FILE__ ) . 'wpaddons-io-sdk/view/' . $atts['view'] . '.php',\n\t);\n\n\t// Initiate addons\n\tnew WP_Addons_IO( $plugin_data );\n\n}", "function bpfit_weight_subtab_show_screen() {\n\t\t\tadd_action( 'bp_template_title', array($this, 'bpfit_weight_subtab_function_to_show_title') );\n\t\t\tadd_action( 'bp_template_content', array($this, 'bpfit_weight_subtab_function_to_show_content') );\n\t\t\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t}", "function dm_hubspot_form_shortcode($atts) {\n\textract(shortcode_atts(array(\n\t\t'portal_id' => '219987',\n\t\t'id' => '',\n\t\t'campaign_id' => '',\n\t\t'include_script' => true\n\t), $atts));\n\n\tob_start();\n?>\n\t<?php if ($include_script): ?>\n\t\t<script charset=\"utf-8\" src=\"//js.hubspot.com/forms/current.js\"></script>\n\t<?php endif; ?>\n\t<script>\n\t\tvar formProps = {\n\t\t\tportalId: '<?php echo $portal_id; ?>',\n\t\t\tformId: '<?php echo $id; ?>'\n\t\t};\n\t\t<?php if (!empty($campaign_id)): ?>\n\t\tformProps.sfdcCampaignId = '<?php echo $campaign_id; ?>';\n\t\t<?php endif; ?>\n\t\thbspt.forms.create(formProps);\n\t</script>\n<?php\n\t$output = ob_get_clean();\n\treturn $output;\n}", "function rev_slider_shortcode($args, $mid_content = null){\n $zt_params = JComponentHelper::getParams('com_zt_layerslider');\n $js_defer = $zt_params->get('js_defer') ? 'defer=\"defer\"' : '';\n extract(shortcode_atts(array('alias' => ''), $args, 'zt_layerslider'));\n extract(shortcode_atts(array('settings' => ''), $args, 'zt_layerslider'));\n extract(shortcode_atts(array('order' => ''), $args, 'zt_layerslider'));\n\n if($settings !== '') $settings = json_decode(str_replace(array('({', '})', \"'\"), array('[', ']', '\"'), $settings) ,true);\n if($order !== '') $order = explode(',', $order);\n\n $sliderAlias = ($alias != '') ? $alias : ZTSliderFunctions::getVal($args,0);\n\n $gal_ids = check_for_shortcodes($mid_content); //check for example on gallery shortcode and do stuff\n\n ob_start();\n if(!empty($gal_ids)){ //add a gallery based slider\n $slider = ZTSliderOutput::putSlider($sliderAlias, '', $gal_ids);\n }else{\n $slider = ZTSliderOutput::putSlider($sliderAlias, '', array(), $settings, $order);\n }\n $content = ob_get_contents();\n ob_clean();\n ob_end_clean();\n\n if(!empty($slider)){\n // Do not output Slider if we are on mobile\n $disable_on_mobile = $slider->getParam(\"disable_on_mobile\",\"off\");\n if($disable_on_mobile == 'on'){\n $mobile = (strstr($_SERVER['HTTP_USER_AGENT'],'Android') || strstr($_SERVER['HTTP_USER_AGENT'],'webOS') || strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') ||strstr($_SERVER['HTTP_USER_AGENT'],'iPod') || strstr($_SERVER['HTTP_USER_AGENT'],'iPad') || strstr($_SERVER['HTTP_USER_AGENT'],'Windows Phone') || wp_is_mobile()) ? true : false;\n if($mobile) return false;\n }\n\n $show_alternate = $slider->getParam(\"show_alternative_type\",\"off\");\n\n if($show_alternate == 'mobile' || $show_alternate == 'mobile-ie8'){\n if(strstr($_SERVER['HTTP_USER_AGENT'],'Android') || strstr($_SERVER['HTTP_USER_AGENT'],'webOS') || strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') ||strstr($_SERVER['HTTP_USER_AGENT'],'iPod') || strstr($_SERVER['HTTP_USER_AGENT'],'iPad') || strstr($_SERVER['HTTP_USER_AGENT'],'Windows Phone') || wp_is_mobile()){\n $show_alternate_image = $slider->getParam(\"show_alternate_image\",\"\");\n return '<img class=\"tp-slider-alternative-image\" src=\"'.$show_alternate_image.'\" data-no-retina>';\n }\n }\n\n //handle slider output types\n echo \"<link rel='stylesheet' type='text/css' href='\".JUri::root(true) . '/administrator/components/com_zt_layerslider/assets/css/settings.css'.\"'>\";\n echo \"<script type='text/javascript' src='\".JUri::root(true) . '/administrator/components/com_zt_layerslider/assets/js/jquery.themepunch.tools.min.js'.\"' \".$js_defer.\" ></script>\";\n echo \"<script type='text/javascript' src='\".JUri::root(true) . '/administrator/components/com_zt_layerslider/assets/js/jquery.themepunch.revolution.min.js'.\"' \".$js_defer.\" ></script>\";\n echo $content;\n }else\n echo $content; //normal output\n\n }", "function add_shortcode( $atts, $content, $name ) {\n\n\t\tif ( ! $this->validate_shortcode( $atts, $content, $name ) ) {\n return '';\n }\n\n\t\t$options = $this->set_options( $atts );\n\n\t\tob_start();\n\n\t\t?><div id=\"<?php echo esc_attr($options['selector']); ?>\" class=\"<?php if(isset($options['classes'])) echo esc_attr($options['classes']); ?>\" <?php do_action(\"oxygen_vsb_component_attr\", $options, $this->options['tag']); ?>><?php echo do_shortcode( $content ); ?></div><?php\n\n\t\treturn ob_get_clean();\n\t}", "function shortcode_pricing_table_vc( $atts, $content = null ) {\n\t\t$variables = array( 'class' => '',\n\t\t\t\t\t\t'color' => 'white',\n\t\t\t\t\t\t'price' => '',\n\t\t\t\t\t\t'unit_text' => '',\n\t\t\t\t\t\t'title' => '',\n\t\t\t\t\t\t'sub_title' => '',\n\t\t\t\t\t\t'icon_class' => '',\n\t\t\t\t\t\t'description' => '',\n\t\t\t\t\t\t'btn_title' => '',\n\t\t\t\t\t\t'btn_url' => '',\n\t\t\t\t\t\t'btn_target' => '',\n\t\t\t\t\t\t'btn_color' => '',\n\t\t\t\t\t\t'btn_class' => '',\n\t\t\t\t\t);\n\t\textract( shortcode_atts( $variables, $atts ) );\n\t\t$class = empty( $class )?'':( ' ' . $class );\n\t\t$result = '';\n\t\t$result .= '<div class=\"pricing-table box ' . esc_attr( $color . $class ) . '\">';\n\t\t$result .= '<div class=\"header clearfix\"><i class=\"' . esc_attr( $icon_class ) . '\"></i><h4 class=\"box-title\"><span>' . esc_html( $title ) . '<small>' . esc_html( $sub_title ) . '</small></span></h4><span class=\"price\"><small>' . esc_html( $unit_text ) . '</small>' . esc_html( $price ) . '</span></div>';\n\t\t$result .= '<p class=\"description\">' . esc_html( $description ) . '</p>';\n\t\t$result .= do_shortcode( $content );\n\t\t$result .= '<a href=\"' . esc_url( $btn_url ) . '\" class=\"button btn-small full-width ' . esc_attr( $btn_color . $btn_class ) . '\" target=\"' . esc_html( $btn_target ) . '\">' . esc_html( $btn_title ) . '</a>';\n\t\t$result .= '</div>';\n\t\treturn $result;\n\t}", "function PrintVersionBox($params) {\n\textract(shortcode_atts(array(\n\t\t'productid' => 6620,\n 'textlabel' => 'Printed version'\n\t), $params));\n\t\n\treturn\n\t'\n\t<div class=\"panel\" style=\"border:none;\">\n\t\t<div class=\"row\" style=\"background:none;\">\n\t\t\t<div class=\"column large-6 small-12\">\n\t\t\t<span class=\"preprice\">'.$textlabel.':<br></span>'.do_shortcode(\"[mp_product_price product_id=\\\"$productid\\\" label=\\\"\\\"]\").'\n\t\t\t</div>\n\t\t\t<div class=\"column large-6 small-12\">'.\n\t\t\tdo_shortcode(\"[mp_buy_button product_id=\\\"$productid\\\" context=\\\"single\\\"]\")\n\t\t\t.' \n\t\t\t</div>\n\t\t</div>\n\t</div>\n';\n\t\n}", "function d2_action_woocommerce_single_product_summary() { \n echo '<div class=\"d2_wc_button\">';\n \tif (dwc_get_theme_options('dwc_single_wishlist_btn')) {\n \t\tdo_shortcode('[dwc_add_to_wishlist_button button_text='.dwc_get_theme_options('dwc_shop_wishlist_btn_text').']');\n \t}\n \tif (dwc_get_theme_options('dwc_single_compare_btn')) {\n \t\tdo_shortcode('[dwc_add_to_compare_button btn_title=\"'.dwc_get_theme_options('dwc_shop_compare_btn_text').'\"]');\n \t}\n echo '</div>';\n}", "function pt_shortcode( $atts )\n\t\t{\n\t\t\treturn $this->pt_show_blc_front();\n\t\t}", "function fami_woocommerce_output_product_data_tabs() {\r\n\t$enable_single_product_mobile = casano_get_option( 'enable_single_product_mobile', true );\r\n\tif ( ! $enable_single_product_mobile || ! casano_is_mobile() ) {\r\n\t\twoocommerce_output_product_data_tabs();\r\n\t}\r\n}", "public function switcher()\n {\n $default_lang = $this->fetchConfig('ml_default_language');\n $all_lang = $this->fetchConfig('ml_languages');\n $lang_text = $this->fetchConfig('ml_switch_text', null, null, false, false);\n $prod_paths = $this->fetchConfig('ml_prod_paths', null, null, false, false);\n $prod_urlroot = $this->fetchConfig('ml_prod_produrlroot', null, null, false, false);\n $currlang = $this->currlang();\n $output = array();\n $output['switch_text'] = $lang_text[$currlang];\n $output['languages'] = array();\n $curr_prod_paths = $prod_paths[$currlang];\n \n $curr_page = Path::pretty(URL::getCurrent());\n $entry_data = Content::get($curr_page);\n\n $uri = ltrim($curr_page, '/');\n $urlparts = explode(\"/\",$uri);\n\n $curr_prod_paths_country = null;\n $curr_prod_paths_path = null;\n if (count($entry_data) < 1)\n { \n if (array_key_exists($urlparts[1], $curr_prod_paths))\n {\n $curr_prod_paths_path = $curr_prod_paths[$urlparts[1]];\n $curr_prod_paths_prod = $urlparts[2];\n $curr_page = \"/\" .$curr_prod_paths_path . \"/\" . $curr_prod_paths_prod;\n }\n\n }\n $entry_data = Content::get($curr_page);\n foreach ($all_lang as $lang) { \n $data = array();\n $data['code'] = $lang;\n $data['text'] = $lang_text[$lang];\n $data['url'] = '/' . $lang;\n $alturl = 'alternative_url_' . $lang;\n if (array_key_exists($alturl, $entry_data)) {\n $data['alturl'] = $entry_data[$alturl];\n }\n $altprodurl = 'alternative_prod_url_' . $lang;\n if (array_key_exists($altprodurl, $entry_data)) {\n $currpp = $prod_paths[$lang];\n reset($currpp);\n $first_key = key($currpp);\n $data['altprodurl'] = \"/\" .$currpp[$first_key] . \"/\" . $entry_data[$altprodurl];\n $data['altprod'] = $entry_data[$altprodurl];\n $data['produrl'] = $prod_urlroot[$lang] . \"/\" . $entry_data[$altprodurl];\n }\n\n $data['is_current'] = ($lang == $currlang) ? true : false;\n array_push($output['languages'], $data);\n }\n\n return $output;\n }", "function carolinaspa_products_shortcode($products){\n if (empty($products['number'])){\n $numberOfProducts = 10;\n }else{\n $numberOfProducts = $products['number'];\n }\n $args = array(\n 'posts_per_page' => $numberOfProducts,\n 'post_type' => 'products_post_type',\n 'orderby' => 'date',\n 'order' => 'ASC',\n );\n $products = new WP_Query($args);\n echo '<div class=\"card-columns w-100\">';\n while ($products->have_posts()): $products->the_post();?>\n<div class=\"card\">\n <a href=\"<?php the_permalink(); ?>\">\n <?php the_post_thumbnail('product-thumbnail', array('class' => 'card-img-top img-fluid'));?>\n </a>\n <div class=\"card-body\">\n <h3 class=\"card-title text-center text-uppercase\"><?php the_title(); ?></h3>\n <p class=\"card-text text-uppercase\"><?php the_field('descripcion_corta'); ?></p>\n <p class=\"lead text-center product-pricing mb-0\">$<?php the_field('precio'); ?></p>\n </div>\n</div>\n<?php\nendwhile; wp_reset_postdata();\n}", "function echotheme_toggle( $atts, $content = null ) {\n extract(shortcode_atts(array(\n\t 'title' => '',\n ), $atts));\n\n $html = '<h4 class=\"slide_toggle\"><a href=\"#\">' .$title. '</a></h4>';\n $html .= '<div class=\"slide_toggle_content\" style=\"display: none;\">'.wpautop(do_shortcode($content)).'</div>';\n \n\treturn $html;\n}", "public function yith_wcfbt_shortcode( $meta ){\n\n\t\t\tif( ! ( defined( 'YITH_WFBT' ) && YITH_WFBT ) || get_option( 'yith_wfbt_enable_integration' ) == 'no' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$products = YITH_WCWL()->get_products(\n\t\t\t\tarray(\n\t\t\t\t\t'wishlist_id' => is_user_logged_in() ? $meta['ID'] : ''\n\t\t\t\t));\n\n\t\t\t$ids = array();\n\t\t\t// take id of products in wishlist\n\t\t\tforeach( $products as $product ) {\n\t\t\t\t$ids[] = $product['prod_id'];\n\t\t\t}\n\n\t\t\tif( empty( $ids ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdo_shortcode( '[yith_wfbt products=\"' . implode( ',', $ids ) . '\"]' );\n\t\t}", "function oet_ajax_display_featured_content_block(){\n $shortcode = oet_featured_content_block_display($_POST['attributes'], true);\n echo wpautop(stripslashes($shortcode));\n die();\n}", "public function wppcShortcode($atts)\n\t\t\t{\n\t\t\t\t// Shortcode default atributes\n\t\t\t\t$atts = shortcode_atts(array('id' => 1), $atts);\n\n\t\t\t\tglobal $wpdb;\n\t\t\t\t$contest = $wpdb->get_row('SELECT * FROM '.WPPC_TABLE_ALL_CONTESTS.' WHERE id='.$atts['id']);\n\t\t\t\t$contestWinners = unserialize($contest->contest_winners);\n\t\t\t\t?>\n\n\t\t\t\t<div id=\"wppc-contest\">\n\t\t\t\t\t<div id=\"wppc-main\">\n\t\t\t\t\t\t<div id=\"contest-tabs\" style=\"display: inline;\">\n\t\t\t\t\t\t\t<ul id=\"contest-nav\" style=\"margin-bottom: 20px; margin-top: 20px;\">\n\t\t\t\t\t\t\t\t<?php if ($contest->contest_about != ''): ?><li style=\"display: inline; margin-right: 2rem;\" <?php if ($contest->start_date > date('Y-m-d h:m:s', time())): ?>class=\"ui-state-default ui-corner-top ui-tabs-active ui-state-active\"<?php endif; ?>><a href=\"#contest-about\">About</a></li><?php endif; ?>\n\t\t\t\t\t\t\t\t<?php if ($contest->start_date <= date('Y-m-d h:m:s', time())): ?><li style=\"display: inline; margin-right: 2rem;\" class=\"ui-state-default ui-corner-top ui-tabs-active ui-state-active\"><a href=\"#contest-photo-gallery\">Photo Gallery</a></li><?php endif; ?>\n\t\t\t\t\t\t\t\t<?php if ($contestWinners['text'] != ''): ?><li style=\"display: inline; margin-right: 2rem;\"><a href=\"#contest-winners\">Winners</a></li><?php endif; ?>\n\t\t\t\t\t\t\t\t<?php if ($contest->contest_rules != ''): ?><li style=\"display: inline; margin-right: 2rem;\"><a href=\"#contest-rules\">Rules</a></li><?php endif; ?>\n\t\t\t\t\t\t\t\t<?php if ($contest->contest_prizes != ''): ?><li style=\"display: inline; margin-right: 2rem;\"><a href=\"#contest-prizes\">Prizes</a></li><?php endif; ?>\n\t\t\t\t\t\t\t\t<?php if ($contest->start_date <= date('Y-m-d h:m:s', time()) && date('Y-m-d h:m:s', time()) <= date('Y-m-d', strtotime('+1 day' , strtotime($contest->end_registration)))): ?><li style=\"display: inline; margin-right: 2rem;\"><a href=\"#contest-entry-form\">Entry form</a></li><?php endif; ?>\n\t\t\t\t\t\t\t\t<?php if ($contest->contest_contact != ''): ?><li style=\"display: inline; margin-right: 2rem;\"><a href=\"#contest-contact\">Contact</a></li><?php endif; ?>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!-- Contest about -->\n\t\t\t\t\t\t\t<?php if ($contest->contest_about != ''): ?>\n\t\t\t\t\t\t\t\t<div id=\"contest-about\">';\n\t\t\t\t\t\t\t\t\t<?php echo $this->formatContent($contest->contest_about); ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<!-- Contest photo gallery -->\n\t\t\t\t\t\t\t<?php if ($contest->start_date <= date('Y-m-d h:m:s', time())): ?>\n\t\t\t\t\t\t\t\t<div id=\"contest-photo-gallery\">\n\t\t\t\t\t\t\t\t\t<?php echo $contest->contest_photo_gallery; ?>\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t$totalDays = (strtotime($contest->end_registration) - strtotime($contest->start_date)) / (60*60*24);\n\t\t\t\t\t\t\t\t\t\t$weeks = $totalDays % 7 != 0 ? $totalDays / 7 + 1 : $totalDays / 7;\n\t\t\t\t\t\t\t\t\t?>\n\n\t\t\t\t\t\t\t\t\t<!-- Contest filters -->\n\t\t\t\t\t\t\t\t\t<div id=\"wppc-filters\" class=\"row\" style=\"margin-top:20px; margin-bottom: 20px;\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" value=\"<?php echo $contest->id ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t<select name=\"wppc-weeks\" id=\"wppc-weeks\" class=\"form-control wppc-select-filter\">\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"week-all\">All weeks</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\tfor ($week = 1; $week <= $weeks; $week ++)\n\t\t\t\t\t\t\t\t\t\t\t\t\techo '<option value=\"week-'.$week.'\">Week '.$week.'</option>';\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-md-3 col-md-offset-1\">\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" value=\"<?php echo $contest->id ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t<select name=\"wppc-points\" id=\"wppc-points\" class=\"form-control wppc-select-filter\">\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"point-all\">All points</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"point-0\">0 points</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"point-1\">1 point</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"point-2\">2 points</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"point-3\">3 points</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"point-4\">4 points</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"point-5\">5 points</option>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<?php if ($contest->photos_mobile_allowed > 0): ?>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-md-3 col-md-offset-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" value=\"<?php echo $contest->id ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<button type=\"button\" value=\"mobile-only\" class=\"btn btn-primary\" id=\"wppc-button-filter\">Mobile only</button>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<!-- Contest photos -->\n\t\t\t\t\t\t\t\t\t<div id=\"wppc-photos\">\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t$wpDir = wp_upload_dir();\n\t\t\t\t\t\t\t\t\t\t\t$contestDir = $wpDir['baseurl'].'/wppc-photos/wppc-photos-'.$contest->id.'/';\n\n\t\t\t\t\t\t\t\t\t\t\t// Get all photos for this contest\n\t\t\t\t\t\t\t\t\t\t\t$contestPhotos = $wpdb->get_results('SELECT * FROM '.WPPC_TABLE_CONTESTS_ENTRIES.' WHERE contest_id='.$contest->id.' AND visible=1');\n\n\t\t\t\t\t\t\t\t\t\t\t// Shuffle photos\n\t\t\t\t\t\t\t\t\t\t\tshuffle($contestPhotos);\n\n\t\t\t\t\t\t\t\t\t\t\t// Get points\n\t\t\t\t\t\t\t\t\t\t\t$contestPoints = array($contest->first_point, $contest->second_point, $contest->third_point, $contest->forth_point, $contest->fifth_point);\n\n\t\t\t\t\t\t\t\t\t\t\t$this->displayContestPhotos($contestPhotos, $contest->contest_name, $contest->end_vote, $contestDir, $contestPoints, get_permalink(get_the_id()), $contest->contest_social_description, $this->photosPerPage);\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php endif; ?> \n\n\t\t\t\t\t\t\t<!-- Contest winners -->\n\t\t\t\t\t\t\t<?php if ($contestWinners['text'] != ''): ?>\n\t\t\t\t\t\t\t\t<div id=\"contest-winners\">\n\t\t\t\t\t\t\t\t\t<?php echo $contestWinners['text'] ?>\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<h2>First prize</h2>\n\t\t\t\t\t\t\t\t\t\t<?php $firstWinner = $wpdb->get_row(\"SELECT * FROM WPPC_TABLE_CONTESTS_ENTRIES WHERE contest_id='\".$atts['id'].\"' AND photo_id=\".$contestWinners['first-winner'], ARRAY_A); ?>\n\t\t\t\t\t\t\t\t\t\t<a class=\"group1\" href=\"<?php echo $contestDir ?>medium/<?php echo $firstWinner['competitor_photo'] ?>\" title=\"\">\n\t\t\t\t\t\t\t\t\t\t\t<img src=\"<?php echo $contestDir ?>medium/<?php echo $firstWinner['competitor_photo'] ?>\" alt=\"<?php echo $firstWinner['photo_name'] ?>\" />\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"no-padding-left col-md-6\">\n\t\t\t\t\t\t\t\t\t\t\t<h2>Second prize</h2>\n\t\t\t\t\t\t\t\t\t\t\t<?php $secondWinner = $wpdb->get_row(\"SELECT * FROM WPPC_TABLE_CONTESTS_ENTRIES WHERE contest_id='\".$atts['id'].\"' AND photo_id=\".$contestWinners['second-winner'], ARRAY_A); ?>\n\t\t\t\t\t\t\t\t\t\t\t<a class=\"group1\" href=\"<?php echo $contestDir ?>medium/<?php echo $secondWinner['competitor_photo'] ?>\" title=\"\" style=\"background-image: url('<?php echo $contestDir ?>medium/<?php echo $secondWinner['competitor_photo'] ?>'); position: relative; float: left; width: 100%; height: 300px; background-position: 50% 50%; background-repeat: no-repeat; background-size: cover;\">\n\t\t\t\t\t\t\t\t\t\t\t\t<!-- <img src=\"<?php echo $contestDir ?>medium/<?php echo $secondWinner['competitor_photo'] ?>\" alt=\"<?php echo $secondWinner['photo_name'] ?>\" /> -->\n\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"no-padding-right col-md-6\">\n\t\t\t\t\t\t\t\t\t\t\t<h2>Third prize</h2>\n\t\t\t\t\t\t\t\t\t\t\t<?php $thirdWinner = $wpdb->get_row(\"SELECT * FROM WPPC_TABLE_CONTESTS_ENTRIES WHERE contest_id='\".$atts['id'].\"' AND photo_id=\".$contestWinners['third-winner'], ARRAY_A); ?>\n\t\t\t\t\t\t\t\t\t\t\t<a class=\"group1\" href=\"<?php echo $contestDir ?>medium/<?php echo $thirdWinner['competitor_photo'] ?>\" title=\"\" style=\"background-image: url('<?php echo $contestDir ?>medium/<?php echo $thirdWinner['competitor_photo'] ?>'); position: relative; float: left; width: 100%; height: 300px; background-position: 50% 50%; background-repeat: no-repeat; background-size: cover;\">\n\t\t\t\t\t\t\t\t\t\t\t\t<!-- <img src=\"<?php echo $contestDir ?>medium/<?php echo $thirdWinner['competitor_photo'] ?>\" alt=\"<?php echo $thirdWinner['photo_name'] ?>\" /> -->\n\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<h2>Our favorites</h2>\n\t\t\t\t\t\t\t\t\t\t<?php foreach ($contestWinners['our-favorites'] as $photoID): ?>\n\t\t\t\t\t\t\t\t\t\t\t<?php $photo = $wpdb->get_row(\"SELECT * FROM WPPC_TABLE_CONTESTS_ENTRIES WHERE contest_id='\".$atts['id'].\"' AND photo_id=\".$photoID, ARRAY_A); ?>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"group1\" href=\"<?php echo $contestDir ?>medium/<?php echo $photo['competitor_photo'] ?>\" title=\"\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"<?php echo $contestDir ?>thumbs/<?php echo $photo['competitor_photo'] ?>\" alt=\"<?php echo $photo['photo_name'] ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<!-- Contest rules -->\n\t\t\t\t\t\t\t<?php if ($contest->contest_rules != ''): ?>\n\t\t\t\t\t\t\t\t<div id=\"contest-rules\">\n\t\t\t\t\t\t\t\t\t<div id=\"rules-tabs\">\n\t\t\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t\t\t<li style=\"display: inline; margin-right: 2rem;\"><a href=\"#en-rules\"><img style=\"max-width: 30px;\" src=\"<?php echo WPPC_URI.'img/flags/uk-flag.png' ?>\" /></a></li>\n\t\t\t\t\t\t\t\t\t\t\t<li style=\"display: inline; margin-right: 2rem;\"><a href=\"#ro-rules\"><img style=\"max-width: 30px;\" src=\"<?php echo WPPC_URI.'img/flags/ro-flag.png' ?>\" /></a></li>\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t<?php $rules = unserialize($contest->contest_rules); ?>\n\t\t\t\t\t\t\t\t\t\t<div id=\"en-rules\"><?php echo $rules['en'] ?></div>\n\t\t\t\t\t\t\t\t\t\t<div id=\"ro-rules\"><?php echo $rules['ro'] ?></div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<!-- Contest prizes -->\n\t\t\t\t\t\t\t<?php if ($contest->contest_prizes != ''): ?>\n\t\t\t\t\t\t\t\t<div id=\"contest-prizes\">\n\t\t\t\t\t\t\t\t\t<?php echo $this->formatContent($contest->contest_prizes); ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<!-- Contest entry form -->\n\t\t\t\t\t\t\t<?php if ($contest->start_date <= date('Y-m-d h:m:s', time()) && date('Y-m-d h:m:s', time()) <= date('Y-m-d', strtotime('+1 day' , strtotime($contest->end_registration)))): ?>\n\t\t\t\t\t\t\t\t<div id=\"contest-entry-form\">\n\t\t\t\t\t\t\t\t\t<?php $this->setEntryForm($contest->id, $contest->contest_entry_form); ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<!-- Contest contact -->\n\t\t\t\t\t\t\t<?php if ($contest->contest_contact != ''): ?>\n\t\t\t\t\t\t\t\t<div id=\"contest-contact\">\n\t\t\t\t\t\t\t\t\t<?php echo $contest->contest_contact; ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t</div> <!-- end contest-tabs -->\n\t\t\t\t\t</div> <!-- end wppc-main -->\n\n\t\t\t\t\t<div id=\"wppc-sidebar\">\n\t\t\t\t\t\t<?php /* Follow us */ setFollowUs(); ?>\n\t\t\t\t\t\t<br/><br/>\n\t\t\t\t\t\t<?php echo $contest->contest_sidebar ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t}", "function shortcodeHandler($atts, $content = null) {\r\n\t\textract( shortcode_atts( array(\r\n\t\t\t 'vid' => '0'\r\n\t\t\t,'vtitle' => ''\r\n\t\t\t,'vinline' => 'false'\r\n\t\t\t), $atts ) );\r\n\t\t$vinline = (strtolower($vinline) == 'true');\r\n\t\treturn $this->_getLinkTag($vid, $vtitle, $vinline);\r\n\t}", "function plugin_starter_shortcode_1() {\r\n\t// This is just for showing that the shortcut works\r\n\treturn '<div class=\"starter-test\">This is the output of this shortcode</div>';\r\n}", "function dcs_dropship_product_page_shortcode($atts, $content=null)\r\n{\r\n\t$pageNumber = 1;\r\n\tif( isset($_GET['pageNumber']) ) \r\n\t{\r\n\t\t$pageNumber = $_GET['pageNumber'];\r\n\t}\r\n\r\n\t$category = \"all\";\r\n\tif( isset($_GET['category']) )\r\n\t{\r\n\t\t$category = $_GET['category'];\r\n\t}\r\n\r\n\t$searchTerms = \"\";\r\n\tif( isset($_GET['searchTerms']) )\r\n\t{\r\n\t\t$searchTerms = $_GET['searchTerms'];\r\n\t}\r\n\r\n\t$retval = dcs_dropship_product_page($pageNumber, $category, $searchTerms);\r\n\r\n\treturn $retval;\r\n}", "function mmc_shortcode() {\r\n\t//$cards = mmc_fetch_my_card_info();\r\n\r\n\t//$cards_content = mmc_display_card_info( $cards ); // do some formatting here\r\n\r\n\t//return $cards_content;\r\n\tinclude('cards_index.php');\r\n}", "function woocommerce_product_write_panel_tabs(){\n ?>\n <li class=\"custom_tab\">\n <a href=\"#custom_tab_data_ctabs\">\n <?php _e('Custom Tabs', 'GWP'); ?>\n </a>\n </li>\n <?php\n }", "function d2_action_woocommerce_after_shop_loop_item() {\n\n echo '<div class=\"d2_wc_button\">';\n \tif (dwc_get_theme_options('dwc_shop_wishlist_btn')) {\n \t\tdo_shortcode('[dwc_add_to_wishlist_button button_text='.dwc_get_theme_options('dwc_shop_wishlist_btn_text').']');\n \t}\n \tif (dwc_get_theme_options('dwc_shop_compare_btn')) {\n \t\tdo_shortcode('[dwc_add_to_compare_button]');\n \t}\n \t\n echo '</div>';\n}", "function wpeppsubNCX_options($atts) {\r\n\r\n\t// get shortcode id\r\n\t\t$atts = shortcode_atts(array(\r\n\t\t\t'id' \t\t=> '',\r\n\t\t\t'align' \t=> '',\r\n\t\t\t'widget' \t=> ''\r\n\t\t), $atts);\r\n\t\t\t\r\n\t\t$post_id = $atts['id'];\r\n\t\t\r\n\t// check to see if post exists\r\n\t$check_post = get_post($post_id);\r\n\t\r\n\tif (empty($check_post)) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t// amount\r\n\t$postAmt = esc_attr(get_post_meta($post_id,'postAmt',true));\r\n\t$postAmt = number_format($postAmt, 2);\r\n\t\r\n\t$wpeppsubNCX_a3 = esc_attr(get_post_meta($post_id,'wpeppsubNCX_a3',true));\r\n\r\n\t// get settings page values\r\n\t$options = get_option('wpeppsubNCX_settingsoptions');\r\n\tforeach ($options as $k => $v ) { $value[$k] = esc_attr($v); }\r\n\t\r\n\t$wpeppsubNCX_button_image = esc_attr(get_post_meta($post_id,'wpeppsubNCX_button_image',true));\r\n\t$button_url = \"\";\r\n\t\r\n\tif($wpeppsubNCX_button_image == 1){\r\n\t\t$button_url = \"https://ssl.nochex.com/Downloads/Nochex%20Payment%20Button/payme4.gif\";\t\r\n\t}elseif($wpeppsubNCX_button_image == 2){\r\n\t\t$button_url = \"https://ssl.nochex.com/Downloads/Nochex%20Payment%20Button/payme.gif\";\t\r\n\t}elseif($wpeppsubNCX_button_image == 3){\r\n\t\t$button_url = \"https://ssl.nochex.com/Downloads/Nochex%20Payment%20Button/nochex_pay.png\";\t\r\n\t}elseif($wpeppsubNCX_button_image == 4){\r\n\t\t$button_url = \"https://ssl.nochex.com/Downloads/Nochex%20Payment%20Button/nochex_checkout.png\";\t\r\n\t}elseif($wpeppsubNCX_button_image == 5){\r\n\t\t$button_url = \"https://ssl.nochex.com/Downloads/Nochex%20Payment%20Button/cardsboth1.gif\";\r\n\t}else{\r\n\t\t$button_url = \"https://ssl.nochex.com/Downloads/Nochex%20Payment%20Button/nochex_pay.png\";\t\r\n\t}\r\n\t\r\n\t$wpeppsubNCX_button_name = esc_attr(get_post_meta($post_id,'wpeppsubNCX_button_name',true));\r\n\t$wpeppsubNCX_button_sku = esc_attr(get_post_meta($post_id,'wpeppsubNCX_button_sku',true));\r\n\r\n\t$account = $value['merchant_id']; \r\n\t\r\n\t$testmode = $value['testmode']; \r\n\t/*$reqBilling = $value['reqBilling']; */\r\n\t$xmlMode = $value['xmlMode']; \r\n\t$hideBilling = $value['hideBillMode'];\r\n\t\t\r\n\t// account\r\n\t$account_a = esc_attr(get_post_meta($post_id,'wpeppsubNCX_button_account',true));\r\n\tif (!empty($account_a)) { $account = $account_a; }\r\n\r\n\t// custom button size\r\n\t$wpeppsubNCX_button_buttonsize = esc_attr(get_post_meta($post_id,'wpeppsubNCX_button_buttonsize',true));\r\n\t\r\n\tif ($wpeppsubNCX_button_buttonsize != \"0\") {\r\n\t\t$value['size'] = $wpeppsubNCX_button_buttonsize;\r\n\t}\r\n\t\t\r\n\t// alignment\r\n\tif ($atts['align'] == \"left\") { $alignment = \"style='float: left;'\"; }\r\n\tif ($atts['align'] == \"right\") { $alignment = \"style='float: right;'\"; }\r\n\tif ($atts['align'] == \"center\") { $alignment = \"style='margin-left: auto;margin-right: auto;width:220px'\"; }\r\n\tif (empty($atts['align'])) { $alignment = \"\"; }\r\n\t\t\r\n\t// spacing above buy button\r\n\t$spacing = \"0\";\r\n\t\r\n\tif ($atts['widget'] == \"true\") {\r\n\t\t$alignment = \"style='margin-left: auto;margin-right: auto;width:220px'\";\r\n\t}\r\n\t\t$item_description = esc_attr(get_post_meta($post_id,'wpeppsubNCX_button_description',true));\r\n\t\t\r\n\t\t\r\n\t$output = \"\";\r\n\t$output .= \"<div class='wpeppsubNCX_wrapper' style=\\\"text-align:center\\\">\";\r\n\t \r\n\t$output .= \"<div><style>.ncx label{min-width: 450px;clear: both;}</style>\r\n\t<form class=\\\"ncx\\\" action='https://secure.nochex.com/default.aspx' method='post'>\";\r\n\t$output .= \"<input type='hidden' name='merchant_id' value='$account'>\"; \r\n\t$output .= \"<label style=\\\"text-align:center;margin:0px 10px;\\\">\r\n\t\t\t\t<ul style=\\\"padding:0px;margin-left:0px;list-style:none\\\">\r\n\t\t\t\t<li style=\\\"text-align:center\\\">Reference: $wpeppsubNCX_button_name<br/><br/></li>\r\n\t\t\t\t<li style=\\\"text-align:center\\\">Item Description: $item_description<br/><br/></li>\r\n\t\t\t\t<li style=\\\"text-align:center\\\">Amount: $wpeppsubNCX_a3</li>\";\r\n\t\t\t\t\r\n\t\t\t\tif($postAmt > 0){\r\n\t\t\t\t\r\n\t$totalAmt = number_format($wpeppsubNCX_a3 + $postAmt, 2);\r\n\t$output .= \"<li style=\\\"text-align:center\\\">Postage: $postAmt<br/></li>\r\n\t\t\t\t<li style=\\\"text-align:center\\\">Total Amount: $totalAmt</li>\";\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t$output .=\t\"</ul></label>\"; \r\n\t\r\nif($testmode == 1){ \r\n\t$output .= \"<input type='hidden' name='test_transaction' value='100'>\"; \r\n}\r\n\r\nif($hideBilling == 1){\r\n\t$output .= \"<input type='hidden' name='hide_billing_details' value='true'>\"; \r\n}\r\n\r\nif (get_post_meta($post_id,'fullname',true) == 1){\r\n\techo \"<style>\r\n\t#billing_fullname{\r\n\t\tdisplay:block;\r\n\t}\r\n\t</style>\";\r\n}else{\r\n\techo \"<style>\r\n\t\t#billing_fullname{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\t\t</style>\";\r\n}\r\n\r\nif (get_post_meta($post_id,'address',true) == 1){\r\necho \"<style>\r\n\t#billing_details{\r\n\t\tdisplay:block;\r\n\t}\r\n\t</style>\";\r\n}else{\r\necho \"<style>\r\n\t#billing_details{\r\n\t\tdisplay:none;\r\n\t}\r\n\t</style>\";\r\n}\r\n\r\nif (get_post_meta($post_id,'EmailAd',true) == 1){\r\necho \"<style>\r\n\t#emailaddress{\r\n\t\tdisplay:block;\r\n\t}\r\n\t</style>\";\r\n\r\n}else{\r\n\r\necho \"<style>\r\n\t#emailaddress{\r\n\t\tdisplay:none;\r\n\t}\r\n\t</style>\";\r\n}\r\n\r\n\tif (get_post_meta($post_id,'contactNo',true) == 1){\r\n\techo \"<style>\r\n\t\t #phonenumber{\r\n\t\t\tdisplay:block;\r\n\t\t}\r\n\t\t</style>\";\r\n\t}else{\r\n\techo \"<style>\r\n\t\t #phonenumber{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\t\t</style>\";\r\n\t}\r\n\r\n\tif($xmlMode == \"1\"){\r\n\t\t$description = \"Payment for #\" . $post_id;\r\n\t\t$itemCollection = \"<items><item><id></id><name>\".$wpeppsubNCX_button_name.\"</name><description> \". $item_description .\"</description><quantity>1</quantity><price>\" . $wpeppsubNCX_a3 . \"</price></item></items>\";\r\n\t}else{ \r\n\t\t$description = $wpeppsubNCX_button_name . \" - Amount: \" . $wpeppsubNCX_a3 . \", \" . $item_description; \r\n\t\t$itemCollection = \"\";\r\n\t}\r\n \r\n\t$notify_url = add_query_arg( 'wpeppsubNCX-listener', 'IPN', home_url( 'index.php' ) );\r\n\t$success_url = add_query_arg( 'wpeppsubNCX-listener', 'SCS', home_url( 'index.php' ) );\r\n\t\r\n\t$output .= \"<div id='billing_fullname'><label>Billing Fullname: <input type='text' name='billing_fullname' autocomplete='name' value=''></label><br/></div>\"; \r\n\t$output .= \"<div id='billing_details'><label>Billing Address: <input type='text' name='billing_address' autocomplete='address-line1' value=''></label><br/><br/>\"; \r\n\t$output .= \"<label>Billing City: <input type='text' name='billing_city' autocomplete='address-level2' value=''></label><br/><br/>\"; \r\n\t$output .= \"<label>Billing Postcode: <input type='text' name='billing_postcode' autocomplete='postal-code' value=''></label><br/></div>\"; \r\n\t$output .= \"<div id='emailaddress'><label>Email Address: <input type='text' name='email_address' autocomplete='email' value=''></label><br/><br/></div>\"; \r\n\t$output .= \"<div id='phonenumber'><label>Phone Number: <input type='text' name='customer_phone_number' autocomplete='tel-national' value=''></label><br/><br/></div>\"; \t \r\n\t$output .= \"<input type='hidden' name='callback_url' value='$notify_url'>\";\r\n\t$output .= \"<input type='hidden' name='success_url' value='$success_url' />\";\t \t\r\n\t$output .= \"<input type='hidden' name='test_success_url' value='$success_url' />\";\t \r\n\t\r\n\tif($postAmt > 0){\r\n\t\t$output .= \"<input type='hidden' name='postage' value='$postAmt'>\";\r\n\t}\r\n\r\n\t$output .= \"<input type='hidden' name='amount' value='$wpeppsubNCX_a3'>\";\r\n\t$output .= \"<input type='hidden' name='optional_1' value='$post_id' />\";\t\r\n\t$output .= \"<input type='hidden' name='description' value='$description' />\";\r\n\t$output .= \"<input type='hidden' name='xml_item_collection' value='$itemCollection' />\";\r\n\t$output .= \"<label style=\\\"text-align:center;float:none;\\\"> \t\r\n\t\t\t\t<input type='submit' style=\\\"display:none;\\\" name='submit' value='Pay Now'><img src='$button_url' /></input>\t\t\t\r\n\t\t\t\t</label><br/><br/>\";\r\n\t$output .= \"</form></div>\";\r\n\t$output .= \"</div>\";\r\n\r\n\treturn $output;\r\n\t\r\n}", "function twentytwelve_store_do_shortcode( $tag, $atts = array(), $content = null ) {\n global $shortcode_tags;\n if ( ! isset( $shortcode_tags[ $tag] ) ) {\n return false;\n }\n return call_user_func( $shortcode_tags[ $tag ], $atts, $content, $tag );\n}", "public function show(SmsSwitch $smsSwitch)\n {\n //\n }", "public function register_shortcode() {\n add_shortcode( 'reveal', array( &$this, 'do_shortcode' ) );\n }", "function add_shortcode( $atts, $content, $name ) {\n\n\t\tif (! $this->validate_shortcode( $atts, $content, $name ) ) {\n return '';\n }\n\n\t\t$options = $this->set_options( $atts );\n\n\t\tob_start();\n\n\t\tif ( is_active_sidebar( $options[\"sidebar_id\"] ) ) {\n\t\t\tdynamic_sidebar( $options[\"sidebar_id\"] );\n\t\t}\n\t\telse {\n\t\t\techo \"No active \\\"\".$options[\"sidebar_id\"].\"\\\" sidebar\";\n\t\t}\n\n\t\treturn ob_get_clean();\n\t}", "function create_picontent_shortcode($atts) {\n\t// Attributes\n\t$atts = shortcode_atts(\n\t\tarray(\n\t\t\t'ids' => '',\n\t\t),\n\t\t$atts,\n\t\t'pi_content'\n\t);\n\n\t$ids = array_filter( explode(',', $atts['ids'] ) );\n $the_query = new WP_Query( array( 'post_type' => 'product', 'post__in' => $ids ) );\n\n $output = '';\n\n if ( $the_query->have_posts() ) {\n $output .= '<ul class=\"pi-content-products\">';\n while ( $the_query->have_posts() ) {\n $the_query->the_post();\n $output .= '<li><a href=\"'. get_permalink() .'\" title=\"'.the_title_attribute( 'echo=0' ).'\" rel=\"bookmark\">';\n $output .= get_the_post_thumbnail( $post_id, array(100, 100), array( 'class' => 'alignleft' ) );\n $output .= get_the_title();\n $rprice = get_post_meta( get_the_ID(), '_regular_price', true );\n $sprice = get_post_meta( get_the_ID(), '_sale_price', true );\n\n $html_price = ($sprice!=='') ? '<del>'.wc_price($rprice).'</del>'.wc_price($sprice) : wc_price($rprice);\n\n $output .= '<span class=\"pi-content-price\">'.$html_price.'</span>';\n $output .= '</a></li>';\n }\n $output .= '</ul>';\n } else {\n $output .= 'no posts found';\n }\n\n wp_reset_postdata();\n\n return $output;\n\n}", "function theme_nt_landium_section_servicestwo( $atts, $content = null ) {\r\n extract( shortcode_atts(array(\r\n\t\"section_id\"\t\t=> '',\r\n\t\"heading_display\"\t=> '',\r\n\t\"heading_align\"\t\t=> '',\r\n\t\"section_heading\"\t=> '',\r\n\t\"section_desc\"\t\t=> '',\r\n\t\"item_column\"\t\t=> '',\r\n\t\"desk_column\"\t\t=> '',\r\n\t\"desk_column_offset\"=> '',\r\n\t\"mob_column\"\t\t=> '',\r\n\t\"servicesloop\"\t\t=> '',\r\n\t\"icon_type\"\t\t\t=> '',\r\n\t\"itemimg_icon\"\t\t=> '',\r\n\t\"item_fonticon\"\t\t=> '',\r\n\t\"item_title\"\t\t=> '',\r\n\t\"item_desc\"\t\t\t=> '',\r\n\t\"sectionbgcss\"\t\t=> '',\r\n\t//custom style\r\n\t\"customstyle\"\t\t=> '',\r\n\t\"currentitem\"\t\t=> '',\r\n\t\"animation\"\t\t\t=> '',\r\n\t\"size\"\t\t\t\t=> '',\r\n\t\"lineh\"\t\t\t\t=> '',\r\n\t\"weight\"\t\t\t=> '',\r\n\t\"color\"\t\t\t\t=> '',\r\n\t\"position\"\t\t\t=> '',\r\n\t\"bgcolor\"\t\t\t=> '',\r\n\t\"padtop\"\t\t\t=> '',\r\n\t\"padright\"\t\t\t=> '',\r\n\t\"padbottom\"\t\t\t=> '',\r\n\t\"padleft\"\t\t\t=> '',\r\n\t\"brdtop\"\t\t\t=> '',\r\n\t\"brdright\"\t\t\t=> '',\r\n\t\"brdbottom\"\t\t\t=> '',\r\n\t\"brdleft\"\t\t\t=> '',\r\n\t\"borderstyl\"\t\t=> '',\r\n\t\"bordercolor\"\t\t=> '',\r\n\t\"borderradius\"\t\t=> '',\r\n\r\n\t), $atts) );\r\n\r\n\t$sectionbg_css = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $sectionbgcss, ' ' ), $atts );\r\n\t$id = ($section_id != '') ? 'id=\"'. esc_attr($section_id) . '\"' : '';\r\n\t$services_loop = (array) vc_param_group_parse_atts($servicesloop);\r\n\r\n\t$custom_style = (array) vc_param_group_parse_atts($customstyle);\r\n\tforeach ( $custom_style as $styl ) {\r\n\t\tif ( !empty( $styl ) ){\r\n\t\t\t$currentitem= ( !empty( $styl['currentitem'] ) ) ? $styl['currentitem'] : '';\r\n\t\t\t$size \t\t= ( !empty( $styl['size'] ) ) ? $styl['size'] : '';\r\n\t\t\t$weight \t= ( !empty( $styl['weight'] ) ) ? $styl['weight'] : '';\r\n\t\t\t$lineh \t\t= ( !empty( $styl['lineh'] ) ) ? $styl['lineh'] : '';\r\n\t\t\t$color \t\t= ( !empty( $styl['color'] ) ) ? $styl['color'] : '';\r\n\t\t\t$position \t= ( !empty( $styl['position'] ) ) ? $styl['position'] : '';\r\n\t\t\t$fstyle \t= ( !empty( $styl['fstyle'] ) ) ? $styl['fstyle'] : '';\r\n\t\t\t$bgcolor \t= ( !empty( $styl['bgcolor'] ) ) ? $styl['bgcolor'] : '';\r\n\t\t\t$padtop \t= ( !empty( $styl['padtop'] ) ) ? ' padding-top:'.$styl['padtop'].';' : '';\r\n\t\t\t$padright \t= ( !empty( $styl['padright'] ) ) ? ' padding-right:'.$styl['padright'].';' : '';\r\n\t\t\t$padbottom \t= ( !empty( $styl['padbottom'] ) ) ? ' padding-bottom:'.$styl['padbottom'].';' : '';\r\n\t\t\t$padleft \t= ( !empty( $styl['padleft'] ) ) ? ' padding-left:'.$styl['padleft'].';' : '';\r\n\t\t\t$padding \t= ( $padtop || $padright || $padbottom || $padleft ) ? $padtop.$padright.$padbottom.$padleft : '';\r\n\t\t\t$brdtop \t= ( !empty( $styl['brdtop'] ) ) ? ' border-top:'.$styl['brdtop'].';' : '';\r\n\t\t\t$brdright \t= ( !empty( $styl['brdright'] ) ) ? ' border-right:'.$styl['brdright'].';' : '';\r\n\t\t\t$brdbottom \t= ( !empty( $styl['brdbottom'] ) ) ? ' border-bottom:'.$styl['brdbottom'].';' : '';\r\n\t\t\t$brdleft \t= ( !empty( $styl['brdleft'] ) ) ? ' border-left:'.$styl['brdleft'].';' : '';\r\n\t\t\t$border \t= ( $brdtop || $brdright || $brdbottom || $brdleft ) ? $brdtop.$brdright.$brdbottom.$brdleft : '';\r\n\t\t\t$borderstyl = ( !empty( $styl['borderstyl'] ) ) ? $styl['borderstyl'] : '';\r\n\t\t\t$bordercolor= ( !empty( $styl['bordercolor'] ) ) ? $styl['bordercolor'] : '';\r\n\t\t\t$borderradius= ( !empty( $styl['borderradius'] ) ) ? $styl['borderradius'] : '';\r\n\r\n\t\t\tif ( $currentitem == '1' ){\r\n\t\t\t\t$current1 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t\t$animation1 = nt_landium_animation( $styl['animation']);\r\n\t\t\t}elseif ( $currentitem == '2' ){\r\n\t\t\t\t$current2 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t\t$animation2 = nt_landium_animation( $styl['animation']);\r\n\t\t\t}elseif ( $currentitem == '3' ){\r\n\t\t\t\t$current3 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t\t$animation3 = nt_landium_animation( $styl['animation']);\r\n\t\t\t\t$imgiconclass = ' img-'.$position.'';\r\n\t\t\t}elseif ( $currentitem == '4' ){\r\n\t\t\t\t$current4 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t\t$animation4 = nt_landium_animation( $styl['animation']);\r\n\t\t\t}elseif ( $currentitem == '5' ){\r\n\t\t\t\t$current5 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t\t$animation5 = nt_landium_animation( $styl['animation']);\r\n\t\t\t}else{\r\n\t\t\t\t$current1 = $current2 = $current3 = $current4 = $current5 = $animation1 = $animation2 = $animation3 = $animation4 = $animation5 = '';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t$out = '';\r\n\r\n\t\t\t$out .= '<!-- start section -->';\r\n\t\t\t$out .= '<a '.$id.' class=\"ancor\"></a>';\r\n\t\t\t$out .= '<section class=\"section section--background-dark'.esc_attr( $sectionbg_css ).'\">';\r\n\t\t\t\t$out .= '<div class=\"container\">';\r\n\t\t\t\t$headingdisplay = $heading_display ? $heading_display : 'show';\r\n\t\t\t\t$headingalign = $heading_align ? $heading_align : 'center';\r\n\t\t\t\tif ( $headingdisplay !='hide' ) {\r\n\t\t\t\t\t$out .= '<div class=\"section-heading section-heading--center section-heading--white\">';\r\n\t\t\t\t\t\tif ( $section_heading !='' ) { $out .= '<h2 class=\"title h1'.$animation1.'\"'.$current1.'>'.landium_sanitize_data( $section_heading ).'</h2>'; }\r\n\t\t\t\t\t\tif ( $section_desc !='' ) { $out .= '<p class=\"sec-desc'.$animation2.'\"'.$current2.'>'.landium_sanitize_data( $section_desc ).'</p>'; }\r\n\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t}\r\n\t\t\t\t\t$out .= '<div class=\"list-with-icon list-with-icon--style-2\">';\r\n\t\t\t\t\t\t$out .= '<div class=\"list__inner\">';\r\n\t\t\t\t\t\t\t$out .= '<div class=\"row\">';\r\n\r\n\t\t\t\t\t\t\tif ( $item_column !='custom' ) {\r\n\t\t\t\t\t\t\t\t$itemcolumntotal = $item_column ? $item_column : 'col-sm-6 col-md-4';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif ( $item_column =='custom' ) {\r\n\t\t\t\t\t\t\t\t$deskcolumn = $desk_column ? $desk_column : 'col-md-4';\r\n\t\t\t\t\t\t\t\t$deskcolumn_offset = $desk_column_offset ? $desk_column_offset : '';\r\n\t\t\t\t\t\t\t\t$mobcolumn = $mob_column ? $mob_column : 'col-sm-6';\r\n\t\t\t\t\t\t\t\t$itemcolumn = ''.esc_attr( $deskcolumn ).' '.esc_attr( $deskcolumn_offset ).' '.esc_attr( $mobcolumn ).'';\r\n\t\t\t\t\t\t\t\t$itemcolumntotal = preg_replace('/\\s\\s+/', ' ', $itemcolumn);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tforeach ( $services_loop as $serv ) {\r\n\t\t\t\t\t\t\t\t$out .= '<!-- start item -->';\r\n\t\t\t\t\t\t\t\t$out .= '<div class=\"col-xs-12 '.$itemcolumntotal.'\">';\r\n\t\t\t\t\t\t\t\t\t$out .= '<div class=\"list__item text-center\">';\r\n\t\t\t\t\t\t\t\tif ( isset( $serv['icon_type'] ) !='' ){ $icon_type = $serv['icon_type']; } else{ $icon_type = 'fonticon'; }\r\n\t\t\t\t\t\t\t\tif ( $icon_type == 'imgicon' ){\r\n\t\t\t\t\t\t\t\t\tif ( isset( $serv['itemimg_icon'] ) !='' ){\r\n\t\t\t\t\t\t\t\t\t\t$itemimgicon = wp_get_attachment_url( $serv['itemimg_icon'],'full' );\r\n\t\t\t\t\t\t\t\t\t\t$out .= '<img class=\"list__item__ico img-responsive'.$animation3.''.$imgiconclass.'\" src=\"'.esc_url( $itemimgicon ).'\" alt=\"img-icon\" />';\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\telse{\r\n\t\t\t\t\t\t\t\t\tif ( isset( $serv['item_fonticon'] ) !='' ){$out .= '<i class=\"list__item__ico font-icon '.$serv['item_fonticon'].''.$animation3.'\"'.$current3.'></i>'; }\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif ( isset( $serv['item_title'] ) !='' ){$out .= '<h3 class=\"list__item__title'.$animation4.'\"'.$current4.'>'.$serv['item_title'].'</h3>'; }\r\n\t\t\t\t\t\t\t\t\tif ( isset( $serv['item_desc'] ) !='' ){$out .= '<p class=\"list-desc'.$animation5.'\"'.$current5.'>'.$serv['item_desc'].'</p>'; }\r\n\t\t\t\t\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t\t\t\t\t$out .= '<!-- end item -->';\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t$out .= '</div>';\r\n\t\t\t$out .= '</section>';\r\n\t\t\t$out .= '<!-- end section -->';\r\n\r\n\treturn $out;\r\n}", "public function init()\n {\n $this->shortcode->getHandlers()->add('div', function (ShortcodeInterface $sc) {\n $id = $sc->getParameter('id');\n $class = $sc->getParameter('class');\n $style = $sc->getParameter('style');\n\n $id_output = $id ? ' id=\"' . $id . '\" ' : '';\n $class_output = $class ? ' class=\"' . $class . '\"' : '';\n $style_output = $style ? ' style=\"' . $style . '\"' : '';\n\n $content = $this->parseDown->line($sc->getContent());\n\n return '<div ' . $id_output . $class_output . $style_output . '>' . $content . '</div>';\n });\n }", "function shortcode_insert_button()\n {\n $this->config['name']\t\t\t= __('Carousel With Thumbnails', 'swedenWp' );\n $this->config['tab']\t\t\t= __('Content Elements', 'swedenWp' );\n $this->config['icon']\t\t\t= swedenBuilder::$path['imagesURL'].\"sc-postslider.png\";\n $this->config['order']\t\t\t= 2;\n $this->config['target']\t\t\t= 'avia-target-insert';\n $this->config['shortcode'] \t\t= 'sw_thumb_nav_carousel';\n $this->config['shortcode_nested'] = array('sw_thumb_carousel_slide');\n $this->config['tooltip'] \t = __('Display a carousel element with thumb navigation', 'swedenWp' );\n }", "public function bp_customersubnav_tab_action() {\n\t\techo \\do_shortcode( '[elementor-template id=\"36015\"]' );\n\t}", "function htheme_launch_shortcode( $atts ) {\r\n\r\n\t\t#SETUP CONTENT CLASS\r\n\t\t$htheme_data = $this->htheme_content->htheme_get_content_launch($atts);\r\n\r\n\t\t#RETURN DATA/HTML\r\n\t\treturn $htheme_data;\r\n\r\n\t}", "function zp_shortcode_label(){\r\n\r\n$zp_shortcode_label = array(\r\n\t// Acccordion \r\n\t'accordion' => array(\r\n\t\t'menu' => __('Accordion','drone' ),\r\n\t\t'header_title' => __( 'Insert Accordion Shortcode','drone'),\r\n\t\t'content' => array()\r\n\t),\r\n\t// Team\r\n\t'team' => array(\r\n\t\t'menu' => __('Team','drone' ),\r\n\t\t'header_title' => __( 'Insert Team Shortcode','drone'),\r\n\t\t'content' => array(\t)\r\n\t),\r\n\t// Blog \r\n\t'blog' => array(\r\n\t\t'menu' => __('Blog','drone' ),\r\n\t\t'header_title' => __( 'Insert Blog Shortcode','drone'),\r\n\t\t'content' => array()\r\n\t),\r\n\t\r\n\t// Buttons \r\n\t'buttons' => array(\r\n\t\t'menu' => __('Button','drone' ),\r\n\t\t'header_title' => __( 'Insert Button Shortcode','drone'),\r\n\t\t'content' => array(\r\n\t\t\t'type' => array(\r\n\t\t\t\t'label' => __( 'Type','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Select type for buttons.','drone' ),\r\n\t\t\t\t'values' => array( 'btn-default', 'btn-primary', 'btn-success', 'btn-info','btn-warning','btn-danger','btn-inverse' )\r\n\t\t\t),\r\n\t\t\t'size' => array(\r\n\t\t\t\t'label' => __( 'Size','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Select button size.','drone' ),\r\n\t\t\t\t'values' => array( 'Large', 'Medium', 'Small','Extra Small' )\r\n\t\t\t),\r\n\t\t\t'outline' => array(\r\n\t\t\t\t'label' => __( 'Outline Style','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Select true if you want to have an outline button.','drone' ),\r\n\t\t\t\t'values' => array( 'True', 'False')\r\n\t\t\t),\r\n\t\t\t'button_link' => array(\r\n\t\t\t\t'label' => __( 'Button Link','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add button link.','drone' )\r\n\t\t\t),\r\n\t\t\t'button_label' => array(\r\n\t\t\t\t'label' => __( 'Button Name','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add button name.','drone' )\r\n\t\t\t),\r\n\t\t\t'button_target' => array(\r\n\t\t\t\t'label' => __( 'Link Target','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Select button link target.','drone' ),\r\n\t\t\t\t'values' => array( '_blank', '_self', '_top', '_parent' )\r\n\t\t\t)\r\n\t\t)\r\n\t),\r\n\t// Portfolio \r\n\t'portfolio' => array(\r\n\t\t'menu' => __('Portfolio','drone' ),\r\n\t\t'header_title' => __( 'Insert Portfolio Shortcode','drone'),\r\n\t\t'content' => array(\r\n\t\t\t'preselect_cat' => array(\r\n\t\t\t\t'label' => __( 'Pre-select Category','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Category that will be loaded first in portfolio section. Leave empty to display all items.','drone' ),\r\n\t\t\t),\r\n\t\t\t'lightbox' => array(\r\n\t\t\t\t'label' => __( 'Enable Lightbox','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Select true to enable portfolio lightbox, false to enable portfolio link.','drone' ),\r\n\t\t\t\t'values' => array( 'True', 'False')\r\n\t\t\t)\r\n\t\t)\r\n\t),\r\n\t// Testimonial \r\n\t'testimonial' => array(\r\n\t\t'menu' => __('Testimonial','drone' ),\r\n\t\t'header_title' => __( 'Insert Testimonial Shortcode','drone'),\r\n\t\t'content' => array()\r\n\t),\r\n\t// Services \r\n\t'services' => array(\r\n\t\t'menu' => __('Service','drone' ),\r\n\t\t'header_title' => __( 'Insert Service Shortcode','drone'),\r\n\t\t'content' => array()\r\n\t),\r\n\t// Progress Bar \r\n\t'progress' => array(\r\n\t\t'menu' => __('Progress Bar','drone' ),\r\n\t\t'header_title' => __( 'Insert Progress Bar Shortcode','drone'),\r\n\t\t'content' => array()\r\n\t),\r\n\t// Columns \r\n\t'columns' => array(\r\n\t\t'menu' => __('Columns','drone' ),\r\n\t\t'header_title' => __( 'Insert column Shortcode','drone'),\r\n\t\t'content' => array(\t),\r\n\t\t'submenu' => array(\r\n\t\t\t'one_half' => __('One Half','drone' ),\r\n\t\t\t'one_third' => __('One Third','drone' ),\r\n\t\t\t'one_fourth' => __('One Fourth','drone' ),\r\n\t\t\t'column_grid_1' => __('Column Grid 1','drone' ),\r\n\t\t\t'column_grid_2' => __('Column Grid 2','drone' ),\r\n\t\t\t'column_grid_3' => __('Column Grid 3','drone' ),\r\n\t\t\t'column_grid_4' => __('Column Grid 4','drone' ),\r\n\t\t\t'column_grid_5' => __('Column Grid 5','drone' ),\r\n\t\t\t'column_grid_6' => __('Column Grid 6','drone' ),\r\n\t\t\t'column_grid_7' => __('Column Grid 7','drone' ),\r\n\t\t\t'column_grid_8' => __('Column Grid 8','drone' ),\r\n\t\t\t'column_grid_9' => __('Column Grid 9','drone' ),\r\n\t\t\t'column_grid_10' => __('Column Grid 10','drone' ),\r\n\t\t\t'column_grid_11' => __('Column Grid 11','drone' ),\r\n\t\t\t'column_grid_12' => __('Column Grid 12','drone' ),\r\n\t\t)\r\n\r\n\t),\r\n\t// Tabs \r\n\t'tab' => array(\r\n\t\t'menu' => __('Tab','drone' ),\r\n\t\t'header_title' => __( 'Insert Tab Shortcode','drone'),\r\n\t\t'content' => array(\r\n\t\t\t'id1' => array(\r\n\t\t\t\t'label' => __( 'First Tab ID','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add first tab ID. This must be unique and one word only.','drone' )\r\n\t\t\t),\r\n\t\t\t'title1' => array(\r\n\t\t\t\t'label' => __( 'First Tab Title','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add first tab title.','drone' )\r\n\t\t\t),\r\n\t\t\t'content1' => array(\r\n\t\t\t\t'label' => __( 'First Tab Content','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add first tab content.','drone' )\r\n\t\t\t),\r\n\t\t\t'id2' => array(\r\n\t\t\t\t'label' => __( 'Second Tab ID','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add second tab ID. This must be unique and one word only.','drone' )\r\n\t\t\t),\r\n\t\t\t'title2' => array(\r\n\t\t\t\t'label' => __( 'Second Tab Title','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add second tab title.','drone' )\r\n\t\t\t),\r\n\t\t\t'content2' => array(\r\n\t\t\t\t'label' => __( 'Second Tab Content','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add second tab content.','drone' )\r\n\t\t\t),\r\n\t\t\t'id3' => array(\r\n\t\t\t\t'label' => __( 'Third Tab ID','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add third tab ID. This must be unique and one word only.','drone' )\r\n\t\t\t),\r\n\t\t\t'title3' => array(\r\n\t\t\t\t'label' => __( 'Third Tab Title','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add third tab title.','drone' )\r\n\t\t\t),\r\n\t\t\t'content3' => array(\r\n\t\t\t\t'label' => __( 'Third Tab Content','drone' ),\r\n\t\t\t\t'tooltip' => __( 'Add third tab content.','drone' )\r\n\t\t\t),\r\n\t\t\t\r\n\t\t)\r\n\t),\r\n\t// Client Carousel\r\n\t'client_carousel' => array(\r\n\t\t'menu' => __('Client Carousel','drone' ),\r\n\t\t'header_title' => __( 'Insert Client Carousel Shortcode','drone'),\r\n\t\t'content' => array(\r\n\t\t\t'name' => array(\r\n\t\t\t\t'label' => __( 'Add Carousel Name','drone' ),\r\n\t\t\t\t'tooltip' => __( 'This serves as carousel ID. It must be unique and avoid using spaces. Ex. \"client_carousel\".','drone' )\r\n\t\t\t)\t\t\t\r\n\t\t)\r\n\t),\r\n\t// Slider\r\n\t'slider' => array(\r\n\t\t'menu' => __('Slider','drone' ),\r\n\t\t'header_title' => __( 'Insert Slider Shortcode','drone'),\r\n\t\t'content' => array(\t)\r\n\t)\r\n);\r\n\r\nreturn $zp_shortcode_label;\r\n}", "public function bp_productssubnav_tab_action() {\n\t\techo $this->get_instance( \\MyVideoRoomExtrasParking\\Library\\SectionTemplates::class )->control_panel_store_products();\n\t}", "function rental_options_product_tab_content() {\n\tglobal $post;\n\t?><div id='rental_options' class='panel woocommerce_options_panel'><?php\n\t\t?><div class='options_group'><?php\n\t\t\twoocommerce_wp_checkbox( array(\n\t\t\t\t'id' \t\t=> '_enable_option',\n\t\t\t\t'label' \t=> __( 'Enable rental option X', 'woocommerce' ),\n\t\t\t) );\n\t\t\twoocommerce_wp_text_input( array(\n\t\t\t\t'id'\t\t\t=> '_text_input_y',\n\t\t\t\t'label'\t\t\t=> __( 'What is the value of Y', 'woocommerce' ),\n\t\t\t\t'desc_tip'\t\t=> 'true',\n\t\t\t\t'description'\t=> __( 'A handy description field', 'woocommerce' ),\n\t\t\t\t'type' \t\t\t=> 'text',\n\t\t\t) );\n\t\t?></div>\n\n\t</div><?php\n}", "function wp_stripe_shortcode($atts) {\n\n\t$options = get_option('wp_stripe_options');\n\n\t$settings = '?keepThis=true&TB_iframe=true&height=580&width=400';\n\t$path = WP_STRIPE_PATH . '/includes/stripe-iframe.php' . $settings;\n\t$count = 1;\n\n\tif ($options['stripe_modal_ssl'] == 'Yes') {\n\t\t$path = str_replace(\"http://\", \"https://\", $path, $count);\n\t}\n\n\textract(shortcode_atts(array(\n\t\t\t\t'cards' => 'true'\n\t\t\t\t\t), $atts));\n\n\tif ($cards == 'true') {\n\t\t$payments = '<div id=\"wp-stripe-types\"></div>';\n\t}\n\n\treturn '<a class=\"thickbox\" id=\"wp-stripe-modal-button\" title=\"' . $options['stripe_header'] . '\" href=\"' . $path . '\">' . $options['stripe_header'] . '</a>' . $payments;\n}", "function thmplt_bootstrap_carousel_shortcode($atts){\r\n\r\n\t\textract( shortcode_atts( array(\r\n\t\t'ID' => 'tpf_carousel', // \r\n\t\t'legacy' => 'on'\t\r\n\t\t//'excerpt' => ''\r\n\t), $atts ) );\r\n\t\r\n\treturn thmplt_do_carousel_slides($ID, false, $legacy);\r\n\t\r\n}", "function handleShortcode($atts = [], $content = null, $tag = '') {\n\n if (is_admin()){\n return;\n }\n \n $vueRootUrl = plugin_dir_url( __FILE__ ) . 'dist';\n $vueFileRoot = plugin_dir_path( __FILE__) . 'dist';\n\n $jsCore = ['bootstrap.min.js', 'jquery-3.3.1.min.js', 'popper.min.js'];\n\n // Find the build files\n $jsMatches = glob(plugin_dir_path( __FILE__) . 'dist/js/*.*.js');\n $cssMatches = glob(plugin_dir_path( __FILE__) . 'dist/css/*.*.css');\n\n // Bring in core dependencies first\n\n $isLocal = true;\n\n if ($isLocal){\n\n //wp_deregister_script('jquery');\n\n //wp_register_script('actiontracker_vuecore_jquery', $vueRootUrl . '/js/jquery-3.3.1.min.js', false, null, true);\n\n wp_register_script('actiontracker_vuecore_popper', $vueRootUrl . '/js/popper.min.js', false, null, true);\n wp_register_script('actiontracker_vuecore_bootstrap4', $vueRootUrl . '/js/bootstrap.min.js', false, null, true);\n \n foreach ($jsMatches as $i => $jsItem) {\n if (!in_array(basename($jsItem), $jsCore)){\n $url = $vueRootUrl . '/js/' . basename($jsItem);\n $name = \"actiontracker_vuejs_\".$i;\n if (!wp_script_is($name, 'enqueued')){\n //print_r('BUILD JS: ' . $jsItem . '<br/>');\n wp_register_script($name, $url);\n wp_enqueue_script($name); \n }\n }\n }\n \n foreach ($cssMatches as $i => $cssItem) { \n $url = $vueRootUrl . '/css/' . basename($cssItem);\n $name = \"actiontracker_vuecss_\".$i;\n if (!wp_script_is($name, 'enqueued')){\n //print_r('CSS JS: ' . $i . '<br/>');\n wp_register_style($name, $url);\n wp_enqueue_style($name); \n }\n \n }\n\n }\n else {\n\n wp_register_script('actiontracker_vuecore_popper', 'http://app.actiontracker.org/js/popper.min.js', false, null, true);\n wp_register_script('actiontracker_vuecore_bootstrap4', 'http://app.actiontracker.org/js/bootstrap.min.js', false, null, true);\n \n //wp_enqueue_script('actiontracker_vuecore_jquery');\n wp_enqueue_script('actiontracker_vuecore_popper');\n wp_enqueue_script('actiontracker_vuecore_bootstrap4');\n \n }\n\n\n \n \n\n /*\n\n */\n \n // Handle short code params\n\n if (array_key_exists('view', $atts)) {\n $str = \"<div class='actionTrackerVuePlugin' view='\".$atts['view'].\"'>You need Javascript for this feature, sorry.</div>\"; \n }\n else {\n $str = \"<div class='actionTrackerVuePlugin' view='all'>You need Javascript for this feature, sorry.</div>\"; \n }\n\n return $str;\n }", "public function run()\n {\n return $this->render('v-tabs-switch', []);\n }", "function ts_run_shortcode( $content ) {\r\r\n global $shortcode_tags;\r\r\n \r\r\n // Backup current registered shortcodes and clear them all out\r\r\n $orig_shortcode_tags = $shortcode_tags;\r\r\n remove_all_shortcodes();\r\r\n \r\r\n add_shortcode('accordions', 'ts_accordions');\r\r\n\tadd_shortcode('accordion', 'ts_accordion');\r\r\n\t\r\r\n\tadd_shortcode('one_half', 'ts_one_half');\r\r\n\tadd_shortcode('one_third', 'ts_one_third');\r\r\n\tadd_shortcode('one_fourth', 'ts_one_fourth');\r\r\n\tadd_shortcode('one_fifth', 'ts_one_fifth');\r\r\n\tadd_shortcode('one_sixth', 'ts_one_sixth');\r\r\n\t\r\r\n\tadd_shortcode('two_third', 'ts_two_third');\r\r\n\tadd_shortcode('two_fourth', 'ts_two_fourth');\r\r\n\tadd_shortcode('two_fifth', 'ts_two_fifth');\r\r\n\tadd_shortcode('two_sixth', 'ts_two_sixth');\r\r\n\t\r\r\n\t\r\r\n\tadd_shortcode('three_fourth', 'ts_three_fourth');\r\r\n\tadd_shortcode('three_fifth', 'ts_three_fifth');\r\r\n\tadd_shortcode('three_sixth', 'ts_three_sixth');\r\r\n\t\r\r\n\tadd_shortcode('four_fifth', 'ts_four_fifth');\r\r\n\tadd_shortcode('four_sixth', 'ts_four_sixth');\r\r\n\t\r\r\n\tadd_shortcode('five_sixth', 'ts_five_sixth');\r\r\n\t\r\r\n\tadd_shortcode('content_box', 'ts_content_box');\r\r\n\t\r\r\n\tadd_shortcode('content_highlight', 'ts_content_highlight');\r\r\n\t\r\r\n\tadd_shortcode( 'dropcap', 'ts_dropcap' );\r\r\n\t\r\r\n\tadd_shortcode( 'highlight', 'ts_highlight' );\r\r\n\t\r\r\n\tadd_shortcode('pre', 'ts_pre');\r\r\n\t\r\r\n\tadd_shortcode( 'pullquote', 'ts_pullquote' );\r\r\n\tadd_shortcode( 'blockquote', 'ts_blockquote' );\r\r\n\t\r\r\n\tadd_shortcode( 'recent_posts', 'ts_recentposts' );\r\r\n\t\r\r\n\tadd_shortcode('separator', 'ts_separator');\r\r\n\tadd_shortcode('clear', 'ts_clearfloat');\r\r\n\tadd_shortcode('clearfix', 'ts_clearfixfloat');\r\r\n\t\r\r\n\tadd_shortcode('social', 'ts_socialshortcode');\r\r\n\t\r\r\n\tadd_shortcode('tabs', 'ts_tab');\r\r\n\t\r\r\n\tadd_shortcode('toggles', 'ts_toggles');\r\r\n\tadd_shortcode('toggle', 'ts_toggle');\r\r\n \r\r\n // Do the shortcode (only the one above is registered)\r\r\n $content = do_shortcode( $content );\r\r\n \r\r\n // Put the original shortcodes back\r\r\n $shortcode_tags = $orig_shortcode_tags;\r\r\n \r\r\n return $content;\r\r\n}", "function simple_pricing_tables_shortcode() {\n\n ob_start(); \n \n // prefix\n $prefix = '_simple_';\n \n ?>\n\n <div class=\"all-simple-pricing-tables\">\n <?php\n \n $simple_pricing_tables_query = new WP_Query( [\n 'post_type' => 'simple-pricing-table',\n 'posts_per_page' => '3',\n ] );\n\n while ( $simple_pricing_tables_query -> have_posts() ) : $simple_pricing_tables_query -> the_post();\n \n ?>\n <div class=\"simple-pricing-table\">\n <div class=\"pricing-titles\">\n <h3 class=\"pricing-title\"><?php echo get_post_meta( get_the_id(), '_simple_pricing_tables_field_title', true ); ?></h3>\n <p><?php echo get_post_meta( get_the_id(), $prefix . 'pricing_tables_field_subtitle', true ); ?></p>\n </div>\n <div class=\"pricing-content\">\n <?php\n\n // if ( !empty( get_post_meta( get_the_id(), $prefix . 'pricing_tables_field_fields', true ) ) )\n // echo '<i class=\"fas fa-check-square\"></i>'; \n $value = get_post_meta( get_the_id(), $prefix . 'pricing_tables_field_fields', true );\n echo $value; \n ?>\n </div>\n <div class=\"pricing-duration\">\n <p>\n $<span><?php echo get_post_meta( get_the_id(), $prefix . 'pricing_tables_field_price', true ); ?></span>\n / <?php \n \n $options = get_post_meta( get_the_id(), $prefix . 'pricing_tables_field_duration' ); \n foreach( $options as $option )\n echo $option;\n \n ?>\n </p>\n </div>\n <div class=\"pricing-button\">\n <a href=\"<?php echo get_post_meta( get_the_id(), $prefix . 'pricing_tables_field_button_link', true ); ?>\"><?php echo get_post_meta( get_the_id(), $prefix . 'pricing_tables_field_button', true ); ?></a>\n </div>\n </div>\n\n <?php endwhile; ?>\n\n </div>\n\n <?php return ob_get_clean();\n\n }", "public function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"toggle-switch-control\">\n\t\t\t\t<div class=\"toggle-switch\">\n\t\t\t\t\t<input type=\"checkbox\" id=\"<?php echo esc_attr( $this->id ); ?>\" name=\"<?php echo esc_attr( $this->id ); ?>\" class=\"toggle-switch-checkbox\" value=\"<?php echo esc_attr( $this->value() ); ?>\"\n\t\t\t\t\t<?php\n\t\t\t\t\t$this->link();\n\t\t\t\t\tchecked( $this->value() );\n\t\t\t\t\t?>\n\t\t\t\t\t>\n\t\t\t\t\t<label class=\"toggle-switch-label\" for=\"<?php echo esc_attr( $this->id ); ?>\">\n\t\t\t\t\t\t<span class=\"toggle-switch-inner\"></span>\n\t\t\t\t\t\t<span class=\"toggle-switch-switch\"></span>\n\t\t\t\t\t</label>\n\t\t\t\t</div>\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "function drubo_brand_slider_func($atts,$content){\nob_start();\n $drubo_shortcode_atts = shortcode_atts(array(\n 'slide' => '',\n // css\n 'custom_css' => '',\n 'custom_css_class' => '',\n ),$atts); \n extract($drubo_shortcode_atts);\n\n //custom class\t\t\n\t$wrap_class = apply_filters( 'kc-el-class', $atts );\n\tif( !empty( $custom_class ) ):\n\t \t$wrap_class[] = $custom_class;\n endif;\n\t$extra_class = implode( ' ', $wrap_class );\t\n?>\n<div class=\"<?php echo $extra_class; ?> <?php echo $custom_css_class; ?>\">\n\n\n\t<div class=\"brand-carsoul\">\n\n<?php foreach ($slide as $key => $value) { ?>\n\t\t<!-- Brand Single -->\n\t\t<div class=\"col-md-12\">\n\t\t\t<div class=\"brand-single\">\n\t\t\t\t<a href=\"<?php echo empty($value->url) ? '#' : $value->url; ?>\">\n\t\t\t<img src=\"<?php \n\t\t\t$image_size = apply_filters('','large');\n\t\t\t$img_src = wp_get_attachment_image_src($value->image , $image_size)[0]; \n\t\t\techo $img_src;\n\n\t\t\t?>\" alt=\"\" /></a>\n\t\t\t</div>\n\t\t</div>\n\t\t<!-- Brand Single -->\n<?php } ?>\n\n\n\n\t</div>\n\n</div>\n<?php\n return ob_get_clean();\n}", "public function addEngineSwitch(CliSwitch $switch)\n\t{\n\t\t$this->engineSwitches[$switch->name] = $switch;\n\t}", "public function __construct(){\r\n\t\t\t\r\n\t\t\tadd_filter( 'woocommerce_shortcode_products_query', array( $this, 'dahz_framework_shortcode_products_query' ), 10, 3 );\r\n\t\t\t\r\n\t\t\t//add_action( \"woocommerce_shortcode_after_products_loop\", array( $this, 'dahz_framework_shortcode_after_products_loop' ), 10, 1 );\r\n\r\n\t\t}", "function flex_video_shortcode($atts, $content = NULL) {\n $a = shortcode_atts( array(\n 'aspect' => ''\n ), $atts );\n $aspect = ($a['aspect'] == 'standard') ? '' : 'widescreen';\n $content = '<div class=\"flexvideo '.$aspect.'\">'.$content.'</div>';\n return $content;\n}", "function khLess_shortcodes_init()\n{\n function khLess_shortcode($atts = [], $content = null)\n {\n get_template_part('template', 'schedule');\n }\n\n add_shortcode('khLess', 'khLess_shortcode');\n}", "function do_shortcode($content, $ignore_html = \\false)\n {\n }", "function ahs_callposts_activate(){\n add_option('ahscp_css', \".callposts_2col .post { float: left; margin-right: 20px; border-bottom: 1px solid #999; overflow: hidden; clear: none; }\\n.callposts_2col .post h3 { margin-bottom: 0; }\\n.callposts_2col .clr { height: 20px; }\\n.callposts.whitespace { background: #fff; width: 225px; float: right; margin-right: -10px; padding: 0 0 10px 10px; }\\n.callposts .floatbox { background-color: #eee; padding: 15px; float: right; margin: 10px -10px 10px 10px;}\\n.clr { clear: both; }\");\n\n add_option('ahscp_tmplnum', '3');\n add_option('ahscp_tmpl_1_title', 'Simple linked titles list');\n add_option('ahscp_tmpl_1_group', '1');\n add_option('ahscp_tmpl_1_text', '<li><a href=\"%%URL%%\">%%TITLE%%</a> %%EDITLINK%%</li>');\n add_option('ahscp_tmpl_2_title', 'Just title and full content');\n add_option('ahscp_tmpl_2_text', \"<div class=\\\"post\\\">\n<h3>%%TITLE%% %%EDITLINK%%</h3>\n<p>%%CONTENT%%</p>\n</div>\");\n add_option('ahscp_tmpl_3_title', 'Linked title, image, excerpt and continue link');\n add_option('ahscp_tmpl_3_text', \"<div class=\\\"post %%CATEGORY%%\\\">\n<h3><a href=\\\"%%URL%%\\\">%%TITLE%%</a> %%EDITLINK%%</h3>\n%%IMAGE%%<p>%%EXCERPT%%...<a href=\\\"%%URL%%\\\">More...</a></p>\n</div>\");\n}", "function render_sc_myShortcode( $context ) {\n\tob_start();\n\t?>\n<div>Some: <?=$context['disp1']?></div>\n<div>Another: <?=$context['disp2']?></div>\n<?php\n\treturn ob_get_clean();\n}", "function btn_shortcode( $atts, $content = null ) {\n $a = shortcode_atts( array(\n 'href' => '#'\n ), $atts );\n \n return '<a class=\"button\" href=\"' . esc_attr($a['href']) . '\">' . $content . '</a>';\n}", "function ex_divi_child_theme_setup() {\n\n if ( class_exists('ET_Builder_Module')) {\n\n class ET_Builder_Module_Image2 extends ET_Builder_Module {\n function init() {\n $this->name = __( 'Banner Image', 'et_builder' );\n $this->slug = 'et_pb_image2';\n // a whole bunch of php code that defines how the class functions\n \n \n }\n }\n $et_builder_module_image2 = new ET_Builder_Module_Image2();\n add_shortcode( 'et_pb_image2', array($et_builder_module_image2, '_shortcode_callback') );\n\n }\n\n}", "function field_switch( $block, $content = '', $is_preview = false, $post_id = 0 ) {\n\t\t// var_dump($block['name']);\n\tglobal $context;\n\tswitch ( $block['name'] ) {\n\n\t\tcase 'acf/cc-graf':\n\t\t\tfield( 'btxt' );\n\t\t\trender( 'basic_text' );\n\t\t\tbreak;\n\n\t\tcase 'acf/cc-hero-banner':\n\t\t\tfield( 'dimensions' );\n\t\t\tfield( 'tagline' );\n\t\t\t$context['fields']['image'] = '';\n\t\t\tif ( $image_id = get_field( 'image' ) ) {\n\t\t\t\t$context['fields']['image'] = new Timber\\Image( $image_id );\n\t\t\t}\n\t\t\tfield( 'cards' );\n\t\t\trender( 'hero_banner' );\n\t\t\tbreak;\n\t}\n}", "function youtubeJStoFrontHead(){\n\n\n\n // require_once(dirname(__FILE__).'/../../peepso-core/activity/classes/activity.php');\n // $newAcctive = new PeepSoActivity;\n // echo 'test function output: ' . $newAcctive->test() . '<br/>';\n\n $button_image = get_option( 'button_image' );\n\n if(get_option( 'custom_button' ) == 1){\n echo '<style>\n .oembed .start-video {\n background: url('.$button_image.') no-repeat;\n height: 24%;\n width: 14%;\n left: 43%;\n top: 38%; \n position: absolute;\n cursor: pointer;\n z-index: 9;\n background-size: contain !important;\n }\n </style>';\n }else{\n echo '<style>\n .oembed .start-video { \n display: none;\n }\n </style>';\n }\n\n }", "function my_shortcode() {\n\n$options = get_option('foodrecipecptplugin_settings');\nreturn \"<p>Recipe Name:\" . $options['foodrecipecptplugin_text_field_0'] . \"</p>\".\"<p>Category: \" . $options['foodrecipecptplugin_text_field_1'].\"</p>\".\"<p>Ingredients: \". $options['foodrecipecptplugin_text_field_2'].\"</p>\".\"<p>Recipe Instructions: \" . $options['foodrecipecptplugin_text_field_3'] . \"</p>\";\n}", "public function integrateWithVC() {\n if ( ! defined( 'WPB_VC_VERSION' ) ) {\n // Display notice that Visual Compser is required\n add_action('admin_notices', array( $this, 'showVcVersionNotice' ));\n return;\n }\n\n vc_map( array(\n \"name\" => __(\"Responsive Website Preview\", 'responsive_website_preview'),\n \"description\" => __(\"Show your website on a mobile device\", 'responsive_website_preview'),\n \"base\" => \"vc_responsive_website_preview\",\n \"class\" => \"\",\n \"controls\" => \"full\",\n \"category\" => __('Responsive Website Preview', 'responsive_website_preview'),\n \"icon\" => 'vc_extend_rwp',\n \"params\" => array(\n array(\n \"type\" => \"textfield\",\n \"holder\" => \"div\",\n \"class\" => \"\",\n \"heading\" => __(\"URL\", 'responsive_website_preview'),\n \"param_name\" => \"url\",\n \"value\" => '',\n \"description\" => __(\"Specify an URL to load on device\", 'responsive_website_preview'),\n \t),\n array(\n \"type\" => \"dropdown\",\n \"holder\" => \"div\",\n \"class\" => \"\",\n \"heading\" => __(\"Device type\", 'responsive_website_preview'),\n \"param_name\" => \"device\",\n \"value\" => array(\n \t__(\"Select a device\", 'responsive_website_preview') => '',\n \t__(\"iPhone 6\", 'responsive_website_preview') => 'iphone6',\n \t__(\"iPad Air\", 'responsive_website_preview') => 'ipadair',\n ),\n \"description\" => __(\"Please select a device to show\", 'responsive_website_preview'),\n \t),\n array(\n \"type\" => \"textfield\",\n \"holder\" => \"div\",\n \"class\" => \"\",\n \"heading\" => __(\"Scale\", 'responsive_website_preview'),\n \"param_name\" => \"scale\",\n \"value\" => '1',\n \"description\" => __(\"Please specify a scale level. 1 is full-size device, 0.5 is half-size.\", 'responsive_website_preview'),\n \t),\n array(\n \"type\" => \"checkbox\",\n \"holder\" => \"div\",\n \"class\" => \"\",\n \"heading\" => __(\"Disable navigation\", 'responsive_website_preview'),\n \"param_name\" => \"disable-navigation\",\n \"value\" => false,\n \"description\" => __(\"Check if you want to prevent navigation on device.\", 'responsive_website_preview'),\n \t),\n array(\n \"type\" => \"textfield\",\n \"holder\" => \"div\",\n \"class\" => \"\",\n \"heading\" => __(\"Element ID\", 'responsive_website_preview'),\n \"param_name\" => \"id\",\n \"value\" => '',\n \"description\" => __(\"Enter row ID (Note: make sure it is unique and valid according to <a href=\\\"http://www.w3schools.com/tags/att_global_id.asp\\\" target=\\\"_blank\\\">w3c specification</a>\", 'responsive_website_preview'),\n \t),\n array(\n \"type\" => \"textfield\",\n \"holder\" => \"div\",\n \"class\" => \"\",\n \"heading\" => __(\"Extra class name\", 'responsive_website_preview'),\n \"param_name\" => \"class\",\n \"value\" => '',\n \"description\" => __(\"Style particular content element differently - add a class name and refer to it in custom CSS.\", 'responsive_website_preview'),\n \t),\n )\n ) );\n }", "function fl_shortcode_call( $atts, $content=null, $code=\"\" ) {\n\tglobal $lightbox;\n\t\n\textract( shortcode_atts( array(\n\t\t'title' => 'form lightbox',\n\t\t'class'\t=> '1',\n\t), $atts ) );\n\t\n\t$title = ( $title !== '' ) ? ' title=\"' . $title . '\"' : '';\n\n\t$output = '<a href=\"#\" class=\"fl_box-' . $class . '\"' . $title . '>' . do_shortcode($content) . '</a>';\n\n\treturn $output;\n}", "function custom_dashboard_widget() {\r\n\tif ( get_current_screen()->base !== 'dashboard' ) {\r\n\t\treturn;\r\n\t}\r\n\t?>\r\n\r\n\t<div id=\"custom-id\" class=\"welcome-panel\" style=\"display: none;\">\r\n\t\t<div class=\"welcome-panel-content\">\r\n\t\t\t<p><?php echo do_shortcode( '[fl_builder_insert_layout slug=\"dashboard\" type=\"fl-builder-template\"]' ); ?></p>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<script>\r\n\t\tjQuery(document).ready(function($) {\r\n\t\t\t$('#welcome-panel').after($('#custom-id').show());\r\n\t\t});\r\n\t</script>\r\n\r\n<?php }", "function CreateSliderButton($setting, $isChecked, $onClick) {\n\t\t $checked = ($isChecked ? 'checked' : '');\n\t\t $onClick = (($onClick === '') ? '' : ' onClick=\"'.$onClick.'\"');\n\n\t\t $content =\n\t\t\t \"<div id='{$setting}_div' class='onoffswitch-block'>\" .\n\t\t\t \"<span class='onoffswitch-pretext'>{$this->addon->options['label_for_map_toggle']}</span>\" .\n\t\t\t \"<div class='onoffswitch'>\" .\n\t\t\t \"<input type='checkbox' name='onoffswitch' class='onoffswitch-checkbox' id='{$setting}-checkbox' $checked>\" .\n\t\t\t \"<label class='onoffswitch-label' for='{$setting}-checkbox' $onClick>\" .\n\t\t\t '<div class=\"onoffswitch-inner\"></div>'.\n\t\t\t \"<div class='onoffswitch-switch'></div>\".\n\t\t\t '</label>'.\n\t\t\t '</div>' .\n\t\t\t '</div>';\n\t\t return $content;\n\t }", "public function settingssubtab_render_main_screen_function() {\n\t\t\\add_action( 'bp_template_content', array( $this, 'bp_settingssubnav_tab_action' ) );\n\t\t\\bp_core_load_template( \\apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t// echo do_shortcode ( '[youzer_groups per_page=\"10\"]' );\n\t}", "function uxbannerShortcode( $atts, $content = null ){\n global $flatsome_opt;\n $bannerid = rand();\n extract( shortcode_atts( array(\n 'text_pos' => 'center',\n 'height' => '300px',\n 'text_color' => 'light',\n 'link' => '',\n 'text_width' => '60%',\n 'text_align' => 'center',\n 'text_box' => '',\n 'animation' => 'fadeIn',\n 'animation_duration' => '',\n 'effect' => '',\n 'video_mp4' => '',\n 'video_ogg' => '',\n 'video_webm' => '',\n 'video_sound' => 'false',\n 'hover' => '',\n 'bg' => '', \n 'parallax' => '',\n 'parallax_text' => '',\n 'text_bg' => '',\n 'text_bg_opacity' => '0.8',\n 'padding' => '30px',\n 'callout' => '',\n 'callout_size' => 'small',\n 'data_height' => '',\n 'target' => '',\n ), $atts ) );\n\n ob_start();\n\n // replace ___ with a nice divider\n $fix = array (\n '&nbsp;' => '', \n '<p></p>' => '', \n '<p>[' => '[', \n ']</p>' => ']', \n ']<br />' => ']',\n '_____' => '<div class=\"tx-div large\"></div>',\n '____' => '<div class=\"tx-div medium\"></div>',\n '___' => '<div class=\"tx-div small\"></div>',\n );\n $content = strtr($content, $fix);\n\n $content = do_shortcode( $content ); \n\n $img_link = get_template_directory_uri().'/img/';\n\n $color = \"light\";\n if($text_color == 'light') $color = \"dark\";\n\n if($hover) $hover = 'hover_'.$hover;\n\n $animated = \"\";\n if($animation != \"none\") $animated = \"animated\";\n\n $start_link = \"\";\n $end_link = \"\";\n if($link) {$start_link = '<a href=\"'.$link.'\"';\n if ($target) {\n $start_link .= ' target=\"'.$target.'\" ';\n }\n $start_link .= '>';\n $end_link = '</a>';};\n\n $background = \"\";\n $background_color = \"\";\n if (strpos($bg,'http://') !== false || strpos($bg,'https://') !== false) {\n $background = $bg;\n }\n elseif (strpos($bg,'#') !== false) {\n $background_color = 'background-color:'.$bg.'!important';\n }\n else {\n $bg = wp_get_attachment_image_src($bg, 'large');\n $background = $bg[0];\n }\n\n $textalign = \"\";\n if($text_align) {$textalign = \"text-\".$text_align;}\n\n /* set rgba background */\n if($text_bg){$text_bg = hex2rgba($text_bg,$text_bg_opacity); };\n \n $parallax_class = '';\n if($parallax){$parallax_class = 'ux_parallax'; $parallax='data-velocity=\"'.(intval($parallax)/10).'\"';} \n \n $text_parallax_class = '';\n if($parallax_text){$text_parallax_class = 'parallax_text'; $parallax_text='data-velocity=\"'.(intval($parallax_text)/10).'\"';} \n \n ?>\n \n <div id=\"banner_<?php echo $bannerid; ?>\" class=\"ux_banner <?php if($text_box)echo 'ux-textbox-'.$text_box; ?> <?php echo $color; ?> <?php echo $hover; ?>\" style=\"height:<?php echo $height; ?>\" data-height=\"<?php echo $height; ?>\" role=\"banner\">\n <?php echo $start_link; ?>\n <div class=\"banner-bg zig <?php echo $parallax_class; ?>\" <?php echo $parallax; ?> style=\"background-image:url(<?php echo $background; ?>); <?php echo $background_color; ?>\"></div>\n <?php if($video_mp4 || $video_webm || $video_ogg){ ?>\n <div class=\"video-overlay\" style=\"position:absolute;top:0;bottom:0;right:0;left:0;z-index:2;background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0IxQjNGRDQ0QUMxMTFFMzhBQzM5OUZBMEEzN0Y1RUUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0IxQjNGRDU0QUMxMTFFMzhBQzM5OUZBMEEzN0Y1RUUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpFN0M5QzFENzRBQTcxMUUzOEFDMzk5RkEwQTM3RjVFRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpFN0M5QzFEODRBQTcxMUUzOEFDMzk5RkEwQTM3RjVFRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PhPF5GwAAAAYSURBVHjaYmJgYPD6//8/AyOIAAGAAAMAPRIGSKhmMMMAAAAASUVORK5CYII=');\"></div>\n <video class=\"ux-banner-video hide-for-small\" <?php echo $parallax; ?> style=\"position:absolute;top:0;left:0;bottom:0;right:0;min-width: 100%;min-height: 100%;z-index:1;\" poster=\"<?php echo $background; ?>\" preload=\"auto\" autoplay=\"\" loop=\"loop\" <?php if($video_sound == 'false') echo \"muted='muted'\"; ?>>\n <source src=\"<?php echo $video_mp4; ?>\" type=\"video/mp4\">\n <source src=\"<?php echo $video_webm; ?>\" type=\"video/webm\">\n <source src=\"<?php echo $video_ogg; ?>\" type=\"video/ogg\">\n </video>\n <?php } ?>\n <?php if($effect){ ?>\n <div class=\"banner-effect\"></div>\n <?php } ?>\n <div class=\"row parallax_text <?php echo $text_parallax_class; ?>\" <?php echo $parallax_text; ?>>\n <div class=\"inner <?php echo $text_pos; ?> <?php echo $animated; ?> <?php echo $textalign; ?> <?php if($text_box){echo 'text-boxed';} ?>\n\" data-animate=\"<?php echo $animation; ?>\" style=\"width:<?php echo $text_width; ?>; <?php if($text_bg){echo 'background-color:'.$text_bg.';';} ?> <?php if($text_bg){echo 'padding:'.$padding;} ?>\">\n <?php echo $content; ?>\n <?php if($callout) { ?> \n <div class=\"callout <?php echo $flatsome_opt['bubble_style']; ?>\">\n <div class=\"inner\">\n <div class=\"inner-text\"><?php echo $callout; ?></div>\n </div>\n </div><!-- end callout -->\n <?php } ?>\n </div> \n </div>\n <?php echo $end_link; ?>\n <?php if($animation_duration){ ?><style>#banner_<?php echo $bannerid; ?> .inner{ animation-duration:<?php echo $animation_duration; ?> ; -webkit-animation-duration:<?php echo $animation_duration; ?> ; -moz-animation-duration:<?php echo $animation_duration; ?> ; -o-animation-duration:<?php echo $animation_duration; ?>; } </style><?php } // End animation duration ?>\n\n<?php // EFFECTS // ?>\n<?php if($effect){ ?>\n<?php if($effect === 'snow'){ ?>\n<style>\n@keyframes snow { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px, 300px 300px }\n}\n@-moz-keyframes snow { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px, 300px 300px }\n}\n@-webkit-keyframes snow { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% {background-position: 500px 1000px, 400px 400px, 300px 300px;\n }\n}\n@-ms-keyframes snow { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px, 300px 300px }\n}\n#banner_<?php echo $bannerid; ?> .banner-effect {\n background-image:url('<?php echo get_template_directory_uri(); ?>/css/effects/snow1.png'),\n url('<?php echo get_template_directory_uri(); ?>/css/effects/snow2.png'); \n -webkit-animation: snow 20s linear infinite;\n -moz-animation: snow 20s linear infinite;\n -ms-animation: snow 20s linear infinite;\n animation: snow 20s linear infinite;\n}\n</style>\n<?php } // End snow effect ?>\n\n\n<?php if($effect === 'confetti'){ ?>\n<style>\n@keyframes confetti { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px, 300px 300px }\n}\n@-moz-keyframes confetti { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px, 300px 300px }\n}\n@-webkit-keyframes confetti { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}\n}\n@-ms-keyframes confetti { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n\n 100% { background-position: 500px 1000px, 400px 400px, 300px 300px }\n}\n#banner_<?php echo $bannerid; ?> .banner-effect {\n background-image:url('<?php echo get_template_directory_uri(); ?>/css/effects/confetti1.png'),\n url('<?php echo get_template_directory_uri(); ?>/css/effects/confetti2.png'); \n -webkit-animation: confetti 10s linear infinite;\n -moz-animation: confetti 10s linear infinite;\n -ms-animation: confetti 10s linear infinite;\n animation: confetti 10s linear infinite;\n}\n</style>\n<?php } // End confetti effect ?>\n\n<?php if($effect === \"sliding-glass\"){ ?>\n<style>\n@keyframes glass { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px}\n}\n@-moz-keyframes glass { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n\n 100% { background-position: 500px 1000px, 400px 400px}\n}\n@-webkit-keyframes glass { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% {background-position: 500px 1000px, -400px -400px; }\n}\n@-ms-keyframes glass { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px }\n}\n#banner_<?php echo $bannerid; ?> .banner-effect {\n background-image:url('<?php echo get_template_directory_uri(); ?>/css/effects/glass1.png'),\n url('<?php echo get_template_directory_uri(); ?>/css/effects/glass2.png'); \n -webkit-animation: glass 30s linear infinite;\n -moz-animation: glass 30s linear infinite;\n -ms-animation: glass 30s linear infinite;\n animation: glass 30s linear infinite;\n}\n</style>\n<?php } // End sliding glass effect ?>\n\n\n<?php if($effect === 'sparkle'){ ?>\n<style>\n@keyframes sparkle { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: -500px -1000px, -400px -400px, 300px 300px }\n}\n@-moz-keyframes sparkle { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: -500px -1000px, -400px -400px, 300px 300px }\n}\n@-webkit-keyframes sparkle { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% {background-position: -500px -1000px, -200px -400px, 300px 300px;\n }\n}\n@-ms-keyframes sparkle { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: -500px -1000px, -400px -400px, 300px 300px }\n}\n#banner_<?php echo $bannerid; ?> .banner-effect {\n background-image:url('<?php echo get_template_directory_uri(); ?>/css/effects/sparkle1.png'),\n url('<?php echo get_template_directory_uri(); ?>/css/effects/sparkle2.png');\n -webkit-animation: sparkle 60s linear infinite;\n -moz-animation: sparkle 60s linear infinite;\n -ms-animation: sparkle 60s linear infinite;\n animation: sparkle 60s linear infinite;\n}\n</style>\n<?php } // End sparkle effect ?>\n\n\n\n<?php if($effect === 'rain'){ ?>\n<style>\n@keyframes rain { \n 0% { background-position: 0px 0px }\n 100% { background-position: 500px 1000px }\n}\n@-moz-keyframes rain { \n 0% { background-position: 0px 0px }\n 100% { background-position: 500px 1000px }\n}\n@-webkit-keyframes rain { \n 0% { background-position: 0px 0px }\n 100% {background-position: 500px 1000px;\n }\n}\n@-ms-keyframes rain { \n 0% { background-position: 0px 0px}\n 100% { background-position: 500px 1000px}\n}\n#banner_<?php echo $bannerid; ?> .banner-effect {\n background-image:url('<?php echo get_template_directory_uri(); ?>/css/effects/rain.png');\n -webkit-animation: rain 2s linear infinite;\n -moz-animation: rain 2s linear infinite;\n -ms-animation: rain 2s linear infinite;\n animation: rain 2s linear infinite;\n}\n</style>\n<?php } // End sparkle effect ?>\n<?php } ?>\n\n\n\n</div><!-- end .ux_banner -->\n\n<?php \n\n $content = ob_get_contents();\n ob_end_clean();\n return $content;\n \n}", "public function add_short_code()\n {\n add_shortcode('colorYourLife', array($this, 'generate_short_code_content'));\n }", "public static function showWebformShortCode($atts)\n\t{\n\t\t$params = shortcode_atts(array(\n\t\t\t'url' => 'null',\n\t\t\t'css' => 'on',\n\t\t\t'center' => 'off',\n\t\t\t'center_margin' => '200',\n\t\t\t'variant' => ''\n\t\t), $atts);\n\n\t\t$div_start = $div_end = '';\n\t\tif ($params['center'] == 'on')\n\t\t{\n\t\t\t$div_start = '<div style=\"margin-left: auto; margin-right: auto; width: ' . $params['center_margin'] . 'px;\">';\n\t\t\t$div_end = '</div>';\n\t\t}\n\n\t\t$css = ($params['css'] == \"off\") ? htmlspecialchars(\"&css=1\") : \"\";\n\n\t\t$variant_maps = array('A' => 0, 'B' => 1, 'C' => 2, 'D' => 3, 'E' => 4, 'F' => 5, 'G' => 6, 'H' => 7);\n\t\t$params['variant'] = strtoupper($params['variant']);\n\t\t$variant = (in_array($params['variant'], array_keys($variant_maps))) ? htmlspecialchars(\"&v=\" . $variant_maps[$params['variant']]) : \"\";\n\n\t\t$params['url'] = self::replaceHttpsToHttpIfSslOn($params['url']);\n\n\t\treturn $div_start . '<script type=\"text/javascript\" src=\"' . $params['url'] . $css . $variant . '\"></script>' . $div_end;\n\t}", "private function register_shortcode(CommentIQ_Shortcode_ShortcodeInterface $shortcode)\n {\n add_shortcode($shortcode::get_name(), array($shortcode, 'generate_output'));\n }", "function shortcode_insert_button()\n {\n $this->config['name']\t\t\t= __('Section Divider', 'swedenWp' );\n $this->config['tab']\t\t\t= __('Content Elements', 'swedenWp' );\n $this->config['icon']\t\t\t= swedenBuilder::$path['imagesURL'].\"sc-hr.png\";\n $this->config['order']\t\t\t= 16;\n $this->config['target']\t\t\t= 'avia-target-insert';\n $this->config['shortcode'] \t\t= 'sw_section_divider';\n $this->config['modal_data'] = array('modal_class' => 'mediumscreen');\n $this->config['tooltip'] = __('Creates a custom gallery', 'swedenWp' );\n }", "function module_callout_box_function($atts, $content, $tag){\r\n\treturn '<div class=\"mod-section-block-callout\">' . do_shortcode($content) . '</div>';\r\n}", "function cyon_toggle( $atts, $content = null ) {\n\t$atts = shortcode_atts(\n\t\tarray(\n\t\t\t'title' \t\t=> __( 'Title Here' , 'cyon' ),\n\t\t\t'icon'\t\t\t=> '',\n\t\t\t'active'\t\t=> false\n\t\t), $atts);\n\t\t\n\t$icon = '';\n\tif($atts['icon']){\n\t\t$icon = '<span class=\"icon-'.$atts['icon'].'\"></span>';\n\t}\n\t$active = '';\n\tif($atts['active']) {\n\t\t$active = ' toggle-active';\n\t}\n\t$toggle_content .= '<div class=\"toggle'.$active.'\"><h3 class=\"toggle-title\">' . $icon . $atts['title'] . '</h3><div class=\"toggle-wrapper\"><div class=\"toggle-content clearfix\">'. do_shortcode( $content ) . '</div></div></div>';\n\treturn $toggle_content;\n}" ]
[ "0.71515334", "0.56276035", "0.55906737", "0.54101384", "0.5379348", "0.5356283", "0.53303295", "0.5304273", "0.5285399", "0.5285045", "0.5284752", "0.5260563", "0.52409726", "0.52369136", "0.5236848", "0.52091396", "0.52060884", "0.5192828", "0.5189148", "0.5186522", "0.5163454", "0.515446", "0.51390743", "0.51340884", "0.51306194", "0.51272124", "0.5105228", "0.50969297", "0.50771415", "0.50715274", "0.5070196", "0.5069881", "0.5053447", "0.5050764", "0.5046427", "0.504523", "0.5043113", "0.504155", "0.50336313", "0.50314915", "0.5016298", "0.50073993", "0.49941742", "0.49941", "0.49925622", "0.49865234", "0.49785873", "0.49688306", "0.49684212", "0.49671364", "0.49084917", "0.49046034", "0.49023223", "0.48927888", "0.48897937", "0.48813993", "0.487893", "0.4873899", "0.48685947", "0.48647782", "0.4861579", "0.48604962", "0.4859838", "0.48474953", "0.4845396", "0.48452437", "0.48425695", "0.48420915", "0.4842052", "0.48377693", "0.48303583", "0.48265177", "0.4823081", "0.4820318", "0.48198116", "0.48161075", "0.48088095", "0.48086572", "0.4802289", "0.4796444", "0.47911072", "0.47901687", "0.47794405", "0.4778544", "0.47753143", "0.47704926", "0.47703", "0.47681615", "0.47665077", "0.47595266", "0.47492656", "0.47444102", "0.4743471", "0.47417945", "0.4733316", "0.47229606", "0.47213104", "0.47193855", "0.47150198", "0.47149727" ]
0.81297636
0
Serializes message to string
public function serialize($messageName, $arguments, array $meta = array()) { return serialize([ $messageName, $arguments, $meta ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __toString()\n\t{\n\t\treturn (string) $this->message;\n\t}", "public function __toString()\n {\n return (string) $this->message;\n }", "public function __toString(): string\n {\n return $this->message;\n }", "public static function serializeMessage($message)\n {\n return json_encode($message);\n }", "public function serialize()\n {\n $result = array();\n\n foreach ($this->getKeys() as $k => $v) {\n $result[] = $k.': '.$v;\n }\n\n foreach ($this->getVariables() as $k => $v) {\n if (is_array($v)) {\n foreach ($v as $singleValue) {\n $result[] = $this->serializeVariable($k, $singleValue);\n }\n } else {\n $result[] = $this->serializeVariable($k, $v);\n }\n }\n\n return $this->finishMessage(implode(self::EOL, $result));\n }", "function serialise(): string;", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function __tostring()\n {\n $res = __CLASS__ . \": [{$this->code}]: {$this->message}\";\n $res.= ': ' . $this->_storage->id . '\\n';\n return $res;\n }", "public function __toString()\n\t{\n\t\t$str = '' ;\n\t\tif ($this->code != 0) {\n\t\t\t$str .= $this->code . ': ';\n\t\t}\n\t\treturn $str . $this->message;\n\t}", "public function toMessage(): array;", "final public function serialize(): string\n {\n return \\serialize($this);\n }", "public function serialize(): string\n {\n return $this->toRawString();\n }", "public function __toString()\n {\n $str = $this->getType().': ';\n\n if ($this->code != 0) {\n $str .= $this->code.': ';\n }\n\n return $str.$this->message;\n }", "public function serialize();", "public function serialize();", "public function serialize();", "public function write($message)\n {\n return (string) $this->getAdapter()->write($message);\n }", "public abstract function serialize();", "public function __toString()\n {\n return (string) $this->getMessage();\n }", "public function write(string $message);", "public function __toString()\n {\n return sprintf(\n '%s:%s#%s(%s)',\n $this->queue,\n $this->class,\n $this->id,\n empty($this->data) ? '' : json_encode($this->data)\n );\n }", "public function serialize(): string\n {\n return serialize($this->toArray());\n }", "public function __toString()\n {\n return \"[Message] \" . $this->getMessage();\n }", "abstract public function serialize();", "abstract public function serialize();", "public function __toString() {\n if ($this->code) {\n return \"[{$this->code}] {$this->message}\\n\";\n } else {\n return \"{$this->message}\\n\";\n }\n }", "public function serialize():String {\n\n\t\treturn json_encode($this->data);\n\n\t}", "public function writeMessage($message);", "public function toString() : void\n {\n $out = serialize($this);\n \n }", "public function serialize()\n {\n }", "public function serialize()\n {\n }", "public function jsonSerialize()\n\t{\n\t\treturn $this->getTranslatedMessage();\n\t}", "public function serialize(){ }", "public function __toString() {\n if ($this->code) {\n return \"{$this->code} - {$this->message}\";\n }\n return \"{$this->message}\";\n }", "public function write($message);", "function networkSerialize() : string{\n\t\treturn \"\\x00\" . $this->ids . $this->data . $this->skyLight . $this->blockLight;\n\t}", "public function __toString(): string\n {\n return $this->getBody();\n }", "public function __toString()\n {\n return (string) $this->exportTo(JadwalPeer::DEFAULT_STRING_FORMAT);\n }", "function write($message);", "public function __toString(): string\n {\n return serialize($this->toArray());\n }", "public function __toString()\n\t{\n\t\treturn $this->serialize();\n\t}", "abstract function write ($message);", "public function serialize()\n {\n // TODO: Implement serialize() method.\n }", "public function __toString() {\n return (string) $this->buffer;\n }", "public function toMessages();", "public function __toString() {\n return \": [{$this->message}]: {$this->body}\\n\";\n }", "public function __toString()\n {\n return (string) $this->getBody();\n }", "private function _serialize()\r\n {\r\n $values = array(count($this->_items));\r\n foreach ($this->_items as $item)\r\n {\r\n $itemArr = $item->asArray();\r\n foreach ($this->_struct as $key)\r\n {\r\n $values[] = is_null($itemArr[$key]) ? '---' : $itemArr[$key];\r\n }\r\n }\r\n if ($this->getDeliveryGrossAmount() > 0)\r\n {\r\n $values[0]++;\r\n $values[] = 'Delivery';\r\n $values[] = 1;\r\n $values[] = number_format($this->getDeliveryNetAmount(), 2);\r\n $values[] = number_format($this->getDeliveryTaxAmount(), 2);\r\n $values[] = number_format($this->getDeliveryGrossAmount(), 2);\r\n $values[] = number_format($this->getDeliveryGrossAmount(), 2);\r\n }\r\n\r\n return implode(':', $values);\r\n }", "public function __toString(): string\n {\n return $this->toJson();\n }", "public function __toString() {\n\n $payload = (string) $this->payload;\n\n if (empty($payload) || $payload === \"{}\") {\n return (string) $this->header;\n }\n return sprintf('%s.%s', $this->header, $payload);\n }", "public function json_encode() : string {\n $obj = new stdClass();\n $obj->id = $this->_id;\n $obj->from = $this->_from;\n $obj->fromName = $this->_fromName;\n $obj->subject = $this->_subject;\n $obj->isPhishing = $this->_isPhishing;\n $obj->userAnswer = $this->_userAnswer;\n\n return $this->json_encode($obj);\n }", "public function __toString()\n {\n return $this->getMessage();\n }", "public function __toString()\n {\n return $this->getMessage();\n }", "public function __toString(): string\n {\n return $this->toJSON();\n }", "public function serialize()\n {\n return serialize($this->text);\n }", "public function __toString()\n {\n return __CLASS__.\": [{$this->code}]: {$this->message}\".\\PHP_EOL;\n }", "public function dump()\n {\n return implode('', array_map(function (Message $message) {\n return $message->formatted();\n }, $this->getMessages()));\n }", "public function toMessageTypeObject() {}", "public function __toString() {\n\t\tif (!empty($this->message) and $this->errNum != 0) {\n\t\t\treturn 'Response: ' . $this->errNum . ': ' . $this->message;\n\t\t} else {\n\t\t\treturn 'Response: No Error: 0';\n\t\t}\n\t}", "public function __toString()\n {\n return (string) $this->exportTo(EventPeer::DEFAULT_STRING_FORMAT);\n }", "function __toString(){\n\treturn serialize($this->__data);\n\t}", "public function serialize()\r\n {\r\n $data = $this->toArray();\r\n\r\n return serialize($data);\r\n }", "public function __toString(){\r\n\t\t$data = serialize($this->_data);\r\n\t\t// Obfuscate the data with base64 encoding\r\n\t\t$data = base64_encode($data);\r\n\t\treturn $data;\r\n\t}", "public function __toString()\n {\n try {\n ob_start();\n $this->sendBody();\n\n return ob_get_clean();\n } catch (\\Exception $e) {\n return 'Exception: ' . $e->getMessage();\n }\n }", "public function serialize()\n {\n // Interface for convenience.\n return serialize($this->__serialize());\n }", "public function serialize()\n {\n return serialize($this->data);\n }", "public function serialize()\n {\n return serialize($this->data);\n }", "public function toSerial() {\n\t\treturn serialize($this->toArray());\n\t}", "public function __toString(){\n // Registro JSon\n\t\treturn \"{\" \n\t\t . chr(34) . \"Id\" . chr(34) . \":\" . chr(34) . $this->getId() . chr(34) \n\t\t . \",\" . chr(34) . \"Cliente\" . chr(34) . \":\" . chr(34) . $this->getCliente() . chr(34) \n\t\t . \",\" . chr(34) . \"Mensaje\" . chr(34) . \":\" . chr(34) . $this->getMensaje() . chr(34) \n\t\t . \",\" . chr(34) . \"Autor\" . chr(34) . \":\" . chr(34) . $this->getAutor() . chr(34) \n\t\t . \"}\";\n \t\t}", "public function __toString()\n {\n return (string) $this->exportTo(SekolahPaudPeer::DEFAULT_STRING_FORMAT);\n }", "public function __toString()\n {\n $this->to = $this->_to;\n if (isset($this->_from)) {\n $this->from = $this->_from;\n }\n\n return $this->unescapeJSON(json_encode($this));\n }", "public function binarySerialize();", "public function SerializeObject () {\n return serialize ($this);\n }", "public function __toString ( ) {\n\n return $this->getStream()->__toString();\n }", "public function __toString(): string {\n return $this->saveXML();\n }", "public function serialize($data): string\n {\n switch ($this->method) {\n case self::METHOD_IGBINARY:\n return igbinary_serialize($data) ?: '';\n\n case self::METHOD_JSON:\n return json_encode($data) ?: '';\n\n default:\n return serialize($data) ?: '';\n }\n }", "public function __toString(): string\n {\n return $this->toPEM()->string();\n }", "private function _writeMessage()\n {\n if (!is_callable($this->fetchData)) {\n return;\n }\n\n $message = '';\n $message .= sprintf('id: %s', $this->id++ . PHP_EOL);\n $message .= sprintf('retry: %s', $this->retryTime * 1000 . PHP_EOL);\n $message .= sprintf('data: %s', call_user_func($this->fetchData) . PHP_EOL);\n\n if (!empty($this->eventName)) {\n $message .= sprintf('event: %s', $this->eventName . PHP_EOL);\n }\n\n echo $message . PHP_EOL;\n }", "public function __toString(){\r\n\t\t$res = array();\r\n\t\tif (!empty($this->_errorMessage)){\r\n\t\t\t$res['errorMessage'] = $this->_errorMessage;\r\n\t\t}\r\n\t\tif (!empty($this->_move)){\r\n\t\t\t$res['move'] = $this->_move;\r\n\t\t}\r\n\t\treturn json_encode($res);\r\n\t}", "public function __toString() {\r\n $mensaje = \"CLASE PEDIDO\";\r\n return $mensaje;\r\n }", "public function __toString()\n {\n return __CLASS__.\": [{$this->code}]: {$this->message}\\n\";\n }", "public function serialize()\n {\n $data = array();\n foreach( $this->toSerialize as $var ) { $data[ $var ] = $this->$var; }\n return serialize( $data );\n }", "public function __tostring();", "public static function toString($msg) {\n\t\tif (!is_string($msg)) {\n\t\t\treturn print_r($msg, true);\n\t\t}\n\n\t\treturn $msg;\n\t}", "public function __toString() {\n return \"{ \" . $this->id .\n \", \" . $this->parent_id .\n \", \" . $this->post_id .\n \", \" . $this->username .\n \", \" . $this->message .\n \", \" . $this->timestamp .\n \", \" . $this->ip .\n \", \" . $this->is_deleted .\n \", \" . $this->is_hidden .\n \" }\";\n }", "public function serialize()\n {\n return serialize([\n 'sessionId' => $this->sessionId,\n 'convAdminInfo' => $this->convAdminInfo,\n 'verifyResult' => $this->verifyResult,\n ]);\n }", "public function __toString()\n {\n return (string) $this->exportTo(SanitasiPeer::DEFAULT_STRING_FORMAT);\n }", "public function __toString()\n {\n return (string) $this->exportTo(BangunanPeer::DEFAULT_STRING_FORMAT);\n }", "public function __toString(): string\n {\n $result = [];\n foreach ($this->headers as $name => $value) {\n $result[] = $name . ': ' . $value;\n }\n\n return join(\"\\r\\n\", $result);\n }", "public function __toString () {\n return $this->encode();\n }", "public function __toString()\n {\n return $this->parseB($this->setToString(\n $this->getClassName($this->getClass()),\n Helpers::parseSpace($this->parseBr($this->parseUl($this->parseCode($this->message))))\n ));\n }", "public function __toString() {\n return $this->toJson($this->data);\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 return serialize($this->getData());\n }" ]
[ "0.72173166", "0.71530956", "0.701513", "0.7006077", "0.6817962", "0.67001814", "0.6525483", "0.6525483", "0.6525483", "0.6525483", "0.6525483", "0.6525483", "0.6525413", "0.6525413", "0.65134627", "0.6455436", "0.64310306", "0.6411574", "0.63971573", "0.6392268", "0.6373016", "0.6373016", "0.6373016", "0.63345534", "0.63143295", "0.6312495", "0.63003385", "0.628315", "0.62127966", "0.6195465", "0.61907023", "0.61907023", "0.6171746", "0.61470985", "0.6145318", "0.6144488", "0.6099786", "0.6099786", "0.6099597", "0.6094199", "0.60741824", "0.6067605", "0.6056604", "0.60427856", "0.60412455", "0.60268515", "0.6014708", "0.6007921", "0.5990542", "0.59889627", "0.59706813", "0.5957716", "0.59561265", "0.5947765", "0.5946044", "0.59343785", "0.5921961", "0.59144473", "0.5911061", "0.5911061", "0.5903362", "0.58967865", "0.5896339", "0.5887922", "0.58775187", "0.58771616", "0.5870564", "0.58633834", "0.5861222", "0.58438", "0.58409816", "0.5835144", "0.5820514", "0.5820514", "0.5817503", "0.5816949", "0.5814733", "0.58109", "0.58066934", "0.5804875", "0.58036155", "0.5792313", "0.5786914", "0.577577", "0.57724184", "0.5765765", "0.5764935", "0.5760144", "0.57558525", "0.5733482", "0.57264286", "0.5723832", "0.5721267", "0.5717772", "0.5716975", "0.5716908", "0.5713446", "0.5708759", "0.570261", "0.5701116", "0.5683089" ]
0.0
-1
Unserializes message string to array, which contains message name and its arguments
public function unserialize($messageSerialized) { return unserialize($messageSerialized); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function decomposeMsg (string $msg) : array {\n\t\tif (($pos = strpos ($msg, ':')) === false || ($command = \\DataLib::isInt (substr ($msg, 0, $pos))) === false || !Command::isCommand ($command)) {\n\t\t\treturn [ Command::INVALID ];\n\t\t}\n\t\treturn [\n\t\t\t$command,\n\t\t\tjson_decode (substr ($msg, $pos + 1), true)\n\t\t];\n\t}", "abstract public static function decode($string): array;", "public function toMessage(): array;", "protected function processFrom(string $string): array\n {\n return \\json_decode($string, true);\n }", "public function nativeMessageProcessing($message): array\n\t{\n\t\treturn $message;\n\t}", "protected function unpack(string $payload)\n {\n return \\unserialize($payload);\n }", "private function multi_byte_string_to_array()\n {\n $this->strings = array_values(\n array_filter(\n preg_split(\"//u\",$this->string),\n \"strlen\"\n )\n );\n }", "public static function unserializeMessagePayload($payload)\n {\n $message = json_decode($payload, true);\n if (json_last_error() === JSON_ERROR_NONE) {\n return $message;\n }\n\n return $payload;\n }", "public function deserialize(array $data): void\n {\n $this->id = $data['id'];\n $this->backendId = $data['backendId'];\n $this->queue = $data['queue'];\n $this->arguments = (array) unserialize($data['arguments']); # unserialize object and convert to []\n $this->attempts = $data['attempts'];\n $this->enqueued = $data['enqueued'];\n $this->serialized = $data['serialized'];\n }", "function ParseMsg($msg) {\n\t$parts = explode(\"&\",$msg);\n\t$result = array();\n\tforeach($parts as $i => $value) {\n\t\t$bits = explode(\"=\", $value, 2);\n\t\t$result[$bits[0]] = urldecode($bits[1]);\n\t}\n\n\treturn $result;\n}", "public function unserialize($string)\n {\n $result = array();\n parse_str($string, $result);\n\n return $result;\n }", "public function unserialize(string $serializedData): array\n {\n $encodedFields = $this->serializer->unserialize($serializedData);\n\n if (!is_array($encodedFields)) {\n throw new \\InvalidArgumentException('Unable to unserialize value.');\n }\n\n $formData = [];\n foreach ($encodedFields as $item) {\n $decodedFieldData = [];\n parse_str($item, $decodedFieldData);\n $formData = array_replace_recursive($formData, $decodedFieldData);\n }\n\n return $formData;\n }", "public static function fromString($raw_message = null, $class_name = null) {}", "function unserialize($str)\n{\n}", "public function getAsArray() {\n return $this->message;\n }", "function l10n_feedback_unpack_string($string) {\n return explode(\"\\0\", $string);\n}", "public function transform(Message $message)\n {\n return $message->toArray();\n }", "function MBunserialize($serial_str)\n{\n $serial_str = preg_replace_callback('!s:(\\d+):\"(.*?)\";!s', function($match){return 's:'.strlen($match['2']).':\"'.$match['2'] . '\";';}, $serial_str);\n $serial_str= str_replace(\"\\r\", \"\", $serial_str);\n return unserialize($serial_str);\n}", "public static function parseArgs($args) {\n if (preg_match_all ( \"/([^\\\\[^\\\\]]+)/\", $args, $matches )) {\n $params = explode ( ',', $matches [1] [0] );\n $toReturn = array ( );\n foreach ( $params as $p ) {\n @list ( $key, $value ) = explode ( '=>', $p );\n $toReturn [preg_replace ( \"/[\\\\' ]+/\", \"\", $key )] = preg_replace ( \"/[\\\\' ]+/\", \"\", $value );\n }\n return $toReturn;\n }\n return $args;\n }", "public static function unpackStringToArray($format, $str)\n {\n return array_values(unpack($format, $str));\n }", "public function __unserialize(array $data): void\n {\n $this->createFromArray($data);\n }", "function deserialise(string $data): void;", "public function __construct($message)\r\n\t{\r\n\t\tparent::__construct('[php-array-parser] ' . $message);\r\n\t}", "public function parseMessage($str)\n\t{\n\t\t$strExp = explode(':', $str);\n\n\t\t$nick = explode('!', $strExp[1])[0];\n\t\tunset($strExp[0]);\n\t\tunset($strExp[1]);\n\t\t$message = implode(':', $strExp);\n\n\t\treturn array('nick' => $nick, 'content' => $message);\n\t}", "public function parseRequest($message);", "public function __unserialize(array $data): void\n {\n $this->name = $data['name'];\n }", "protected function _translateArgs(array $args): array\n {\n foreach ($args as $k => $arg) {\n if (is_string($arg)) {\n $args[$k] = __d($this->_validationDomain, $arg);\n }\n }\n\n return $args;\n }", "private function getPayloadParser(array $message)\n {\n if (isset($message['Body']) === true) {\n $body = \\GuzzleHttp\\json_decode($message['Body'], true);\n if (isset($body['Type']) === true && $body['Type'] === 'Notification') {\n return new SqsSnsPayloadParser();\n }\n }\n\n return new SqsStandardPayloadParser();\n }", "public function parse(): array\n {\n // Text.\n if ($this->type === 'text') {\n return [\n 'text' => $this->message,\n ];\n }\n\n // Template.\n if ($this->type === 'template') {\n $payload = Arr::get($this->message, 'attachments.0.payload');\n\n // Generic template.\n if (Arr::get($payload, 'template_type') === 'generic') {\n return [\n 'generic' => $this->parseGenericTempalte($payload),\n ];\n }\n }\n\n // Image\n if ($this->type === 'image') {\n $payload = Arr::get($this->message, 'attachments.0.payload');\n return [\n 'image' => $this->parseImageAttachment($payload),\n ];\n }\n\n // This for unsupported messages.\n return [];\n }", "function __unserialize($sObject) {\n\t$__ret =preg_replace('!s:(\\d+):\"(.*?)\";!e', \"'s:'.strlen('$2').':\\\"$2\\\";'\", $sObject );\n\treturn unserialize($__ret);\n}", "public function unserialize($data) {}", "private function ParseMsg($msg) {\n\t\t$parts = explode(\"&\",$msg);\n\t\t$result = array();\n\t\tforeach($parts as $i => $value) {\n\t\t\t$bits = explode(\"=\", $value, 2);\n\t\t\t$result[$bits[0]] = urldecode($bits[1]);\n\t\t}\n\n\t\treturn $result;\n\t}", "public function deserializeAll(string $data);", "static function MessageToArray($Message = null)\r\n {\r\n if ($Message === null)\r\n {\r\n return null;\r\n }\r\n else\r\n {\r\n $MessageArray = array();\r\n\r\n $MessageArray['id'] = $Message->getId(); \r\n $MessageArray['contest'] = $Message->getContest();\r\n $MessageArray['idUserFrom'] = $Message->getIdUserFrom();\r\n $MessageArray['idUserTo'] = $Message->getIdUserTo();\r\n $MessageArray['seen'] = $Message->getSeen();\r\n $MessageArray['received'] = $Message->getReceived();\r\n $MessageArray['time'] = $Message->getTime();\r\n\r\n return $MessageArray;\r\n }\r\n }", "public function parseFromArray()\n {\n $this->value = $this->reader->next();\n }", "private function cleaningAttrFromMsg($msg):array{\n\n $return = [\n 'msg' => $msg,\n 'behavior' => null\n ];\n\n if(strpos($msg, '{alert}:') === 0){\n $return['msg'] = substr($msg, 8);\n $return['behavior'] = 'alert';\n }\n\n return $return;\n }", "public function getMessageData()\n {\n return (array) array();\n }", "public function fromString(string $string): array;", "public function reverseTransform($string) {\n\t\t\treturn json_decode($string);\n\t\t}", "public function fromString($string)\n {\n if (empty($string)) {\n return array();\n }\n\n return \\Zend\\Json\\Json::decode(\n $string,\n \\Zend\\Json\\Json::TYPE_ARRAY\n );\n }", "private function handleMessageLength(string $message): array\n {\n $truncatedMarker = ' (...truncated)';\n if (!$this->splitLongMessages && strlen($message) > self::MAX_MESSAGE_LENGTH) {\n return [Utils::substr($message, 0, self::MAX_MESSAGE_LENGTH - strlen($truncatedMarker)) . $truncatedMarker];\n }\n\n return str_split($message, self::MAX_MESSAGE_LENGTH);\n }", "abstract protected function unserializeData(array $data);", "function parse_request($message): array\n{\n $data = _parse_message($message);\n $matches = [];\n if (!preg_match('/^[\\S]+\\s+([a-zA-Z]+:\\/\\/|\\/).*/', $data['start-line'],\n $matches)) {\n throw new \\InvalidArgumentException('Invalid request string');\n }\n $parts = explode(' ', $data['start-line'], 3);\n $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1';\n\n $attributes = [\n 'method' => $parts[0],\n 'uri' => $matches[1] === '/' ?\n _parse_request_uri($parts[1], $data['headers']) : $parts[1],\n 'headers' => $data['headers'],\n 'body' => $data['body'],\n 'version' => $version,\n\n ];\n\n return $attributes;\n}", "public function __unserialize(array $data): void\n {\n $this->__construct($data);\n }", "function unpack_member_cache( $cache_serialized_array=\"\" )\n\t{\n\t\treturn unserialize( $cache_serialized_array );\n\t}", "public function unserialize($serialized);", "public function unserialize($serialized);", "public function pullTransientMessage(): object|array;", "public static function Unserialize($SerializedString) {\n\t\t$Result = $SerializedString;\n\n if(is_string($SerializedString)) {\n\t\t\tif(substr_compare('a:', $SerializedString, 0, 2) === 0 || substr_compare('O:', $SerializedString, 0, 2) === 0)\n\t\t\t\t$Result = unserialize($SerializedString);\n\t\t\telseif(substr_compare('obj:', $SerializedString, 0, 4) === 0)\n $Result = json_decode(substr($SerializedString, 4), FALSE);\n elseif(substr_compare('arr:', $SerializedString, 0, 4) === 0)\n $Result = json_decode(substr($SerializedString, 4), TRUE);\n }\n return $Result;\n }", "public static function decode($msg)\n {\n try {\n $data = json_decode($msg, true);\n\n return $data;\n } catch (\\Exception $e) {\n throw new \\InvalidArgumentException('Invalid json format');\n }\n }", "public static function deserialize(array $body);", "public function deserialize($data);", "private static function convertCommandToArray($command, array $data)\n {\n if ($command == '') {\n return [];\n }\n\n $commandParts = explode(':', $command);\n $part = $commandParts[0];\n unset($commandParts[0]);\n $command = implode(':', $commandParts);\n\n if ($command != '') {\n $result[$part] = self::convertCommandToArray($command, $data);\n } else {\n $result[$part] = $data;\n }\n\n return $result;\n }", "public static function getType($message) : array\n{\n\n $str = substr($message, 0, 5);\n $str2 = substr($message, 5);\n\n switch ($str) {\n\n case \"%GPS \":\n // $str2 = str_replace(' ', '', $str2); // remove space after GPS. (\"%GPS 32.333---\")\n return array('gps', $str2);\n break;\n case \"%BIN \":\n return array('bin', $str2);\n break;\n case \"%JSON\":\n return array('json', substr($message, 5));\n break;\n default:\n return array('txt', $message);\n break;\n }\n }", "public function _unserialize($data)\n\t{\n\t\treturn json_decode($data, TRUE);\n\t}", "public static function decode_args( $value )\n\t{\n\t\tif ( count( $value->children() ) ) {\n\t\t\t$value = $value->xpath( '*' );\n\t\t\t$value = $value[0];\n\t\t}\n\t\tswitch ( $value->getName() ) {\n\t\t\tcase 'data':\n\t\t\tcase 'array':\n\t\t\t\t$result_array = array();\n\t\t\t\tforeach ( $value->xpath( '//data/value' ) as $array_value ) {\n\t\t\t\t\t$result_array[] = self::decode_args( $array_value );\n\t\t\t\t}\n\t\t\t\treturn $result_array;\n\t\t\t\tbreak;\n\t\t\tcase 'struct':\n\t\t\t\t$result_struct = new XMLRPCStruct();\n\t\t\t\tforeach ( $value->xpath( '//member' ) as $struct_value ) {\n\t\t\t\t\t$property_name = (string) $struct_value->name;\n\t\t\t\t\t$children = $struct_value->value->children();\n\t\t\t\t\tif ( count( $children ) > 0 ) {\n\t\t\t\t\t\t$result_struct->$property_name = self::decode_args( $children[0] );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$result_struct->$property_name = (string) $struct_value->value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $result_struct;\n\t\t\t\tbreak;\n\t\t\tcase 'string':\n\t\t\t\treturn (string) $value;\n\t\t\tcase 'i4':\n\t\t\tcase 'integer':\n\t\t\t\treturn (int) $value;\n\t\t\tcase 'double':\n\t\t\t\treturn (double) $value;\n\t\t\tcase 'boolean':\n\t\t\t\treturn ( (int) $value == 1 ) ? true : false;\n\t\t\tcase 'dateTime.iso8601':\n\t\t\t\treturn strtotime( (string) $value );\n\t\t\tdefault:\n\t\t\t\treturn (string) $value;\n\t\t}\n\t}", "protected function mungeMessage(&$msg) {\n list($msg['first_name'], $msg['last_name']) = wmf_civicrm_janky_split_name( $msg['full_name'] );\n $msg['currency'] = strtoupper($msg['currency']);\n $msg['original_currency'] = strtoupper($msg['original_currency']);\n parent::mungeMessage($msg);\n }", "public function decode(string $data): Package\n {\n $cmd = '';\n $ext = [];\n $map = (array)unserialize($data, ['allowed_classes' => false]);\n\n // Find message route\n if (isset($map['cmd'])) {\n $cmd = (string)$map['cmd'];\n unset($map['cmd']);\n }\n\n if (isset($map['data'])) {\n $body = $map['data'];\n $ext = $map['ext'] ?? [];\n } else {\n $body = $map;\n }\n\n return Package::new($cmd, $body, $ext);\n }", "function stringtoarray($string) {\r\n\t/**\r\n\t * Probamos que sea un array sin comprimir\r\n\t */\r\n\tif (is_string($string)) {\r\n\t\tif (strstr($string, 'array')) {\r\n\t\t\teval(\"\\$arrayAux = $string;\");\r\n\t\t\treturn $arrayAux;\r\n\t\t}\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "public function convertMessage2JSON($message)\n {\n if(isset($message->text->content)) $message->text->content = urlencode($message->text->content);\n return urldecode(json_encode($message));\n }", "public function decode($data)\n {\n $out = array();\n\n $this->_data = $data;\n $this->_datalen = strlen($data);\n $this->_ptr = 0;\n\n while ($this->_curr() !== false) {\n $this->_rfc822SkipLwsp();\n\n $this->_rfc822ParseMimeToken($param);\n\n if (is_null($param) || ($this->_curr() != '=')) {\n break;\n }\n\n ++$this->_ptr;\n $this->_rfc822SkipLwsp();\n\n $value = '';\n\n if ($this->_curr() == '\"') {\n try {\n $this->_rfc822ParseQuotedString($value);\n } catch (Horde_Mail_Exception $e) {\n break;\n }\n } else {\n $this->_rfc822ParseMimeToken($value);\n if (is_null($value)) {\n break;\n }\n }\n\n $out[$param] = $value;\n\n $this->_rfc822SkipLwsp();\n if ($this->_curr() != ';') {\n break;\n }\n\n ++$this->_ptr;\n }\n\n return $out;\n }", "public function restore(int $message_id):array {\n\t\treturn $this->doRequest('POST', 'restore', hash('sha256', $this->apiSecret . $message_id), [['name' => 'message_id', 'contents' => $message_id]]);\n\t}", "public function convert( $param_string ) {\n\t\t(array) $params = json_decode( fusion_decode_if_needed( $param_string ), true );\n\t\treturn $params;\n\t}", "public function stringToArray(string $string): array;", "function fusion_string_to_array( $string ) {\n\n\t// If already an array, return early.\n\tif ( is_array( $string ) ) {\n\t\treturn $string;\n\t}\n\n\t$string = stripslashes( $string );\n\n\tif ( empty( $string ) ) {\n\t\treturn false;\n\t}\n\n\t$result = [];\n\t$pairs = explode( '&', $string );\n\n\tforeach ( $pairs as $key => $pair ) {\n\t\t// Use the original parse_str() on each element.\n\t\tparse_str( $pair, $params );\n\n\t\t$k = key( $params );\n\n\t\tif ( ! isset( $result[ $k ] ) ) {\n\t\t\t$result += $params;\n\t\t} else {\n\t\t\t$result[ $k ] = fusion_array_merge_recursive( $result[ $k ], $params[ $k ] );\n\t\t}\n\t}\n\n\treturn $result;\n}", "function extractMessageArray($line)\r\n{\r\n\t$linearray = explode('||', $line);\r\n\r\n\t// Snag the unix timestamp and perform some date calculations\r\n\t$datetime = array_shift($linearray);\r\n\r\n\t// Time elapsed (e.g. 1.5 hours, 4 days, etc.)\r\n\t$age = duration_str(time() - $datetime, false, 2);\r\n\r\n\t// Long format date\r\n $date_full = date(\"l, d F Y\", $datetime);\r\n\r\n // Short format date\r\n $date = date('m/d/Y', $datetime);\r\n\r\n // Time of day\r\n $time = date('H:i', $datetime);\r\n\r\n // Day of week\r\n $day = date('l', $datetime);\r\n\r\n\t// Hour\r\n\t$hour = date('H', $datetime);\r\n\r\n // Next snag the name\r\n $name = array_shift($linearray);\r\n\r\n\t// Check for action or system notice\r\n\t$action = ($name{0} == '*') ? true : false;\r\n\t$notice = ($name{0} == '!') ? true : false;\r\n\r\n\tif ($action || $notice)\r\n\t\t$name = mb_substr($name, 1);\r\n\r\n\t// Now put the post back together\r\n\t$words = trim(implode(' ', $linearray));\r\n\r\n\t// return this mess of info\r\n\treturn array\r\n\t(\r\n\t\t'timestamp' => $datetime,\r\n\t\t'date_full' => $date_full,\r\n\t\t'date' => $date,\r\n\t\t'time' => $time,\r\n\t\t'day' => $day,\r\n\t\t'hour' => $hour,\r\n\t\t'age' => $age,\r\n\t\t'action' => $action,\r\n\t\t'notice' => $notice,\r\n\t\t'name' => $name,\r\n\t\t'text' => $words\r\n\t);\r\n}", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"Message\",$param) and $param[\"Message\"] !== null) {\n $this->Message = new Message();\n $this->Message->deserialize($param[\"Message\"]);\n }\n\n if (array_key_exists(\"FinishReason\",$param) and $param[\"FinishReason\"] !== null) {\n $this->FinishReason = $param[\"FinishReason\"];\n }\n\n if (array_key_exists(\"Index\",$param) and $param[\"Index\"] !== null) {\n $this->Index = $param[\"Index\"];\n }\n }", "abstract public function unserialize($serialized);", "public function __construct(array $message)\n {\n $this->message = $message;\n }", "public function deserialize($strToken);", "function _safe_unserialize($str)\n{\n\tif(strlen($str) > MAX_SERIALIZED_INPUT_LENGTH)\n\t{\n\t\tthrow new Exception('safe_unserialize: input exceeds ' . MAX_SERIALIZED_INPUT_LENGTH);\n\t}\n\n\tif(empty($str) || !is_string($str))\n\t{\n\t\treturn false;\n\t}\n\n\t$stack = array();\n\t$expected = array();\n\n\t/*\n\t * states:\n\t * 0 - initial state, expecting a single value or array\n\t * 1 - terminal state\n\t * 2 - in array, expecting end of array or a key\n\t * 3 - in array, expecting value or another array\n\t */\n\t$state = 0;\n\twhile($state != 1)\n\t{\n\t\t$type = isset($str[0]) ? $str[0] : '';\n\n\t\tif($type == '}')\n\t\t{\n\t\t\t$str = substr($str, 1);\n\t\t}\n\t\telse if($type == 'N' && $str[1] == ';')\n\t\t{\n\t\t\t$value = null;\n\t\t\t$str = substr($str, 2);\n\t\t}\n\t\telse if($type == 'b' && preg_match('/^b:([01]);/', $str, $matches))\n\t\t{\n\t\t\t$value = $matches[1] == '1' ? true : false;\n\t\t\t$str = substr($str, 4);\n\t\t}\n\t\telse if($type == 'i' && preg_match('/^i:(-?[0-9]+);(.*)/s', $str, $matches))\n\t\t{\n\t\t\t$value = (int)$matches[1];\n\t\t\t$str = $matches[2];\n\t\t}\n\t\telse if($type == 'd' && preg_match('/^d:(-?[0-9]+\\.?[0-9]*(E[+-][0-9]+)?);(.*)/s', $str, $matches))\n\t\t{\n\t\t\t$value = (float)$matches[1];\n\t\t\t$str = $matches[3];\n\t\t}\n\t\telse if($type == 's' && preg_match('/^s:([0-9]+):\"(.*)/s', $str, $matches) && substr($matches[2], (int)$matches[1], 2) == '\";')\n\t\t{\n\t\t\t$value = substr($matches[2], 0, (int)$matches[1]);\n\t\t\t$str = substr($matches[2], (int)$matches[1] + 2);\n\t\t}\n\t\telse if($type == 'a' && preg_match('/^a:([0-9]+):{(.*)/s', $str, $matches) && $matches[1] < MAX_SERIALIZED_ARRAY_LENGTH)\n\t\t{\n\t\t\t$expectedLength = (int)$matches[1];\n\t\t\t$str = $matches[2];\n\t\t}\n\t\telse if($type == 'O')\n\t\t{\n\t\t\tthrow new Exception('safe_unserialize: objects not supported');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Exception('safe_unserialize: unknown/malformed type: '.$type);\n\t\t}\n\n\t\tswitch($state)\n\t\t{\n\t\t\tcase 3: // in array, expecting value or another array\n\t\t\t\tif($type == 'a')\n\t\t\t\t{\n\t\t\t\t\tif(count($stack) >= MAX_SERIALIZED_ARRAY_DEPTH)\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception('safe_unserialize: array nesting exceeds ' . MAX_SERIALIZED_ARRAY_DEPTH);\n\t\t\t\t\t}\n\n\t\t\t\t\t$stack[] = &$list;\n\t\t\t\t\t$list[$key] = array();\n\t\t\t\t\t$list = &$list[$key];\n\t\t\t\t\t$expected[] = $expectedLength;\n\t\t\t\t\t$state = 2;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif($type != '}')\n\t\t\t\t{\n\t\t\t\t\t$list[$key] = $value;\n\t\t\t\t\t$state = 2;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthrow new Exception('safe_unserialize: missing array value');\n\n\t\t\tcase 2: // in array, expecting end of array or a key\n\t\t\t\tif($type == '}')\n\t\t\t\t{\n\t\t\t\t\tif(count($list) < end($expected))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception('safe_unserialize: array size less than expected ' . $expected[0]);\n\t\t\t\t\t}\n\n\t\t\t\t\tunset($list);\n\t\t\t\t\t$list = &$stack[count($stack)-1];\n\t\t\t\t\tarray_pop($stack);\n\n\t\t\t\t\t// go to terminal state if we're at the end of the root array\n\t\t\t\t\tarray_pop($expected);\n\t\t\t\t\tif(count($expected) == 0) {\n\t\t\t\t\t\t$state = 1;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif($type == 'i' || $type == 's')\n\t\t\t\t{\n\t\t\t\t\tif(count($list) >= MAX_SERIALIZED_ARRAY_LENGTH)\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception('safe_unserialize: array size exceeds ' . MAX_SERIALIZED_ARRAY_LENGTH);\n\t\t\t\t\t}\n\t\t\t\t\tif(count($list) >= end($expected))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception('safe_unserialize: array size exceeds expected length');\n\t\t\t\t\t}\n\n\t\t\t\t\t$key = $value;\n\t\t\t\t\t$state = 3;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthrow new Exception('safe_unserialize: illegal array index type');\n\n\t\t\tcase 0: // expecting array or value\n\t\t\t\tif($type == 'a')\n\t\t\t\t{\n\t\t\t\t\tif(count($stack) >= MAX_SERIALIZED_ARRAY_DEPTH)\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception('safe_unserialize: array nesting exceeds ' . MAX_SERIALIZED_ARRAY_DEPTH);\n\t\t\t\t\t}\n\n\t\t\t\t\t$data = array();\n\t\t\t\t\t$list = &$data;\n\t\t\t\t\t$expected[] = $expectedLength;\n\t\t\t\t\t$state = 2;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif($type != '}')\n\t\t\t\t{\n\t\t\t\t\t$data = $value;\n\t\t\t\t\t$state = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthrow new Exception('safe_unserialize: not in array');\n\t\t}\n\t}\n\n\tif(!empty($str))\n\t{\n\t\tthrow new Exception('safe_unserialize: trailing data in input');\n\t}\n\treturn $data;\n}", "protected function parseLooseArgumentOrder(array $args)\r\n {\r\n // Get the arguments in a very loose format\r\n $callback = array_pop($args);\r\n $path = array_pop($args);\r\n $method = array_pop($args);\r\n\r\n // Return a named parameter array\r\n return array(\r\n 'method' => $method,\r\n 'path' => $path,\r\n 'callback' => $callback,\r\n );\r\n }", "function cera_grimlock_to_array( $args ) {\n\tif ( ! empty( $args ) && ( is_string( $args ) || is_array( $args ) ) ) {\n\t\tif ( is_string( $args ) ) {\n\t\t\t$args = preg_split( '#\\s+#', $args );\n\t\t}\n\t\treturn array_map( 'esc_attr', $args );\n\t}\n\treturn array();\n}", "public function getArguments()\n {\n return unserialize($this->arguments);\n }", "public function decode($challenge_message);", "public function parse($string)\n {\n $array = json_decode($string, true);\n if (!is_array($array)) {\n $error = function_exists('json_last_error_msg') ? json_last_error_msg() : null;\n throw InvalidFormatException::create('JSON', $string, $error);\n }\n return $array;\n }", "protected function unwrap($msg,$bytes){ return substr($msg,1,$bytes-2); }", "public function unserialize($serialized)\n{\n list($this->username, $this->password,\n $this->id) = json_decode(\n $serialized);\n}", "private function argsToArray($args)\n\t{\n\t\tif(!count($args)) throw new Exception(\"Er moet minstends één argument gegeven zijn.\");\n\t\t\n\t\t$fill = array_pop($args);\n\t\t\n\t\twhile($key = array_pop($args))\n\t\t{\n\t\t\tif(!is_string($key)) throw new Exception(\"De key is geen string\");\n\t\t\t$fill = array($key => $fill);\n\t\t}\n\t\t\n\t\tif(!is_array($fill)) throw new Exception(\"Wanneer één argument gegeven moet dit een array zijn\");\n\t\t\n\t\treturn $fill;\n\t}", "public function convertExtraToArray( $string ) {\n\t\tif( !$string )\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t$_temp = array();\n\t\t\n\t\tif( $string == '#show_roles#' )\n\t\t{\n\t\t\t$roles = Yii::app()->authManager->getRoles();\n\t\t\tif( count($roles) )\n\t\t\t{\n\t\t\t\tforeach( $roles as $role )\n\t\t\t\t{\n\t\t\t\t\t$_temp[ $role->name ] = $role->name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$exploded = explode(\"\\n\", $string);\n\n\t\t\tif( count($exploded) )\n\t\t\t{\n\t\t\t\tforeach( $exploded as $explode )\n\t\t\t\t{\n\t\t\t\t\tlist($key, $value) = explode('=', $explode);\n\t\t\t\t\t$_temp[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t\n\t\treturn $_temp;\n\t}", "function parse_response_array($string) {\n $response_string_array = explode(\"&\", $string);\n\n $proper_array = array();\n\n foreach ($response_string_array as $value) {\n list($key, $val) = explode(\"=\", $value);\n\n $val = urldecode($val);\n\n $proper_array[\"$key\"] = $val;\n }\n unset($key);\n unset($val);\n\n return $proper_array;\n }", "public function jsonToArray( $string )\n {\n return json_decode( $string, true );\n }", "public function getMessagefromArray($array){\n\t\tunset($array[0]);\n\t\treturn implode(' ', $array);\n\t}", "private function parseDigestMessage($message) {\n\t\t\t$to_parse = array(\"username\", \"nonce\", \"response\", \"opaque\", \"uri\", \"cnonce\");\n\t\t\t$data = array();\n\n\t\t\tforeach($to_parse as $name) {\n\t\t\t\tpreg_match('/' . $name . '=\"([^\"]+)\"/', $message, $tmp);\n\t\t\t\t$data[$name] = $tmp[1];\n\t\t\t}\n\n\t\t\tpreg_match('/qop=\"?([^,\\s\"]+)/', $message, $tmp); $data[\"qop\"] = $tmp[1];\n\t\t\tpreg_match('/nc=([^,\\s]+)/', $message, $tmp); $data[\"nc\"] = $tmp[1];\n\n\t\t\treturn $data;\n\t\t}", "function readPayload($string) {\n // initialize our \"pointer\"\n $p = 0;\n // read in the command\n $command = readPayloadString($string, $p);\n // increase the pointer past 10 bytes\n $p += 10;\n // initialize return array\n $return = array();\n // keep reading in strings until we have met the length\n while ($p < strlen($string))\n $return[] = readPayloadString($string, $p);\n // return the array of strings\n return $return;\n}", "static function ArrayToMessage($array = array())\r\n {\r\n if ($array === null)\r\n {\r\n return null;\r\n }\r\n\r\n $Message = new Message($array['id'], \r\n $array['contest'], \r\n $array['idUserFrom'], \r\n $array['idUserTo'], \r\n $array['seen'], \r\n $array['received'], \r\n $array['time']);\r\n\r\n return $Message;\r\n }", "protected function prepareMessage(Message $message): void\n {\n $data = $message->getData();\n\n if ($data) {\n $message->setMessage(Arr::toString($data));\n }\n }", "protected function parseMessage($messageText)\n {\n\n $lines = explode(PHP_EOL, $messageText);\n\n // [*17-Aug-2010 13:57:24*] PHP Notice: Undefined variable...\n $time = substr($lines[0], 1, 20);\n $data = array();\n\n // [17-Aug-2010 13:57:24] PHP Notice*:* Undefined variable...\n $typeEndPos = strpos($lines[0], ':', 27);\n // [17-Aug-2010 13:57:24] PHP *Notice*: Undefined variable...\n $type = substr($lines[0], 27, $typeEndPos - 27);\n // [17-Aug-2010 13:57:24] PHP Notice: *Undefined variable...*\n $text = substr($lines[0], $typeEndPos + 2);\n\n // $lines[1] == 'Stack trace:'\n $stackTrace = '';\n $i = 2;\n do {\n $stackTrace .= $lines[$i] . PHP_EOL;\n $i++;\n } while ( strncasecmp('Url:', $lines[$i], 4) !== 0 );\n\n // Url: http://localhost/tlumoceni-preklady.cz/portal/tlumoceni-preklady.cz/htdocs/\tReferer: unknown\n list($url, $referer, $ip) = explode(\"\\t\", $lines[$i]);\n $url = substr($url, 5);\n $referer = substr($referer, 9);\n $ip = substr($ip, 4);\n $key = md5($type . $text);\n\n return new Message(array(\n 'time' => $time,\n 'type' => $type,\n 'text' => $text,\n 'key' => $key,\n 'stackTrace' => $stackTrace,\n 'url' => $url,\n 'referer' => $referer,\n 'ip' => $ip\n ));\n }", "public static function parseMessages($jsonString)\n\t{\n\t\t$object = json_decode($jsonString);\n\t\t$messageArray = array();\n\t\t$summary = null;\n\t\t$details = null;\n\t\t$refersto = null;\n\t\t$severity = null;\n\t\t$source = null;\n\n\t\tforeach($object->Messages as $message)\n\t\t{\n\t\t\tif( property_exists($message,'Summary')) $summary = $message->Summary;\n\t\t\tif( property_exists($message,'Details')) $details = $message->Details;\n\t\t\tif( property_exists($message,'RefersTo')) $refersto = $message->RefersTo;\n\t\t\tif( property_exists($message,'Severity')) $severity = $message->Severity;\n\t\t\tif( property_exists($message,'Source')) $source = $message->Source;\n\n\t\t\t$messageArray[] = new self(\n\t\t\t\t$summary,\n\t\t\t\t$details,\n\t\t\t\t$refersto,\n\t\t\t\t$severity,\n\t\t\t\t$source);\n\t\t}\n\n\t\treturn $messageArray;\n\n\n\t}", "public static function from_decoding_args( $action_id ) {\n\t\t$message = sprintf(\n\t\t\t__( 'Action [%s] has invalid arguments. It cannot be JSON decoded to an array.', 'action-scheduler' ),\n\t\t\t$action_id\n\t\t);\n\n\t\treturn new static( $message );\n\t}", "public function deserialize(string $data)\n {\n if( $this->deserializer ){\n return \\call_user_func($this->deserializer, $data);\n }\n\n return \\json_decode($data);\n }", "public static function decode(WebSocketClient $sender, $message)\n {\n $request = json_decode($message, true);\n\n if (is_null($request) || empty($request[0]) || empty($request[1]))\n {\n return;\n }\n\n $controllerName = str_replace(' ', '', ucwords(str_replace('-', ' ', $request[0]))) . 'Controller';\n $actionName = 'action' . str_replace(' ', '', ucwords(str_replace('-', ' ', $request[1])));\n\n if (!isset(static::$controllers[$controllerName]))\n {\n if (!class_exists($controllerName))\n {\n return;\n }\n\n static::$controllers[$controllerName] = new $controllerName();\n }\n\n $controller = static::$controllers[$controllerName];\n static::$sender = $sender;\n\n if (!empty($request[2]) && is_array($request[2]))\n {\n static::$parameters = $request[2];\n }\n\n if (is_callable(array($controller, $actionName)))\n {\n $controller->$actionName();\n }\n }", "private function unpackData()\n {\n return json_decode($this->packedData, true);\n }", "public function toMessageTypeObject() {}", "public function decodeMessage(AbiType $abi, string $message): DecodedMessageBody\n {\n return new DecodedMessageBody(\n $this->tonClient->request(\n 'abi.decode_message',\n [\n 'abi' => $abi,\n 'message' => $message,\n ]\n )->wait()\n );\n }", "public function parse(): array\n {\n unset($this->arguments[0]);\n $keyPairParams = [];\n foreach ($this->arguments as $argument) {\n $arguments = explode(self::CONSOLE_DELIMITER, strip_tags($argument));\n $parameterName = ltrim(reset($arguments), self::START_PARAMETER_WITH);\n $parameterValue = end($arguments);\n $keyPairParams[$parameterName] = $parameterValue;\n }\n return $keyPairParams;\n }", "protected function parse_args($string)\r\n\t{\r\n\t\t$arguments = array();\r\n\t\t\r\n\t\tpreg_match_all('@(\\w+?)\\s*=\\s*(\\'|\")(.*?)\\2@', $string, $matches, PREG_SET_ORDER);\r\n\t\t\r\n\t\tforeach($matches as $match)\r\n\t\t{\r\n\t\t\t$arguments[$match[1]] = $match[3];\r\n\t\t}\r\n\t\t\r\n\t\treturn $arguments;\r\n\t}", "abstract protected function unSerializeData();", "public function setArgs(&$var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->args = $arr;\n }", "public function extractMessage($object);" ]
[ "0.68234146", "0.56260407", "0.5613232", "0.54898244", "0.5450762", "0.5379476", "0.5339271", "0.53222835", "0.531563", "0.5306378", "0.5282207", "0.52708936", "0.5270886", "0.52580106", "0.5228971", "0.5221436", "0.5163102", "0.516228", "0.51506233", "0.513443", "0.51333886", "0.5129931", "0.51109016", "0.5097463", "0.5096622", "0.50928974", "0.5079823", "0.507645", "0.50664806", "0.505644", "0.50455135", "0.50267714", "0.5005852", "0.50037885", "0.49554968", "0.49382585", "0.49313208", "0.49249387", "0.49176732", "0.4908101", "0.48990706", "0.48925772", "0.4890263", "0.48821", "0.4881764", "0.4878049", "0.4878049", "0.48777595", "0.48753878", "0.4872273", "0.4856986", "0.48476735", "0.48466069", "0.48169485", "0.48082027", "0.4798813", "0.4797353", "0.477903", "0.47686037", "0.47667098", "0.47569597", "0.47552305", "0.4753966", "0.4752612", "0.47497845", "0.47496453", "0.4748326", "0.47440028", "0.47289234", "0.47278953", "0.47231618", "0.4720908", "0.47074378", "0.47058418", "0.47053042", "0.46906945", "0.46887192", "0.4684025", "0.4682346", "0.46806896", "0.4678037", "0.46711096", "0.46643066", "0.46640676", "0.4663304", "0.46576914", "0.46562782", "0.46531656", "0.46438977", "0.46425605", "0.46210247", "0.46180293", "0.46162054", "0.4613049", "0.46068057", "0.46054736", "0.45921123", "0.4591336", "0.4589022", "0.45876345" ]
0.5365858
6
Der Rand von links
public function getPosX($c) { $x = $this->getWidthOfBorder(); # Beim 1. Feld brauchen wir sonst keinen Abstand if($c == 1) { $x += 0; } if($c >= 2) { $x += $this->getFieldsWidthBrutto() * ($c-1); } if($c >= 3) { $x += 12; } if($c >= 5) { $x += 12; } # Offset left zu x dazu $x += $this->getFieldsOffsetLeft(); # Richtiger X Wert wird zurückgegeben return $x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRandomLink() {\n\t\t$link = getDbConnect();\n\t\t$preparedStatement = $link->prepare(\"SELECT * FROM urls ORDER BY RAND() LIMIT 1;\");\n\t\t$preparedStatement->execute(array());\n\t\treturn parseFullResults($preparedStatement->fetchAll());\n\t}", "public function random();", "public function orderRandom();", "protected function linkcreator() {\n $chars = str_split(\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-\", 1);shuffle($chars);\n return join(\"\", array_slice($chars, 0, 33));\n }", "public function findRandom();", "protected function generateLinkID() {\n $s = \"\";\n do {\n switch (getConfig(\"link_style\")) {\n case LINK_UUID_V4:\n // UUID version 4.\n $uuid = openssl_random_pseudo_bytes(16);\n $uuid[6] = chr(ord($uuid[6]) & 0x0f | 0x40);\n $uuid[8] = chr(ord($uuid[8]) & 0x3f | 0x80);\n $s = vsprintf(\"%s%s-%s-%s-%s-%s%s%s\", str_split(bin2hex($uuid), 4));\n break;\n case LINK_16_HEX:\n // 16-char (8-byte) hexadecimal string.\n $s = bin2hex(openssl_random_pseudo_bytes(8));\n break;\n case LINK_16_LOWER_CASE:\n // 16-char lower-case alphanumeric string.\n $alpha = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n for ($i = 0; $i < 16; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n break;\n case LINK_16_MIXED_CASE:\n // 16-char mixed-case alphanumeric string.\n // '0', 'O', 'l' and 'I' not included because of visual similarity.\n $alpha = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n for ($i = 0; $i < 16; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n break;\n case LINK_16_UPPER_CASE:\n // 16-char upper-case alphanumeric string.\n // '0' and 'O' not included because of visual similarity.\n $alpha = \"123456789ABCDEFGHIJKLMNPQRSTUVWXYZ\";\n for ($i = 0; $i < 16; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n break;\n case LINK_32_HEX:\n // 32-char (16-byte) hexadecimal string.\n $s = bin2hex(openssl_random_pseudo_bytes(16));\n break;\n case LINK_32_LOWER_CASE:\n // 32-char lower-case alphanumeric string.\n $alpha = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n for ($i = 0; $i < 32; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n break;\n case LINK_32_MIXED_CASE:\n // 32-char mixed-case alphanumeric string.\n // '0', 'O', 'l' and 'I' not included because of visual similarity.\n $alpha = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n for ($i = 0; $i < 32; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n break;\n case LINK_32_UPPER_CASE:\n // 32-char upper-case alphanumeric string.\n // '0' and 'O' not included because of visual similarity.\n $alpha = \"123456789ABCDEFGHIJKLMNPQRSTUVWXYZ\";\n for ($i = 0; $i < 32; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n break;\n case LINK_4_PLUS_4_LOWER_CASE:\n // 4+4-char lower-case alphanumeric string.\n $alpha = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n for ($i = 0; $i < 8; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n $s = substr($s, 0, 4).\"-\".substr($s, -4);\n break;\n case LINK_4_PLUS_4_MIXED_CASE:\n // 4+4-char mixed-case alphanumeric string.\n // '0', 'O', 'l' and 'I' not included because of visual similarity.\n $alpha = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n for ($i = 0; $i < 8; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n $s = substr($s, 0, 4).\"-\".substr($s, -4);\n break;\n case LINK_4_PLUS_4_UPPER_CASE:\n default:\n // 4+4-char upper-case alphanumeric string.\n // '0' and 'O' not included because of visual similarity.\n $alpha = \"123456789ABCDEFGHIJKLMNPQRSTUVWXYZ\";\n for ($i = 0; $i < 8; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n $s = substr($s, 0, 4).\"-\".substr($s, -4);\n break;\n }\n } while ($this->memcache->get(PREFIX_LOCDATA.$s) !== false);\n return $s;\n }", "private static function generateShareLink()\n {\n $strong = true;\n $appearance = 'sha256';\n return hash($appearance, openssl_random_pseudo_bytes(128, $strong), false);\n }", "function getJesusLink() {\n\t\tglobal $jesusLinks;\n\t\treturn $jesusLinks[rand(0, count($jesusLinks) - 1)];\n\t}", "function random() {\n echo StringHelper::random(48);\n echo \"<br />\";\n echo StringHelper::random(16);\n echo \"<br />\";\n echo CryptHelper::generateKey(24);\n echo \"<br />\";\n echo CryptHelper::generateKey(8);\n }", "function randomUrl($type = 'alphanumeric', $length = 4){\n $str = '';\n switch($type):\n case 'alphanumeric':\n $possible = \"23456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ\";\n break;\n case 'alpha':\n $possible = \"abcdefghijklmnopqrstuvwxyz\";\n break;\n case 'numeric':\n $possible = \"0123456789\";\n break;\n endswitch;\n \n $i = 0;\n while ($i < $length) {\n $str .= substr( $possible, mt_rand( 0, strlen( $possible )-1 ), 1 );\n $i++;\n }\n return $str;\n}", "function setLinks(&$source, &$target) {\n\t\tglobal $links;\n\t\t\n\t\t$i = rand(0, count($links) - 1);\n\t\t\n\t\t// make sure i and j aren't the same\n\t\tdo {\n\t\t\t$j = rand(0, count($links) - 1);\n\t\t} while ($j == $i);\n\t\t\n\t\t$source = $links[$i];\n\t\t$target = $links[$j];\n\t}", "function generateRandID(){\r\n \t\treturn md5(generateRandStr(16));\r\n \t\t}", "function gener_random($length){\r\n\r\n\tsrand((double)microtime()*1000000 );\r\n\t\r\n\t$random_id = \"\";\r\n\t\r\n\t$char_list = \"abcdefghijklmnopqrstuvwxyz\";\r\n\t\r\n\tfor($i = 0; $i < $length; $i++) {\r\n\t\t$random_id .= substr($char_list,(rand()%(strlen($char_list))), 1);\r\n\t}\r\n\t\r\n\treturn $random_id;\r\n}", "public function randomize()\n {\n return mt_rand(1, $this->maxnumber());\n }", "function searchURI()\t{\n return $this->getRandomString(mt_rand(0,100));\n\t}", "public function randomKey();", "function createRand()\n{\n\t$up = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\t$down = \"abcdefghijklmnopqrstuvwxyz\";\n\t$num = \"1234567890\";\n\t$upRand = str_shuffle($up) . str_shuffle($up);\n\t$downRand = str_shuffle($down) . str_shuffle($down);\n\t$numRand = str_shuffle($num) . str_shuffle($num);\n\t$randStr1 = str_shuffle($upRand.$downRand.$numRand);\n\t$randStr2 = str_shuffle($upRand.$downRand.$numRand);\n\t$randStrFull = str_shuffle($randStr1.$randStr2);\n\t$randStrFinal = str_shuffle(substr($randStrFull,0,8));\n\treturn $randStrFinal;\n}", "function generateRandID(){\n \t\treturn md5(generateRandStr(16));\n \t\t}", "function randfuzz($len) \n{\n if (is_readable('/dev/urandom')) {\n $f=fopen('/dev/urandom', 'r');\n $urandom=fread($f, $len);\n fclose($f);\n }\n else\n {\n die(\"either /dev/urandom isnt readable or this isnt a linux \nmachine!\");\n }\n $return='';\n for ($i=0;$i < $len;++$i) {\n if (!!empty($urandom)) {\n if ($i%2==0) mt_srand(time()%2147 * 1000000 + \n(double)microtime() * 1000000);\n $rand=48+mt_rand()%64;\n } else $rand=48+ord($urandom[$i])%64;\n\n if ( 57 < $rand ) $rand+=7; \n if ( 90 < $rand ) $rand+=6; \n\n if ($rand==123) $rand=45;\n if ($rand==124) $rand=46;\n $return.=chr($rand);\n }\n return $return; \n}", "function random_code($limit = 8)\n\t{\n\t return substr(base_convert(sha1(uniqid(mt_rand())), 16, 36), 0, $limit);\n\t}", "function r(){\n\t\t\n\t\t$chars = '0123456789';\n\t\t$s = substr(str_shuffle(str_repeat($chars, 5)), 0, 5);\n\t\treturn $s;\t\t\t\n\t\t}", "function rand() {\n\n $next = $this->find('first', array('order'=>'position DESC'));\n\n $rand = rand(1, $next['Ringsite']['position']);\n\n $next = $this->find('first', array('conditions'=>array('position'=>$rand)));\n\n return $next;\n }", "function randomize(int $length = 16)\n {\n return Crypter::random($length);\n }", "private static function getRandomReferenceNumber()\n {\n return sprintf('%02X', mt_rand(0, 0xFF));\n }", "function random(){\n $randomnummer = rand(1,6);\n return $randomnummer;\n}", "public function shuffle();", "function testGenRandom() {\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "public function get_random_affiliate_url() {\n\t\t$websites = array(\n\t\t\t'http://www.appthemes.com/',\n\t\t\t'http://marketplace.appthemes.com/',\n\t\t\t'http://www.amazon.com/',\n\t\t\t'http://www.amazon.co.uk/',\n\t\t\t'http://www.amazon.de/',\n\t\t\t'http://www.ebay.com/',\n\t\t\t'http://www.ebay.co.uk/',\n\t\t\t'http://www.ebay.de/',\n\t\t\t'http://www.etsy.com/',\n\t\t\t'http://www.alibaba.com/',\n\t\t\t'http://www.rakuten.com/',\n\t\t);\n\n\t\t$aff_params = array(\n\t\t\t'affiliate',\n\t\t\t'aff_id',\n\t\t\t'ad',\n\t\t\t'ad_id',\n\t\t\t'ref',\n\t\t\t'ref_id',\n\t\t\t'partner',\n\t\t\t'partner_id',\n\t\t\t'campaign',\n\t\t\t'campaign_id',\n\t\t);\n\n\t\t$aff_param = $aff_params[ rand( 0, count( $aff_params ) - 1 ) ];\n\t\t$website = $websites[ rand( 0, count( $websites ) - 1 ) ];\n\n\t\treturn add_query_arg( $aff_param, rand( 10, 1000 ), $website );\n\t}", "function __generateRandom($length = 8, $salt = 'abcdefghijklmnopqrstuvwxyz0123456789') {\r\n\t\t$salt = str_shuffle ($salt);\r\n\t\t$return = \"\";\r\n\t\t$i = 0;\r\n\t\twhile ($i < $length) {\r\n\t\t\t$num = rand(0, strlen($salt) -1);\r\n\t\t\t$tmp = $salt[$num];\r\n\t\t\t$return .= $tmp;\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\treturn str_shuffle($return);\r\n\t}", "public static function seedRand() {\r\n\t\tsrand((int)((($m=microtime(true))-((int)$m))*pow(10,(int)log10(PHP_INT_MAX)))); \r\n\t}", "function generate_key()\n{\n $pool = \"qwertzupasdfghkyxcvbnm\";\n $pool .= \"23456789\";\n $pool .= \"WERTZUPLKJHGFDSAYXCVBNM\";\n srand ((double)microtime()*1000000);\n for($index = 0; $index < 10; $index++)\n {\n $akti .= substr($pool,(rand()%(strlen ($pool))), 1);\n }\n return $akti;\n}", "public function shuffle() {\n\t$this->checkElementsInDom();\n\n\t// Save reference to parent node, while the link exists.\n\t$parentNode = $this->_elArray[0]->parentNode;\n\n\t// Remove them all from the DOM.\n\tforeach ($this->_elArray as $el) {\n\t\t$el->remove();\n\t}\n\n\tshuffle($this->_elArray);\n\t// Add them back into the DOM, in their shuffled order.\n\tforeach ($this->_elArray as $el) {\n\t\t$parentNode->append($el);\n\t}\n}", "public function it_can_be_shuffled()\n {\n $this->shuffle();\n }", "protected function generateRandomId(){\n return Keygen::numeric(7)->prefix(mt_rand(1, 9))->generate(true);\n}", "protected function rand(){\n\n return Str::random(25);\n\n }", "function randomNum($length){\n $rangeMin = pow(36, $length-1);\n $rangeMax = pow(36, $length)-1;\n $base10Rand = mt_rand($rangeMin, $rangeMax);\n $newRand = base_convert($base10Rand, 10, 36);\n return $newRand;\n}", "public function rand($min,$max);", "public static function random() { return Secrets::random(); }", "function randomx($mode = 0, $leng = '3~5', $rndkey = -1)\n{\n // $seeds = $mode == 0 ? range('a', 'z') : range(0, 9);\n $range_a = range('a', 'z');\n $range_b = range('A', 'Z');\n $range_c = range(0, 9);\n switch ($mode) {\n case 0:\n $seeds = $range_a;\n break;\n case 1:\n $seeds = $range_c;\n break;\n case 2:\n $seeds = array_merge($range_a, $range_c);\n break;\n case 3:\n $seeds = array_merge($range_a, $range_b);\n break;\n case 4:\n $seeds = $range_b;\n break;\n case 5:\n $seeds = array_merge($range_a, $range_b, $range_c);\n break;\n }\n // if ($rndkey != -1) {\n // mt_srand($rndkey);\n // }\n $parselen = explode('~', $leng);\n if (count($parselen) == 1) {\n $leng = (int) $leng;\n } else {\n $leng = mt_rand((int) $parselen[0], (int) $parselen[1]);\n }\n $x = '';\n // if ($mode != 1) {\n // // ext char out of $charlist\n // global $charlist;\n // foreach ($seeds as $s_k => $s_v) {\n // if (strpos($charlist, $s_v) !== false) {\n // unset($seeds[$s_k]);\n // }\n // }\n // $seeds = array_values($seeds);\n // }\n shuffle($seeds);\n // $seedlen = count($seeds) - 1;\n // for ($k = $seedlen; $k > 0; $k--){\n // $j = mt_rand(0, $k);\n // $tmpseed = $seeds[$k];\n // $seeds[$k] = $seeds[$j];\n // $seeds[$j] = $tmpseed;\n // }\n // print_r($seeds);die;\n // for ($i=0; $i < $leng; $i++) {\n // // if ($rndkey != -1) {\n // // mt_srand($rndkey+$i);\n // // }\n // // $x .= $seeds[mt_rand(0, $seedlen)];\n // if (!isset($seeds[$i])) {\n // break;\n // }\n // $x .= $seeds[$i];\n // }\n $x = substr(implode('', $seeds), 0, $leng);\n // mt_srand();\n // if (in_array($mode, array(2, 5))) {\n // $x = substr($x, 0, strlen($x) - 1) . $range_a[array_rand($range_a)];\n // }\n return $x;\n}", "public static function getRandomString($length) \n{\n$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\nreturn substr(str_shuffle(str_repeat($pool, $length)), 0, $length);\n}", "protected function getID()\n {\n return rand();\n }", "public function randomItem();", "function psuedo_random_urlsafe($length)\n{\n $adjustedLength = ceil($length / 1.33);\n $bytes = openssl_random_pseudo_bytes($adjustedLength);\n $urlSafe = base64url_encode($bytes);\n return substr($urlSafe, 0, $length);\n}", "public function Random()\n {\n return parent::Random();\n }", "function randPass($length = 8){\n \treturn substr(md5(rand().rand()), 0, $length);\n }", "private function generateURL($name)\n {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n return md5($name.substr(str_shuffle($characters), 0, 10));\n }", "function random_numbers($ms) {\n\t\t\t\t\n\t\t\t\t$n = rand(0, $ms);\n\t\t\t\t\n\t\t\t\treturn $n;\n\t\t\t\t\n\t\t\t}", "function tep_rand($min = null, $max = null) {\n static $seeded;\n\n if (!isset($seeded)) {\n mt_srand((double)microtime()*1000000);\n $seeded = true;\n }\n\n if (isset($min) && isset($max)) {\n if ($min >= $max) {\n return $min;\n } else {\n return mt_rand($min, $max);\n }\n } else {\n return mt_rand();\n }\n }", "function tep_rand($min = null, $max = null) {\n static $seeded;\n\n if (!$seeded) {\n mt_srand((double)microtime()*1000000);\n $seeded = true;\n }\n\n if (isset($min) && isset($max)) {\n if ($min >= $max) {\n return $min;\n } else {\n return mt_rand($min, $max);\n }\n } else {\n return mt_rand();\n }\n}", "protected function generate()\n {\n\t\t$this->value = md5(uniqid(rand(), true));\n }", "function crypt_random($min = 0, $max = 0x7FFFFFFF)\r\n{\r\n if ($min == $max) {\r\n return $min;\r\n }\r\n\r\n // see http://en.wikipedia.org/wiki//dev/random\r\n static $urandom = true;\r\n if ($urandom === true) {\r\n // Warning's will be output unles the error suppression operator is used. Errors such as\r\n // \"open_basedir restriction in effect\", \"Permission denied\", \"No such file or directory\", etc.\r\n $urandom = @fopen('/dev/urandom', 'rb');\r\n }\r\n if (!is_bool($urandom)) {\r\n extract(unpack('Nrandom', fread($urandom, 4)));\r\n\r\n // say $min = 0 and $max = 3. if we didn't do abs() then we could have stuff like this:\r\n // -4 % 3 + 0 = -1, even though -1 < $min\r\n return abs($random) % ($max - $min) + $min;\r\n }\r\n\r\n /* Prior to PHP 4.2.0, mt_srand() had to be called before mt_rand() could be called.\r\n Prior to PHP 5.2.6, mt_rand()'s automatic seeding was subpar, as elaborated here:\r\n\r\n http://www.suspekt.org/2008/08/17/mt_srand-and-not-so-random-numbers/\r\n\r\n The seeding routine is pretty much ripped from PHP's own internal GENERATE_SEED() macro:\r\n\r\n http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3_2/ext/standard/php_rand.h?view=markup */\r\n if (version_compare(PHP_VERSION, '5.2.5', '<=')) {\r\n static $seeded;\r\n if (!isset($seeded)) {\r\n $seeded = true;\r\n mt_srand(fmod(time() * getmypid(), 0x7FFFFFFF) ^ fmod(1000000 * lcg_value(), 0x7FFFFFFF));\r\n }\r\n }\r\n\r\n static $crypto;\r\n\r\n // The CSPRNG's Yarrow and Fortuna periodically reseed. This function can be reseeded by hitting F5\r\n // in the browser and reloading the page.\r\n\r\n if (!isset($crypto)) {\r\n $key = $iv = '';\r\n for ($i = 0; $i < 8; $i++) {\r\n $key.= pack('n', mt_rand(0, 0xFFFF));\r\n $iv .= pack('n', mt_rand(0, 0xFFFF));\r\n }\r\n switch (true) {\r\n case class_exists('Crypt_AES'):\r\n $crypto = new Crypt_AES(CRYPT_AES_MODE_CTR);\r\n break;\r\n case class_exists('Crypt_TripleDES'):\r\n $crypto = new Crypt_TripleDES(CRYPT_DES_MODE_CTR);\r\n break;\r\n case class_exists('Crypt_DES'):\r\n $crypto = new Crypt_DES(CRYPT_DES_MODE_CTR);\r\n break;\r\n case class_exists('Crypt_RC4'):\r\n $crypto = new Crypt_RC4();\r\n break;\r\n default:\r\n extract(unpack('Nrandom', pack('H*', sha1(mt_rand(0, 0x7FFFFFFF)))));\r\n return abs($random) % ($max - $min) + $min;\r\n }\r\n $crypto->setKey($key);\r\n $crypto->setIV($iv);\r\n $crypto->enableContinuousBuffer();\r\n }\r\n\r\n extract(unpack('Nrandom', $crypto->encrypt(\"\\0\\0\\0\\0\")));\r\n return abs($random) % ($max - $min) + $min;\r\n}", "function gen_pin(){\n $rand_num = rand(6, 12);\n $permitted_chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $pin = substr(str_shuffle($permitted_chars), 0, $rand_num);\n return $pin;\n }", "public function rand($start, $end) {\n $return = realistic_dummy_content_api_rand($start, $end, $this->getHash());\n return $return;\n }", "private static function getRandomNumber()\n {\n if (defined('PHP_WINDOWS_VERSION_BUILD') && version_compare(PHP_VERSION, '5.3.4', '<')) {\n $useOpenSsl = false;\n } elseif (!function_exists('openssl_random_pseudo_bytes')) {\n $useOpenSsl = false;\n } else {\n $useOpenSsl = true;\n }\n\n $nbBytes = 32;\n\n if ($useOpenSsl) {\n $bytes = openssl_random_pseudo_bytes($nbBytes, $strong);\n\n if (false !== $bytes && true === $strong) {\n return $bytes;\n }\n }\n\n return hash('sha256', uniqid(mt_rand(), true), true);\n }", "function _randomSteps(){\n return rand(3000, 9000);\n }", "function append_random( &$sUrl, $nLon=1 )\n{\n $sSep = '&';\n if( strpos($sUrl,'?') ===false )\n {\n $sSep = '?';\n }\n $sUrl .= $sSep.'rnd='.STRING::get_random($nLon);\n}", "public function gen_random_string(){\n\t\t$chars =\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n\t\t$final_rand='';\t\t\n\t\tfor($i=0;$i<4; $i++) {\t\t \n\t\t$final_rand .= $chars[ rand(0,strlen($chars)-1)];\n\t\t}\t\t\n\t\treturn $final_rand;\t\n\t}", "function generateRandID(){\n\t\t$userid = $this->getPasswordSalt();\n\t\treturn hash('sha256',$userid);\n\t}", "public static function generateRandomToken() {\n return Security::chlogHashStatic(md5(rand())); \n }", "function randNumber($len=6,$start=false,$end=false) {\n\n mt_srand ((double) microtime() * 1000000);\n $start=(!$len && $start)?$start:str_pad(1,$len,\"0\",STR_PAD_RIGHT);\n $end=(!$len && $end)?$end:str_pad(9,$len,\"9\",STR_PAD_RIGHT);\n \n return mt_rand($start,$end);\n }", "final public static function uniqueIDGenerator(){\n $letters = range('A', 'Z');\n shuffle($letters);\n return( md5(time() . implode('', $letters) . rand()));\n }", "function random_string($max = 8)\n {\n $rtn = \"\";\n $chars = explode(\" \", \"a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9\");\n for ($i = 0; $i < $max; $i++) {\n $rnd = array_rand($chars);\n $rtn .= base64_encode(md5($chars[$rnd]));\n }\n return substr(str_shuffle(strtolower($rtn)), 0, $max);\n }", "function psuedo_random_number($min, $max) {\n $bytes = openssl_random_pseudo_bytes(4);\n $int = unpack('l', $bytes);\n return $min + abs($int[1] % ($max-$min+1));\n}", "function generateKey()\n\t{\n\t\treturn ( rand(1, 25) );\n\t}", "function getRandomNumber() {\n return rand(0, 0x7fffffff);\n }", "function generate() ;", "function rand_num() {\n\t\t\t\t\n\t\t\t\t$r = rand(1000000, 9999999);\n\t\t\t\treturn $r;\n\t\t\t\n\t\t\t}", "function GenerateKey() {\n // deterministic; see base.js.\n return rand();\n}", "public static function random()\n {\n return '#' . str_pad(dechex(mt_rand(0, 0xFFFFFF)), 6, '0', STR_PAD_LEFT);\n }", "protected function getRandomKey()\n {\n return Str::random(32);\n }", "function generateRandomNumber() {\n return chr(mt_rand(48, 57));\n }", "function postit(){\r\n $rand = rand(1, 4);\r\n return \"postit\" . $rand;\r\n}", "function passgen() {\r\n\t$pw = '';\r\n\t$pw_lenght = 8;\r\n $zeichen = \"0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z\";\r\n $array_b = explode(\",\",$zeichen);\r\n for($i=0;$i<$pw_lenght;$i++) {\r\n \tsrand((double)microtime()*1000000);\r\n $z = rand(0,25);\r\n $pw .= \"\".$array_b[$z].\"\";\r\n }\r\n\treturn $pw;\r\n}", "function generate_mailkey(){\r\n $rseed=date(\"U\")%1000000;\r\n srand($rseed);\r\n $mailkey=md5(rand(10000,10000000));\r\n return $mailkey;\r\n}", "function dss_rand()\n{\n\tglobal $db, $board_config, $dss_seeded;\n\n\t$val = $board_config['rand_seed'] . microtime();\n\t$val = md5($val);\n\t$board_config['rand_seed'] = md5($board_config['rand_seed'] . $val . 'a');\n \n\tif($dss_seeded !== true)\n\t{\n\t\t$sql = \"UPDATE \" . CONFIG_TABLE . \" SET\n\t\t\tconfig_value = '\" . $board_config['rand_seed'] . \"'\n\t\t\tWHERE config_name = 'rand_seed'\";\n\t\t\n\t\tif( !$db->sql_query($sql) )\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, \"Unable to reseed PRNG\", \"\", __LINE__, __FILE__, $sql);\n\t\t}\n\n\t\t$dss_seeded = true;\n\t}\n\n\treturn substr($val, 4, 16);\n}", "function random_angka($panjang) {\n $r = ''; //set string kosong\n //mengulang sebanyak $panjang dengan angka random dari 0-9\n for ($x=0; $x<$panjang; $x++) $r .= random_int(0, 9);\n return $r; //mereturn hasil string yang berisi angka random tadi\n}", "public function randomize($string);", "function rand_color(){\n\t\t$list = array ('azure', 'amber','black', 'blue', 'cobalt', 'copper', 'bronze', 'tan', 'crimson', 'dark', 'brown', 'desert', 'emerald', 'foliage', 'gold', 'green', 'indigo', 'ivory', 'navy', 'olive', 'onyx', 'orange', 'pink', 'platinum', 'red', 'rose', 'ruby', 'sapphire', 'slate', 'silver', 'smoke', 'turquoise', 'violet', 'yellow');\n\t\t$i = count($list);\n\t\treturn $list[mt_rand(0,$i-1)];\n\t}", "function random_strings($length_of_string) \n {\n $str_result = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; \n \n return substr(str_shuffle($str_result), \n 0, $length_of_string); \n }", "function generate_link_hash($link_name)\n{\n\tglobal $user;\n\n\tif (!isset($user->data[\"hash_$link_name\"]))\n\t{\n\t\t$user->data[\"hash_$link_name\"] = substr(sha1($user->data['user_form_salt'] . $link_name), 0, 8);\n\t}\n\n\treturn $user->data[\"hash_$link_name\"];\n}", "static function getMobileRand();", "function random_strings($length_of_string) \n{ \n $str_result = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz'; \n return substr(str_shuffle($str_result), 0, $length_of_string); \n}", "protected function randomIndex() {\n return mt_rand(1, 10);\n }", "function tf_md5rand() {\r\n return md5( time() .'-'. uniqid(rand(), true) .'-'. mt_rand(1, 1000) );\r\n }", "private function genRandomKey()\n {\n return strtoupper(str_random(32));\n }", "function util_random_string($max=30)\n{\n\tsrand(time());\n\t\n\t$source = \"abcdefghijklmnopqrstuvwxyz0123456789\" ;\n\t$shuffled = str_shuffle($source);\n\twhile (strlen($shuffled) < 3*$max)\n\t{\n\t\t$shuffled .= str_shuffle($source);\n\t}\n\t$start = rand(0, $max);\n\treturn substr($shuffled, $start, $max);\n\t/*\n\t$chars = explode(\" \", \"a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9\");\n\tfor($i = 0; $i < $max; $i++){\n\t\t$rnd = array_rand($chars);\n\t\t$rtn .= base64_encode(md5($chars[$rnd]));\n\t}\n\treturn substr(str_shuffle(strtolower($rtn)), 0, $max);\n\t $key = '';\n\t$keys = array_merge(range(0, 9), range('a', 'z'));\n\tfor ($i = 0; $i < $length; $i++) {\n\t\t$key .= $keys[array_rand($keys)];\n\t}\n\treturn $key;\n\t*/\n}", "function random($car) {\n\t$string = \"\";\n\t$chaine = \"abcdefghijklmnpqrstuvwxy\";\n\tsrand((double)microtime()*1000000);\n\tfor($i=0; $i<$car; $i++) {\n\t\t$string .= $chaine[rand()%strlen($chaine)];\n\t}\n\treturn $string;\n}", "function random( $min = 0, $max = 0 ) {\n\tglobal $rnd_value;\n\n\t// Reset $rnd_value after 14 uses\n\t// 32(md5) + 40(sha1) + 40(sha1) / 8 = 14 random numbers from $rnd_value\n\tif ( strlen($rnd_value) < 8 ) {\n\t\tstatic $seed = 'jimmy';\n\t\t$rnd_value = md5( uniqid(microtime() . mt_rand(), true ) . $seed );\n\t\t$rnd_value .= sha1($rnd_value);\n\t\t$rnd_value .= sha1($rnd_value . $seed);\n\t\t$seed = md5($seed . $rnd_value);\n\t}\n\n\t// Take the first 8 digits for our value\n\t$value = substr($rnd_value, 0, 8);\n\n\t// Strip the first eight, leaving the remainder for the next call to wp_rand().\n\t$rnd_value = substr($rnd_value, 8);\n\n\t$value = abs(hexdec($value));\n\n\t// Reduce the value to be within the min - max range\n\t// 4294967295 = 0xffffffff = max random number\n\tif ( $max != 0 )\n\t\t$value = $min + (($max - $min + 1) * ($value / (4294967295 + 1)));\n\n\treturn abs(intval($value));\n}", "function getRandomCode() {\n $code = md5($this->getid_recipient() . $this->getid_offer() . $this->getexpirationdate());\n return $code;\n }", "public function generate()\n{\n\n//generate a unique id//\n\n$unique=uniqid();\n\n$mesadig=crypt($unique,rand());\n//encrypt with the salt//\n\n//FILETER FOR THE /\n\n$mesadig=str_replace('/', 'ssd', $mesadig);\n\nreturn $mesadig;\n\n}", "function wp_rand($min = \\null, $max = \\null)\n {\n }", "function generateRandomString($len=32)\n{\nreturn substr(str_shuffle(str_repeat($x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',$len)),0,$len);\n}", "function generaPass($longi){\r\n\t$cadena = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\r\n\t//Obtenemos la longitud de la cadena de caracteres\r\n\t$longitudCadena=strlen($cadena);\r\n\r\n\t//Se define la variable que va a contener la contraseņa\r\n\t$pass = \"\";\r\n\t$longitudPass=$longi;\r\n\r\n\t//Creamos la contraseņa\r\n\tfor($i=1 ; $i<=$longitudPass ; $i++){\r\n\t\t//Definimos numero aleatorio entre 0 y la longitud de la cadena de caracteres-1\r\n\t\t$pos=rand(0,$longitudCadena-1);\r\n\r\n\t\t$pass .= substr($cadena,$pos,1);\r\n\t}\r\n\treturn $pass;\r\n}", "function createRandomToken(){\n\t\t\t$chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\n\t\t\tsrand((double)microtime()*1000000);\n\t\t\t$i = 0;\n\t\t\t$pass = '' ;\n\t\t\twhile ($i <= 7){\n\t\t\t\t$num = rand() % 33;\n\n\t\t\t\t\t\t\t$tmp = substr($chars, $num, 1);\n\n\t\t\t\t\t\t\t$pass = $pass . $tmp;\n\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn $pass;\n\t\t\t\t\t\t}", "function random2($min = null, $max = null) {\n static $seeded;\n\n if (!isset($seeded)) {\n mt_srand((double)microtime()*1000000);\n $seeded = true;\n }\n\n if (isset($min) && isset($max)) {\n if ($min >= $max) {\n return $min;\n } else {\n return mt_rand($min, $max);\n }\n } else {\n return mt_rand();\n }\n }", "function tf_secure_rand($length)\r\n {\r\n if (function_exists('openssl_random_pseudo_bytes')) {\r\n $rnd = openssl_random_pseudo_bytes($length, $strong);\r\n if ($strong) {\r\n return $rnd;\r\n }\r\n }\r\n\r\n $sha ='';\r\n $rnd ='';\r\n\r\n if (file_exists('/dev/urandom')) {\r\n $fp = fopen('/dev/urandom', 'rb');\r\n if ($fp) {\r\n if (function_exists('stream_set_read_buffer')) {\r\n stream_set_read_buffer($fp, 0);\r\n }\r\n $sha = fread($fp, $length);\r\n fclose($fp);\r\n }\r\n }\r\n\r\n for ($i = 0; $i < $length; $i++) {\r\n $sha = hash('sha256', $sha.mt_rand());\r\n $char = mt_rand(0, 62);\r\n $rnd .= chr(hexdec($sha[$char].$sha[$char+1]));\r\n }\r\n\r\n return $rnd;\r\n }", "function getRand($len) {\n\t\t$char = 'abcdefghijklmnopqrstuvwxyz';\n\t\t$rand = '';\n\t\tfor ($i = 0; $i < $len; $i++) {\n\t\t\t$rand .= $char[rand(0, strlen($char) - 1)];\n\t\t}\n\t\treturn $rand;\n\t}", "function generateRandStr($length){\n \t\t$randstr = \"\";\n \t\tfor($i=0; $i<$length; $i++){\n \t\t$randnum = mt_rand(0,61);\n\t\t\t\tif($randnum < 10){\n \t\t$randstr .= chr($randnum+48);\n \t\t}else if($randnum < 36){\n \t\t$randstr .= chr($randnum+55);\n \t\t}else{\n \t\t$randstr .= chr($randnum+61);\n \t\t}\n \t\t}\n \t\treturn $randstr;\n \t\t}", "function generate_random_number($start, $end, $flag){\r\n\tglobal $g_var;\r\n\tsrand((double)microtime()*1000000);\r\n\t$random = (rand($start,$end));\r\n\t\r\n\treturn $random;\r\n}", "function random_strings($length_of_string) \n {\n $str_result = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; \n \n // Shufle the $str_result and returns substring \n // of specified length \n return substr(str_shuffle($str_result), \n 0, $length_of_string); \n }", "function random_strings($length_of_string) \n {\n $str_result = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; \n \n // Shufle the $str_result and returns substring \n // of specified length \n return substr(str_shuffle($str_result), \n 0, $length_of_string); \n }" ]
[ "0.70327264", "0.692919", "0.68286526", "0.674898", "0.6579774", "0.64992416", "0.63017327", "0.62563586", "0.6234002", "0.6171639", "0.6168669", "0.6151963", "0.612277", "0.6101543", "0.6086519", "0.6056398", "0.6049515", "0.60404676", "0.60002637", "0.59647495", "0.5964702", "0.5956389", "0.5940147", "0.59317183", "0.59244865", "0.5919959", "0.5917379", "0.5906241", "0.58927405", "0.58914715", "0.5860846", "0.58445793", "0.5842325", "0.5837873", "0.58358115", "0.5812382", "0.5810994", "0.5807929", "0.58048075", "0.5799035", "0.5789859", "0.5785261", "0.5746465", "0.5734105", "0.5731183", "0.5724938", "0.57199436", "0.57149595", "0.5711134", "0.5710144", "0.5708217", "0.5706079", "0.5700661", "0.56973857", "0.56955546", "0.5683316", "0.56715786", "0.56625384", "0.565686", "0.5653292", "0.565316", "0.5641101", "0.5638211", "0.56252396", "0.5624407", "0.5623771", "0.56220305", "0.5620992", "0.5608997", "0.55930567", "0.55917364", "0.55909944", "0.55837196", "0.5582095", "0.55776054", "0.5574942", "0.55728805", "0.5560423", "0.5560207", "0.5560146", "0.555967", "0.5557047", "0.5556034", "0.55542606", "0.5548867", "0.5548637", "0.5548187", "0.55470645", "0.554609", "0.5542388", "0.5540978", "0.55399805", "0.55353504", "0.55240494", "0.5522619", "0.55219513", "0.551413", "0.5511608", "0.5507078", "0.5505755", "0.5505755" ]
0.0
-1
Get list of tempory uploaded files
public function getAll() { $list = $this->_tableGw->select(); return $list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFiles()\n {\n return R::findAll('upload');\n }", "public function getUploadedFiles() {}", "private function getUploadedFiles()\n {\n $list = array();\n \n if(isset($_REQUEST['files']))\n {\n $files = explode('::', $_REQUEST['files']);\n foreach($files as $index => $item)\n {\n list($name, $src, $size) = explode(':', $item);\n \n $list[] = array(\n 'name' => $name,\n 'src' => $src,\n 'size' => $size \n );\n }\n }\n \n return $list;\n }", "public function all()\n {\n $dir = public_path() . '/uploads/temp/' . Session::getId() . '/';\n $data = [];\n $mimetypes = new Mimetype;\n if(file_exists($dir)) {\n foreach(scandir($dir) as $file) {\n if(in_array($file, ['.', '..'])) continue;\n $filedata = [];\n $filedata['name'] = $file;\n $filedata['url'] = url('/uploads/temp/' .Session::getId() . '/' .$file);\n $filedata['size'] = File::size($dir . $file);\n $filedata['type'] = $mimetypes->detectByFileExtension(File::extension($file));\n $data[] = $filedata;\n }\n return $data;\n }\n }", "public function getUploadedFiles()\n {\n }", "public function getUploadedFiles()\n {\n return $this->uploadedFiles;\n }", "public function getUploadedFiles()\n {\n return $this->uploadedFiles;\n }", "public function getFileUploads()\n {\n return $this->file_uploads;\n }", "public function getFiles() {}", "public static function getAll_files() {\n $db = DBInit::getInstance();\n\n $statement = $db->prepare(\"SELECT id, file_name, uploaded, user FROM files\");\n $statement->execute();\n\n return $statement->fetchAll();\n }", "public function get_test_file_uploads()\n {\n }", "public function getFiles();", "public function getFiles();", "public function getFiles();", "public function getFiles() {\n return $this->getPartFiles(0);\n }", "public function files()\r\n {\r\n return $this->files;\r\n }", "public function getFiles() {\r\n\r\n $files = array();\r\n\r\n $userId= $this->userId;\r\n $trackingId = $this->trackingFormId;\r\n $dir = FILEPATH . $userId. '/' . $trackingId;\r\n\r\n if (is_dir($dir)) {\r\n if ($dh = opendir($dir)) {\r\n while (($file = readdir($dh)) !== false) {\r\n if($file != '.' && $file != '..') {\r\n $size = $this->Size($dir . '/' . $file);\r\n array_push($files, array('name'=>$file,\r\n 'urlfilename'=>urlencode($file),\r\n 'size'=>$size));\r\n }\r\n }\r\n closedir($dh);\r\n }\r\n }\r\n\r\n return $files;\r\n }", "public function getUploadedFiles()\n {\n if (null === $this->uploadedFiles) {\n $this->uploadedFiles = UploadedFilesFactory::createFiles();\n }\n return $this->uploadedFiles;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles ();", "public function fileInfo()\n {\n return R::findAll('uploaddetail');\n }", "function getFiles()\r\n\t{\r\n\t\treturn $this->files;\r\n\t}", "public function get_uploaded_files(/* ... */)\n {\n return $this->_uploaded;\n }", "public function getAll()\n {\n return $files;\n }", "public function uploaded_files()\n {\n\t\tif(Module::hasAccess(\"Uploads\", \"view\")) {\n\t\t\t$uploads = array();\n\t\n\t\t\t// print_r(Auth::user()->roles);\n\t\t\tif(Entrust::hasRole('SUPER_ADMIN')) {\n\t\t\t\t$uploads = Upload::all();\n\t\t\t} else {\n\t\t\t\tif(config('laraadmin.uploads.private_uploads')) {\n\t\t\t\t\t// Upload::where('user_id', 0)->first();\n\t\t\t\t\t$uploads = Auth::user()->uploads;\n\t\t\t\t} else {\n\t\t\t\t\t$uploads = Upload::all();\n\t\t\t\t}\n\t\t\t}\n\t\t\t$uploads2 = array();\n\t\t\tforeach ($uploads as $upload) {\n\t\t\t\t$u = (object) array();\n\t\t\t\t$u->id = $upload->id;\n\t\t\t\t$u->name = $upload->name;\n\t\t\t\t$u->extension = $upload->extension;\n\t\t\t\t$u->public = $upload->public;\n\t\t\t\t\n\t\t\t\t$u->user = $upload->user->name;\n\t\t\t\t$u->url = $upload->url;\n\t\t\t\t$u->thumbnails = $upload->thumbnails;\n\t\t\t\t$u->path = $upload->path;\n\t\t\t\t$u->type = $upload->type;\n\n\t\t\t\t$uploads2[] = $u;\n\t\t\t}\n\t\t\treturn response()->json(['uploads' => $uploads2]);\n\t\t} else {\n\t\t\treturn response()->json([\n\t\t\t\t'status' => \"failure\",\n\t\t\t\t'message' => \"Unauthorized Access\"\n\t\t\t]);\n\t\t}\n }", "public function files()\n {\n return $this->_array[\"files\"];\n }", "public static function getFiles()\n\t{\n\t\t$result = Array();\n\t\t$files = sfCore::$db->query(\"SELECT * FROM `swoosh_file_storage`\")->asObjects();\n\t\tforeach($files as $file){\n\t\t\t$sfFileStorageItem = sfCore::make('sfFileStorageItem');\n\t\t\t$sfFileStorageItem->loadFromObject($file);\n\t\t\t$result[] = $sfFileStorageItem;\n\t\t}\n\t\treturn $result;\n\t}", "public function getFiles(): array\n {\n return $this->files;\n }", "public function getFiles() {\n return $this->files;\n }", "public function getFiles() {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->_files;\n }", "function get_list_file_uploaded($params) {\n $sql = \"SELECT * FROM fa_files WHERE data_id = ?\";\n $query = $this->db->query($sql, $params);\n if ($query->num_rows() > 0) {\n $result = $query->result_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }", "public function getFiles()\n {\n $request = $this->getRequest();\n return (array)$request->getFiles();\n }", "public function getFiles() {\n\t\treturn $this->files;\n\t}", "public function list_of_fileuploads() {\n $request = $_GET;\n $result = $this->fileupload_model->load_list_of_fileuploads($request, array());\n $result = getUtfData($result);\n echo json_encode($result);\n exit;\n }", "public function GetFiles() {\n\n if ($this->Files === null) {\n $this->Files= array();\n foreach($this->GetRequestContext()->FILES as $Key=>$Value) {\n if (is_array($Value['tmp_name'])) {\n $this->Error('Request/File: multiple values for files are not supported for key \"'.$Key.'\".');\n continue;\n }\n $this->Files[$Key]= $this->BuildComponent('Accent\\\\Request\\\\File', array('OrigInfo'=> $Value));\n }\n }\n return $this->Files;\n }", "public function uploadGetUploadedFilesList($fieldName)\n\t{\n\t\t$returnValue = [];\n\n\t\t$fileString = $this->getObjectData($fieldName);\n\t\tif (!empty($fileString)) {\n\t\t\t$filesArray = explode(\"#\", $fileString);\n\t\t\tforeach ($filesArray as $fullFilePath) {\n\t\t\t\tif (!empty($fullFilePath)) {\n\t\t\t\t\t// Prepare some infos to send back for a preview.\n\t\t\t\t\t$fileurl = $this->uploadGetRelativeFileIconPath('/' . str_replace(GLOBAL_FRONTEND_DIR, \"\", $fullFilePath));\n\t\t\t\t\t$filenamePieces = explode('/', $fullFilePath);\n\t\t\t\t\t$filename = $filenamePieces[count($filenamePieces) - 1]; // The last piece is the filename.\n\n\t\t\t\t\t// Add the preview infos to the array.\n\t\t\t\t\t$returnValue[] = [\n\t\t\t\t\t\t'filename' => $filename,\n\t\t\t\t\t\t'url' => $fileurl\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$uploadDirectoryTail = $this->uploadGetRelativeTempDir($fieldName);\n\t\t\t$uploadDirectory = GLOBAL_FRONTEND_DIR . $uploadDirectoryTail;\n\t\t\tif (is_dir($uploadDirectory)) {\n\t\t\t\t$files = scandir($uploadDirectory);\n\t\t\t\tif (!empty($files)) {\n\t\t\t\t\tforeach($files AS $file) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t$file !== \".\" AND\n\t\t\t\t\t\t\t$file !== \"..\"\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t$this->uploadSaveFile($_POST['fieldName'], $file, $uploadDirectory);\n\t\t\t\t\t\t\t$fileurl = $this->uploadGetRelativeFileIconPath('/' . $uploadDirectoryTail . $file);\n\t\t\t\t\t\t\t$returnValue[] = [\n\t\t\t\t\t\t\t\t'filename' => $file,\n\t\t\t\t\t\t\t\t'url' => $fileurl\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $returnValue;\n\t}", "public function getFiles(): array;", "public function getFiles(): array\n {\n return [$this->file];\n }", "public function getFiles() : array\n {\n return $this->files;\n }", "public function uploads(): array;", "public function uploaded_files()\n {\n\t\tif(Module::hasAccess(\"Uploads\", \"view\")) {\n\t\t\t$uploads = array();\n\t\n\t\t\t// print_r(Auth::user()->roles);\n\t\t\tif(Entrust::hasRole('SUPER_ADMIN')) {\n\t\t\t\t$uploads = Upload::all();\n\t\t\t} else {\n\t\t\t\tif(config('laraadmin.uploads.private_uploads')) {\n\t\t\t\t\t// Upload::where('user_id', 0)->first();\n\t\t\t\t\t$uploads = Auth::user()->uploads;\n\t\t\t\t} else {\n\t\t\t\t\t$uploads = Upload::all();\n\t\t\t\t}\n\t\t\t}\n\t\t\t$uploads2 = array();\n\t\t\tforeach ($uploads as $upload) {\n\t\t\t\t$u = (object) array();\n\t\t\t\t$u->id = $upload->id;\n\t\t\t\t$u->name = $upload->name;\n\t\t\t\t$u->extension = $upload->extension;\n\t\t\t\t$u->hash = $upload->hash;\n\t\t\t\t$u->public = $upload->public;\n\t\t\t\t$u->caption = $upload->caption;\n\t\t\t\t$u->user = $upload->user->name;\n\t\t\t\t\n\t\t\t\t$uploads2[] = $u;\n\t\t\t}\n\t\t\t\n\t\t\t// $folder = storage_path('/uploads');\n\t\t\t// $files = array();\n\t\t\t// if(file_exists($folder)) {\n\t\t\t// $filesArr = File::allFiles($folder);\n\t\t\t// foreach ($filesArr as $file) {\n\t\t\t// $files[] = $file->getfilename();\n\t\t\t// }\n\t\t\t// }\n\t\t\t// return response()->json(['files' => $files]);\n\t\t\treturn response()->json(['uploads' => $uploads2]);\n\t\t} else {\n\t\t\treturn response()->json([\n\t\t\t\t'status' => \"failure\",\n\t\t\t\t'message' => \"Unauthorized Access\"\n\t\t\t]);\n\t\t}\n }", "public function getFileStorages() {}", "function list_files () {\n\t\t$root = $this->get_root();\n\t\t\n\t\treturn $this->_list_files($root);\n\t}", "public function getFiles(){\r\n $fids = Input::get('FILES');\r\n $files = array();\r\n foreach($fids as $fid){\r\n $file = UploadedFiles::find($fid);\r\n if($file == null)\r\n return -1;\r\n $files[]=$file;\r\n }\r\n return json_encode($files);\r\n }", "public function getAllUploads() {\n return Upload::all();\n }", "public function files() {\n\t\t$files = $this->ApiFile->fileList($this->path);\n\t\t$this->set('files', $files);\n\t}", "function get_file_objs() {\n return $this->file_objs;\n }", "public function files() :array\n {\n $files = DB::query(\"SELECT `ft_filename` AS 'filename', `ft_size` AS 'size' FROM `file_table` WHERE `ft_ut_id` = :u_id ORDER BY `ft_filename` ASC\", array(':u_id'=>$_SESSION['user_id']));\n\n $list = [];\n $i = 0;\n\n foreach($files as $file){\n $list[$i] = array($file['filename'], round($file['size']/1024, 2));\n $i++;\n }\n return $list;\n }", "public function files();", "public function files();", "public function files();", "function getFiles(){\n\t\treturn $this->used_files;\n\t}", "public function get_files()\n {\n }", "function get_list_of_files() {\n $result = $this->pdo->query('SELECT * FROM files ORDER BY filename ASC');\n return $result;\n }", "public function getTemporaryFiles()\n {\n if (is_file($file = frameEbbs::_()->getModule('warehouse')->getTemporaryPath() . '/stacks.dat')) {\n $data = explode(PHP_EOL, file_get_contents($file));\n unlink($file);\n\n return $data;\n }\n\n return array();\n }", "public function getFileList() {\n return $this->fileList;\n }", "protected function getFileList()\n\t\t{\n\t\t\t$dirname=opendir($this->ruta);\n\t\t\t$files=scandir($this->ruta);\n\t\t\tclosedir ($dirname);\t\n\t\t\t\n\t\t\treturn $files;\t\t\n\t\t}", "protected function getFiles(): array\n {\n return [];\n }", "public function getFileList()\n {\n if ($sessionKey = $this->getSessionKey()) {\n $list = $deferredQuery = $this->model\n ->{$this->attribute}()\n ->withDeferred($sessionKey)\n ->orderBy('id', 'desc')\n ->get();\n } else {\n $list = $this->model\n ->{$this->attribute}()\n ->orderBy('id', 'desc')\n ->get();\n }\n\n if (!$list) {\n $list = new Collection;\n }\n\n /*\n * Decorate each file with thumb\n */\n $list->each(function ($file) {\n $this->decorateFileAttributes($file);\n });\n\n return $list;\n }", "private function _getFiles($input)\n {\n return isset($_FILES[$input]) ?\n PostHelper::toArrayOfFiles($_FILES[$input]) :\n [];\n }", "public function getUserFiles()\n {\n $user_files = Helper::getUserFiles();\n return $user_files;\n }", "public function getFiles()\n {\n return FileInfo::findBy( Condition::EQ(FileInfo::TABLE, 'module_id', $this->getId()),\n new ArrayObject(array('sort'=>$this->getSortBy(), 'ord'=>'asc')) );\n }", "public function list_owned_files() {\n $stmt = $this->pdo->prepare('select filename from file where user_id = :id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, $f['filename']);\n }\n return $result;\n }", "function _generateFilesList() {\n return array();\n }", "protected function getFiles() {\n\t\tif ($this->_files === null) {\n\t\t\t$files = array(\n\t\t\t\t\"test.txt\" => uniqid(),\n\t\t\t\t\"test2.txt\" => uniqid(),\n\t\t\t\t\"test3.txt\" => uniqid(),\n\t\t\t);\n\t\t\tforeach($files as $file => $content) {\n\t\t\t\tfile_put_contents($this->path.\"/\".$file,$content);\n\t\t\t\t$this->assertTrue(file_exists($this->path.\"/\".$file));\n\t\t\t}\n\t\t\t$this->_files = array_keys($files);\n\t\t}\n\t\treturn $this->_files;\n\t}", "public function getAllFiles(){\n $user = auth()->user();\n $cloud = CloudFile::where('user_id', $user->id);\n $active = $cloud->where('active',true)->get();\n $trash = $cloud->where('active',true)->onlyTrashed()->get();\n\n return $this->respondWithSuccess('Files details',[\n 'active'=>$active,'trash'=>$trash]);\n }", "public function getFiles() : FileUploadHelper {\n\t\t\treturn new FileUploadHelper($this->variables->files);\n\t\t}", "private function getFileList(){\n // Using the high-level iterators returns ALL the objects in your bucket, low level returns truncated result of about 1000 files\n $objects = $this->AmazonClient->getIterator('ListObjects', array('Bucket' => $this->getDataFromBucket));\n return $objects;\n }", "public static function filelist()\n\t{\n\t\tglobal $g_relative_file_directory;\t// '../../UPLOADS/';\n\t\tglobal $g_relative_root_directory;\t// 'UPLOADS/';\n\n\t\t$actualdirectory = $_POST['actualdir'];\n\t\tif(!$actualdirectory)\n\t\t\t$actualdirectory='';\n\n\t\t$result = [];\n\t\t$result['directory'] = $g_relative_root_directory;\n\t\t$result['actualdir'] = $actualdirectory;\n\n\t\tif(strlen($actualdirectory)>0)\n\t\t\t$actualdirectory.=\"/\";\n\n\t\t$reldir = $g_relative_file_directory.$actualdirectory;\n\t\t$dirs=[];\n\t\tforeach(glob($reldir.'*', GLOB_ONLYDIR) as $d)\n\t\t{\n\t\t\t$fn=str_replace($reldir,'',$d);\n\t\t\t$dirs[] = $fn;\n\t\t}\n\t\t$result['dirs']=$dirs;\n\t\t//$result['reldir']=$reldir;\n\n\t\t$filenames = [];\n\t\tforeach(array_filter(glob($reldir.'*.*'), 'is_file') as $file)\n\t\t{\n\t\t\t$farray = [];\n\t\t\t$fn=str_replace($reldir,'',$file);\n\n\t\t\t$f=filesize($file);\n\t\t\t$fe=\"bytes\";\n\t\t\tif($f/1024 > 1)\n\t\t\t{\n\t\t\t\t$f/=1024;\n\t\t\t\t$fe=\"kb\";\n\t\t\t\tif($f/1024 > 1)\n\t\t\t\t{\n\t\t\t\t\t$f/=1024;\n\t\t\t\t\t$fe=\"Mb\";\n\t\t\t\t\tif($f/1024 > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$f/=1024;\n\t\t\t\t\t\t$fe=\"GB\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$farray['Filename'] = $fn;\n\t\t\t$farray['Filesize'] = number_format($f,1);\n\t\t\t$farray['FilesizeDeterminant'] = $fe;\n\n\t\t\t$filenames[] = $farray;\n\t\t}\n\t\t$result['files']=$filenames;\n\n\t\theader('Content-Type: application/json');\n\t\techo(json_encode($result));\n\t}", "function ajaxlistfiles(){\n\n\t\t//Glob all files in uploaddir\n\t\t$files = array();\n\t\tforeach(glob($this->uploaddir.'*') as $file){\n\n\t\t\t//Strip path\n\t\t\t$filename = str_replace($this->uploaddir,'',$file);\n\n\t\t\t$files[$filename]['filename']=$filename;\n\t\t\t$files[$filename]['filesize']=filesize($file) / 1024 / 1024; //Mb\n\t\t\t$files[$filename]['modified']=filemtime($file); //Mb\n\n\t\t\t//Check torrent\n\t\t\tif( file_exists( $this->torrentdir.$filename.'.torrent' )){\n\n\t\t\t\t//Add torrent file\n\t\t\t\t$files[$filename]['torrent']=$filename.'.torrent';\n\n\t\t\t\t//Check database table phptracker_peers for torrent peers:\n\t\t\t\tif($torrent = $this->Torrent->findByName($filename)){\n\t\t\t\t\tif($peers = $this->Peer->findAllByInfoHash($torrent['Torrent']['info_hash'])){\n\t\t\t\t\t\t$files[$filename]['peers']=$peers;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->set('files',$files);\n\n\t\t$this->layout = 'ajax';\n\t}", "public static function getRegisteredTemporaryFilesList($userId)\n\t{\n\t\t/**\n\t\t * @global CDatabase $DB\n\t\t */\n\t\tglobal $DB;\n\n\t\t$arFiles = array();\n\n\t\t$userId = (int) $userId;\n\n\t\t$rc = $DB->Query(\n\t\t\t\"SELECT FILE_ID FROM b_tasks_files_temporary\n\t\t\tWHERE USER_ID = $userId\");\n\n\t\twhile ($ar = $rc->Fetch())\n\t\t\t$arFiles[] = (int) $ar['FILE_ID'];\n\n\t\t// For backward compatibility. Just uploaded files was registered in\n\t\t// $_SESSION[\"TASKS_UPLOADED_FILES\"] in past\n\t\tif (isset($_SESSION['TASKS_UPLOADED_FILES']) && count($_SESSION['TASKS_UPLOADED_FILES']))\n\t\t{\n\t\t\t$loggedUserId = (int) User::getId();\n\n\t\t\t// this files list can be used only if logged user and checked user are equals\n\t\t\tif ($loggedUserId)\n\t\t\t{\n\t\t\t\tif ($loggedUserId === $userId)\n\t\t\t\t{\n\t\t\t\t\tforeach ($_SESSION['TASKS_UPLOADED_FILES'] as $fileId)\n\t\t\t\t\t\t$arFiles[] = (int) $fileId;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn (array_unique($arFiles));\n\t}", "public function getFileList()\n {\n $filelist = app()->redis->hGet('Torrent:' . $this->tid . ':base_content', 'torrent_structure');\n if ($filelist == false) {\n $filelist = app()->pdo->createCommand('SELECT `torrent_structure` FROM `torrents` WHERE `id`= :tid LIMIT 1')->bindParams([\n 'tid' => $this->tid\n ])->queryScalar();\n // However, we don't cache it for cache safety reason.\n }\n return ['msg' => 'Get Filelist success', 'result' => json_decode($filelist, false)];\n }", "public function getAll()\n {\n try {\n $response = $this->getClient()->request('GET', $this->url . \"/files\", [\n 'headers' => [\n 'Authorization' => 'Bearer ' . $this->token,\n ],\n ]);\n } catch (\\Exception $e) {\n $response = $e;\n }\n\n return json_decode($response->getBody()->getContents());\n }", "public function getFiles()\n {\n echo json_encode($this->galery->getFiles());\n }", "public function getFiles()\n {\n return array_keys($this->files);\n }", "public function getFiles()\n\t{\n\t\tif ($this->_files === null) {\n\t\t\t$command = 'show --pretty=\"format:\" --name-only '.$this->hash;\n\t\t\tforeach(explode(\"\\n\",$this->repository->run($command)) as $line) {\n\t\t\t\t$this->_files[] = trim($line);\n\t\t\t}\n\t\t}\n\t\treturn $this->_files;\n\t}", "public function getFileList(): array\n\t\t{\n\t\t\treturn $this->fileList;\n\t\t}", "function getFileList() {\n\tglobal $apiBaseURL; // bad practice in production - fine for this example\n\n\t// use the getURL function to call the URL\n\t$response = getURL($apiBaseURL);\n\t// it returned as JSON so lets decode it\n\t$response = json_decode($response);\n\n\t// return the response\n\treturn($response);\n}", "private function searchFiles()\n {\n $query = File::whereNull('deleted_at');\n $data = $query->get();\n\n return $data;\n }", "public function getOtherFiles(): array;", "public function getUserUploads() {\n\t\tif (!self::COOKIES_ENABLED) {\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t/* load form database */\n\t\t$uploads = array();\n\t\t$delete_code = $this->getDeleteCode();\n\t\t$result = $this->db->query('\n\t\t\tSELECT *\n\t\t\tFROM image\n\t\t\tWHERE delete_code = \"'.SQLite3::escapeString($delete_code).'\"\n\t\t\t\tAND gallery_id = \"\"\n\t\t\tORDER BY ROWID DESC');\n\t\tif ($result) {\n\t\t\twhile ($entry = $result->fetchArray(SQLITE3_ASSOC)) {\n\t\t\t\t$uploads[$entry['id']] = $entry;\n\t\t\t}\n\t\t}\n\t\treturn $uploads;\n\t}", "public function getFilesList() : array {\n $sqlQuery = 'SELECT * FROM files';\n $statement = $this->_dbHandle->prepare($sqlQuery);\n $statement->execute();\n\n $dataSet = [];\n while ($row = $statement->fetch()) {\n $dataSet[] = new File($row);\n }\n return $dataSet;\n }", "private function getFileList()\n {\n\n $count = $this->getFileCount();\n $size = $this->getSize() + 4;\n\n $this->seek(\n $this->offset\n + 18\n + $this->getAliasSize()\n + 4\n + $this->getMetadataSize()\n );\n\n return $this->readFileList($count, $size);\n }", "public function getConvertedTempFile()\n\t{\n\n\t\t$file = array(\"name\" => StringHelper::substr($this->tmpFileName, strrpos($this->tmpFileName, DIRECTORY_SEPARATOR) + 1),\n\t\t \"tmp_name\" => $this->tmpFileName);\n\n\t\treturn $file;\n\n\t}", "private function getFilenames() {\n $result = [];\n $files = scandir($this->tmpFolder);\n foreach ($files as $v) {\n if($v != '.' && $v != '..' && '__MACOSX') {\n $result[] = $v;\n }\n }\n\n return $result;\n }", "public function getAllFiles()\n {\n }", "public function getFiles()\n {\n return isset($this->source['files']) && is_array($this->source['files']) ? $this->source['files'] : [];\n }", "public function getUploadedFileInfo();", "public function files()\n {\n if($this->collection->empty())\n {\n foreach($this->fileList() as $file)\n {\n if(!is_dir($file))\n {\n $this->files->push($file);\n $this->collection->push(new Reader($this->path . $file));\n }\n else\n {\n $this->directories->push($file);\n }\n }\n }\n\n return $this->collection->get();\n }", "public function ShowFiles() {\n $i = 0;\n if ($handle = opendir($this->filePath)) {\n while (false !== ($file = readdir($handle))) {\n if (($file != '..') && ($file != '.') && ($file != 'Thumbs.db')) {\n $files[$i] = $file;\n $i++;\n }\n }\n closedir($handle);\n }\n return($files);\n }", "public function getTmpFilesCreated() {\n return $this->tmpFilesCreated;\n }" ]
[ "0.7819385", "0.7664267", "0.747257", "0.73408234", "0.72912335", "0.7197342", "0.7197342", "0.7122286", "0.70128083", "0.7009124", "0.69708335", "0.6958534", "0.6958534", "0.6958534", "0.6934792", "0.69292104", "0.6923858", "0.69049114", "0.6889502", "0.6889502", "0.6889502", "0.6889502", "0.6889502", "0.6889502", "0.6889502", "0.6889502", "0.6889502", "0.6889502", "0.68818593", "0.68683696", "0.6864953", "0.685298", "0.6846419", "0.6841723", "0.6837084", "0.6833593", "0.6821066", "0.68188673", "0.68188673", "0.6793446", "0.67835015", "0.6777603", "0.67738485", "0.67707443", "0.6761919", "0.6744581", "0.67317724", "0.6707789", "0.6704126", "0.66750157", "0.666747", "0.66426724", "0.6640641", "0.66378546", "0.6612443", "0.65763503", "0.6569283", "0.65515286", "0.6542726", "0.6542726", "0.6542726", "0.6534556", "0.65088516", "0.6507005", "0.65017295", "0.649944", "0.6499042", "0.649665", "0.64925873", "0.647278", "0.644987", "0.6434247", "0.64313275", "0.6430446", "0.6402288", "0.63849086", "0.6375608", "0.6366018", "0.6346386", "0.6345962", "0.63387144", "0.632703", "0.632454", "0.6321527", "0.6297782", "0.628923", "0.62888116", "0.6265769", "0.62430394", "0.6242397", "0.624222", "0.6227777", "0.62108576", "0.6210675", "0.62091464", "0.6202357", "0.6190821", "0.6184898", "0.61846", "0.61780685", "0.61689067" ]
0.0
-1
Get count of tempory storaged images
public function countTemporyImages(){ $count = $this->_tableGw->select()->count(); return $count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function count()\n {\n return $this->getImages()->count();\n }", "function total_images_uploaded() {\n\tglobal $dB;\n\t$uploaded_qry = $dB->query_fetch_single(\"SELECT count(*) as total FROM chv_images;\");\n\treturn $uploaded_qry[\"total\"];\n}", "public function count(): int\n {\n return count($this->storage);\n }", "public function count()\n {\n return $this->storage->count();\n }", "public function getNumberOfImages()\n {\n return $this->resource->getNumberImages();\n }", "public function count()\n {\n return $this->_storage->count();\n }", "public function getStorageCount()\n {\n return $this->storageCount;\n }", "function count_pictures() {\n global $connexion, $config;\n $nb_images = $connexion->query('SELECT COUNT(id) FROM image')->fetchColumn();\n return $nb_images;\n}", "private function getSpecNoImageCount(){\n\t\t$cnt = 0;\n\t\tif($this->collid){\n\t\t\t$sql = 'SELECT count(o.occid) AS cnt '.\n\t\t\t\t'FROM omoccurrences o LEFT JOIN images i ON o.occid = i.occid '.\n\t\t\t\t'WHERE o.collid = '.$this->collid.' AND i.imgid IS NULL ';\n\t\t\t$rs = $this->conn->query($sql);\n\t\t\twhile($r = $rs->fetch_object()){\n\t\t\t\t$cnt = $r->cnt;\n\t\t\t}\n\t\t\t$rs->free();\n\t\t}\n\t\treturn $cnt;\n\t}", "public function getImagesCount()\n {\n return $this->imagesCount;\n }", "function GetPhotoUploadCount(){\r\n\t$directory = \"./images/\";\r\n\t$filecount = 0;\r\n\t$files = glob($directory . \"4mw*.jpg\");\r\n\tif ($files){\r\n \t\t$filecount = count($files);\r\n\t}\r\n\techo $filecount;\r\n}", "public function getUsedStorageSize() {\n\t\treturn (int)$this->db->querySingle('SELECT SUM(size) FROM image');\n\t}", "public function count()\n\t{\n\t\treturn $this->filesRepository->count();\n\t}", "public function countStored(): int;", "public function countItems(): int\n\t{\n\t\treturn $this->storage->count();\n\t}", "public function getFileCount(){\n $user = auth()->user();\n $cloud = CloudFile::where('user_id', $user->id);\n $active = $cloud->where('active',true)->count();\n $trash = $cloud->where('active',true)->onlyTrashed()->count();\n\n return $this->respondWithSuccess('Files details',[\n 'active'=>$active,'trash'=>$trash]);\n }", "function get_object_count()\r\n {\r\n return $this->get_browser()->count_photo_gallery_publications($this->get_condition());\r\n }", "private function getAvatarsUploadSize()\n {\n $userId = Auth::user()->id;\n $uploadAmount = Avatar::select('user_id')->where('user_id', $userId)->count();\n return $uploadAmount;\n }", "public function get_nb_pictures(){\n $return = array();\n $sql = sprintf(\"SELECT count(*) FROM miki_album_picture WHERE id_album = %d\",\n mysql_real_escape_string($this->id));\n $result = mysql_query($sql);\n $row = mysql_fetch_array($result);\n return $row[0];\n }", "public function get_count()\n\t\t{\n\t\t\treturn $this->files_count;\n\t\t}", "protected function imageCount()\n\t{\n\t\t$this->score += $this->store['image_count'] * $this->config->data()['imageCount'];\n\t}", "public function totalRecords()\n {\n return TfUserImageType::where('action', 1)->count();\n }", "public function imageCount(): array\n {\n $options = $this->generateGetRequestParams('image_count', uniqid('', true), time());\n\n // Call API\n $res = $this->client->request(\"GET\", \"image_count/\", [\n 'query' => $options,\n ]);\n\n // Decode Response\n $parsed_json = json_decode($res->getBody(), true);\n if (null === $parsed_json) {\n throw new TinEyeJsonParseException($res->getBody());\n }\n\n return $parsed_json;\n }", "public function imagesCount($id)\n {\n $req = $this->_db->prepare('SELECT count(id_images) AS nombre FROM images\n WHERE id_articles=:id;');\n $req->bindParam(':id', $id);\n $req->execute();\n $result = $req->fetch();\n return $result['nombre'];\n }", "function how_many_photos($data)\r\n\t{\r\n\t\tglobal $db;\r\n\t\t$query = 'SELECT spotlight_post_id FROM gv_spotlight_post_image WHERE (spotlight_image_block = 0) AND spotlight_post_id = ' . $data;\r\n\t\t$result = mysql_query($query, $db) or die(mysql_error($db));\r\n\t\t\r\n\t\tif(mysql_num_rows($result) > 0)\r\n\t\t{\r\n\t\t\t$number_of_images = mysql_num_rows($result);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t\t$number_of_images = 0;\r\n\t\t}\r\n\t\treturn $number_of_images;\r\n\t}", "public function countFiles()\n {\n return $this->filesQuantity;\n }", "public function _count();", "public function record_count_photo(){\n $sql = $this->db->query(\"select * from `gallery` where status='1' and publish='1' and type='1'\");\n return $sql->num_rows();\n }", "function count_all_files() {\n $result = $this->pdo->query('SELECT COUNT(*) FROM files');\n return $result->fetchColumn();\n }", "public function countImageUses($image)\n {\n $select = $this->getConnection()->select()\n ->from([$this->getMainTableAlias() => $this->getMainTable()])\n ->where(\n 'value = ?',\n $image\n );\n return count($this->getConnection()->fetchAll($select));\n }", "function count_gallery()\n{\n\trequire_once('../conf/config.php');\n\t//Connect to mysql server\n\t$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);\n\tif(!$link)\n\t{\n\t\tdie('Failed to connect to server: ' . mysql_error());\n\t}\n\t//Select database\n\t$db = mysql_select_db(DB_DATABASE);\n\tif(!$db)\n\t{\n\t\tdie(\"Unable to select database\");\n\t}\n\t//\n\t$query=\"select count(*) cnt from gallery\";\n\t$result = mysql_query($query) or die(\"<b>A fatal MySQL error occured</b>.\\n<br />Query: \" . $query . \"<br />\\nError: (\" . mysql_errno() . \") \" . mysql_error());\n\twhile ($row = mysql_fetch_assoc($result))\n\t{\n\t\textract($row);\n\t}\n\treturn $cnt;\n}", "function get_page_count() {\n global $connexion, $config;\n $nb_images = $connexion->query('SELECT COUNT(id) FROM image')->fetchColumn();\n $nb_pages = ceil($nb_images / $config['nb_pictures_page']);\n return $nb_pages;\n}", "function imageCount( $check_write = false )\r\n {\r\n if ( $limit == 0 )\r\n {\r\n $ini =& INIFile::globalINI();\r\n $limit = $ini->read_var( \"eZImageCatalogueMain\", \"ListImagesPerPage\" );\r\n }\r\n\r\n $db =& eZDB::globalDatabase();\r\n\r\n $user =& eZUser::currentUser();\r\n $usePermission = true;\r\n if ( $user )\r\n {\r\n $groups =& $user->groups( false );\r\n\r\n $i = 0;\r\n foreach ( $groups as $group )\r\n {\r\n if ( $i == 0 )\r\n $groupSQL .= \"( Permission.GroupID=$group AND ( CategoryPermission.GroupID=$group OR CategoryPermission.GroupID='-1' ) ) OR\\n\";\r\n else\r\n $groupSQL .= \" ( Permission.GroupID=$group AND ( CategoryPermission.GroupID=$group OR CategoryPermission.GroupID='-1' ) ) OR\";\r\n\r\n $i++;\r\n }\r\n\r\n $groupSQL .= \" (Image.UserID='\" . $user->id() . \"') OR\";\r\n\r\n if ( $user->hasRootAccess() )\r\n $usePermission = false;\r\n }\r\n\r\n $having_str = \"\";\r\n\r\n $sel_str = \"count( DISTINCT Image.ID ) AS Count\";\r\n if ( $usePermission )\r\n {\r\n if ( $check_write )\r\n {\r\n $permissionSQL = \"( ($groupSQL Permission.GroupID='-1') )\r\n AND Image.ID = Permission.ObjectID\r\n AND eZImageCatalogue_Category.ID = CategoryPermission.ObjectID\r\n AND \";\r\n $sel_str = \"max( Permission.ReadPermission ) AS MaxReadPerm, max( Permission.WritePermission ) AS MaxWritePerm,\r\n MAX(CategoryPermission.WritePermission) AS MaxCatWritePerm, MAX(CategoryPermission.ReadPermission) AS MaxCatReadPerm,\r\n MAX(CategoryPermission.UploadPermission) AS MaxCatUploadPerm\";\r\n $having_str = \"GROUP BY Image.ID\r\n HAVING MaxWritePerm=1 AND MaxReadPerm=1 AND MaxCatWritePerm=1 AND MaxCatReadPerm=1 AND MaxCatUploadPerm=1 \";\r\n }\r\n else\r\n $permissionSQL = \"( ( $groupSQL Permission.GroupID='-1' AND CategoryPermission.GroupID='-1' ) AND\r\n Permission.ReadPermission='1' AND CategoryPermission.ReadPermission='1') AND\r\n Image.ID = Permission.ObjectID AND \";\r\n\r\n $fromTablePermissionsSQL = \", eZImageCatalogue_ImagePermission as Permission, \" .\r\n \"eZImageCatalogue_CategoryPermission as CategoryPermission\";\r\n\r\n }\r\n else\r\n {\r\n $permissionSQL = \"\";\r\n $fromTablePermissionsSQL = \"\";\r\n }\r\n\r\n $sql = \"\r\n SELECT $sel_str\r\n FROM eZImageCatalogue_Image as Image,\r\n eZImageCatalogue_Category,\r\n eZImageCatalogue_ImageCategoryLink\r\n $fromTablePermissionsSQL\r\n WHERE $permissionSQL\r\n eZImageCatalogue_ImageCategoryLink.ImageID = Image.ID\r\n AND eZImageCatalogue_Category.ID = eZImageCatalogue_ImageCategoryLink.CategoryID\r\n AND eZImageCatalogue_Category.ID='$this->ID'\r\n AND eZImageCatalogue_ImageCategoryLink.CategoryID='$this->ID'\r\n $having_str\";\r\n\r\n// eZLog::writeNotice( \"Count sql: $sql\" );\r\n\r\n if ( $usePermission and $check_write )\r\n {\r\n $db->array_query( $file_array, $sql );\r\n $cnt = count( $file_array );\r\n }\r\n else\r\n {\r\n $db->query_single( $file_array, $sql,\r\n \"Count\" );\r\n $cnt = $file_array;\r\n }\r\n return $cnt;\r\n }", "function itemCount(){\r\n\t\tif( $this->_itemCount === null ){\r\n\t\t\tglobal $database;\r\n\t\t\t\r\n\t\t\t$gid = $this->id;\r\n\t\t\t$database->setQuery(\"SELECT COUNT(1) FROM #__rsgallery2_files WHERE gallery_id='$gid' AND published = '1'\");\r\n\t\t\t$this->_itemCount = $database->loadResult();\r\n\t\t}\r\n\t\treturn $this->_itemCount;\r\n\t}", "public function count(): int\n {\n return \\count($this->container);\n }", "public function files_num();", "public function getSize()\n {\n $this->size = 0;\n\n if (count($this->temp_files) > 0) {\n\n foreach ($this->temp_files as $file) {\n $this->size = $this->size + (int)$file->size;\n }\n }\n\n return;\n }", "public function count() {\n return count($this->scale);\n }", "public function getUsedTimes($photo)\n {\n//\n// if ($photo->folder_id > 0) {\n// $galleries = $resources->getGalleriesWithFolder($photo->folder_id);\n// } else {\n// $galleries = $resources->getGalleriesWithPhoto($photo->id);\n// }\n//\n// return count($galleries);\n\n return 0;\n }", "public function countUsed()\n {\n }", "public abstract function countObjects();", "public function count_homepage_photos(){\n $sql=\"SELECT COUNT(*) FROM photos WHERE img_navigacija_id=2\";\n $result=self::$connect->query($sql);\n while($row=$result->fetch(PDO::FETCH_NUM)){\n return $row[0];\n }\n }", "public function numFotos(){\n\n\t\t\t$sentencia = \"SELECT count(*) AS total FROM fotos\";\n\t\t\t$total= $this->db->query($sentencia)->row()->total; // converir fila y total\n\t\t\t\t\t\t\n\t\t\treturn intval($total); // asegurarnos que sea entero\n\n\t\t}", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public static function count();", "public function count() {\r\n\r\n return $this->total_size;\r\n\r\n }", "protected function get_total_images_to_smush() {\r\n\t\t$images_to_resmush = count( get_option( 'wp-smush-resmush-list', array() ) );\r\n\r\n\t\t// This is the same calculation used for $core->remaining_count,\r\n\t\t// except that we don't add the re-smushed count here.\r\n\t\t$unsmushed_count = WP_Smush::get_instance()->core()->total_count - WP_Smush::get_instance()->core()->smushed_count - WP_Smush::get_instance()->core()->skipped_count;\r\n\r\n\t\t// Sometimes this number can be negative, if there are weird issues with meta data.\r\n\t\tif ( $unsmushed_count > 0 ) {\r\n\t\t\treturn $images_to_resmush + $unsmushed_count;\r\n\t\t}\r\n\r\n\t\treturn $images_to_resmush;\r\n\t}", "public function getResCount()\n {\n return $this->count(self::RES);\n }", "public function count(): int\n {\n return count($this->store);\n }", "public function count() {\n\t\treturn count($this->store);\n\t}", "public function getFileCount(){\n\t\treturn $this->intFileCount;\n\t}", "public function getFilesCount(): int\n {\n return count($this->getFiles());\n }", "public function getSize() {\n return (int) $this->_count;\n }", "public function totalFileCount(): int\n {\n return $this->getItems()->count();\n }", "abstract public function count();", "abstract public function count();", "abstract public function count();", "abstract public function count();", "public function count()\n {\n return count($this->container);\n }", "private function getWorkingImageWidth()\n {\n return imagesx($this->workingImageResource);\n }", "function epfl_stats_media_size_and_count($used_bytes, $quota_bytes, $nb_files)\n{\n /* If we are in CLI mode, it's useless to update in APC because it's the APC for mgmt container and not httpd\n container */\n if(php_sapi_name()=='cli') return;\n\n global $wp;\n\n $adapter = new Prometheus\\Storage\\APC();\n\n $registry = new CollectorRegistry($adapter);\n\n /* Size information */\n $size_gauge = $registry->registerGauge('wp',\n 'epfl_media_size_bytes',\n 'Used (and max) space for medias',\n ['site', 'type']);\n\n $size_gauge->set($used_bytes, [home_url( $wp->request ), \"used\"]);\n $size_gauge->set($quota_bytes, [home_url( $wp->request ), \"quota\"]);\n\n\n /* Media count */\n $count_gauge = $registry->registerGauge('wp',\n 'epfl_media_nb_files',\n 'Media count on website',\n ['site', 'type']);\n\n $count_gauge->set($nb_files, [home_url( $wp->request ), \"used\"]);\n}", "public function countGalleryImageLikes() {\n\t\t$sql = \"SELECT\tCOUNT(*) AS count\n\t\t\tFROM\twcf\".$this->dbNo.\"_rating\n\t\t\tWHERE\tobjectName = ?\n\t\t\t\tAND userID <> ?\n\t\t\t\tAND rating NOT IN (?, ?)\";\n\t\t$statement = $this->database->prepareStatement($sql);\n\t\t$statement->execute(array('com.woltlab.wcf.user.gallery.photo', 0, 0, 3));\n\t\t$row = $statement->fetchArray();\n\t\treturn $row['count'];\n\t}", "public function getCount() {\n \treturn $this->count();\n }", "public function count(): int\n {\n return count($this->resources);\n }", "function get_counts() {\n\t$artists = @file(\"/var/lib/musica/artists.count\");\n\t$albums = @file(\"/var/lib/musica/albums.count\");\n\t$songs = @file(\"/var/lib/musica/songs.count\");\n\t$counts = array(rtrim($artists[0]), rtrim($albums[0]), rtrim($songs[0]));\n\treturn $counts;\n}", "function count_series() {\n $result = $this->pdo->query('SELECT COUNT(DISTINCT series) FROM files');\n return $result->fetchColumn();\n }", "public abstract function get_counts();", "function count()\n\t{\n\t\treturn count($this->getGoods());\n//\t\treturn count($this->getSESSION()[$this->sessionsGoodsKey]);\n\t}", "public function getUnprocSpecNoImage(){\n\t\t$cnt = 0;\n\t\tif($this->collid){\n\t\t\t$sql = 'SELECT count(o.occid) AS cnt '.\n\t\t\t\t'FROM omoccurrences o LEFT JOIN images i ON o.occid = i.occid '.\n\t\t\t\t'WHERE (o.collid = '.$this->collid.') AND (i.imgid IS NULL) AND (o.processingstatus = \"unprocessed\") ';\n\t\t\t$rs = $this->conn->query($sql);\n\t\t\twhile($r = $rs->fetch_object()){\n\t\t\t\t$cnt = $r->cnt;\n\t\t\t}\n\t\t\t$rs->free();\n\t\t}\n\t\treturn $cnt;\n\t}", "function count_bytes_all_files() {\n $result = $this->pdo->query('SELECT SUM(size) FROM files');\n return $this->convert_file_size($result->fetchColumn());\n }", "function count() ;", "public function count(): int\n {\n return count(\n /** @scrutinizer ignore-type */\n $this->getArchive()\n );\n }", "public function gallery_record_count() \n\t{\n\t $query = $this->db->query(\"SELECT * FROM gallery_tbl WHERE gallery_is_deleted=0\");\n return $query->num_rows();\n }", "public abstract function count();", "public abstract function count();", "public function execPurgeImgCache() {\n\t\t$cnt=0;\n\t\t$dir = Environment::getVariable(\"dataDir\") . '/thumbs/';\n\t\t$files = Finder::findFiles($this->id . \"-*.png\")->from($dir);\n\n\t\tforeach ($files as $file => $info) {\n\t\t\tunlink($file);\n\t\t\t$cnt++;\n\t\t}\n\n\t\treturn $cnt;\n\t}", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();" ]
[ "0.7088729", "0.6806957", "0.6746369", "0.66332316", "0.6608738", "0.6556508", "0.64675283", "0.64452153", "0.64270383", "0.6419856", "0.64023995", "0.63392824", "0.63272494", "0.63240576", "0.62039655", "0.6195368", "0.6159883", "0.6150446", "0.6137345", "0.60788465", "0.6076927", "0.6055166", "0.60390294", "0.60353893", "0.60182387", "0.6010557", "0.59992826", "0.5983705", "0.59705794", "0.5964756", "0.59573686", "0.5956113", "0.59492564", "0.5939151", "0.5913781", "0.5906667", "0.59035736", "0.5891962", "0.5863624", "0.58601713", "0.5857147", "0.5852679", "0.584265", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.58209944", "0.5806562", "0.5800067", "0.579626", "0.5779672", "0.57770187", "0.5772213", "0.57580686", "0.5749722", "0.57356155", "0.57324743", "0.572956", "0.572956", "0.572956", "0.572956", "0.5722369", "0.5721585", "0.5713092", "0.57015085", "0.57003486", "0.5698607", "0.5697179", "0.5694903", "0.5690101", "0.56810606", "0.5667766", "0.5662431", "0.56613016", "0.56595707", "0.56512827", "0.56504667", "0.56504667", "0.5648596", "0.5643158", "0.5643158", "0.5643158" ]
0.8303075
0
Copy uploaded file to temp storage, and add it information to database
public function addFile($file) { $originalName = $file['name']; $fileType = $file['type']; if ($fileType !== 'audio/mp3') { return false; } if (!file_exists(self::ROOT_PATH . "/public/{$this->storagePath}")) { mkdir(self::ROOT_PATH . "/public/{$this->storagePath}", 0777, true); } $fileName = time() . '_' . md5($originalName) . '.mp3'; $filePath = self::ROOT_PATH . "/public/{$this->storagePath}/" . $fileName; $sqlData = array( 'filename' => $originalName, 'filepath' => $fileName, ); if (!$this->_tableGw->insert($sqlData)) { return false; } copy($file['tmp_name'], $filePath); $fileId = $this->_tableGw->getLastInsertValue(); return $fileId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function upload_file() {\n upload_file_to_temp();\n }", "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n // si on avait un ancien fichier on le supprime\n if (null !== $this->tempFilename) {\n $oldFile = $this->getUploadRootDir().'/'.$this->id.'.'.$this->tempFilename;\n if (file_exists($oldFile)) {\n unlink($oldFile);\n }\n }\n\n // déplace le fichier envoyé dans le répertoire de notre choix\n $this->file->move(\n $this->getUploadRootDir(), // répertoire de destination\n $this->id.'.'.$this->url // nom du fichier à créer \"id.extension\"\n );\n\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n $this->picture = file_get_contents($this->getFile());\n\n if (isset($this->temp)) {\n $this->temp = null;\n }\n\n $this->file = null;\n }", "private function uploadFile()\n {\n $uid = $this->param[2];\n $src = $_FILES['Filedata']['tmp_name'];\n $dst = TEMP_DIR . '/' . $uid . $_FILES['Filedata']['name'];\n \n if(@move_uploaded_file($src, $dst))\n {\n $data = \"{$_FILES['Filedata']['name']}:$dst:{$_FILES['Filedata']['size']}\";\n echo $data;\n }\n exit;\n }", "public function makeTmpFileFromUpload() {\r\n if (is_uploaded_file($_FILES[$this->_name]['tmp_name'])) {\r\n $this->_tmpFile = $this->_tmpDir . DS . date(\"YmdHis\") . $this->_name . uniqid() . $_FILES[$this->_name]['name'];\r\n move_uploaded_file($_FILES[$this->_name]['tmp_name'], $this->_tmpFile);\r\n } else {\r\n return false;\r\n }\r\n }", "public function process($temporaryFilename)\n {\n $file = $this->fileFactory->build($temporaryFilename);\n\n $checksum = $file->getSha1Checksum();\n\n if (!$this->doesFileExist($checksum)) {\n $this->moveFile($file, $checksum);\n }\n\n $stmt = $this->dbConnection->prepare(\n 'INSERT INTO uploads (filename, userid, checksum) VALUES (:filename, :userid, :checksum)'\n );\n $stmt->execute([\n 'filename' => $temporaryFilename,\n 'userid' => $this->userModel->getLoggedInUserId(),\n 'checksum' => $checksum,\n ]);\n }", "private function createTempFile(){\n\n\t\t\ttry {\n\t\t \n\t\t\t // Undefined | Multiple Files | $_FILES Corruption Attack\n\t\t\t // If this request falls under any of them, treat it invalid.\n\t\t\t if (!isset($_FILES['file']['error']) ||\n\t\t\t is_array($_FILES['file']['error'])) {\n\t\t\t throw new RuntimeException('Invalid parameters.');\n\t\t\t }\n\n\t\t\t // Check $_FILES['upfile']['error'] value.\n\t\t\t switch ($_FILES['file']['error']) {\n\t\t\t case UPLOAD_ERR_OK:\n\t\t\t break;\n\t\t\t case UPLOAD_ERR_NO_FILE:\n\t\t\t throw new RuntimeException('No file sent.');\n\t\t\t case UPLOAD_ERR_INI_SIZE:\n\t\t\t case UPLOAD_ERR_FORM_SIZE:\n\t\t\t throw new RuntimeException('Exceeded filesize limit.');\n\t\t\t default:\n\t\t\t throw new RuntimeException('Unknown errors.');\n\t\t\t }\n\n\t\t\t // You should also check filesize here. \n\t\t\t if ($_FILES['file']['size'] > 1000000) {\n\t\t\t throw new RuntimeException('Exceeded filesize limit.');\n\t\t\t }\n\n\t\t\t // DO NOT TRUST $_FILES['upfile']['mime'] VALUE !!\n\t\t\t // Check MIME Type by yourself.\n\t\t\t $finfo = new finfo(FILEINFO_MIME_TYPE);\n\t\t\t echo $finfo->file($_FILES['file']['tmp_name']).\"<br><br>\";\n\n\t\t\t if (false === $ext = array_search(\n\t\t\t $finfo->file($_FILES['file']['tmp_name']),\n\t\t\t array(\n\t\t\t 'csv' => 'text/plain',\n\t\t\t ),\n\t\t\t true\n\t\t\t )) {\n\t\t\t throw new RuntimeException('Invalid file format.');\n\t\t\t }\n\n\t\t\t} catch (RuntimeException $e) {\n\n\t\t \techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function moveTempFileToTempFolder()\n {\n $result = null;\n $fileData = $this->getUploadedFileInfo();\n\n if (count($fileData)) {\n $fileExtension = pathinfo($fileData['filename'], PATHINFO_EXTENSION);\n $filename = uniqid('sf_register') . '.' . $fileExtension;\n\n /** @var ResourceStorage $resourceStorage */\n $resourceStorage = GeneralUtility::makeInstance(ResourceStorage::class);\n $result = $resourceStorage->addFile($fileData['tmp_name'], $this->getTempFolder(), $filename);\n }\n\n return $result;\n }", "public function actionUpload()\n\t{\n\n\t\t$input = craft()->request->getPost();\n\n\t\t$file = UploadedFile::getInstanceByName('file');\n\n\t\t$folder = craft()->assets->findFolder(array(\n\t\t 'id' => $input['id']\n\t\t));\n\n\t\tif ($folder) {\n\t\t\t$folderId = $input['id'];\n\t\t}\n\n\t\tcraft()->assets->insertFileByLocalPath(\n\t\t $file->getTempName(),\n\t\t $file->getName(),\n\t\t $folderId,\n\t\t AssetConflictResolution::KeepBoth);\n\n\t\tcraft()->end();\n\t}", "public function upload($sTempFileName,$sPath)\n { \n copy($sTempFileName,$sPath);\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // if there is an error when moving the file, an exception will\n // be automatically thrown by move(). This will properly prevent\n // the entity from being persisted to the database on error\n $this->getFile()->move($this->getUploadRootDir(), $this->fileName);\n\n // check if we have an old image\n if (isset($this->temp)) {\n // delete the old image\n unlink($this->getUploadRootDir().'/'.$this->temp);\n // clear the temp image path\n $this->temp = null;\n }\n $this->file = null;\n }", "private function copyFileToTemp($file) \n {\n @mkdir(sys_get_temp_dir().'/moodle');\n $tempFile=@fopen(sys_get_temp_dir().'/moodle/'. $file->get_filename(),\"wb\"); \n if ($tempFile ) {\n fwrite($tempFile,$file->get_content());\n fclose($tempFile); \n } \n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n $filename = substr( md5(rand()), 0, 15).'.'.$this->getFile()->guessExtension();\n // move takes the target directory and then the\n // target filename to move to\n\n\n\t\t\t\tif(!file_exists($this->getUploadRootDir())) mkdir($this->getUploadRootDir(), 0777, true);\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $filename;\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n // 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 then the\n // target filename to move to\n $this->file->move(\n $this->getUploadRootDir(),\n $this->id . '.' .$this->ext\n );\n\n // set the ext property to the filename where you've saved the file\n //$this->ext = $this->file->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload() {\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 self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\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 }", "public function upload() {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(), $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->photo = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n\t{\n\t if (null === $this->getFile()) {\n\t return;\n\t }\n\t\n\t // use the original file name here but you should\n\t // sanitize it at least to avoid any security issues\n\t\n\t // move takes the target directory and then the\n\t // target filename to move to\n\t \n\t $this->getFile()->move($this->getWebPath(),$this->imagen);\n\t \n\t \n\t // set the path property to the filename where you've saved the file\n\t $this->path = $this->getFile()->getClientOriginalName();\n\t\t//$this->temp = \n\t // clean up the file property as you won't need it anymore\n\t $this->file = null;\n\t}", "public function upload_local_file()\n\t{\n if ($this->local_file) {\n \t$s3 = AWS::createClient('s3');\n $s3->putObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location,\n 'SourceFile' => $this->local_file,\n 'ContentType' => $this->mime,\n 'StorageClass' => $this->storage,\n 'ServerSideEncryption' => $this->encryption\n )\n );\n }\n\t}", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n $filename = substr( md5(rand()), 0, 15).'.'.$this->getFile()->guessExtension();\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $filename;\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\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 $filename = time().'_'.$this->getFile()->getClientOriginalName();\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 self::$SERVER_PATH_TO_VIDEO_FOLDER,\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $filename;\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // 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 then the\n // target filename to move to\n\n $filePath = md5(uniqid($this->getIdUser().\"_profil\",true)).\".\".\n $this->getFile()->guessClientExtension();\n\n $this->getFile()->move(\n $this->getUploadRootDir(),$filePath\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $filePath;\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // 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 then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->backgroundImage = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function prepareToUpload(): void\n {\n if (!$this->hasFile()) {\n return;\n }\n\n // do whatever you want to generate a unique name\n $filename = sha1(uniqid(mt_rand(), true));\n if ($this->namePrefix !== null) {\n $filename = Uri::getUrl($this->namePrefix) . '_' . $filename;\n }\n $this->fileName = $filename . '.' . $this->getFile()->guessExtension();\n }", "public function upload(): void\n {\n // check if we have an old image\n if ($this->oldFileName !== null) {\n $this->removeOldFile();\n }\n\n if (!$this->hasFile()) {\n return;\n }\n\n $this->writeFileToDisk();\n\n $this->file = null;\n }", "function addFile(FileUpload $file)\n\t{\n\t\t$file->move($this->getUniqueFilePath());\n\t\t$this->query('INSERT INTO files (queueID, created, data, name) VALUES (\"' . sqlite_escape_string($this->getQueueID()) . '\",' . time() . ',\\'' . sqlite_escape_string(serialize($file)) . '\\', \\'' . sqlite_escape_string($file->getName()) . '\\')');\n\t}", "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 }", "public function upload(){\n if (null === $this->getProductsFileImage()) {\n return;\n }\n\n // 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 then the\n // target filename to move to\n $this->getProductsFileImage()->move(\n $this->getUploadRootDir(),\n $this->getProductsFileImage()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getProductsFileImage()->getClientOriginalName();\n $this->productsImage = $this->getProductsFileImage()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->productsFileImage = null;\n }", "function tep_copy_uploaded_file($filename, $target) {\n if (substr($target, -1) != '/') $target .= '/';\n\n $target .= $filename['name'];\n //if (!file_exists($target)) {\n //@mkdir($target);\n //@chmod($target, 0777);\n //}\n move_uploaded_file($filename['tmp_name'], $target);\n chmod($target, 0666);\n}", "function move_uploaded_file($filename, $destination)\n{\n return copy($filename, $destination);\n}", "function uploadFile()\n{\n $uploaddir = 'files/';\n\n // TODO: handle duplicate names?\n // get file description?\n $query = \"\n INSERT INTO clipboard\n SET\n name = '{$_FILES['clipfile']['name']}',\n path = $uploaddir . $_FILES['clipfile']['name']',\n description = '',\n date = now(),\n clip_id = NULL\";\n \n query($query);\n testError($query);\n \n move_uploaded_file($_FILES['clipfile']['tmp_name'], $uploaddir . $_FILES['clipfile']['name'])\n or die('fucking file failed');\n \n print \"file {$_FILES['clipfile']['name']} uploaded successfully. Word Up!\";\n}", "public function upload()\n {\n // The file property can be empty if the field is not required\n if (null === $this->file) {\n return;\n }\n\n // 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 then the\n // target filename to move to\n $this->file->move(\n $this->getUploadRootDir(),\n $this->path\n );\n\n // Set the path property to the filename where you've saved the file\n $this->path = $this->file->getClientOriginalName();\n\n // Clean up the file property as you won't need it anymore\n $this->file = null;\n }", "function storeUploadedFile($tmpFilePath){\r\n \r\n // gets the image type, reads first few bytes of image and returns int that represents jpg or png\r\n $imageTypeInt = exif_imagetype($tmpFilePath);\r\n \r\n // takes int and gets image extension\r\n $extension = image_type_to_extension($imageTypeInt);\r\n \r\n // gets the target directory for upload\r\n $target_dir = \"images/properties/\";\r\n \r\n // generates unique name for file based on microseconds of upload time\r\n // second param makes it more unique adds additional characters on end of returned value\r\n //eg \"/images/properties/8872791982.jpg\"\r\n $newImagePath = $target_dir . uniqid(\"prop\", true) . $extension;\r\n \r\n // takes current image path (in tmp folder) and puts it in new location newImagePath\r\n move_uploaded_file($tmpFilePath, $newImagePath);\r\n \r\n return $newImagePath;\r\n}", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // 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 then the\n // target filename to move to\n \n\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // 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 then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // 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 then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // 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 then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // 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 then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function dz_files()\n {\n if (!empty($_FILES) && $_FILES['file']) {\n $file = $_FILES['file'];\n\n\n foreach ($file['error'] as $key=>$error) {\n $uploadfile = sys_get_temp_dir().basename($file['name']['key']);\n move_uploaded_file($file['tmp_name'],$uploadfile);\n\n }\n }\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n $partes_ruta = pathinfo($this->getFile()->getClientOriginalName());\n $this->nombre = md5(uniqid()) . '.' . $partes_ruta['extension'];\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->nombre\n );\n\n $this->url = $this->getWebPath();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload();", "public function uploadImage() \n {\n if (is_null($this->image)) {\n return;\n }\n \n // move image from temp directory to destination one\n $this->image->move(\n $this->getUploadRootDir(),\n $this->image->getClientOriginalName()\n );\n\n $this->path = $this->image->getClientOriginalName();\n $this->image = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // 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 then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->setImageName($this->getFile()->getClientOriginalName());\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n if(!is_dir($this->getTargetUploadRootDir())){\n mkdir($this->getTargetUploadRootDir(), 0777, true);\n }\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getTargetUploadRootDir(),\n $this->file->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = date('Y-m-d').DIRECTORY_SEPARATOR.$this->id.DIRECTORY_SEPARATOR.$this->file->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\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 upload()\n {\n //Checks if the path is null\n if (null === $this->file) {\n return;\n }\n\n $hash = uniqid('', true);\n $extension = $this->file->getClientOriginalExtension();\n $newFilename = $hash.'.'.$extension;\n\n $this->file->move($this->getUploadRootDir(), $newFilename);\n $this->path = $newFilename;\n\n // Clean the path file\n $this->file = null;\n }", "function copyFileToLocal($fileid){\n#set target path for storing audio files on the server\n$audio_upload_path = \"/home/dingz/dataset/audiofiles/0/\" .$fileid. \".wav\";\n#get and store uploaded audio files on the server\nif(copy($_FILES['uploadedfile']['tmp_name'], $audio_upload_path)) {\n #echo \"File uploaded!\\n\";\n return TRUE;\n} else{\n echo \"There was an error uploading the file...\\nThe developer is notified with this problem. Sorry for the inconvenience!\\n\";\n #error_log(\"Attendance System:\\nVerification: Uploading file failed!\", 1, \"dingz@andrew.cmu.edu\");\n\treturn FALSE;\n}\n}", "protected function _singleUpload(){\r\n\t\t$this->_infoPic = new api_libs_InfoPic($_FILES['userfile']['tmp_name']);\r\n\t\t$params['name'] = $_FILES['userfile']['name'];\r\n\t\t$params['w'] = $this->_infoPic->getW();\r\n\t\t$params['h'] = $this->_infoPic->getH();\r\n\t\t$params['mime_type'] = $this->_infoPic->getMime();\r\n\t\t$params['source'] = 'site_upload_single';\r\n\t\t$params['status'] = 'live';\r\n\t\t$params['extension'] = $this->_infoPic->getExt();\r\n\t\t\r\n\t\t$hash = $this->_model->buildNewDynamicEntry($params);\r\n\t\t// file to be uploaded\r\n\t\t$uploadfile = $this->_upLoc . $hash.'.'.$params['extension'];\r\n\t\t\r\n\t\tif(! move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile))\r\n\t\t throw new Exception(\"File was not uploaded!\");\r\n\t\t\r\n\t\t$this->_newHashes = array($hash);\r\n\t}", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n// use the original file name here but you should\n// sanitize it at least to avoid any security issues\n// move takes the target directory and then the\n// target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n// set the path property to the filename where you've saved the file\n $this->logo = $this->getFile()->getClientOriginalName();\n// clean up the file property as you won't need it anymore\n $this->file = null;\n\n\n }", "public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->avatar)\n {\n return;\n }\n\n //Lastname du fichier\n $file = $this->id_user.'.'.$this->avatar->guessExtension();\n // move takes the target directory and then the target filename to move to\n $this->avatar->move($this->getUploadRootDir(), $file);\n //Suppression des thumbnail déjà en cache\n @unlink(__DIR__.'/../../../../../web/imagine/thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/avatar_thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/moyen_thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/mini_thumbnail/avatars/'.$file);\n\n // set the path property to the filename where you'ved saved the file\n $this->avatar = $file;\n }", "public function preUpload()\n {\n if (null !== $this->file) {\n // do whatever you want to generate a unique name\n $filename = sha1(uniqid(mt_rand(), true));\n $this->path = $filename.'.'.$this->file->guessExtension();\n $this->fileName = $this->file->getClientOriginalName();\n $this->size = $this->file->getSize();\n $this->type = $this->file->getMimeType();\n $this->uploadDate = new \\DateTime('now');\n }\n }", "public function moveToTmpDir()\n\t{\n\t\tif($this->source instanceof UploadedFile) {\n\t\t\t$this->source->move($this->getTmpDir()->getRootPath());\n\t\t} else if(is_string($this->source)) {\n\t\t\tcopy($this->params['path'], $this->getTmpDir()->getRootPath() . '/' . $this->params['name']);\n\t\t}\n\t}", "public function uploadFile(){\n\n if (!$this->request->is('post'))\n {\n $this->setErrorMessage('Post method required');\n return;\n }\n\n if (!isset($this->request->data['currentPath']) ||\n !isset($this->request->params['form']) ||\n !isset($this->request->params['form']['idia'])\n ){\n $this->setErrorMessage('Invalid parameters');\n return;\n }\n\n $path = ltrim(trim($this->request->data['currentPath']), DS);\n $tokens = explode(DS, strtolower($path));\n\n ($tokens[0] == 'root') && ($tokens = array_slice($tokens, 1, null, true));\n\n $path = implode(DS, $tokens);\n $fullPath = WWW_FILE_ROOT . strtolower($path);\n\n if(!is_dir($fullPath)){\n $this->setErrorMessage('Invalid path');\n return;\n }\n\n if(is_file($fullPath . DS . strtolower($this->request->params['form']['idia']['name']))){\n $this->setErrorMessage('File with similar name already exist');\n return;\n }\n\n $newFile = new File($fullPath . DS . strtolower($this->request->params['form']['idia']['name']), true );\n $newFile->close();\n\n $tempFile = new File(($this->request->params['form']['idia']['tmp_name']));\n $tempFile->copy($fullPath . DS .$this->request->params['form']['idia']['name']);\n $tempFile->delete();\n\n $this->set(array(\n 'status' => 'ok',\n \"message\" => 'successful',\n \"_serialize\" => array(\"message\", \"status\")\n ));\n }", "public function testMoveFileFromTmpWithMediaStorageDatabase(): void\n {\n $fileName = 'magento_small_image.jpg';\n $storage = $this->objectManager->get(Storage::class);\n $databaseStorage = $this->objectManager->get(Storage\\Database::class);\n $directory = $this->objectManager->get(DatabaseFactory::class)->create();\n // Synchronize media.\n $storage->synchronize(\n [\n 'type' => 1,\n 'connection' => 'default_setup'\n ]\n );\n // Upload file.\n $fixtureDir = realpath(__DIR__ . '/../_files');\n $filePath = $this->tmpDirectory->getAbsolutePath($fileName);\n copy($fixtureDir . DIRECTORY_SEPARATOR . $fileName, $filePath);\n $_FILES['image'] = [\n 'name' => $fileName,\n 'type' => 'image/jpeg',\n 'tmp_name' => $filePath,\n 'error' => 0,\n 'size' => 12500,\n ];\n $result = $this->imageUploader->saveFileToTmpDir('image');\n // Move file from tmp dir.\n $moveResult = $this->imageUploader->moveFileFromTmp($result['name'], true);\n // Verify file moved to new dir.\n $databaseStorage->loadByFilename($moveResult);\n $directory->loadByPath('catalog/category');\n $this->assertEquals('catalog/category', $databaseStorage->getDirectory());\n $this->assertEquals($directory->getId(), $databaseStorage->getDirectoryId());\n }", "function move_temp_file($file, $to)\n {\n if (\\Storage::disk('local')->exists($file)){\n $path = \\Storage::disk('local')->move($file, $to);\n\n return $path? : $to;\n }\n return null;\n }", "function uploadFile3 (string $fileName, string $tempFileName, int $fileSize, string $fileType, string $fileLocation, string $fileDescription)\n {\n if (!$fileName) {\n die(\"No filename.\");\n }\n\n// abort if file is not an image\n// never assume the upload succeeded\n if ($_FILES['Filename']['error'] !== UPLOAD_ERR_OK) {\n die(\"Upload failed with error code \" . $_FILES['file']['error']);\n }\n $info = getimagesize($_FILES['Filename']['tmp_name']);\n if ($info === FALSE) {\n die(\"Error Unable to determine <i>image</i> type of uploaded file\");\n }\n if (($info[2] !== IMAGETYPE_GIF) && ($info[2] !== IMAGETYPE_JPEG)\n && ($info[2] !== IMAGETYPE_PNG)) {\n die(\"Not a gif/jpeg/png\");\n }\n\n// abort if file is too big\n if($fileSize > 2000000) { echo \"Error: file exceeds 2MB.\"; exit(); }\n\n// fix slashes in $fileType variable, if necessary\n $fileType=(get_magic_quotes_gpc()==0 ? mysqli_real_escape_string(null, $_FILES['Filename']['type']) : mysqli_real_escape_string(null, stripslashes ($_FILES['Filename'])));\n\n// put the content of the file into a variable, $content\n $fp = fopen($tempFileName, 'r');\n $content = fread($fp, filesize($tempFileName));\n $content = addslashes($content);\n fclose($fp);\n\n// no longer needed - feature removed from php\n// http://php.net/manual/en/function.get-magic-quotes-gpc.php\n// restore slashes in $fileType variable, if necessary\n if(!get_magic_quotes_gpc()) { $fileName = addslashes($fileName); }\n\n// connect to database\n $pdo = Database::connect();\n\n// insert file info and content into table\n $sql = \"INSERT INTO upload03 (filename, filesize, filetype, content, description) \"\n . \"VALUES ('$fileName', '$fileSize', '$fileType', '$content', '$fileDescription')\";\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $q = $pdo->prepare($sql);\n $q->execute(array());\n\n// list all uploads in database\n// ORDER BY BINARY filename ASC (sorts case-sensitive, like Linux)\n echo '<br><br>All files in database...<br><br>';\n $sql = 'SELECT * FROM upload03 '\n . 'ORDER BY BINARY filename ASC;';\n\n foreach ($pdo->query($sql) as $row) {\n $id = $row['id'];\n $sql = \"SELECT * FROM upload03 where id=$id\";\n echo $row['id'] . ' - ' . $row['filename'] . '<br>'\n . '<img width=100 src=\"data:image/jpeg;base64,'\n . base64_encode( $row['content'] ).'\"/>'\n . '<br><br>';\n }\n echo '<br><br>';\n\n// disconnect\n Database::disconnect();\n }", "public function upload(): void\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 self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->logo = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "public function upload()\n {\n if (null === $this->image) {\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 then the target filename to move to\n $this->file->move($this->getUploadRootDir(), $this->image->getClientOriginalName());\n\n // set the path property to the filename where you'ved saved the file\n $this->path = $this->image->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload($file, $local_file);", "public function uploadtoserver() {\r\n $targetDir = $_SERVER['DOCUMENT_ROOT'] . '/uploads/items/';\r\n\r\n //$cleanupTargetDir = false; // Remove old files\r\n //$maxFileAge = 60 * 60; // Temp file age in seconds\r\n // 5 minutes execution time\r\n @set_time_limit(5 * 60);\r\n\r\n // Uncomment this one to fake upload time\r\n // usleep(5000);\r\n // Get parameters\r\n $chunk = isset($_REQUEST[\"chunk\"]) ? $_REQUEST[\"chunk\"] : 0;\r\n $chunks = isset($_REQUEST[\"chunks\"]) ? $_REQUEST[\"chunks\"] : 0;\r\n $fileName = isset($_REQUEST[\"name\"]) ? $_REQUEST[\"name\"] : '';\r\n // Clean the fileName for security reasons\r\n $fileName = preg_replace('/[^\\w\\._]+/', '', $fileName);\r\n\r\n // Make sure the fileName is unique but only if chunking is disabled\r\n if ($chunks < 2 && file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) {\r\n unlink($targetDir . DIRECTORY_SEPARATOR . $fileName);\r\n /*$ext = strrpos($fileName, '.');\r\n $fileName_a = substr($fileName, 0, $ext);\r\n $fileName_b = substr($fileName, $ext);\r\n\r\n $count = 1;\r\n while (file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName_a . '_' . $count . $fileName_b))\r\n $count++;\r\n\r\n $fileName = $fileName_a . '_' . $count . $fileName_b;*/\r\n }\r\n\r\n // Create target dir\r\n if (!file_exists($targetDir))\r\n @mkdir($targetDir);\r\n\r\n if (isset($_SERVER[\"HTTP_CONTENT_TYPE\"]))\r\n $contentType = $_SERVER[\"HTTP_CONTENT_TYPE\"];\r\n\r\n if (isset($_SERVER[\"CONTENT_TYPE\"]))\r\n $contentType = $_SERVER[\"CONTENT_TYPE\"];\r\n\r\n // Handle non multipart uploads older WebKit versions didn't support multipart in HTML5\r\n if (strpos($contentType, \"multipart\") !== false) {\r\n if (isset($_FILES['file']['tmp_name']) && is_uploaded_file($_FILES['file']['tmp_name'])) {\r\n // Open temp file\r\n $out = fopen($targetDir . DIRECTORY_SEPARATOR . $fileName, $chunk == 0 ? \"wb\" : \"ab\");\r\n if ($out) {\r\n // Read binary input stream and append it to temp file\r\n $in = fopen($_FILES['file']['tmp_name'], \"rb\");\r\n\r\n if ($in) {\r\n while ($buff = fread($in, 4096))\r\n fwrite($out, $buff);\r\n }\r\n else\r\n die('{\"jsonrpc\" : \"2.0\", \"error\" : {\"code\": 101, \"message\": \"Failed to open input stream.\"}, \"id\" : \"id\"}');\r\n fclose($in);\r\n fclose($out);\r\n @unlink($_FILES['file']['tmp_name']);\r\n }\r\n else\r\n die('{\"jsonrpc\" : \"2.0\", \"error\" : {\"code\": 102, \"message\": \"Failed to open output stream.\"}, \"id\" : \"id\"}');\r\n }\r\n else\r\n die('{\"jsonrpc\" : \"2.0\", \"error\" : {\"code\": 103, \"message\": \"Failed to move uploaded file.\"}, \"id\" : \"id\"}');\r\n }\r\n else {\r\n // Open temp file\r\n $out = fopen($targetDir . DIRECTORY_SEPARATOR . $fileName, $chunk == 0 ? \"wb\" : \"ab\");\r\n if ($out) {\r\n // Read binary input stream and append it to temp file\r\n $in = fopen(\"php://input\", \"rb\");\r\n\r\n if ($in) {\r\n while ($buff = fread($in, 4096))\r\n fwrite($out, $buff);\r\n }\r\n else\r\n die('{\"jsonrpc\" : \"2.0\", \"error\" : {\"code\": 101, \"message\": \"Failed to open input stream.\"}, \"id\" : \"id\"}');\r\n\r\n fclose($in);\r\n fclose($out);\r\n }\r\n else\r\n die('{\"jsonrpc\" : \"2.0\", \"error\" : {\"code\": 102, \"message\": \"Failed to open output stream.\"}, \"id\" : \"id\"}');\r\n }\r\n // Return JSON-RPC response\r\n die('{\"jsonrpc\" : \"2.0\", \"result\" : null, \"id\" : \"id\"}');\r\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 }", "public function save(){\n\t\t\tif(isset($this->id)){\n\t\t\t\t$this->update();\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//checking for errors\n\t\t\t\t//Can't save if there are pre=existing errors.\n\t\t\t\tif(!empty($this->errors)){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//Can't save without filename and temp location on server.\n\t\t\t\tif(empty($this->filename) || empty($this->temp_path)){\n\t\t\t\t\t$this->errors[]=\"The file location is not available!\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//Determine the target path\n\t\t\t\t$upload_dir=\"images\";\n\t\t\t\t$target_path=\"../../public/\".$upload_dir.\"/\".$this->filename;\n\t\t\t\t//$target_path=$this->filename;\n\t\t\t\tif(file_exists($target_path)){\n\t\t\t\t\t$this->errors[]=\"The file {$this->filename} already exists!\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//Attempt to move the file.\n\t\t\t\tif(move_uploaded_file($this->temp_path, $target_path)){\n\t\t\t\t\t//success\n\t\t\t\t\t//save corresponding entry into database.\n\t\t\t\t\tif($this->create()){\n\t\t\t\t\t\t//we are done with temp_path.\n\t\t\t\t\t\tunset($this->temp_path);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t//file not moved.\n\t\t\t\t\t\t$this->error[]=\"file can't be uploaded because of some denied permissions.\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function uploadFileAdmin(){\r\n $file = Input::file('file');\r\n $projectId = Input::get('PROJECT');\r\n $adminId = Input::get('CONSULTANT');\r\n $project = Project::find($projectId);\r\n if($project!=null){\r\n if($file){\r\n $fileName = $file->getClientOriginalName();\r\n $file->move(public_path().'/files/projects/'.$project->lead->fileno.'/'.$project->id.'/uploaded', $fileName);\r\n //create the row in upload file\r\n $uploadFile = new UploadedFiles();\r\n $uploadFile->project_id = $projectId;\r\n $uploadFile->url = \"files/projects/\".$project->lead->fileno.\"/\".$project->id.\"/uploaded/$fileName\";\r\n $uploadFile->fileName = $fileName;\r\n $uploadFile->admin_id = $adminId;\r\n $uploadFile->ip = $_SERVER[\"REMOTE_ADDR\"];\r\n $uploadFile->save();\r\n ToolsFunctions::notifyGeorgeOfFileUpload($project);\r\n }\r\n }\r\n }", "public function uploadFileManufacturer(){\r\n $file = Input::file('file');\r\n $manufacturerId = Input::get('MANUFACTURER');\r\n $adminId = Input::get('CONSULTANT');\r\n $manufacturer = Project::find($manufacturerId);\r\n if($manufacturer!=null){\r\n if($file){\r\n $fileName = $file->getClientOriginalName();\r\n if(!File::exists(\"files/manufacturerFiles/\".$manufacturerId.\"/\")) {\r\n File::makeDirectory(\"files/manufacturerFiles/\".$manufacturerId.\"/\", 0755, true);\r\n }\r\n $file->move(public_path().'/files/manufacturerFiles/'.$manufacturerId.'/', $fileName);\r\n //create the row in upload file\r\n $uploadFile = new UploadedFiles();\r\n $uploadFile->project_id = 0;\r\n $uploadFile->manufacturer_id = $manufacturerId;\r\n $uploadFile->url = \"files/manufacturerFiles/\".$manufacturerId.\"/$fileName\";\r\n $uploadFile->fileName = $fileName;\r\n $uploadFile->admin_id = $adminId;\r\n $uploadFile->ip = $_SERVER[\"REMOTE_ADDR\"];\r\n $uploadFile->save();\r\n Transaction::createTransaction($adminId,'','','UPLOAD_FILE_FROM_MANUFACTURER',$fileName,'','','','','','');\r\n }\r\n }\r\n }", "public function preUpload()\n {\n if (null !== $this->getFile()) {\n // do whatever you want to generate a unique name\n $filename = sha1(uniqid(mt_rand(), true));\n $this->path = $filename.'.'.$this->getFile()->guessExtension();\n }\n }", "public function uploadFile($object, $file, $path){\n $fileName = md5(uniqid()).'.'.$file->guessExtension();\n // Move the file to the directory where brochures are stored\n $picDir = $_SERVER['DOCUMENT_ROOT'].'/uploads/'.$path;\n $file->move($picDir, $fileName);\n // Update the 'screenshot' property to store the file name instead of the file\n return $object->setPic($fileName);\n}", "public function testCopyCopiesStorageProperly()\n {\n $data = 'contents';\n mkdir(self::$temp.DS.'text');\n file_put_contents(self::$temp.DS.'text'.DS.'foo.txt', $data);\n\n Storage::copy(self::$temp.DS.'text'.DS.'foo.txt', self::$temp.DS.'text'.DS.'foo2.txt');\n\n $this->assertTrue(is_file(self::$temp.DS.'text'.DS.'foo2.txt'));\n $this->assertTrue($data === file_get_contents(self::$temp.DS.'text'.DS.'foo2.txt'));\n }", "public function upload() {\n $logger = Logger::getLogger();\n if ($this->file[\"error\"] == UPLOAD_ERR_FORM_SIZE || $this->file[\"error\"] == UPLOAD_ERR_INI_SIZE) {\n $logger->critical(\"File size of uploaded song exceeds limit configured\", $this->file);\n }\n $song = SongManager::createSong($this->file[\"name\"]);\n $targetFile = SongManager::getAbsolutePath($song);\n Logger::getLogger()->info(\"Uploading {$this->file['name']} to $targetFile\", $this->file);\n\n if (move_uploaded_file($this->file[\"tmp_name\"], $targetFile)) {\n $song = SongManager::popularizeMetadata($song);\n foreach ($song->getArtists() as $artist) {\n DatabaseManager::getEntityManager()->persist($artist);\n }\n if ($song->getAlbum() !== null) {\n DatabaseManager::getEntityManager()->persist($song->getAlbum());\n }\n DatabaseManager::getEntityManager()->persist($song);\n } else {\n throw new \\RuntimeException(\"can't upload song\");\n }\n\n return $song;\n }", "abstract protected function doUpload();", "function insert_file_nominee()\n {\n $pefs_file = $_FILES['fil']['tmp_name'];\n $fil_name = iconv(\"UTF-8\", \"TIS-620\", $_FILES['fil']['name']);\n $Emp_ID = $this->input->post(\"Emp_ID\");\n\n $this->load->model('Da_pef_file_present', 'pef');\n $this->pef->fil_location = $Emp_ID . \"_\" . $fil_name;\n $this->pef->fil_emp_id = $Emp_ID;\n\n $this->pef->insert_file(); // add file to table pef_file\n copy($pefs_file, 'upload/' . $Emp_ID . \"_\" . $fil_name); // add file to floder upload\n $this->show_list_nominee();\n }", "public function storeResumeFile()\n\t\t{\n\t\t\t// check to make sure file was posted\n\t\t\tif (!isset($_FILES['resume'])) {\n\t\t\t\t$this->throwJsonError(500, 'No resume file found.');\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t// Get the PHP assigned file name & location from the RAM storage of the file\n\t\t\t$tmp_name = $_FILES['resume']['tmp_name'];\n\t\t\t// Get the original file name as uploaded\n\t\t\t$name = $_FILES['resume']['name'];\n\t\t\t// To ensure all files are unique, get the timestamp of the uplaod.\n\t\t\t$timestamp = date('YmdHis');\n\t\t\t// Determine the server location for the file to be stored.\n\t\t\t$location = \"$this->uploads_dir/$timestamp-$name\";\n\t\t\t// Store the file.\n\t\t\tif (move_uploaded_file($tmp_name, $location)) {\n\t\t\t\tchmod($location, 0666);\n\t\t\t\treturn $location;\n\t\t\t}\n\t\t\treturn $tmp_name;\n\t\t}", "function readdata($filename) {\n global $CFG;\n \n $unique_code = time();\n $temp_dir = $CFG->dataroot.\"/temp/webworkquiz_import/\".$unique_code;\n $this->temp_dir = $temp_dir;\n //failures we cannot handle\n if (!$this->check_and_create_import_dir($unique_code)) {\n error(\"Could not create temporary directory\");\n return;\n }\n if(!is_readable($filename)) {\n error (\"Could not read uploaded file\");\n return;\n }\n if (!copy($filename, \"$temp_dir/webwork.zip\")) {\n error(\"Could not copy backup file\");\n return;\n }\n if(!unzip_file(\"$temp_dir/webwork.zip\", '', false)) {\n print \"filename: $filename<br />tempdir: $temp_dir <br />\";\n error(\"Could not unzip file.\");\n return; \n }\n $data = array();\n //open the directory\n $this->process_directory($data,$temp_dir);\n return $data;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // 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 then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = '/'.$this->getUploadDir().'/'.$this->getFile()->getClientOriginalName();\n //get the file name\n// $file = $this->getFile()->getClientOriginalName();\n// $info = pathinfo($file);\n// $file_name = basename($file,'.'.$info['extension']);\n// $this->name = $file_name ;\n// $this->setName($file_name);\n// // clean up the file property as you won't need it anymore\n// $this->file = null;\n }", "protected function storeFiles()\n {\n $this->log(sprintf('%s', __METHOD__), 'debug');\n\n $this->log(sprintf('Playlist - Writing file list to temporary file. (%s)', basename($this->tempFilesFromFilename)), 'info');\n $stream = new Stream(fopen($this->tempFilesFromFilename, 'w'));\n\n try {\n $stream->write($this->filesToString());\n } catch (\\Exception $e) {\n $this->log(sprintf('Playlist - Error while writing to file %s. (%s)', basename($this->tempFilesFromFilename), $e->getMessage()), 'error');\n }\n\n $stream->close();\n }", "public function upload()\n{\n // The file property can be empty if the field is not required\n if (null === $this->file) {\n return;\n }\n\n // 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 then the\n // target filename to move to\n $this->file->move(\n $this->getUploadRootDir(),\n $this->path\n );\n\n // Set the path property to the filename where you've saved the file\n //$this->path = $this->file->getClientOriginalName();\n\n // Clean up the file property as you won't need it anymore\n $this->file = null;\n}", "public function copyStorageFileToScratch(StorageFile $file);", "public function copyStorageFileToLocalPath(StorageFile $file, $destinationPath);", "function transfer()\n\t{\n\t\tglobal $phpbb_root_path;\n\n\t\t$this->file_perms\t= 0644;\n\t\t$this->dir_perms\t= 0777;\n\n\t\t// We use the store directory as temporary path to circumvent open basedir restrictions\n\t\t$this->tmp_path = $phpbb_root_path . 'store/';\n\t}", "public function upload_foto_file()\n\t{\n\t\tif (!$this->is_allowed('m_ads_add', false)) {\n\t\t\techo json_encode([\n\t\t\t\t'success' => false,\n\t\t\t\t'message' => cclang('sorry_you_do_not_have_permission_to_access')\n\t\t\t\t]);\n\t\t\texit;\n\t\t}\n\n\t\t$uuid = $this->input->post('qquuid');\n\n\t\techo $this->upload_file([\n\t\t\t'uuid' \t\t \t=> $uuid,\n\t\t\t'table_name' \t=> 'm_ads',\n\t\t]);\n\t}", "function _save_uploaded_file($tmp_name,$new_path){\n\tif(is_file($new_path)){\n\t\tunlink($new_path);\n\t}\n\n\tmove_uploaded_file($tmp_name, $new_path);\n\tchmod($new_path,0777);\n}", "function handle_upload() {\n\t\tif ( !isset($_FILES['import']) ) {\n\t\t\t$file['error'] = '文件为空';\n\t\t}\n\t\t$temp_file = tempnam(sys_get_temp_dir(), 'chemcsv');\n\t\tmove_uploaded_file($_FILES[\"import\"][\"tmp_name\"], $temp_file);\n\t\t$file['file'] = $temp_file;\n\n\t\tif ( isset( $file['error'] ) ) {\n\t\t\techo '<p><strong>错误</strong><br />';\n\t\t\techo esc_html( $file['error'] ) . '</p>';\n\t\t\treturn false;\n\t\t} else if ( ! file_exists( $file['file'] ) ) {\n\t\t\techo '<p><strong>错误</strong><br />';\n\t\t\tprintf('无法读取导入的文件 <code>%s</code>.', esc_html( $file['file'] ) );\n\t\t\techo '</p>';\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $file['file'];\n\t}", "public function testMoveFileFromTmp(): void\n {\n $expectedFilePath = $this->imageUploader->getBasePath() . DIRECTORY_SEPARATOR . 'magento_small_image_1.jpg';\n\n $this->assertFalse($this->mediaDirectory->isExist($expectedFilePath));\n\n $this->imageUploader->moveFileFromTmp('magento_small_image.jpg');\n\n $this->assertTrue($this->mediaDirectory->isExist($expectedFilePath));\n }", "function upload_file($src, $dest){\t\n\t\tif(!empty($src)){\t\t\t\n\t\t\t// copy the file to the image path\t\t\t\n\t\t\tif(!copy($src, $dest)){\n\t\t\t\techo 'failed to copy the file';\n\t\t\t}else{\t\t\t\t\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t}", "public function move_photo(){\n move_uploaded_file($this->tmp_path, '/home/a1031316/public_html/uploaded_images/'.$this->name);\n\n }", "public function step_2_manage_upload()\n {\n }", "private function createTemporaryFile()\n {\n return $this->temp[] = tempnam(sys_get_temp_dir(), 'sqon-');\n }", "public function upload()\n {\n if (!Request::hasPost('requestToken') || !RequestToken::validate(Request::getPost('requestToken'))) {\n $objResponse = new ResponseError();\n $objResponse->setMessage('Invalid Request Token!');\n $objResponse->output();\n }\n\n if (!Request::getInstance()->files->has($this->name)) {\n return;\n }\n\n $objTmpFolder = new \\Folder(MultiFileUpload::UPLOAD_TMP);\n\n // contao 4 support, create tmp dir symlink\n if (version_compare(VERSION, '4.0', '>=')) {\n // tmp directory is not public, mandatory for preview images\n if (!file_exists(System::getContainer()->getParameter('contao.web_dir') . DIRECTORY_SEPARATOR . MultiFileUpload::UPLOAD_TMP)) {\n $objTmpFolder->unprotect();\n $command = new SymlinksCommand();\n $command->setContainer(System::getContainer());\n $input = new ArrayInput([]);\n $output = new NullOutput();\n $command->run($input, $output);\n }\n }\n\n $strField = $this->name;\n $varFile = Request::getInstance()->files->get($strField);\n // Multi-files upload at once\n if (is_array($varFile)) {\n // prevent disk flooding\n if (count($varFile) > $this->maxFiles) {\n $objResponse = new ResponseError();\n $objResponse->setMessage('Bulk file upload violation.');\n $objResponse->output();\n }\n\n /**\n * @var UploadedFile $objFile\n */\n foreach ($varFile as $strKey => $objFile) {\n $arrFile = $this->uploadFile($objFile, $objTmpFolder->path, $strField);\n $varReturn[] = $arrFile;\n\n if (\\Validator::isUuid($arrFile['uuid'])) {\n $arrUuids[] = $arrFile['uuid'];\n }\n }\n } // Single-file upload\n else {\n /**\n * @var UploadedFile $varFile\n */\n $varReturn = $this->uploadFile($varFile, $objTmpFolder->path, $strField);\n\n if (\\Validator::isUuid($varReturn['uuid'])) {\n $arrUuids[] = $varReturn['uuid'];\n }\n }\n\n if ($varReturn !== null) {\n $this->varValue = $arrUuids;\n $objResponse = new ResponseSuccess();\n $objResult = new ResponseData();\n $objResult->setData($varReturn);\n $objResponse->setResult($objResult);\n\n return $objResponse;\n }\n }", "public function getTemporaryFile()\n {\n return $this->files[] = new TemporaryFile($this);\n }", "private function uploadFile($tmpName)\n {\n $filename = \"original/\".$_SESSION['sess_user_id'].\"_\".md5(time()).\".jpg\";\n $this->sizeOriginalFilepath = $this->_destDirectory.$filename;\n if (move_uploaded_file($tmpName, $this->sizeOriginalFilepath)) {\n $this->message = \"File Uploaded Successfully\";\n $this->token = true;\n $this->sizeOriginalFileName = $filename;\n $this->size100FileName = $this->createThumb(100);\n $this->size500FileName = $this->createThumb(500);\n } else {\n $this->message = \"Some error has ocurred while upoading.85\";\n }\n }", "public function uploadPhoto($f3){\n \n\n $latitude = $f3->get('POST.latitude');\n $longitude = $f3->get('POST.longitude');\n $salete = $f3->get('POST.salete');\n \n \n$f3->set('UPLOADS','public/images/uploaded/');\n\n \n \\Web::instance()->receive(function($file) use ($f3){\n var_dump($file);\n $monupload=$file['name'];\n $f3->set('monupload',$monupload);\n },true,true);\n \n \n $chemin = $f3->get('monupload');\n \n if ($latitude) {\n\t\t $this->model->insertScrap($chemin,$latitude, $longitude, $salete);\n }\n $this->merci($f3);\n\n }", "public static function upload(/*$localFile, $name, $attributes = array()*/)\n {\n $args = func_get_args();\n $argsCnt = func_num_args();\n if($argsCnt == 3 && is_uploaded_file($args[0]))\n {\n $localFile = $args[0];\n $name = $args[1];\n $attributes = $args[2];\n }\n elseif($argsCnt == 2)\n {\n $localFile = tempnam(getConfig()->get('server')->tempDir, 'opme');\n $name = basename($localFile).'.jpg';\n $attributes = $args[1];\n file_put_contents($localFile, base64_decode($args[0]));\n }\n else\n {\n return false;\n }\n\n $fs = getFs();\n $db = getDb();\n $id = User::getNextPhotoId();\n // TODO: add a log message\n if($id === false)\n return false;\n $paths = Photo::generatePaths($name);\n // resize the base image before uploading\n $localFileCopy = \"{$localFile}-copy}\";\n copy($localFile, $localFileCopy);\n\n $exiftran = getConfig()->get('modules')->exiftran;\n if(is_executable($exiftran))\n exec($cmd = sprintf('%s -ai %s', getConfig()->get('modules')->exiftran, escapeshellarg($localFileCopy)));\n\n $baseImage = getImage($localFileCopy);\n $baseImage->scale(getConfig()->get('photos')->baseSize, getConfig()->get('photos')->baseSize);\n $baseImage->write($localFileCopy);\n $uploaded = $fs->putPhotos(\n array(\n array($localFile => $paths['pathOriginal']),\n array($localFileCopy => $paths['pathBase'])\n )\n );\n if($uploaded)\n {\n $exif = self::readExif($localFile);\n $defaults = array('title', 'description', 'tags', 'latitude', 'longitude');\n foreach($defaults as $default)\n {\n if(!isset($attributes[$default]))\n $attributes[$default] = null;\n }\n $dateUploaded = time();\n $dateTaken = @$exif['dateTaken'];\n $attributes = array_merge(\n $attributes, \n self::getDefaultAttributes(),\n array(\n 'hash' => sha1_file($localFile),\n 'size' => intval(filesize($localFile)/1024),\n 'exifCameraMake' => @$exif['cameraMake'],\n 'exifCameraModel' => @$exif['cameraModel'],\n 'width' => @$exif['width'],\n 'height' => @$exif['height'],\n 'dateTaken' => $dateTaken,\n 'dateTakenDay' => date('d', $dateTaken),\n 'dateTakenMonth' => date('m', $dateTaken),\n 'dateTakenYear' => date('Y', $dateTaken),\n 'dateUploaded' => $dateUploaded,\n 'dateUploadedDay' => date('d', $dateUploaded),\n 'dateUploadedMonth' => date('m', $dateUploaded),\n 'dateUploadedYear' => date('Y', $dateUploaded),\n 'pathOriginal' => $paths['pathOriginal'], \n 'pathBase' => $paths['pathBase']\n )\n );\n $stored = $db->putPhoto($id, $attributes);\n unlink($localFile);\n unlink($localFileCopy);\n if($stored)\n return $id;\n }\n return false;\n }", "public function upload_file(){\n //return from method if file name is sample\n if($this->file_name == 'sample.jpg'){\n return;\n }\n\n $allowed_types = ['image/jpeg', 'image/gif', 'image/png'];\n //check file is an image\n if(!in_array($this->file_type, $allowed_types)){\n throw new Exception('File must be an image');\n exit;\n }\n\n //move from temp dir in to uploads folder\n move_uploaded_file($this->tmp_file_name, $this->dir_location . $this->file_name );\n }", "function uploadFile($name)\n{\n // Gets the paths, full and local directory\n global $image_dir, $image_dir_path;\n if (isset($_FILES[$name])) {\n // Gets the actual file name\n $filename = $_FILES[$name]['name'];\n if (empty($filename)) {\n return;\n }\n // Get the file from the temp folder on the server\n $source = $_FILES[$name]['tmp_name'];\n // Sets the new path - images folder in this directory\n $target = $image_dir_path . '/' . $filename;\n // Moves the file to the target folder\n move_uploaded_file($source, $target);\n // Send file for further processing\n processImage($image_dir_path, $filename);\n // Sets the path for the image for Database storage\n $filepath = $image_dir . '/' . $filename;\n // Returns the path where the file is stored\n return $filepath;\n }\n}", "public function temporary(Storage_Model_File $model)\n {\n if( substr($model->storage_path, 0, strlen($this->_bucket)) == $this->_bucket ) {\n $path = $model->storage_path;\n } else {\n $path = $this->_bucket . '/' . $model->storage_path;\n }\n \n try {\n $rfh = fopen($this->_streamWrapperName . '://' . $path, 'r');\n } catch( Exception $e ) {\n throw $e;\n }\n \n $tmp_file = APPLICATION_PATH . '/public/temporary/' . basename($model['storage_path']);\n $fp = fopen($tmp_file, \"w\");\n stream_copy_to_stream($rfh, $fp);\n fclose($fp);\n @chmod($tmp_file, 0777);\n return $tmp_file;\n }", "public function upload(){\n if( NULL === $this->getFile()){\n return;\n }\n $filename= $this->getFile()->getClientOriginalName();\n\n // Move to the target directory\n \n $this->getFile()->move(\n $this->getAbsolutePath(), \n $filename);\n\n //Set the logo\n $this->setFilename($filename);\n\n $this->setFile();\n\n }", "public function uploadMeta()\n\t{\n global $mysql;\n\n Debug::log('<hr><h1>Beginning meta update</h1><hr>', LEVEL_MAIN);\n \n $startTime = new DateTime();\n\n\t\t$version = $this->getVersionNumberFromFolder($this->folderlocation);\n\n\t\tif ($this->getVersionExistsInDatabase($version, $this->versionId) == null)\n\t\t{\n Debug::log('New version detected', LEVEL_MINIMUM);\n\n // Todo: Migrate to stored procedure\n $mysql->insert('wot_versions', array('version' => $version, 'published' => time()));\n\n $this->versionId = $mysql->getLastUpdatedId();\n\t\t}\n \n $this->deserializeWoTMetaFiles();\n $this->copyTranslationFiles();\n $this->updateTranslations();\n \n $this->vehicles_path = 'versions/' . $this->version . '/';\n \n $this->ImportEquipment();\n $this->ImportTankInformation();\n\n\n Debug::log('<hr><h1>Completed meta upate</h1>', LEVEL_MAIN);\n Debug::log('Meta update took '.$startTime->diff(new DateTime())->format('%I minutes and %S seconds'), LEVEL_MAIN);\n \n\t}", "abstract public function store(File $file);", "function do_upload()\r\n\t{\r\n\t\tif (isset($_FILES[$this->post_name]))\r\n\t\t{\r\n\t\t\t$post \t\t= $_FILES[$this->post_name];\r\n\t\t\t$tmp_file\t= ( !$this->isArrayPostName ) ? $post['tmp_name'] : $post['tmp_name'][$this->arrayPostName];\r\n\r\n\t\t\tif ( is_uploaded_file( $tmp_file ) )\r\n\t\t\t{\r\n\t\t\t\tif ($this->filteringExtension($post))\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($this->checkFileSize())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$file_name = $this->getFileNameUploaded();\r\n\t\t\t\t\t\t$dest = $this->folder.$file_name;\r\n\t\t\t\t\t\t$upload = move_uploaded_file($tmp_file, $dest);\r\n\t\t\t\t\t\tif ($upload)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t@chmod($dest, $this->chmod);\r\n\t\t\t\t\t\t\t$this->file_name_sukses_uploaded = $file_name;\r\n\t\t\t\t\t\t\t$cfg_resize = array('source_image'=> $dest);\r\n\t\t\t\t\t\t\tif($this->is_resize)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$cfg_resize = array(\r\n\t\t\t\t\t\t\t\t\t'source_image'=> $dest,\r\n\t\t\t\t\t\t\t\t\t'width'\t\t\t\t=> $this->rez_width,\r\n\t\t\t\t\t\t\t\t\t'height'\t\t\t=> $this->rez_height\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t// pr(json_encode($cfg_resize, JSON_PRETTY_PRINT), __FILE__.':'.__LINE__);\r\n\t\t\t\t\t\t\t\t_class('image_lib', $cfg_resize)->resize();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif($this->is_watermark)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$this->watermark_param['source_image'] = $dest;\r\n\t\t\t\t\t\t\t\t// pr(json_encode($this->watermark_param, JSON_PRETTY_PRINT), __FILE__.':'.__LINE__);\r\n\t\t\t\t\t\t\t\t_class('image_lib', $this->watermark_param)->watermark();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif($this->is_thumbnail)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(substr($this->thumb_prefix, -1) == '/' && !is_dir($this->folder.$this->thumb_prefix))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t@mkdir($this->folder.$this->thumb_prefix, 0777);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t$config = array_merge($cfg_resize, $this->thumb_param);\r\n\t\t\t\t\t\t\t\t$config['create_thumb'] = FALSE ;\r\n\t\t\t\t\t\t\t\t$config['new_image'] = $this->folder.$this->thumb_prefix.$file_name;\r\n\t\t\t\t\t\t\t\t// pr(json_encode($config, JSON_PRETTY_PRINT), __FILE__.':'.__LINE__);\r\n\t\t\t\t\t\t\t\t_class('image_lib', $config)->resize();\r\n\t\t\t\t\t\t\t\t_class('images')->move_upload($this->folder.$this->thumb_prefix.$file_name);\r\n\t\t\t\t\t\t\t\t@chmod($this->folder.$this->thumb_prefix.$file_name, $this->chmod);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t_class('images')->move_upload($dest);\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse $this->error_code .= 'move_upload_file_failed';\r\n\t\t\t\t\t} else $this->error_code .= 'file_size_max_exceeded';\r\n\t\t\t\t} else $this->error_code .= 'file_type_unallowed';\r\n\t\t\t}// end if is_uploaded_file\r\n#\t\t\telse $this->error_code .= 'file_upload_from_post_failed';\r\n\t\t}// end if isset\r\n\t\telse {\r\n#\t\t\t$this->error_code .= 'file_post_un_uploaded';\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static function put($tmpFilePath, $metaData = [])\n {\n if (is_array($tmpFilePath)) {\n $tmpFile = new File($tmpFilePath['tmp_name']);\n $metaData['original_filename'] = $tmpFilePath['name'];\n } else {\n $tmpFile = new File($tmpFilePath);\n }\n\n if (!$tmpFile->exists()) {\n throw new StatusMessageException('file_api_missing_tmp_file');\n }\n\n if (!isset($metaData['category']) || !isset($metaData['tag'])) {\n throw new StatusMessageException('file_api_missing_metadata');\n }\n\n if (!isset($metaData['original_filename'])) {\n $metaData['original_filename'] = $tmpFile->name;\n }\n\n $filesTable = static::_setupFilesTable();\n\n $file = $filesTable->newEntity();\n $file->category = $metaData['category'];\n $file->tag = $metaData['tag'];\n $file->size = $tmpFile->size();\n $file->original_filename = $metaData['original_filename'];\n if (isset($metaData['meta']) && is_array($metaData['meta'])) {\n $file->meta = $metaData['meta'];\n }\n $pathInfo = pathinfo($metaData['original_filename']);\n $file->filename = Text::uuid() . '.' . $pathInfo['extension'];\n\n $folder = new Folder(Configure::read('FileApi.basePath') . $file->category . DS . $file->tag, true, 0755);\n if (empty($folder->path) || (!empty($folder->path) && file_exists($folder->path) !== true)) {\n throw new StatusMessageException('file_api_missing_fileserver');\n }\n $destFile = new File($folder->path . DS . $file->filename);\n if (!$tmpFile->copy($destFile->path)) {\n throw new StatusMessageException('file_api_can_not_copy_file');\n }\n\n $tmpFile->delete();\n $tmpFile->close();\n $destFile->close();\n\n $filesTable->eventManager()->off('Model.afterSave');\n if ($filesTable->save($file)) {\n return $file->id;\n }\n\n return false;\n }", "public function upload()\n\t{\n\t}", "function move_upload_file($srcfile, $destfile) {\n\t//if(IN_SAE) return copy($srcfile, $destfile);\n\t//$r = move_uploaded_file($srcfile, $destfile);\n\t$r = copy($srcfile, $destfile);\n\treturn $r;\n}", "public function testUploadedFile()\n {\n $file = new UploadedFile(\n __DIR__.'/test.txt',\n 'test.txt',\n 'plain/text',\n filesize(__DIR__.'/test.txt'),\n null,\n true\n );\n $this->field->saveUploadedFile($file);\n\n $path = $this->field->getUploadTo();\n $this->assertEquals(sprintf('foo/FileModel/%s', date('Y-m-d')), $path);\n $this->assertEquals('123', file_get_contents(__DIR__.'/temp/'.$path.'/test.txt'));\n }" ]
[ "0.71968025", "0.65895", "0.6565526", "0.6479392", "0.6467935", "0.64483696", "0.64217734", "0.64117765", "0.6393578", "0.6392456", "0.632139", "0.62807786", "0.6258501", "0.61633986", "0.61501694", "0.6131079", "0.612517", "0.6118918", "0.61097497", "0.61087775", "0.60758346", "0.60639983", "0.6058946", "0.60558", "0.6052953", "0.6042538", "0.60378754", "0.60294235", "0.60012764", "0.59940916", "0.5977618", "0.5969272", "0.59606147", "0.59527737", "0.59527737", "0.59527737", "0.59527737", "0.5945459", "0.5938944", "0.5933989", "0.5927412", "0.59163684", "0.5908634", "0.5906397", "0.5900345", "0.5899384", "0.58914304", "0.5891051", "0.58898956", "0.5889165", "0.58844876", "0.58838713", "0.58702034", "0.5852446", "0.584332", "0.58256584", "0.58038235", "0.5794529", "0.5786462", "0.5766292", "0.5760067", "0.5755657", "0.57333565", "0.5730584", "0.5726767", "0.5721144", "0.57148314", "0.5713341", "0.5708607", "0.56958646", "0.5688216", "0.5687853", "0.5687219", "0.56588835", "0.5654255", "0.56424034", "0.5642356", "0.56240803", "0.5611329", "0.5593164", "0.55916893", "0.557943", "0.55735666", "0.55524075", "0.55513144", "0.5550282", "0.55435354", "0.5537289", "0.5536691", "0.5533699", "0.5529366", "0.55285066", "0.55258846", "0.55210155", "0.551638", "0.55066144", "0.550424", "0.5494893", "0.54935646", "0.5485137", "0.5484006" ]
0.0
-1
Get single tempory storage item information
public function getEntry($entryId) { $rowset = $this->_tableGw->select(array('id' => (int) $entryId)); $entry = $rowset->current(); if (!$entry) { throw new \Exception("Could not find entry with id: $entryId"); } return $entry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getItem() {}", "public function getItem() {}", "function getItem() ;", "protected function getStorageInfo() {\n\t\t$dirInfo = \\OC\\Files\\Filesystem::getFileInfo('/', false);\n\t\treturn \\OC_Helper::getStorageInfo('/', $dirInfo);\n\t}", "public function getItem()\n {\n return $this->get(self::ITEM);\n }", "public function getStorage() {}", "public function getStorage() {}", "public function getStorage() {}", "public function getItem();", "public function getStorage()\n {\n return $this->get(self::_STORAGE);\n }", "public function getItem() {\n\t\treturn $this->item;\n\t}", "public static function getStorage() {}", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getItem() {\n return $this->item;\n }", "public function getItem() {\n return $this->item;\n }", "public function getStorage();", "public function getStorage();", "function getStorage() ;", "abstract public function getItem();", "function kval_fsstore_get_item($key)\n{\n return fsstore_get(kval_fsstore_path(), $key);\n}", "public function get()\n {\n if (!$this->storage->has(self::STORAGE_KEY)) {\n $this->update();\n }\n return $this->storage->get(self::STORAGE_KEY);\n }", "function getStorage();", "public static function getStorageItemsField() {}", "public function getCurrentStorage() {\n return @$this->attributes['current_storage'];\n }", "public function getStorageRecord() {}", "public function get_item() {\n\t\treturn $this->item;\n\t}", "public function retrieve($item);", "public function getItem()\n {\n $query = $this->grammar->compileGetItem($this);\n\n $result = $this->connection->getClient()->getItem($query);\n\n return $this->processor->processItem($result);\n }", "public function getStorage()\r\n {\r\n return $this->storage;\r\n }", "abstract public function getItem($name);", "public function get_storage_unit()\n {\n return $this->storage_unit;\n }", "public function getStorage() {\n\t\treturn $this->_storage;\n\t}", "public function getStorage()\n {\n return $this->_storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function f_get_item()\n {\n\n $sql = $this->db->query(\"SELECT * FROM md_dm_item \");\n return $sql->result();\n\n }", "public function getStorageInfo()\n\t{\n\t\treturn 'table=`'.$this->getTable().'\\'';\n\t}", "public function getItem() \n {\n $this->checkUserIsLogged();\n $params = Route::getUrlParameters();\n $id = $params['id'];\n try {\n $item = new Item;\n $item->getItem($id);\n View::renderJson($item);\n } catch (Exception $e) {\n View::renderJson(['status' => 0, 'message' => $e]);\n }\n }", "function getStockItemModel() {\n\t\t\treturn $this->getCatalogInventoryHelper( )->getStockItem( $this->getStockId( ) );\n\t\t}", "public function getStoragePrimaryKey();", "public function getStorageId()\n {\n return $this->_getField(self::$STORAGE_ID);\n }", "public function getItem()\n {\n if ($this->item !== null) {\n return $this->item;\n }\n\n $this->item = 'lol';\n\n return $this->getItem();\n }", "public function retrieveItem($id) {\n return $this->itemsDB->retrieve($id);\n }", "public function get()\n {\n $file_path = $this->path();\n\n if (Storage::exists($file_path)) {\n\n return Storage::get($file_path);\n\n }\n }", "public function getItem( $id );", "public function value ()\n {\n return $this->context->storage->value ($this->name);\n }", "public function get_single_stock() {\n\n\t\t$inventory = $this->get_inventory();\n\n\t\treturn ! empty( $inventory ) ? current( $inventory ) : null;\n\t}", "protected function getStoragePID() {\r\n\t\t$tsConf = tx_pttools_div::typoscriptRegistry('plugin.tx_ptgsaconfmgm.');\r\n\t\t$persDataStorage = $tsConf['persDataStorage'];\r\n\t\treturn $persDataStorage;\r\n\t}", "function get_data_item( $name ) {\n\t\treturn $this->data_layer()->get_item( $name );\n\t}", "static public function getItemById($id) {\n $rq = \"SELECT * FROM \" . PREFIX . \"shop.`item` \n WHERE `id` =\" . $id . \" LIMIT 1;\";\n\n $aItem = Sql::Get($rq, 1);\n // MemCacheManager::Set($sKey, $aItems, 900); //900s = 15 min\n\n return $aItem[0];\n }", "protected function getStorageDetails($identifier) {\n $storage = $this->_config->get('storage');\n\n if (isset($storage[$identifier])) {\n return $storage[$identifier];\n }\n\n throw new \\Exception('Storage identifier ' . $identifier . ' was not found');\n }", "public function getItem($key){}", "public function getStorageId() {\n return $this->configuration['storage_id'] ?: NULL;\n }", "abstract protected function getStorage(): StorageInterface;", "public function getItemTemplate()\r\n {\r\n return $this->templateConfiguration['itemTemplate'];\r\n }", "protected function getItem($kind, $name){\r\n switch ($kind) {\r\n case \"entity\":\r\n return $this->entities[$name];\r\n break;\r\n case \"storage\":\r\n return $this->storages[$name];\r\n break;\r\n case \"app\":\r\n return $this->apps[$name];\r\n break;\r\n default:\r\n return null;\r\n }\r\n }", "public function getItem($id)\n {\n return $this->where('id', $id)->first();\n }", "public function get()\n\t{\n\t\t$output = null;\n\t\tif($this->storage == self::STORAGE_FILE)\n\t\t{\n\n\t\t}\n\t\telseif($this->storage == self::STORAGE_APC)\n\t\t{\n\t\t\t$output = apc_fetch($this->key);\n\t\t}\n\t\telseif($this->storage == self::STORAGE_REDIS)\n\t\t{\n\t\t\tif(self::$redis != null)\n\t\t\t\t$output = self::$redis->get($this->key);\n\t\t}\n\t\telseif($this->storage == self::STORAGE_MEMCACHED)\n\t\t{\n\t\t\tif(self::$memcached != null)\n\t\t\t\t$output = self::$memcached->get($this->key);\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->storageException();\n\t\t}\n\n\n\n\t\treturn $output;\n\t}", "public function get($identifier) {\n\t\treturn $this->storage[$identifier];\n\t}", "public function grabItemByID($itemID)\n\t{\n\t\treturn $this->caches['ibEco_stocks'][ $itemID ];\n\t}", "public function getItemById($it_id)\n\t{\n\t\treturn \\ORM::for_table($this->table)->where('it_id', $it_id)->find_one();\n\t}", "function backup_migrate_crud_get_item($type, $id) {\n if ($type = backup_migrate_crud_type_load($type)) {\n return $type->item($id);\n }\n}", "public function getStorageService();", "public function index()\n {\n return Storageplace::get();\n }", "public function getItemById($id)\n {\n return $this->type->find($id);\n }", "public function describeStorage(array $context = []): string;", "public function getStorageNode()\n {\n return $this->get('storagenode');\n }", "function item_get()\n {\n $key = $this->get('id');\n $result = $this->supplies->get($key);\n if ($result != null)\n $this->response($result, 200);\n else\n $this->response(array('error' => 'Supplies item not found!'), 404);\n }", "public function first()\n {\n return reset($this->storage);\n }", "public function getInfo()\n\t{\n\t\treturn $this->resource->get($this->name)->getContent();\n\t}", "public function getStorage(): StorageInterface\n {\n return $this->configuration[ConfigurationInterface::STORAGE];\n }", "public function getItemByIdentifier($identifier);", "public function getItemName();", "public function getItem($pk = null)\n\t{\n\t\t$item = parent::getItem($pk);\n\t\tif($item AND property_exists($item, 'image'))\n\t\t{\n\t\t\t$registry = new Registry($item->image);\n\t\t\t$item->imageinfo = $registry->toArray();\n\t\t}\n\t\treturn $item;\n\t}", "public function getItem ($id);", "public function storage($storage)\n\t{\n\t\treturn $this->storage->get($storage);\n\t}", "protected function getStorage()\n {\n return unserialize(Session::retrieve(__NAMESPACE__));\n }", "public function storage()\n {\n return $this->hasOne(StorageCategory::class);\n }", "public function GetStorageItem(string $storage, string $key, string $ownerUserName = null)\n {\n $result = $this->ExecuteCall(\"GetStorageItem\", (object)[\n \"storage\" => $storage,\n \"key\" => $key,\n \"ownerUserName\" => $ownerUserName\n ], GnResponseType::GnMashupStorageItem);\n\n return $result;\n }", "public function find_storage($accid) {\n $result = $this->call_json($this->appliance_url.\"/api/find_storage.php\",array(\"accid\"=>$accid));\n if($result->status != \"ok\")\n throw new Exception(\"Failed to resolve storage for account $accid: \".$result->error);\n return $result->result;\n }", "public function getTierItem()\n {\n return $this->getItem()->getTierItem();\n }", "public function getItem($key);", "public function getItem($key);", "public function getItem($key);", "public function getItem($key);", "public static function getStorage($mountPoint) {\n\t\tif (!self::$mounts) {\n\t\t\t\\OC_Util::setupFS();\n\t\t}\n\t\t$mount = self::$mounts->find($mountPoint);\n\t\treturn $mount->getStorage();\n\t}" ]
[ "0.67651176", "0.67651176", "0.67520857", "0.6719238", "0.6706887", "0.6493131", "0.649241", "0.64919925", "0.6490673", "0.648171", "0.64614415", "0.6453562", "0.6449652", "0.6449652", "0.6449652", "0.6449652", "0.6449652", "0.6449652", "0.6449652", "0.6449652", "0.6449652", "0.6445388", "0.6432518", "0.64151275", "0.64151275", "0.6398669", "0.63079584", "0.6248454", "0.6233465", "0.61932886", "0.61654025", "0.6147371", "0.6127785", "0.6069798", "0.5974959", "0.59741884", "0.5949666", "0.5943436", "0.5931648", "0.5920995", "0.5906752", "0.58791834", "0.58791834", "0.58791834", "0.58791834", "0.58791834", "0.58791834", "0.58791834", "0.58791834", "0.58791834", "0.5862903", "0.58477056", "0.5823323", "0.5823032", "0.58216316", "0.58156675", "0.581072", "0.577544", "0.57750523", "0.57593066", "0.57527936", "0.572324", "0.5721576", "0.57212627", "0.57184833", "0.57101506", "0.571008", "0.57063115", "0.5703204", "0.56803894", "0.5674695", "0.5662222", "0.5659774", "0.56473047", "0.5633149", "0.5605959", "0.5604696", "0.5597434", "0.5592604", "0.5589012", "0.5583783", "0.5575401", "0.55620986", "0.55570984", "0.55546606", "0.55538666", "0.55464125", "0.5544221", "0.55434805", "0.5542356", "0.5541597", "0.5535246", "0.55210406", "0.5520104", "0.5508896", "0.5501394", "0.5493319", "0.5493319", "0.5493319", "0.5493319", "0.5487391" ]
0.0
-1
Delete current tempory image item from DB and storage
public function deleteEntry($entryId) { $rowset = $this->_tableGw->select(array('id' => (int) $entryId)); $entry = $rowset->current(); if (!$entry) { throw new \Exception("Could not find entry with id: $entryId"); } else { if (unlink($entry->filepath)) { $this->_tableGw->delete(array('id' => (int) $entry->id)); return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public static function deleteImage(){}", "public function deleteImage1()\n {\n Storage::delete($this->image1);\n }", "public function deleteImage(){\n if(file_exists($this->getImage())){\n unlink($this->getImage());\n }\n $this->setImage(null);\n }", "function deleteImage()\n {\n $this->dbInit();\n\n $this->Database->array_query( $result, \"SELECT ImageID FROM eZLink_Link WHERE ID='$this->ID'\" );\n\n foreach ( $result as $item )\n {\n $image = new eZImage( $item[\"ImageID\"] );\n $image->delete();\n }\n \n $this->Database->query( \"UPDATE eZLink_Link set ImageID='0' WHERE ID='$this->ID'\" );\n }", "public function handleDeleteImage(){\n\n $session = $this->hlp->sess(\"images\");\n $img = $session->toDelete;\n $listingID = $this->hlp->sess(\"listing\")->listingID;\n $imgs = $this->listings->getListingImages($listingID);\n \n unset($imgs[$img]);\n\n //reindexed array after unset\n $newArray = array();\n \n foreach ($imgs as $image){\n array_push($newArray, $image);\n }\n \n unset($imgs);\n \n //final array - updated - without deleted images to store in db\n $images = serialize($newArray);\n \n $this->listings->updateListingImages($listingID, $images);\n $this->redirect(\"Listings:editListing\", $listingID);\n }", "public function actionDelImg(){\n $img_id = Yii::$app->request->post('img_id');\n $model_id = Yii::$app->request->post('model_id');\n\n $docModel = Product::find()\n ->where([\n 'id' => $model_id\n ])\n ->limit(1)\n ->one();\n $img = $docModel->getImageById($img_id);\n $docModel->removeImageNoDel($img);\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 deleteImage()\n {\n return Storage::delete($this->image);\n }", "public function remove_image() {\n\t\t$this->join_name = \"images\";\n\t\t$this->use_layout=false;\n\t\t$this->page = new $this->model_class(Request::get('id'));\n\t\t$image = new WildfireFile($this->param(\"image\"));\n\t\t$this->page->images->unlink($image);\n\t}", "public function destroy($id)\n {\n $item = News::find($id);\n $old_img = $item->img;\n Storage::disk('public')->delete($old_img);\n DB::table('newstest')->delete($id);\n\n return redirect('/data');\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 }", "public function destroy($id)\n {\n \n $destroy = Category_image::find($id);\n if(file_exists('images/sales_page_image/'.$destroy->image_name.''))\n {\n @unlink('images/sales_page_image/'.$destroy->image_name.'');\n }\n $destroy->delete();\n\n return redirect()->back();\n }", "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 }", "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 actionDelete()\n\t{\n\t\t// setting the delete tag as false\n\t\t$deleteObject = Image::model()->findByPk($_GET['imageid']);\n\t\t$deleteObject->deleted = true;\n\t\t$deleteObject->save();\n\t\t\n\t\t// link to the physical image file\n\t\t$deleteMe = $deleteObject->getImageFile('full', false, Image::FULLIMAGEPATH);\n\t\t\t\n\t\t// first the existance of the file has to be evaluated in order to avoid an php error\n\t\tif( file_exists( $deleteMe ) )\n\t\t\trename( \n\t\t\t\t// source\n\t\t\t\t$deleteMe,\n\t\t\t\t// target \n\t\t\t\tImage::DELETEDIMAGEPATH . $deleteObject->imageid . '.' . $deleteObject->tiedostotyyppi\t\t\n\t\t);\n\t\t\n\t\t$deleteObject->deleteImage(array('small', 'light', 'medium', 'large'));\n\t\t\n\t\t$this->redirect(Yii::app()->user->returnUrl);\n\t\t\n\t}", "public function delete_photo(){\n $sql=\"DELETE FROM photos WHERE id=\".$this->id;\n self::$connect->query($sql);\n\n }", "public function delete(){\n $record = $this->getImageWithId($this->id);\n if(!$record){\n return false;\n }\n $conn = static::connect();\n $stmt = $conn->prepare(\"DELETE FROM images WHERE id = :id\");\n $stmt->bindValue(\"id\", $record['id'], PDO::PARAM_INT);\n\n /* removes file from server */\n unlink($record['path']);\n return $stmt->execute();\n }", "public function delete_image_from_storage($image_file_name) {\n\t\t unlink(\"product_images/\".$image_file_name);\n\t }", "public function destroy($id) {\n $item = Item::where('id',$id)->first();\n foreach($item->images as $img) {\n if(\\File::exists(public_path($img->img))){\n \\File::delete(public_path($img->img));\n }\n }\n $path = 'images/items/'.$item->id.'/';\n \\File::deleteDirectory($path); \n $item->delete();\n return redirect('/admin/items')->with('message','تم حذف المنتج بنجاح');\n }", "function removeImage() {\n\t\t\n $image = $this->getImageByImageId();\n \n $file_image = $this->dir_path.$image['path_image'];\n\n $this->deleteImage(array('image_id' => $image['image_id'] ));\n\n if(file_exists($file_image)) {\n @unlink($file_image);\n }\n\t\t\n\t}", "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 actionDelete()\n {\n if (Yii::$app->user->can('imagedelete')) {\n if (Yii::$app->request->isAjax) {\n $system = new Filesystem();\n $param = Yii::$app->request->post();\n $model = $this->findModel($param['id']);\n $system->remove($this->original . $model->unique_name);\n $system->remove($this->thumb_145x145 . $model->unique_name);\n $system->remove($this->thumb_original . $model->unique_name);\n $system->remove($this->thumb_191x128 . $model->unique_name);\n $model->delete();\n }\n } else {\n throw new HttpException(403, 'You are not allowed to access this page', 0);\n }\n }", "function unsetImage($uid,$table,$data,$path) {\n\t\n\t $this->db->select($data);\n $this->db->from($table);\n\t\t$this->db->where('uid',$uid);\n $query=$this->db->get();\t\t\n\t\tif($query->num_rows()>0)\n\t\t{\n\t\t $query=$query->result();\n\t\t $img=$query[0]->$data;\n @unlink($path.$img);\n\t\t}\t\n return true;\t\t\n\t}", "public function destroy($id)\n {\n $dbData = Product::with('productImgs')->find($id);\n // $pattern='/src=\"(\\S*)\"/';\n // preg_match_all($pattern, $dbData['description'], $matches);\n // dd($dbData['description'],$matches);\n\n if (isset($dbData->img)) {\n // dd($dbData->img);\n File::delete(public_path($dbData->img));\n if (isset($dbData->productImgs)) {\n foreach ($dbData->productImgs as $i) {\n File::delete(public_path($i->img));\n // dd(public_path($dbData->img), public_path($i->img));\n }\n }\n }\n\n Product::destroy($id);\n $this->fetchDestroyByProdId($id);\n $imgs = ProductImg::where('product_id', $id)->get();\n foreach ($imgs as $img) {\n $img->delete();\n }\n // $path = $myfile->putfile('upload', $data);\n // Storage::url($path);\n\n return redirect()->route('admin');\n }", "public function destroy($id)\n {\n $item = PhotoGallary::find($id);\n $item->delete();\n\n //delete image\n $image_path = \"uploads/photogallary/\".$item->image; // Value is not URL but directory file path\n if(File::exists($image_path)) {\n // dd($image_path);\n File::delete($image_path);\n }\n\n $item = PhotoGallary::get();\n return redirect()->route('photoGallary.index')->with('message','Photo Successfully Deleted');\n }", "public function destroy() {\n\t\tif($this->delete()) {\n\t\t\t// then remove the file\n\t\t // Note that even though the database entry is gone, this object \n\t\t\t// is still around (which lets us use $this->image_path()).\n\t\t\t$target_path = SITE_ROOT.DS.'public'.DS.$this->image_path();\n\t\t\treturn unlink($target_path) ? true : false;\n\t\t} else {\n\t\t\t// database delete failed\n\t\t\treturn false;\n\t\t}\n\t}", "public function destroyimage($id)\n {\n DB::beginTransaction();\n try {\n $image = Images::find($id);\n $product_id = $image->products[0]->id;\n $image->products()->detach($product_id);\n Images::destroy($id);\n DB::commit();\n return redirect()->route('product.edit',$product_id)->with('message','Image Deleted Successfully');\n } catch (\\Exception $ex) {\n DB::rollback();\n return redirect()->route('product.edit',$product_id)->with('message',$ex->getMessage());\n }\n }", "public function actionDel($id){\t\t\t\t\n\t\t$look = Images::findOne($id);\n\t\t$image ='../../img/cart/300x/'.$look->image_name;\t\t\n\t\t$images ='../../img/cart/600x/'.$look->image_name;\t\t\n\t\tif (unlink($image) && unlink($images)) {\n\t\t\t$look->delete();\n\t\t}\n\t\treturn Yii::$app->getResponse()->redirect(Yii::$app->homeUrl.'?r=product/update&id='.$look->product_id);\n\t}", "function del_image_from_object($obj_type, $obj_id, $img_id)\n{\n db()->query('DELETE FROM object_images WHERE obj_type = \"' . strtok($obj_type, \" \") .\n '\" AND obj_id = ' . (int)$obj_id . ' AND img_id = ' . (int)$img_id);\n\n delete_image($img_id);\n}", "public function removeImage() {\n //check if we have an old image\n if ($this->image) {\n //store the old name to delete the image on the upadate\n $this->temp = $this->image;\n //delete the current image\n $this->setImage(NULL);\n }\n }", "public function destroy($id)\n {\n try{\n $slider= Slider::find($id);\n\n $link = $slider->img_url;\n\n $slider->delete();\n\n if($slider->img_url!=null){\n if(\\File::exists(public_path($link))){\n unlink(public_path($link));\n\n }\n\n }\n\n\n\n Session::flash('danger', 'Image is deleted');\n return Redirect::back();\n }catch (Exception $exception){\n Session::flash('alert', 'Image is not deleted');\n return Redirect::back();\n }\n\n\n }", "public function deleteImage($id){\n $delete_image=Details::findOrFail($id);\n $image_large=public_path().'/'.$delete_image->image;\n if($delete_image){\n $delete_image->image='';\n $delete_image->save();\n \n unlink($image_large);\n }\n session()->flash('success','Image bien supprimer');\n return back();\n }", "public function deleteImage($image){\n /** @var Image $image */\n $this->em->remove($image);\n $image->onPreRemove();\n $this->em->flush();\n }", "public function deleteThisItem(){\n $this->deleteFiles(self::DATA_DIRECTORY.$this->_page.\"/items/\".$this->_id);\n // Supprimer l'item de $this->_collectionAdministrator->_data\n $this->_collectionAdministrator->removeItem($this->_id);\n }", "public function destroy($id)\n {\n $item = Item::findOrFail($id);\n $image_path = public_path(\"img/items/{$item->image}\");\n $small_image_path = public_path(\"img/items/small_items/{$item->image}\");\n\n if (File::exists($image_path)) {\n if (File::exists($small_image_path)){\n File::delete($image_path);\n File::delete($small_image_path);\n }\n } else {\n return redirect()->back()->withErrors('Delete error');\n }\n\n $item->delete();\n\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n // $images=LookbookCategoryController::where('lookbook_category_id',$id)->get();\n // foreach ($images as $img) {\n // unlink(public_path('/img/uploads/'.$img->img));\n // }\n // LookbookCategoryController::find($id)->delete();\n }", "public function destroy($id){\n $post=Post::find($id);\n $image=$post->path;\n $post->delete();\n if($image!=NULL)\n File::delete($image);\n\n\n\n \n \n //\n }", "public function actionDeleteguideimage()\n\t{\n\t $sessionimagesarr = array();\n\t if($_POST['type']=='1'){\n\t\t unlink(Yii::getPathOfAlias('webroot').'/'.$_POST['path']);\n\t\t }else{\t\t \n\t\t $images = Images::model()->find('item_type=:item_type AND item_id=:item_id',array(':item_type'=>'guide','item_id'=>$id));\n\t\t\t unlink( Yii::getPathOfAlias('webroot').'/'.$images->image_path );\n\t\t\t $images->delete();\t\t \n\t\t }\n\t \n\t\t echo 'Deleted';\n\t\t die;\n\t}", "public function reset() {\n\n\t\t$type = Dba::escape($this->type);\n\t\t$uid = Dba::escape($this->uid);\n\n\t\t$sql = \"DELETE FROM `image` WHERE `object_id`='$uid' AND `object_type`='$type'\";\n\t\t$db_results = Dba::write($sql);\n\n\t}", "public function deleteSlider($id)\n {\n $image = Slider::find($id);\n $old_image = $image->image;\n unlink($old_image);\n\n Slider::find($id)->delete();\n\n return redirect()->back()->with('success','slider Delete successfully');\n }", "public function DeleteSupplier($id){\n\n $delete=DB::table('suppliers')\n ->where('id',$id)\n ->first();\n $photo=$delete->photo;\n unlink($photo);\n $dltuser=DB::table('suppliers')\n ->where('id',$id)\n ->delete(); \n\n return Redirect()->route('all.supplier')->with('message','Deleted Successfully.');\n\n \n}", "function delete_logoimage() \n {\n \n $fullpath = './assets/uploads/fashion_prod/';\n $thumbpath = './assets/uploads/fashion_prod/thumbs/';\n $picture=$_POST[\"r_logoimage\"];\n \n unlink($fullpath.$picture);\n unlink($thumbpath.$picture);\n $this->db->delete('productimages', array('imagename' => $picture));\n echo true;\n \n }", "public function delImg($item_id, $imgfile)\n {\n $this->db->update(array('id'=>$item_id), array('$pull'=>array('imgs'=>$imgfile)));\n \n // if this img is defimg, remove it, and replace with next img if still exists\n if ( $this->db->getOne(array('id'=>$item_id, 'defimg'=>$imgfile)) )\n {\n $defimg = ( $imgs = $this->db->getOne(array('id'=>$item_id, array('imgs'))) ) ? $imgs[0] : null;\n $this->db->update(array('id'=>$item_id), array('defimg'=>null));\n }\n }", "public function destroy_photo($id)\n {\n //\n if(File::exists(public_path('files/products_img/'.Photo::find($id)->name)))\n {\n File::delete(public_path('files/products_img/'.Photo::find($id)->name));\n Photo::find($id)->delete();\n return redirect()->back();\n }\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 Delete($id)\n {\n $dbt = Team::where('id','like', $id)->first();\n /// Delete Stored image \n if (Storage::exists($dbt->image)) {\n /// Delete Stored image \n Storage::delete($dbt->image);\n }\n //print_r($dbt[0]->image);\n $dt = Team::find($id);\n $dt->delete();\n }", "function imageAllDelete();", "public function delete()\n {\n DB::beginTransaction();\n $res=parent::delete();\n \n if($res==true)\n {\n $relations=$this->morphMany('App\\Models\\Image', 'imageable');\n\n \n $relations->delete(); \n }\n\n DB::commit(); \n }", "protected function _delete()\n {\n $photoTable = Engine_Api::_()->getItemTable('socialstore_product_photo');\n $photoSelect = $photoTable->select()->where('album_id = ?', $this->getIdentity());\n foreach( $photoTable->fetchAll($photoSelect) as $productPhoto ) {\n $productPhoto->delete();\n }\n\n parent::_delete();\n }", "function deletePicture() {\n\t\tglobal $DB_LINK, $db_table_recipes, $g_rb_database_type, $LangUI;\n\t\t$sql = \"UPDATE $db_table_recipes SET recipe_picture='', recipe_picture_type='' WHERE recipe_id=\" . $DB_LINK->addq($this->id, get_magic_quotes_gpc());\n\t\t$rc = $DB_LINK->Execute($sql);\n\t\tDBUtils::checkResult($rc, NULL, $LangUI->_('There was an error removing the picture'), $sql);\n\n\t\t// Do the postgres cleanup\n\t\tif ($this->picture_oid && $g_rb_database_type==\"postgres\") {\n\t\t\t$rc = $DB_LINK->BlobDelete($this->picture_oid);\n\t\t\t$this->picture_oid=NULL;\n\t\t\tDBUtils::checkResult($rc, NULL, $LangUI->_('There was an error removing the picture'), $sql);\n\t\t}\n\t\treturn TRUE;\n\t}", "public function actionDeletepimage()\n\t{\n\t $sessionimagesarr = array();\n\t if($_POST['type']=='1'){\n\t\t @unlink(Yii::getPathOfAlias('webroot').'/'.$_POST['path']);\n\t\t $thumbpath = str_replace(basename($_POST['path']), 'thumb/'.basename($_POST['path']),$_POST['path']);\n\t\t @unlink(Yii::getPathOfAlias('webroot').'/'. $thumbpath);\n\t\t }else{\n\t\t $images = Images::model()->findByPK($_POST['path']);\n\t\t @unlink( Yii::getPathOfAlias('webroot').'/'.$images->image_path );\n\t\t $thumbpath = str_replace(basename($images->image_path), 'thumb/'.basename($images->image_path),$images->image_path);\n\t\t @unlink(Yii::getPathOfAlias('webroot').'/'. $thumbpath);\n\t\t $images->delete();\n\t\t }\n\t \n\t\t echo 'Deleted';\n\t\t die;\n\t}", "public function actionDeleteimage()\n {\n $this->enableCsrfValidation = false;\n $filename = Yii::$app->request->post('filename');\n $path_name = \"../web/web_mat/temp/\" . $filename;\n if (unlink($path_name)) {\n echo \"success\";\n } else {\n echo \"fail\";\n }\n }", "public function delete()\n\t{\n\t\t$product_id = $this->input->post('product_id');\n\t\t$vendor_id = $this->session->userdata('vendor_id');\n\n\t\t$thumb_image = get_product($product_id, 'thumb_image'); //get thumb_image\n\t\t$images = unserialize(get_product($product_id, 'images')); //get multiple images\n\n\t\t$deleted = $this->products->delete($product_id);\n\n\t\tif ($deleted)\n\t\t{\n\t\t\t//thumb image//\n\t\t\t$copy_thumb = str_replace('products', 'products/deleted', $thumb_image); //replace path\n\t\t\tcopy($thumb_image, $copy_thumb); //copy image\n\t\t\tunlink($thumb_image);\n\n\t\t\tforeach ($images as $image) //multiple images//\n\t\t\t{\n\t\t\t\t$copy_image = str_replace('products', 'products/deleted', $image); //replace path\n\t\t\t\tcopy($image, $copy_image); //copy image\n\t\t\t\tunlink($image);\n\t\t\t}\n\n\t\t\t$this->vendors->update_total_product($vendor_id, 'total_products - 1');\n\t\t\techo 'true';\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo 'false';\n\t\t}\n\t}", "public function destroy($id)\n {\n $category= Category::find($id);\n\n if(Storage::disk(\"public\")->exists(\"category/\".$category->image)){\n Storage::disk(\"public\")->delete(\"category/\".$category->image);\n }\n\n if(Storage::disk(\"public\")->exists(\"category/slider/\".$category->image)){\n Storage::disk(\"public\")->delete(\"category/slider/\".$category->image);\n }\n\n $category->delete();\n\n\n\n Toastr::success(\"Category Delete successfully\",'success');\n return redirect()->route('admin.category.index');\n }", "public function pre_delete()\r\n\t{\r\n\t\tparent::pre_delete();\r\n\t\t$Change = App::make('Change');\r\n\t\t$Change::where('fmodel', 'GalleryItem')\r\n\t\t\t ->where('fid', $this->id)\r\n\t\t\t ->delete();\r\n\t\t\t \r\n\t\t// Thumbs\r\n\t\t/*if($this->file) {\r\n\t\t\t# Should really check if these are used anywhere else, but no easy way to do that in other modules yet so just leaving them for now\r\n\t\t\t\r\n\t\t\t// Name\r\n\t\t\t$name = basename(public_path().$this->file);\r\n\t\t\t\r\n\t\t\t// Thumbs\r\n\t\t\t$thumbs = Config::get('galleries::thumbs');\r\n\t\t\tforeach($thumbs as $k => $v) {\r\n\t\t\t\tif(file_exists(public_path().$v['path'].$name)) unlink(public_path().$v['path'].$name);\r\n\t\t\t}\r\n\t\t}*/\r\n\t}", "public function destroy(){\n $productData = Products::where(\"productId\",request('productId'));\n $productDataImages = ProductImages::where(\"productId\",request('productId'));\n File::delete(\"productImages/\".$productData->get()->first()->thumbnail);\n if(count($productDataImages->get())){\n foreach ($productDataImages->get() as $productDataImage) {\n File::delete(\"productImages/\".$productDataImage->name);\n }\n $productDataImages->delete();\n }\n if($productData->delete()){\n Session()->flash('message', \"Product Sucessfully Updated\");\n }else{\n Session()->flash('error', \"Product Not Sucessfully Updated\"); \n }\n return redirect(\"/products\");\n }", "public function deleteAltImage($id=null)\n {\n $productImage = ProductsImages::where(['id'=>$id])->first();\n // Get Product Image Paths\n $large_image_path = 'images/backend_images/products/large/';\n $medium_image_path = 'images/backend_images/products/medium/';\n $small_image_path = 'images/backend_images/products/small/';\n // Delete Large Image if not exists in folder\n if (file_exists($large_image_path.$productImage->image)) {\n unlink($large_image_path.$productImage->image);\n }\n // Delete Medium Image if not exists in folder\n if (file_exists($medium_image_path.$productImage->image)) {\n unlink($medium_image_path.$productImage->image);\n }\n // Delete Small Image if not exists in folder\n if (file_exists($small_image_path.$productImage->image)) {\n unlink($small_image_path.$productImage->image);\n }\n // Delete Image from Product table\n ProductsImages::where(['id'=>$id])->delete();\n return redirect()->back()->with('flash_message_success', 'Product Alternate Image(s) has been deleted Successfully !!!');\n }", "public function remove()\n {\n $file = $this->security->xss_clean($this->input->post(\"file\"));\n $id = $this->security->xss_clean($this->input->post(\"id\"));\n if ($file && file_exists($file)) {\n unlink($file);\n $this->db->where(array('url_image'=>$file,'idProduct'=>$id));\n $this->db->delete('imageProduct');\n }\n }", "function deleteImage($image = \"\")\n {\n if (!$image)\n $image = $this->image;\n unlink ($image);\n }", "public function destroyimage($id) {\n $delete = ProductsGallary::find($id);\n if(!empty($delete->media) and file_exists(public_path().'/upload/products/'.$delete->media))\n {\n unlink(public_path().'/upload/products/'.$delete->media);\n }\n $delete->delete();\n session()->flash('success',trans('admin.deleted'));\n return back();\n }", "public function delete(Request $request) \n {\n $credit = \\App\\Goldcredit::where('id', $request->id)->first();\n \n $images = $credit->credit_images;\n \n // Save images\n if (sizeof($images))\n {\n foreach ($images as $key => $image) \n {\n if (file_exists(public_path() . $image->image)) unlink(public_path() . $image->image);\n }\n }\n \\App\\credit_image::where('goldcredit_id', $request->id)->delete();\n \\App\\creditItem::where('goldcredit_id', $request->id)->delete(); \n $credit->delete(); \n }", "public function destroy($id)\n {\n //\n $post=DB::table('posts')->where('id',$id)->first();\n $image=$post->image;\n $delete=DB::table('posts')->where('id',$id)->delete();\n if($delete){\n unlink($image);\n return Redirect()->back();\n }else{\n\n }\n }", "public function destroy($id)\n { //productimg dc truy van qua model Product thong qua hasmany\n $prod_img_detail= Product::find($id)->productimg;\n\n foreach ($prod_img_detail as $prodImgDetail){\n File::delete('uploads/products/product/'.$prodImgDetail->name);\n $prodImgDetail->delete();\n }\n $prodImg= Product::find($id);\n unlink('uploads/products/thumbnail/'.$prodImg->image);\n $prodImg->delete();\n return redirect()->route('product.index')->with('thongbao','Delete Success!!!');\n }", "function beforeDelete(){\r\n\t\t$photo = $this->findById($this->id);\r\n\t\tunlink($this->dir . $photo['Photo']['small']);\r\n\t\tunlink($this->dir . $photo['Photo']['large']);\r\n\t\treturn true;\r\n\t}", "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 destroy($id)\n {\n $product = Product::find($id);\n if ($product->image) {\n unlink($product->image);\n $product->delete();\n }else{\n $product->delete();\n }\n }", "public function destroy($id)\n {\n $db = team::findorfail($id); \n $image = $db->img;\n if($image == 'rename'){\n $db->delete();\n return redirect()->back()->with('toast_success', 'Deleted Successfully');\n }\n else{\n $db->delete();\n unlink(\"public/frontend/images/about/$image\");\n return redirect()->back()->with('toast_success', 'Deleted Successfully');\n }\n }", "public function destroy($id)\n {\n if ($data = Blog::find($id))\n {\n $filename = $data->img;\n $fullPath = public_path(\"images/blog/{$data->img}\");\n if (File::exists($fullPath)) {\n File::delete($fullPath);\n }\n $data->delete($fullPath);\n\n Alert::success('The Item was deleted.', 'Congrats');\n \n }else{\n Alert::error('Something went wrong!', 'Oops...');\n }\n return Redirect::to('admin/'.$this->title);\n }", "public function afterDelete()\n {\n if ($this->image) $this->image->delete();\n if ($this->reindex) Slide::reindex();\n }", "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(ImageController $image,$id)\n {$newid = DB::table('images')->where('id',$id)->get()->first();\n DB::table('images')->where('id',$id)->delete();\n return $this->show($newid->product_id);\n }", "public function destroy($id)\n {\n \n $sliders = DB::table('sliders')->where('id',$id)->get();\n foreach ($sliders as $slider) {\n Storage::delete('public/upload/'.$slider->name);\n }\n Slider::where('id',$id)->delete();\n return redirect()->back();\n\n \n //dd(Storage::delete('public/upload/'.$img));\n //return redirect()->back();\n \n }", "function delete_image() {\n\tif(isset($_POST['remove'])){\n\t\tglobal $wpdb;\n\t\t$img_path = $_POST['path'];\n\n\t\t// We need to get the images meta ID.\n\t\t$query = \"SELECT ID FROM wp_posts where guid = '\" . esc_url($img_path) . \"' AND post_type = 'attachment'\";\n\t\t$results = $wpdb->get_results($query);\n\n\t\t// And delete it\n\t\tforeach ( $results as $row ) {\n\t\t\twp_delete_attachment( $row->ID ); //delete the image and also delete the attachment from the Media Library.\n\t\t}\n\t\tdelete_option('pochomaps_map_image'); //delete image path from database.\n\t}\n}", "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 destroy($id)\n {\n $data = DB::table('categories')->where('id',$id)->first();\n $image = $data->image;\n unlink($image);\n DB::table('categories')->where('id',$id)->delete();\n Toastr::success('Category Successfully Deleted :)', 'Success', [\"closeButton\" => true, \"progressBar\" => true]);\n return redirect()->back();\n }", "public function delete_product($id){\n $img = DB::table('products')->where('id',$id)->first();\n $image_url = $img->product_image;\n if( $image_url == NULL ){\n \n $delete = DB::table('products')->where('id',$id)->delete();\n if($delete){\n $notification=array(\n 'messege'=>'products delete Successfully without image',\n 'alert-type'=>'success'\n );\n return Redirect()->route('all.product')->with($notification);\n }else{\n return Redirect()->back();\n }\n }\n else{\n $done = unlink($image_url); \n $delete = DB::table('products')->where('id',$id)->delete(); \n if($delete){\n $notification=array(\n 'messege'=>'products delete Successfully with image',\n 'alert-type'=>'success'\n );\n return Redirect()->route('all.product')->with($notification);\n }else{\n return Redirect()->back();\n }\n } \n\n }", "public function removeProduct($id){\n ProductCategory::where('product_id', $id)->delete();\n $del = DB::table('imageupload')->where('content_id', $id)->get();\n foreach ($del as $img) {\n $path = public_path().'/uploads/'.$img->path;\n if( file_exists($path) ){\n //File::delete('uploads/'.$img->path);\n unlink($path);\n }\n ImageUpload::find($img->id)->delete();\n }\n Product::find($id)->delete();\n return redirect('admin/products');\n }", "public function delete_img_unlink() {\n //create ad time\n $img_name = $this->input->post('img_name');\n $type = $this->input->post('type');\n if($type == 'create'){\n echo 'create';\n $img_path_thumb = 'uploads/ads/'.$img_name;\n $img_path_thumb_view = 'uploads/ads/'.$img_name;\n \n $extension = image_type_to_extension($img_name);\n $img_path_original = 'uploads/ads/original/original-'.$img_name.$extension;\n \n unlink($img_path_original);\n //$img_path_original = base_url().'uploads/ads/_thumb/'.$img_name;\n unlink($img_path_thumb);\n unlink($img_path_thumb_view);\n\n $delete_path = $this->session->userdata['img'];\n $pos = array_search($img_name, $delete_path);\n // if($delete_path.indexOf($img_name) !== -1){\n //unset($delete_path[array_search($img_name, $delete_path)]);\n unset($delete_path[$pos]);\n $this->session->set_userdata('img',$delete_path);\n // }\n }else if($type == 'edit'){\n echo 'edit';\n $id = $this->input->post('id');\n if($id){\n $data = array(\n 'StatusID'=> 3,\n 'DeletedBy'=> $this->session->userdata('log_id'),\n 'DeletedDT'=> date('Y-m-d H:i:s')\n );\n $this->Advertisement->image_deleted($id, $data);\n }\n }\n \n \n //Edit ad then ad new pic and delete\n \n }", "public function destroy($id)\n {\n $item=Item::findOrFail($id);\n if($item->image!='default.png'){\n Storage::disk('public_uploads')->delete($item->image);\n }\n $item->meals()->detach();\n $item->delete();\n Session::flash('success','The item was Succesfully deleted');\n return redirect()->route('items.index');\n }", "function delete_image($imageId) {\n\t\t\tglobal $wpdb;\n\t\t\t$sql = \"select `filename` from `\".$this->table_img_name.\"` where `id` = '\".$imageId.\"'\";\n\t\t\t$img = $wpdb->get_row($sql, ARRAY_A, 0);\n\n\t\t\t$sql = \"delete from `\".$this->table_img_name.\"` where `id` = '\".$imageId.\"'\";\n\t\t\t$wpdb->query($sql);\n\n\t\t\t$page = $this->plugin_path.$this->images_dir.\"/\".$img['filename'];\n\n\t\t\t@unlink( $page );\n\n\t\t\t$fileExt = split( \"\\.\", $img['filename'] );\n\t\t\tif( $fileExt[1] != \"swf\" ) \n\t\t\t\t{\n\t\t\t\t\t $thumb = $this->plugin_path.$this->images_dir.\"/thumb_\".$img['filename'];\n\t\t\t\t\t @unlink( $thumb );\n\t\t\t\t}\n\t\t}", "public function deleteBannerImage($id=null){\n //get banner/slider image name\n $bannerImage =Banner::where(['id'=>$id])->first();\n \n //get banner/slider image paths\n $banner_image_path = 'images/frontend_images/images/banners/';\n\n //delete banner image if exist in folder\n if(file_exists($banner_image_path.$bannerImage->image)){\n unlink($banner_image_path.$bannerImage->image);\n }\n \n // delete image from banner table\n Banner::where(['id'=>$id])->update(['image'=>'']);\n return redirect()->back()->with('flash_success_msg','Slider Image Deleted successfully!');\n }", "public function destroy($id) {\n\n $foods = Food::find($id);\n\n $food_pics = DB::table('food_pic')->get()->where('food_id',$id);\n\n foreach ($food_pics as $food_pic) {\n\n File::delete(public_path() . '/images/resize_food/' .$food_pic->food_pic_file);\n }\n \n $foods->delete();\n return back();\n\n // Health::find($id)->delete();\n // Food::destroy($id);\n // return back();\n }", "protected function deleteExpired() {\n\t\t$result = $this->db->query('SELECT id FROM image WHERE delete_time < '.time());\n\t\tif ($result) {\n\t\t\twhile ($entry = $result->fetchArray(SQLITE3_NUM)) {\n\t\t\t\t$this->delete($entry[0]);\n\t\t\t}\n\t\t}\n\t}", "public function destroy($id)\n {\n $product = Product::find($id);\n if($product->product_image =='default_img.jpg'){\n Product::find($id)->delete();\n }else{\n \n Product::find($id)->delete();\n unlink(base_path('public/uploads/product_images/'.$product->product_image));\n }\n \n \n \n }", "public function imagedelete($id) {\n $img = ItemImage::where('id',$id)->first();\n $item_id = $img->item_id;\n $images = ItemImage::where('item_id',$item_id)->get();\n if (count($images) > 1) {\n if(\\File::exists(public_path($img->img))){\n \\File::delete(public_path($img->img));\n }\n $img->delete();\n return redirect()->back()->with('message','تم حذف الصورة بنجاح');\n } else {\n return redirect()->back()->with('message','لايمكنك حذف الصورة، يجب أن يكون للمنتج صورة واحدة على الأقل');\n }\n }", "public function deleting(Image $image)\n {\n Storage::delete($image->filename);\n Storage::delete($image->thumbnail);\n }", "public function destroy($id)\n {\n $item = Item::find($id);\n if (isset($item->picture)) {\n $oldFilename = $item->picture;\n Storage::delete('public/images/items/'.$oldFilename); \n }\n $item->delete();\n\n Session::flash('success','The item has been deleted');\n\n return redirect()->route('items.index');\n\n }", "public function destroy($id)\n {\n $delete = Product::where(\"id\", $id)->first();\n $img = $delete->image;\n if($img){\n unlink('backend/assets/images/products/'.$img);\n $delete->delete();\n toast('Product Deleted Successfully','success');\n return redirect()->route('index.product');\n }else{\n return redirect()->route('index.product');\n toast('Product Not Deleted','success');\n }\n }", "protected function deleteOldImage(){\n if(auth()->user()->profileImage){\n Storage::delete('/public/images/'.auth()->user()->profileImage);\n }\n }", "public function delete_image($img) {\n $this->db->where('Images',$img);\n $this->db->update('advertisement_image',array('StatusID'=>3));\n }", "public function delete(): void\n {\n $this->instances->demo()->runHook($this->root(), 'delete:before', $this);\n\n Dir::remove($this->root());\n $this->instances->delete($this->id);\n\n $this->instances->demo()->runHook($this->root(), 'delete:after', $this);\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 }", "function imageDelete($property);", "public function deletePicture()\n {\n $tenant = Tenant::where('idPerson', '=', \\Auth::user()->idPerson)->first();\n $tenant->profile_picture = NULL;\n $tenant->save();\n\n }", "public function delete(){\r\n\t\t$image = $this->admin_users_model->get_one(array('id'=>$this->uri->segment(2)),'UserAvatar');\r\n\t\t@unlink('../upload/avatar/'.$image);\r\n\t\t$this->admin_users_model->Delete($this->uri->segment(2));\r\n\t\tredirect('admin-users-list');\t\r\n\r\n\r\n\t\t}", "protected function delete($id) {\n\t\t@unlink(self::getPath($id));\n\t\t$this->db->exec(\"DELETE FROM image WHERE id = '\".SQLite3::escapeString($id).\"'\");\n\t}", "public function deleteImage($id){\n $id = strip_tags($id);\n\n $sql = \"DELETE FROM image WHERE id = :id\";\n $query = $this->db->prepare($sql);\n $query->execute(array(':id' => $id));\n\n }", "public function deleteImage($id){\n $product = Product::find( $id);\n $product->image = '';\n $product->update(); \n return redirect('/admin/products/'.$id.'/edit');\n }", "public function destroy($id)\n {\n $data=Brand::findOrFail($id)->first();\n $img=$data->name;\n \n if (file_exists($img) ) {\n\n @unlink($img);\n \n Brand::where('id', $id)->delete();\n\n }else{\n\n Brand::where('id', $id)->delete();\n } \n return redirect()->route('brand.index')->with('success','brand Deleted Successfull');\n }" ]
[ "0.78890854", "0.7610641", "0.72132725", "0.7097558", "0.70782965", "0.7042595", "0.69506484", "0.692985", "0.6915368", "0.6893346", "0.6882658", "0.6866592", "0.68548876", "0.68538207", "0.68332034", "0.6832461", "0.67977124", "0.6794679", "0.6792924", "0.6788387", "0.6785112", "0.67839164", "0.6781152", "0.6771875", "0.6767679", "0.67637056", "0.6760275", "0.67468077", "0.6746043", "0.67363226", "0.6736296", "0.6733896", "0.6733731", "0.6729999", "0.67243457", "0.67232895", "0.6722307", "0.6720418", "0.6714618", "0.66962045", "0.6689581", "0.66765857", "0.66730404", "0.66716224", "0.6666249", "0.6655315", "0.66491747", "0.6647397", "0.66464007", "0.66458964", "0.66454154", "0.6636236", "0.6632869", "0.662699", "0.6622982", "0.661375", "0.6610677", "0.6609583", "0.6606669", "0.65977675", "0.6592965", "0.6591028", "0.65875655", "0.6585027", "0.6578829", "0.657611", "0.6570485", "0.6570243", "0.65653765", "0.65610266", "0.65549684", "0.65527683", "0.6552751", "0.65490234", "0.6546303", "0.65448207", "0.6534978", "0.65317076", "0.6527885", "0.6524701", "0.6519078", "0.6498822", "0.64919025", "0.6488858", "0.6486919", "0.64822906", "0.64820814", "0.6480949", "0.64788616", "0.64759505", "0.64741147", "0.64681035", "0.646807", "0.64596903", "0.64586425", "0.64582247", "0.6458001", "0.645786", "0.6457694", "0.64543205", "0.64535606" ]
0.0
-1
Clean tempory storage and dell all items fron DB table
public function clearAll() { $list = scandir(self::ROOT_PATH . "/public/{$this->storagePath}"); foreach ($list as $file) { if ($file == '.' || $file == '..') { continue; } $filePath = self::ROOT_PATH . "/public/{$this->storagePath}/$file"; unlink($filePath); } $this->_tableGw->delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function empty_temp_db() {\n\t\tif(self::using_temp_db()) {\n\t\t\t$dbadmin = new DatabaseAdmin();\n\t\t\t$dbadmin->clearAllData();\n\t\t\t\n\t\t\t// Some DataExtensions keep a static cache of information that needs to \n\t\t\t// be reset whenever the database is cleaned out\n\t\t\tforeach(array_merge(ClassInfo::subclassesFor('DataExtension'), ClassInfo::subclassesFor('DataObject')) as $class) {\n\t\t\t\t$toCall = array($class, 'on_db_reset');\n\t\t\t\tif(is_callable($toCall)) call_user_func($toCall);\n\t\t\t}\n\t\t}\n\t}", "private function cleanup()\n\t{\n\t\tee()->sync_db = ee()->load->database('sync_db', true);\n\n\t\t// delete 14 day old processed product records, always leaving at least 5\n\t\tee()->sync_db->query(\"DELETE FROM products WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 14 DAY) AND id NOT IN (SELECT id FROM ( SELECT id FROM `products` WHERE processed = 1 ORDER BY id DESC LIMIT 5 ) keepers)\");\n\t\t\n\t\t// delete old inventory records\t\n\t\tee()->sync_db->query(\"DELETE FROM products_inventory WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 2 DAY)\");\n\n\t\t// delete old shipping records\n\t\tee()->sync_db->query(\"DELETE FROM orders_shipping WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 14 DAY)\");\n\n\t\t// delete old processed records\n\t\tee()->sync_db->query(\"DELETE FROM orders_processed WHERE processed = 1 AND timestamp < DATE_SUB(NOW(), INTERVAL 14 DAY)\");\n\t\t\n\t}", "public function clear(): void\n {\n $app = App::get();\n $list = $app->data->getList()\n ->filterBy('key', '.temp/cache/', 'startWith');\n foreach ($list as $item) {\n $app->data->delete($item->key);\n };\n }", "protected function clearAllPersistentData()\r\n {\r\n }", "private function purgeTables()\n\t{\t\n\t\t$this->db->query(\"DELETE FROM categories\");\n\t\t$this->db->query(\"DELETE FROM album_art\");\n\t\t$this->db->query(\"TRUNCATE TABLE albums\");\n\t\t\n\t}", "private function getCleanTables() {\n\t\tunset($this->_vm_product);\n\t\tunset($this->product_id);\n\t\tunset($this->product_sku);\n\t\tunset($this->product_in_stock);\n\t}", "private function cleanDatabase()\n {\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n foreach($this->tables as $table)\n {\n\n DB::table($table)->truncate();\n\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n\n\n }", "protected function doPurgeDatabase()\n {\n }", "public function cleanup()\n\t{\n\t\t$ArticlesLatest = Article::where('status', 'read')->where('star_ind', '0')->orderBy('created_at', 'desc')->select('id')->take(10000)->get();\n\t\t$ArticlesStar = Article::where('star_ind', '1')->select('id')->get();\n\t\t$ArticlesUnread = Article::where('status', 'unread')->select('id')->get();\n\n\t\t//create new empty array to store id's\n\t\t$cleanup_item_ids = [];\n\n\t\t//store id's from ArticlesStar in cleanup_item_ids\n\t\tif (!empty($ArticlesStar)) {\n\t\t\tforeach ($ArticlesStar as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//store id's from ArticlesLatest in cleanup_item_ids\n\t\tif (!empty($ArticlesLatest)) {\n\t\t\tforeach ($ArticlesLatest as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//store id's from ArticlesUnread in cleanup_item_ids\n\t\tif (!empty($ArticlesUnread)) {\n\t\t\tforeach ($ArticlesUnread as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//delete items that are not in cleanup_item_ids array\n\t\tArticle::whereNotIn('id', $cleanup_item_ids)->delete();\n\t}", "private function cleanUpDatabase(){\n\t\t$this->cleanUpSessions();\n\t\t// reports older 90 days\n\t\t$this->cleanUpReports();\n\t\t// delete unregistered users without actions older 30 days\n\t\t$this->cleanUpUsers();\n\t}", "private function clear_dummy_data()\n {\n $this->adapter->query('DELETE FROM ' . RUCKUSING_TS_SCHEMA_TBL_NAME);\n }", "public static function dbClear(){\n\t\tif (App::runningUnitTests()) {\n\t\t\tself::clearModelTables(TestSettings::$modelTables);\n\t\t\tself::clearTables(TestSettings::$pivotTables);\n\t\t}\n\t}", "function clear() {\n\n switch ($this->type) {\n case 'sqlite':\n case 'mysql':\n $query[0] = 'DROP TABLE `enrolled`;';\n\n $query[1] = 'DROP TABLE `paid`;';\n\n $query[2] = 'DROP TABLE `admin`;';\n\n $query[3] = 'DROP TABLE `log`';\n\n $query[4] = 'DROP TABLE `stage`';\n\n\t\t\t\t$query[5] = 'DROP TABLE `guest`';\n\n break;\n\n default:\n throw new Exception($this->type . \" is not a valid database type.\");\n break;\n\n }\n\n foreach ($query as $drop) {\n $this->query($drop);\n }\n\n /**\n * Integrity Checking goes here\n */\n\n }", "static function cleanup()\n {\n $db = eZDB::instance();\n $rows = $db->arrayQuery( \"SELECT productcollection_id FROM ezorder\" );\n\n $db = eZDB::instance();\n $db->begin();\n if ( count( $rows ) > 0 )\n {\n $productCollectionIDList = array();\n foreach ( $rows as $row )\n {\n $productCollectionIDList[] = $row['productcollection_id'];\n }\n eZProductCollection::cleanupList( $productCollectionIDList );\n }\n // Who deletes which order in shop should be logged.\n eZAudit::writeAudit( 'order-delete', array( 'Comment' => 'Removed all orders from the database: eZOrder::cleanup()' ) );\n\n eZOrderItem::cleanup();\n $db->query( \"DELETE FROM ezorder_status_history\" );\n $db->query( \"DELETE FROM ezorder\" );\n $db->commit();\n }", "public function clearItems()\n\t{\n\t\t$this->storage->clear();\n\t}", "function cleanup()\n {\n $db = eZDB::instance();\n $db->begin();\n $db->query( \"DELETE FROM ezsphinx\" );\n $db->query( \"DELETE FROM ezsphinx_pathnodes\" );\n $db->commit();\n }", "public function cleanupDatabase() {\n\t\t\tif ( !$this->getTableExists() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$sQuery = \"\n\t\t\t\tDELETE from `%s`\n\t\t\t\tWHERE\n\t\t\t\t\t`day_id`\t\t\t!= '0'\n\t\t\t\t\tAND `created_at`\t< '%s'\n\t\t\t\";\n\t\t\t$sQuery = sprintf( $sQuery,\n\t\t\t\t$this->getTableName(),\n\t\t\t\t( $this->loadDP()->time() - 31*DAY_IN_SECONDS )\n\t\t\t);\n\t\t\t$this->loadDbProcessor()->doSql( $sQuery );\n\t\t}", "function base_clear(){\n $tables = array(\n 'oc_product',\n 'oc_product_image',\n 'oc_manufacturer',\n 'oc_manufacturer_description',\n 'oc_product_description',\n 'oc_product_to_category',\n 'oc_product_attribute',\n 'oc_attribute',\n 'oc_attribute_description',\n // 'oc_attribute_value',\n // 'oc_category',\n // 'oc_category_description',\n 'oc_product_to_store',\n // 'oc_category_to_store',\n 'oc_manufacturer_to_store',\n 'oc_product_to_layout',\n // 'oc_category_to_layout',\n );\n foreach ($tables as $table)\n {\n sDb::query(\"TRUNCATE TABLE $table\");\n echo \"Таблица $table очищена\\n\";\n }\n}", "public function wipeAll() {\n\t\tforeach($this->getTables() as $t) {\n\t\t\tforeach($this->getKeys($t) as $k) {\n\t\t\t\t$this->adapter->exec(\"ALTER TABLE \\\"{$k['FKTABLE_NAME']}\\\" DROP FOREIGN KEY \\\"{$k['FK_NAME']}\\\"\");\n\t\t\t}\n\t\t\t$this->adapter->exec(\"DROP TABLE \\\"$t\\\"\");\n\t\t}\n\t\tforeach($this->getTables() as $t) {\n\t\t\t$this->adapter->exec(\"DROP TABLE \\\"$t\\\"\");\n\t\t}\n\t}", "function purge(){\r\n\t\t$this->db->execute($this->stm['purge'],time());\r\n\t\tif($this->count() === 0){\r\n\t\t\t$this->drop();\r\n\t\t}\r\n\t}", "public function clean() {\n\t\t\tif( !$items = $this->getStats( 'items' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$memcache = $this->getMemcache();\n\t\t\tforeach( $items['items'] as $key => $item ) {\n\t\t\t\t$dump = $memcache->getStats( 'cachedump', $key, $item['number'] * 2 );\n\t\t\t\tforeach( array_keys( $dump ) as $ckey ) {\n\t\t\t\t\t$memcache->get( $ckey );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->stats = null;\n\t\t}", "static function deleteAll()\n {\n $GLOBALS['DB']->exec(\"DELETE FROM stores;\");\n $GLOBALS['DB']->exec(\"DELETE FROM stores_brands;\");\n }", "public function dropAllData()\n {\n $database_name = $this->conn->getDatabase();\n\n $tables = $this->conn->query(\"SELECT concat('DROP TABLE IF EXISTS ', table_name, ';') FROM information_schema.tables WHERE table_schema = '$database_name';\")->fetchAll();\n\n $queries = \"SET FOREIGN_KEY_CHECKS=0;\\n\";\n\n foreach ($tables as $aTable){\n $queries .= reset($aTable);\n }\n\n $this->conn->executeQuery($queries);\n\n $editora_structure = file_get_contents(__DIR__ .'/../../../../data/editora.sql');\n\n $this->conn->executeQuery($editora_structure);\n }", "public function run()\n {\n Model::unguard();\n\n DB::table('documents__objects')->delete();\n DB::table('documents__pool')->delete();\n }", "public function clear()\r\n\t{\r\n\t\t$this->db->runQuery(\"TRUNCATE TABLE `\" . $this->name . \"`\");\r\n\t}", "function emptyIndexTable(){\n\t\t$this->ecmDBhandle->truncateTable($this->dfs_db-> table_name);\n\t}", "public function run()\n {\n echo PHP_EOL , 'cleaning old data....', PHP_EOL;\n\n DB::statement(\"SET foreign_key_checks=0\");\n\n User::truncate();\n Role::truncate();\n UserRole::truncate();\n Permission::truncate();\n DB::table('roles_permissions')->truncate();\n DB::table('users_permissions')->truncate();\n\n DB::statement(\"SET foreign_key_checks=1\");\n\n $this->call(RolesTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n }", "protected function _resetPersistentCache() {\n $oUtils = Registry::getUtils();\n $sCacheDir = $oUtils->getCacheFilePath(null, true);\n $aDir = glob($sCacheDir.'*');\n if(is_array($aDir)) {\n $aDir = preg_grep(\"/c_fieldnames_|c_tbdsc_|_allfields_/\", $aDir);\n foreach($aDir as $iKey => $sData) {\n if(!is_dir($sData)) {\n @unlink($sData);\n }\n }\n }\n }", "public function delete_all() {\n\t\t$this->_cache = array();\n\t\t$this->_collections = array();\n\t}", "public function clearDb ()\n {\n // Empty tables and reset auto-increment values\n $this->_dbh->query('SET FOREIGN_KEY_CHECKS = 0');\n foreach (self::$dbTables as $table) {\n $stmt = $this->_dbh->prepare('TRUNCATE `' . $table . '`');\n $stmt->execute();\n $stmt = $this->_dbh->prepare('ALTER TABLE `' . $table . '` AUTO_INCREMENT = 1');\n $stmt->execute();\n }\n // Re-enable checks only if set as such in config\n $config = parse_ini_file('config/AcToBs.ini', true);\n if (isset($config['checks']['fk_constraints']) && $config['checks']['fk_constraints'] == 1) {\n $this->_dbh->query('SET FOREIGN_KEY_CHECKS = 1');\n }\n // Delete denormalized tables\n foreach (self::$dbDenormalizedTables as $table) {\n $stmt = $this->_dbh->prepare('DROP TABLE IF EXISTS `' . $table . '`');\n $stmt->execute();\n }\n // Delete non-standard taxonomic ranks\n $stmt = $this->_dbh->prepare(\n 'DELETE FROM `taxonomic_rank` WHERE `standard` = ?');\n $stmt->execute(array(\n 0\n ));\n unset($stmt);\n }", "public function reset()\n {\n $this->getDb()->exec('delete from media');\n //pictures and vignettes deletion\n $this->deleteMedias();\n //backup deletion\n $this->deleteBackup();\n }", "public function clean(){\n\t\t$sql = 'DELETE FROM ano_letivo';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0;');\n DB::table('usuario')->truncate();\n DB::table('rol')->truncate();\n DB::table('rol_usuario')->truncate();\n DB::table('permiso')->truncate();\n DB::table('permiso_rol')->truncate();\n DB::table('permiso_usuario')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS = 1;');\n }", "public function clear(): void\n {\n $this->items = collect();\n\n $this->save();\n }", "public function clear()\n {\n $this->items = [];\n $this->saveItems();\n }", "protected function deleteUnusedItems(){\n $items=Item::where('serial_number','')->get();\n foreach($items as $item){\n $item->delete();\n }\n }", "public static function cleanDatabase()\n\t{\n\t\t$expire = time() - 86400*30;\n\t\tDB::get()->prepare(\"\n\t\t\tDELETE FROM forms\n\t\t\tWHERE forms_created_time < ?\")\n\t\t\t->execute(array($expire));\n\t}", "public function clean(): void\n {\n $this->truncateJournalTable();\n $this->output(\"<success>Table {$this->internalTable} truncated</success>\");\n }", "private function truncate()\n {\n // Désactivation des contraintes FK\n $this->co->executeQuery('SET foreign_key_checks = 0');\n // On tronque\n $this->co->executeQuery('TRUNCATE TABLE casting');\n $this->co->executeQuery('TRUNCATE TABLE department');\n $this->co->executeQuery('TRUNCATE TABLE genre');\n $this->co->executeQuery('TRUNCATE TABLE job');\n $this->co->executeQuery('TRUNCATE TABLE movie');\n $this->co->executeQuery('TRUNCATE TABLE movie_genre');\n $this->co->executeQuery('TRUNCATE TABLE person');\n $this->co->executeQuery('TRUNCATE TABLE review');\n $this->co->executeQuery('TRUNCATE TABLE team');\n $this->co->executeQuery('TRUNCATE TABLE user');\n }", "public function clearDatabase()\n {\n $purger = new ORMPurger($this->getEntityManager());\n $purger->purge();\n }", "protected function resetExistingTables()\n {\n $this->existingTables = null;\n }", "public static function clean_cached_data()\n {\n }", "public function delall()\n {\n }", "public function reset()\n {\n $db = Zend_Registry::get('dbAdapter');\n $dbname = Zend_Registry::get('configDatabase')->database->params->dbname;\n\n $stmt = $db->query(\"SELECT * FROM INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = '\".$dbname.\"'\");\n while ($row = $stmt->fetch()) {\n $db->query('DELETE FROM `'.$row['TABLE_NAME'].'`');\n }\n\n $path = UtilityComponent::getDataDirectory('assetstore');\n $dir = opendir($path);\n while ($entry = readdir($dir)) {\n if (is_dir($path.'/'.$entry) && !in_array($entry, array('.', '..'))\n ) {\n $this->_rrmdir($path.'/'.$entry);\n }\n }\n\n $path = UtilityComponent::getDataDirectory('thumbnail');\n $dir = opendir($path);\n while ($entry = readdir($dir)) {\n if (is_dir($path.'/'.$entry) && !in_array($entry, array('.', '..'))\n ) {\n $this->_rrmdir($path.'/'.$entry);\n }\n }\n\n if (file_exists(LOCAL_CONFIGS_PATH.'/ldap.local.ini')) {\n unlink(LOCAL_CONFIGS_PATH.'/ldap.local.ini');\n }\n\n /** @var UserModel $userModel */\n $userModel = MidasLoader::loadModel('User');\n\n $admin = $userModel->createUser(MIDAS_DEMO_ADMIN_EMAIL, MIDAS_DEMO_ADMIN_PASSWORD, 'Demo', 'Administrator', 1);\n $userModel->createUser(MIDAS_DEMO_USER_EMAIL, MIDAS_DEMO_USER_PASSWORD, 'Demo', 'User', 0);\n\n /** @var CommunityModel $communityModel */\n $communityModel = MidasLoader::loadModel('Community');\n $communityDao = $communityModel->createCommunity(\n 'Demo',\n 'This is a demo community',\n MIDAS_COMMUNITY_PUBLIC,\n $admin,\n MIDAS_COMMUNITY_CAN_JOIN\n );\n\n /** @var AssetstoreModel $assetstoreModel */\n $assetstoreModel = MidasLoader::loadModel('Assetstore');\n $assetstoreDao = new AssetstoreDao();\n $assetstoreDao->setName('Default');\n $assetstoreDao->setPath(UtilityComponent::getDataDirectory('assetstore'));\n $assetstoreDao->setType(MIDAS_ASSETSTORE_LOCAL);\n $assetstoreModel->save($assetstoreDao);\n\n /** @var SettingModel $settingModel */\n $settingModel = MidasLoader::loadModel('Setting');\n $settingModel->setConfig('default_assetstore', $assetstoreDao->getKey());\n\n $options = array('allowModifications' => true);\n $config = new Zend_Config_Ini(CORE_CONFIGS_PATH.'/application.ini', null, $options);\n $config->global->dynamichelp = 1;\n $config->global->environment = 'production';\n $config->global->application->name = 'Midas Platform - Demo';\n $description = 'Midas Platform is an open-source toolkit that enables the\n rapid creation of tailored, web-enabled data storage. Designed to meet\n the needs of advanced data-centric computing, Midas Platform addresses\n the growing challenge of large data by providing a flexible, intelligent\n data storage system. The system integrates multimedia server technology\n with other open-source data analysis and visualization tools to enable\n data-intensive applications that easily interface with existing\n workflows.';\n $config->global->application->description = $description;\n\n $enabledModules = array(\n 'api',\n 'metadataextractor',\n 'oai',\n 'statistics',\n 'scheduler',\n 'thumbnailcreator',\n 'visualize',\n );\n foreach ($enabledModules as $module) {\n if (file_exists(LOCAL_CONFIGS_PATH.'/'.$module.'.demo.local.ini')) {\n copy(\n LOCAL_CONFIGS_PATH.'/'.$module.'.demo.local.ini',\n LOCAL_CONFIGS_PATH.'/'.$module.'.local.ini'\n );\n $config->module->$module = 1;\n } else {\n unlink(LOCAL_CONFIGS_PATH.'/'.$module.'.local.ini');\n }\n }\n\n $writer = new Zend_Config_Writer_Ini();\n $writer->setConfig($config);\n $writer->setFilename((LOCAL_CONFIGS_PATH.'/application.local.ini'));\n $writer->write();\n\n $configGlobal = new Zend_Config_Ini(APPLICATION_CONFIG, 'global', true);\n Zend_Registry::set('configGlobal', $configGlobal);\n\n /** @var UploadComponent $uploadComponent */\n $uploadComponent = MidasLoader::loadComponent('Upload');\n $uploadComponent->createUploadedItem(\n $admin,\n 'midasLogo.gif',\n BASE_PATH.'/core/public/images/midasLogo.gif',\n $communityDao->getPublicFolder(),\n null,\n '',\n true\n );\n $uploadComponent->createUploadedItem(\n $admin,\n 'cow.vtp',\n BASE_PATH.'/modules/demo/public/'.$this->moduleName.'/cow.vtp',\n $communityDao->getPublicFolder(),\n null,\n '',\n true\n );\n }", "private function collectGarbage() {\n\t\t$query = 'DELETE FROM ' .//'DELETE LOW_PRIORITY FROM ' .\n\t\t\tShelveIt::$query_cache[ 'table' ] .\n\t\t\t' WHERE time < NOW() - ' . ShelveIt::$query_cache[ 'expire' ];\n \n\t\tif( !mysql_unbuffered_query( $query, $this->mysql ) ) {\n die( \"Garbage collect query: $query<br />\" .\n 'Invalid query: ' . mysql_error( $this->mysql ) );\n };\n\t}", "public static function clean()\n {\n try {\n Mage::getModel('hackathon_ordertransaction/mongo')->clean();\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }", "public function tearDown() {\n\t\tunset($this->ItemsTable);\n\t\tunset($this->PDO);\n\t}", "public function cleanUp();", "public function cleanUp();", "public function cleanUp();", "public function run()\n {\n DB::table('messages')->truncate();\n DB::table('medicinal_plants_history')->truncate();\n DB::table('medicinal_plants_reports')->truncate();\n DB::table('medicinal_plants_reviews')->truncate();\n DB::table('remedies_history')->truncate();\n DB::table('remedies_reports')->truncate();\n DB::table('remedies_reviews')->truncate();\n DB::table('store_prescriptions')->truncate();\n }", "static function kill_temp_db() {\n\t\tif(self::using_temp_db()) {\n\t\t\t$dbConn = DB::getConn();\n\t\t\t$dbName = $dbConn->currentDatabase();\n\t\t\tif($dbName && DB::getConn()->databaseExists($dbName)) {\n\t\t\t\t// Some DataExtensions keep a static cache of information that needs to \n\t\t\t\t// be reset whenever the database is killed\n\t\t\t\tforeach(ClassInfo::subclassesFor('DataExtension') as $class) {\n\t\t\t\t\t$toCall = array($class, 'on_db_reset');\n\t\t\t\t\tif(is_callable($toCall)) call_user_func($toCall);\n\t\t\t\t}\n\n\t\t\t\t// echo \"Deleted temp database \" . $dbConn->currentDatabase() . \"\\n\";\n\t\t\t\t$dbConn->dropDatabase();\n\t\t\t}\n\t\t}\n\t}", "public function clean()\n\t{\n\t\t$this->deleteFromContainer($this->binary);\n\t}", "private function resetDatabase()\n {\n $dumpFolder = APPLICATION_PATH . '/../data/dumps/';\n\n $directoryIterator = new DirectoryIterator($dumpFolder);\n /**\n * @var Zend_Db_Adapter_Abstract $db\n */\n $db = Zend_Registry::get('db');\n\n foreach ($directoryIterator as $file) {\n if (!$file->isDot()\n && $file->isFile()\n && $file->isReadable()\n ) {\n $sql = file_get_contents($file->getPathname());\n $db->query($sql);\n }\n }\n }", "public function cleanContrexxCaching()\n {\n $this->_deleteAllFiles();\n }", "public function reset()\n {\n $db = PDOController::getInstance();\n \n $req = $db->prepare(\"TRUNCATE TABLE `executedtask` \");\n $req->execute([]);\n }", "protected function truncateTables()\n {\n \\DB::table('cities')->truncate();\n \\DB::table('states')->truncate();\n }", "public function purgeSearchTables()\n\t{\n\t\t$objDatabase = \\Database::getInstance();\n\n\t\t// Truncate the tables\n\t\t$objDatabase->execute(\"TRUNCATE TABLE tl_search\");\n\t\t$objDatabase->execute(\"TRUNCATE TABLE tl_search_index\");\n\n\t\t// Purge the cache folder\n\t\t$objFolder = new \\Folder('system/cache/search');\n\t\t$objFolder->purge();\n\n\t\t// Add a log entry\n\t\t$this->log('Purged the search tables', __METHOD__, TL_CRON);\n\t}", "public function actionClearDb()\n {\n if (YII_DEBUG) {\n $db = Yii::$app->db;\n //$db->createCommand()->truncateTable('{{%forsage_studio}}')->execute();\n /*$db->createCommand()->truncateTable(ProductImage::tableName())->execute();\n $db->createCommand()->truncateTable(ProductCategoryRef::tableName())->execute();\n $db->createCommand()->truncateTable(ProductAttributesEav::tableName())->execute();\n\n $db->createCommand()->truncateTable(AttributeOption::tableName())->execute();\n $db->createCommand()->truncateTable(Attribute::tableName())->execute();*/\n\n $db->createCommand()->truncateTable(ProductCategoryRef::tableName())->execute();\n $db->createCommand()->truncateTable(Category::tableName())->execute();\n\n\n if ($db->createCommand('SELECT * FROM ' . Product::tableName() . ' WHERE forsage_id IS NOT NULL')->query()->count()) {\n $db->createCommand()->delete(Product::tableName(), ['not', ['forsage_id' => null]])->execute();\n //$db->createCommand()->truncateTable(Product::tableName() . ' WHERE forsage_id IS NOT NULL')->execute();\n }\n if ($db->createCommand('SELECT * FROM ' . Brand::tableName() . ' WHERE forsage_id IS NOT NULL')->query()->count()) {\n //$db->createCommand()->truncateTable(Brand::tableName() . ' WHERE (forsage_id IS NOT NULL)')->execute();\n $db->createCommand()->delete(Brand::tableName(), ['not', ['forsage_id' => null]])->execute();\n }\n if ($db->createCommand('SELECT * FROM ' . Supplier::tableName() . ' WHERE forsage_id IS NOT NULL')->query()->count()) {\n //$db->createCommand()->truncateTable(Supplier::tableName())->execute();\n $db->createCommand()->delete(Supplier::tableName(), ['not', ['forsage_id' => null]])->execute();\n }\n $db->createCommand()->truncateTable('{{%shop__type_attribute}}')->execute();\n $db->createCommand()->truncateTable(ProductImage::tableName())->execute();\n $db->createCommand()->truncateTable(AttributeOption::tableName())->execute();\n\n $model = new Category;\n $model->name = 'Каталог продукции';\n $model->lft = 1;\n $model->rgt = 2;\n $model->depth = 1;\n $model->slug = 'root';\n $model->full_path = '';\n if ($model->validate()) {\n $model->saveNode();\n }\n } else {\n echo 'YII_DEBUG disabled!.';\n }\n }", "public function refreshTables()\n {\n $em = $this->container->get('doctrine')->getManager();\n $repository = $this->container->get('doctrine')->getRepository('OpiferManualBundle:Category');\n $categories = $repository->findAll();\n\n foreach($categories as $category)\n {\n $em->remove($category);\n }\n $em->flush();\n }", "function cleanDBonPurge() {\n $sl = new SoftwareLicense();\n $sl->deleteByCriteria(['softwares_id' => $this->fields['id']]);\n\n $this->deleteChildrenAndRelationsFromDb(\n [\n Item_Project::class,\n SoftwareVersion::class,\n ]\n );\n }", "public static function resetIndex(){\n\t\t$sql = \"TRUNCATE TABLE `documents`\";\n\t\t$result = mysqli_query(self::$conn, $sql) or die(mysqli_error(self::$conn));\n\t\t$sql = \"TRUNCATE TABLE `terms`\";\n\t\t$result = mysqli_query(self::$conn, $sql) or die(mysqli_error(self::$conn));\n\t\t$sql = \"TRUNCATE TABLE `term_documents`\";\n\t\t$result = mysqli_query(self::$conn, $sql) or die(mysqli_error(self::$conn));\n\t\t// delete all files from documents directory\n\t\tarray_map('unlink', glob('documents/' . '*.txt'));\n\t}", "public static function gc()\n {\n Dba::write('DELETE FROM `album` USING `album` LEFT JOIN `song` ON `song`.`album` = `album`.`id` WHERE `song`.`id` IS NULL');\n }", "public function cleanCaches()\n {\n require_once \"include/MetaDataManager/MetaDataManager.php\";\n\n $this->log(\"Cleaning cache\");\n $this->cleanFileCache();\n $this->cleanDir($this->cacheDir(\"smarty\"));\n $this->cleanDir($this->cacheDir(\"modules\"));\n $this->cleanDir($this->cacheDir(\"jsLanguage\"));\n $this->cleanDir($this->cacheDir(\"Expressions\"));\n $this->cleanDir($this->cacheDir(\"themes\"));\n $this->cleanDir($this->cacheDir(\"include/api\"));\n\n // as far as database schema hasn't been rebuilt yet, it's needed to check\n // if metadata manager is operable\n if (MetaDataManager::isCacheOperable()) {\n MetaDataManager::clearAPICache(true, true);\n } else {\n // otherwise, disable it until the schema has been rebuilt\n MetaDataManager::disableCache();\n }\n\n $this->log(\"Cache cleaned\");\n }", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}" ]
[ "0.7007235", "0.6908007", "0.68983954", "0.68895525", "0.68500066", "0.68411887", "0.6809482", "0.6802274", "0.6790552", "0.66109735", "0.659425", "0.65871114", "0.6557937", "0.6557367", "0.65443844", "0.6520375", "0.6503157", "0.6499922", "0.645771", "0.6442338", "0.6433538", "0.6432775", "0.6412829", "0.6393703", "0.63824624", "0.6378254", "0.6364057", "0.63615406", "0.63603365", "0.6338257", "0.63376635", "0.63351935", "0.6323293", "0.6320796", "0.63168263", "0.62717515", "0.627155", "0.6270476", "0.6269", "0.6266419", "0.62557465", "0.6254916", "0.6253653", "0.62460905", "0.6242435", "0.6230917", "0.6228615", "0.62218916", "0.62218916", "0.62218916", "0.62210137", "0.6215426", "0.6209147", "0.62059057", "0.6196789", "0.6191084", "0.6190477", "0.61843646", "0.6183445", "0.617968", "0.616991", "0.61692315", "0.6167237", "0.6166029", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.61620253", "0.6161639", "0.6161639", "0.6161639" ]
0.6346495
29
check upload file correctly
protected function _checkConfirmUploadFile() { switch ($this->_uploadedFile->getError()) { case UPLOAD_ERR_OK: break; case UPLOAD_ERR_NO_FILE: throw new Exception('Empty File Upload ERROR!'); break; case UPLOAD_ERR_FORM_SIZE; case UPLOAD_ERR_INI_SIZE; throw new Exception('Too Large File Size ERROR!'); break; default: throw new Exception('Something ERROR!'); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkUpload() {}", "public function validUpload() {\t\n\t\tif($this->file['error'] == 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isUploadedFile() {}", "protected function checkFileUploadEnabled() {}", "function verifyUpload( $file ){\n $passed = false; //\tVariável de controle\n if( is_uploaded_file( $file[ \"tmp_name\" ] ) ){\n $ext = $this->getExt( $file[ \"name\" ] );\n if( ( count( $this->allowedExtensions ) == 0 ) || ( in_array( $ext, $this->allowedExtensions ) ) ){\n $passed = true;\n }\n }\n return $passed;\n }", "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 confirm_upload()\n\t{\n\t\tglobal $log, $root_directory, $upload_dir, $upload_badext;\n\t\t$log->debug(\"Eentering confirm_upload() method ...\");\n\t\t$upload_maxsize = GlobalVariable::getVariable('Application_Upload_MaxSize',3000000,$currentModule);\n\n\t\tif (!is_uploaded_file($_FILES[$this->field_name]['tmp_name']) )\n\t\t{\n\t\t\t$log->debug(\"Exiting confirm_upload method ...\");\n\t\t\treturn false;\n\t\t}\n\t\telse if ($_FILES[$this->field_name]['size'] > $upload_maxsize)\n\t\t{\n\t\t\tdie(\"ERROR: uploaded file was too big: max filesize:$upload_maxsize\");\n\t\t}\n\n\t\tif( !is_writable( $root_directory.'/'.$upload_dir))\n\t\t{\n\t\t\tdie(\"ERROR: cannot write to directory: $root_directory/$upload_dir for uploads\");\n\t\t}\n\n\t\trequire_once('include/utils/utils.php');\n\t\t$this->stored_file_name = sanitizeUploadFileName($_FILES[$this->field_name]['name'], $upload_badext);\n\t\t$log->debug(\"Exiting confirm_upload method ...\");\n\t\treturn true;\n\t}", "function fileChecker($nome_file){\n \n // controllo che sia stato inviato un file altrimenti restituisco false\n if(empty($_FILES['file'])){\n return false;\n }\n \n // memorizzo l'estensione\n $ext = trim(strtolower(end($nome_file)));\n \n // verifico che sia stato inviato un file contente un foto i formati disponibili sono jpg png jpeg\n if(!preg_match(VALID_FILE_FORMAT, $ext)){\n return false;\n }\n \n return true;\n}", "public function isUploaded() {\n\t\t$this->msg = '';\n\t\t\t//\tcheck if the name of the file uploaded is not available\n\t\tif (!$_FILES[$this->fileName]['name'])\t{\n\t\t\t$this->msg .= 'File name not available';\n\t\t\treturn false;\n\t\t}\n\n\t\t\n\t\t\t// tests for an error in uploading\n\t\tif ($_FILES[$this->fileName]['error']) {\t\n\t\t\tswitch($_FILES[$this->fileName]['error']) {\n\t\t\t\tcase 1: $this->msg .= 'Your image is too big!'; // exceeds PHP\\'s maximun upload size\n\t\t\t\t\treturn false;\n\t\t\t\tcase 2: $this->msg .= 'Your image is too large!'; // File exceeds maximum upload file size set in the form\n\t\t\t\t\treturn false;\n\t\t\t\tcase 3: $this->msg .= 'That only partially worked!'; // File partially uploaded\n\t\t\t\t\treturn false;\n\t\t\t\tcase 4: $this->msg .= 'Your file wasn\\'t uploaded!'; // No file upload\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\t// check if file type is invalid\n\t\t$type = $_FILES[$this->fileName]['type'];\t//\tget the type of the uploaded file\n\t\tif (!in_array($type, $this->fileTypes)) {\n\t\t\t$this->msg .= 'Wrong file type';\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\t// check if file did not reach the server\n\t\tif (!is_uploaded_file($_FILES[$this->fileName]['tmp_name'])) {\n\t\t\t$this->msg .= 'File did not reach the temporary location on the server';\n\t\t\treturn false;\n\t\t}\n\t\t$fleName = $_FILES[$this->fileName]['name'];\n\t\t$flePath = $this->folderPath ? $this->folderPath.'/'.$fleName : $fleName;\n\t\t\n\t\t\t// test if a file with the same name exists and rename it using a random generated (uniqid) if it does\n\t\tif (file_exists($flePath)) {\n\t\t\t$newName = uniqid('art').$fleName;\n\t\t\t$flePath = $this->folderPath ? $this->folderPath.'/'.$newName : $newName;\n\t\t}\n\n\t\t\t//move file from temporary location to the path specified and test if it's not successful\n\t\tif (!move_uploaded_file($_FILES[$this->fileName]['tmp_name'], $flePath)) {\t\n\t\t\t$this->msg .= 'Error in moving file to the specified location';\n\t\t\treturn false;\n\t\t}\n\t\t\t// check if new file does not exists in the destination folder\n\t\tif (!file_exists($flePath)) {\n\t\t\t$this->msg .= 'File did not reach the destination folder';\n\t\t\treturn false;\n\t\t}\n\t\t\t\t// all worked fine and returns the filepath\n\t\t\t$this->msg .= 'File '.$_FILES[$this->fileName]['name'].' uploaded successfully ';\n\t\t\treturn $flePath;\n\t\t}", "public function validateFile(){\n // Check uploaded errors\t\n if($this->fileError){\n if(array_key_exists($this->fileError, $this->phpFileUploadErrors)){\n $this->addError(['PHP Upload Error',$this->phpFileUploadErrors[$this->fileError]]);\n } \n }else{\n // Check if file was uploaded via the form\n if(!is_uploaded_file($this->tmpLocation)){\n $this->addError(['File Upload', \"File uploading failed. Please upload the file again.\"]);\n }\t\n // Check extension\n if(!in_array($this->fileExt, $this->allowedExtensions)){\n $allowed = implode(', ', $this->allowedExtensions);\n $this->addError(['File Extension',\"Uploading this type of file is not allowed. Allowed file extensions are \".$allowed]);\n }\n // Check size\n if($this->size > $this->maxSize){\n $this->addError(['File Size',\"The file size must be up to \".$this->maxSize]);\n }\n // Check if upload folder exists\n if(!file_exists($this->uploadPath)){\n $this->addError(['Admin Error',\"The chosen upload directory does not exist.\"]);\n }\n } \n if(!$this->_errors){\n return true;\n } \n return false;\t\n }", "public function upload(){\n if($this->validateFile()){\n if(move_uploaded_file($this->tmpLocation, $this->fullUploadPath)){\n return true;\n }else{\n $this->addError(['Upload Error','File Upload Failed']);\n return false;\n }\n }\n return false;\n }", "function isUpload()\n {\n return ($this->type->getTypeName() == 'file');\n }", "function userfile_check()\n\t\t{\n\t\t\tif ($_FILES['userfile']['size'] > 0)\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->form_validation->set_message('userfile_check', 'The {field} file is required');\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}", "function check_upload($file) {\n if (preg_match(\":^application/vnd.bdoc-:\", $file[\"type\"])) {\n $file[\"format\"] = \"bdoc\";\n } else if ($file[\"type\"] === \"application/x-ddoc\") {\n $file[\"format\"] = \"ddoc\";\n } else {\n return FALSE;\n }\n\n return is_uploaded_file($file[\"tmp_name\"]);\n}", "public function isImage(){\n if(isset($_POST[\"submit\"])) {\n $check = getimagesize($_FILES[\"fileToUpload\"][\"tmp_name\"]);\n if($check !== false) {\n echo \"File is an image - \" . $check[\"mime\"] . \".<br>\";\n $this->uploadOk = 1;\n } else {\n echo \"File is not an image.<br>\";\n $this->uploadOk = 0;\n }\n }\n return $this->uploadOk;\n }", "public function validate() {\n \n if (in_array($this->ext, $this->allow) !==false){\n \n if ($this->size < 10000000 ) {\n if ($this->error === 0) {\n $enc = uniqid('',true).\".\".$this->ext;\n $dest = $_SERVER['DOCUMENT_ROOT'].'/'.'tempSTR/'.$enc;\n\n move_uploaded_file($this->filetmp, $dest);\n \n } else {\n echo \"something wrong with this image\";\n }\n } else {\n echo \"Your file is to big\";\n }\n\n } else {\n echo \"You can't upload image with this exstension\";\n }\n }", "public function edit_fileupload_check()\n { \n \n // we retrieve the number of files that were uploaded\n $number_of_files = sizeof($_FILES['img']['tmp_name']);\n \n // considering that do_upload() accepts single files, we will have to do a small hack so that we can upload multiple files. For this we will have to keep the data of uploaded files in a variable, and redo the $_FILE.\n $files = $_FILES['img'];\n \n // first make sure that there is no error in uploading the files\n for($i=0; $i<$number_of_files; $i++)\n {\n if($_FILES['img']['error'][$i] != 0)\n {\n // save the error message and return false, the validation of uploaded files failed\n $this->form_validation->set_message('fileupload_check', 'Please add at least one Image');\n return FALSE;\n }\n return TRUE;\n }\n }", "function validate() {\r\n\t\t$post_ok = isset($this->params['form']['Filedata']);\r\n\t\t$upload_error = $this->params['form']['Filedata']['error'];\r\n\t\t$got_data = (is_uploaded_file($this->params['form']['Filedata']['tmp_name']));\r\n\t\t\r\n\t\tif (!$post_ok){\r\n\t\t\t$this->setError(2000, 'Validation failed.', 'Expected file upload field to be named \"Filedata.\"');\r\n\t\t}\r\n\t\tif ($upload_error){\r\n\t\t\t$this->setError(2500, 'Validation failed.', $this->getUploadErrorMessage($upload_error));\r\n\t\t}\r\n\t\treturn !$upload_error && $post_ok && $got_data;\r\n\t}", "public function isValid(): bool\n {\n return ($this->error === UPLOAD_ERR_OK) && is_uploaded_file($this->getPathname());\n }", "public function correctImage(){\n parent::isImage();\n parent::exist();\n parent::sizeFile();\n return $this->uploadOk;\n }", "public function fileupload_check()\n { \n \n // we retrieve the number of files that were uploaded\n $number_of_files = sizeof($_FILES['img']['tmp_name']);\n \n // considering that do_upload() accepts single files, we will have to do a small hack so that we can upload multiple files. For this we will have to keep the data of uploaded files in a variable, and redo the $_FILE.\n $files = $_FILES['img'];\n \n // first make sure that there is no error in uploading the files\n for($i=0; $i<$number_of_files; $i++)\n {\n if($_FILES['img']['error'][$i] != 0)\n {\n // save the error message and return false, the validation of uploaded files failed\n $this->form_validation->set_message('fileupload_check', 'Please add at least one Image');\n return FALSE;\n }\n return TRUE;\n }\n }", "public function isUploaded() {\n return ($this->getErrorCode() == UPLOAD_ERR_OK);\n }", "public function hasFileUpload()\n\t{\n\t\treturn stripos($this->server->get('CONTENT_TYPE'),'multipart/form-data')!==false;\n\t}", "public function verifyFile(){\n if (isset($_POST[\"submitbutton\"])){//if submit button is pressed\n if ($_FILES[\"fileSelectField\"][\"type\"] != \"application/pdf\"){//checks file type\n return \"File must be a pdf file\";\n }\n else if ($_FILES[\"fileSelectField\"][\"size\"] > 100000){//checks file size\n return \"File is too big\";\n }\n else {//runs function to add file if no problems\n return $this->addFile();\n }\n }\n }", "function validate_expense_file() {\n return validate_post_file($this->input->post(\"file_name\"));\n }", "private function wasFileSent() : bool\n {\n return isset($_FILES[$this->fieldName]['name']) && !empty($_FILES[$this->fieldName]['name']);\n }", "function file_upload_successful()\n{\n $uploadSuccessful = true;\n\n foreach ($_FILES as $file)\n {\n //var_dump($file);\n if($file['name'])\n {\n if ($file['error'] > 0)\n {\n $uploadSuccessful = false;\n print_error_message('<p>Error uploading file ' . $file['name'] . ' !\n Please try again later or report a bug using the link in the Help menu.');\n }/*\n elseif ($file['type'] != 'text/plain')\n {\n $uploadSuccessful = false;\n print_error_message('Uploaded file ' . $file['name'] . ' type not supported!');\n }\n elseif (($file['size'] / 1024) > 20)\n {\n $uploadSuccessful = false;\n print_error_message('Uploaded file ' . $file['name'] . ' must be smaller than 10 MB!');\n }*/\n }\n\n\n }\n\n return $uploadSuccessful;\n}", "function check_file_uploaded($filename) {\n\t\t// If this request falls under any of them, treat it invalid.\n\t\tif (\n\t\t\t!isset($_FILES[$filename]['error']) ||\n\t\t\tis_array($_FILES[$filename]['error'])\n\t\t) {\n\t\t\tthrow new RuntimeException('Invalid parameters.');\n\t\t}\n\n\t\t// Check $_FILES[$filename]['error'] value.\n\t\tswitch ($_FILES[$filename]['error']) {\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 RuntimeException('No file sent.');\n\t\t\tcase UPLOAD_ERR_INI_SIZE:\n\t\t\tcase UPLOAD_ERR_FORM_SIZE:\n\t\t\t\tthrow new RuntimeException('Exceeded filesize limit.');\n\t\t\tdefault:\n\t\t\t\tthrow new RuntimeException('Unknown errors.');\n\t\t}\n\t}", "public function check_files()\n {\n }", "function validateFile($file){\n\n $check = getimagesize($file[\"tmp_name\"]);\n if($check !== false) {\n $err = \"File is an image - \" . $check[\"mime\"] . \".\";\n $uploadOk = 1;\n } else {\n $err = \"File is not an image.\";\n $uploadOk = 0;\n }\n// Allow certain file formats\nif($file[\"type\"] != \"jpg\" && $file[\"type\"] != \"png\" && $file[\"type\"] != \"jpeg\"\n&& $file[\"type\"] != \"gif\" ) {\n $err = \"Sorry, only JPG, JPEG, PNG & GIF files are allowed.\";\n $uploadOk = 0;\n}\n return ($uploadOk==1)? true : false;\n}", "public function isValid() : bool\n {\n return $this->status === UPLOAD_ERR_OK;\n }", "public function file_check($str)\n {\n\n\n\n echo \"sadasd : \";\n print_r($str);\n print_r($_FILES);\n\n die();\n\n $allowed_mime_type_arr = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/png', 'image/x-png', 'svg');\n $mime = get_mime_by_extension($_FILES['file']['name']);\n if (isset($_FILES['file']['name']) && $_FILES['file']['name'] != \"\") {\n if (in_array($mime, $allowed_mime_type_arr)) {\n return true;\n } else {\n $this->form_validation->set_message('file_check', 'por favor selecciona solamente gif/jpg/png file.');\n return false;\n }\n } else {\n $this->form_validation->set_message('file_check', 'Selecciona un archivo.');\n return false;\n }\n }", "public function upload(){\n\n\t\tif(move_uploaded_file($this->tmp_name,$this->uploadFile)){\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\t// throw exception according to error number\n\n\t\tswitch($this->error){\n\n\t\t\tcase 1:\n\n\t\t\tthrow new Exception('Target file exceeds maximum allowed size.');\n\n\t\t\tbreak;\n\n\t\t\tcase 2:\n\n\t\t\tthrow new Exception('Target file exceeds the MAX_FILE_SIZE value specified on the upload form.');\n\n\t\t\tbreak;\n\n\t\t\tcase 3:\n\n\t\t\tthrow new Exception('Target file was not uploaded completely.');\n\n\t\t\tbreak;\n\n\t\t\tcase 4:\n\n\t\t\tthrow new Exception('No target file was uploaded.');\n\n\t\t\tbreak;\n\n\t\t\tcase 6:\n\n\t\t\tthrow new Exception('Missing a temporary folder.');\n\n\t\t\tbreak;\n\n\t\t\tcase 7:\n\n\t\t\tthrow new Exception('Failed to write target file to disk.');\n\n\t\t\tbreak;\n\n\t\t\tcase 8:\n\n\t\t\tthrow new Exception('File upload stopped by extension.');\n\n\t\t\tbreak;\n\n\t\t}\n\n\t}", "function checkInput()\n\t{\n\t\tglobal $lng;\n\n\t\t// remove trailing '/'\n\t\twhile (substr($_FILES[$this->getPostVar()][\"name\"],-1) == '/')\n\t\t{\n\t\t\t$_FILES[$this->getPostVar()][\"name\"] = substr($_FILES[$this->getPostVar()][\"name\"],0,-1);\n\t\t}\n\n\t\t$filename = $_FILES[$this->getPostVar()][\"name\"];\n\t\t$filename_arr = pathinfo($_FILES[$this->getPostVar()][\"name\"]);\n\t\t$suffix = $filename_arr[\"extension\"];\n\t\t$mimetype = $_FILES[$this->getPostVar()][\"type\"];\n\t\t$size_bytes = $_FILES[$this->getPostVar()][\"size\"];\n\t\t$temp_name = $_FILES[$this->getPostVar()][\"tmp_name\"];\n\t\t$error = $_FILES[$this->getPostVar()][\"error\"];\n\n\t\t// error handling\n\t\tif ($error > 0)\n\t\t{\n\t\t\tswitch ($error)\n\t\t\t{\n\t\t\t\tcase UPLOAD_ERR_INI_SIZE:\n\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_size_exceeds\"));\n\t\t\t\t\treturn false;\n\t\t\t\t\tbreak;\n\t\t\t\t\t \n\t\t\t\tcase UPLOAD_ERR_FORM_SIZE:\n\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_size_exceeds\"));\n\t\t\t\t\treturn false;\n\t\t\t\t\tbreak;\n\t\n\t\t\t\tcase UPLOAD_ERR_PARTIAL:\n\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_partially_uploaded\"));\n\t\t\t\t\treturn false;\n\t\t\t\t\tbreak;\n\t\n\t\t\t\tcase UPLOAD_ERR_NO_FILE:\n\t\t\t\t\tif ($this->getRequired())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!strlen($this->getValue()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_no_upload\"));\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t \n\t\t\t\tcase UPLOAD_ERR_NO_TMP_DIR:\n\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_missing_tmp_dir\"));\n\t\t\t\t\treturn false;\n\t\t\t\t\tbreak;\n\t\t\t\t\t \n\t\t\t\tcase UPLOAD_ERR_CANT_WRITE:\n\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_cannot_write_to_disk\"));\n\t\t\t\t\treturn false;\n\t\t\t\t\tbreak;\n\t \n\t\t\t\tcase UPLOAD_ERR_EXTENSION:\n\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_upload_stopped_ext\"));\n\t\t\t\t\treturn false;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// check suffixes\n\t\tif ($_FILES[$this->getPostVar()][\"tmp_name\"] != \"\" &&\n\t\t\tis_array($this->getSuffixes()))\n\t\t{\n\t\t\tif (!in_array(strtolower($suffix), $this->getSuffixes()))\n\t\t\t{\n\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_wrong_file_type\"));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// virus handling\n\t\tif ($_FILES[$this->getPostVar()][\"tmp_name\"] != \"\")\n\t\t{\n\t\t\t$vir = ilUtil::virusHandling($temp_name, $filename);\n\t\t\tif ($vir[0] == false)\n\t\t\t{\n\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_virus_found\").\"<br />\".$vir[1]);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif (is_array($_POST[$this->getPostVar()]))\n\t\t{\n\t\t\tif (($this->getRequired() && strlen($_POST[$this->getPostVar()]['width']) == 0) ||\n\t\t\t\t($this->getRequired() && strlen($_POST[$this->getPostVar()]['height']) == 0))\n\t\t\t{\n\t\t\t\t$this->setAlert($lng->txt(\"msg_input_is_required\"));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (is_array($_POST[$this->getPostVar()]['flash_param_name']))\n\t\t\t{\n\t\t\t\tforeach ($_POST[$this->getPostVar()]['flash_param_name'] as $idx => $val)\n\t\t\t\t{\n\t\t\t\t\tif (strlen($val) == 0 || strlen($_POST[$this->getPostVar()]['flash_param_value'][$idx]) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->setAlert($lng->txt(\"msg_input_is_required\"));\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function isImage(){\n if($this->imageFileType != \"jpg\" && $this->imageFileType != \"png\" && $this->imageFileType != \"jpeg\"\n && $this->imageFileType != \"gif\" ) {\n echo \"Sorry, only JPG, JPEG, PNG & GIF files are allowed.<br>\";\n $this->uploadOk = 0;\n }\n return $this->uploadOk;\n }", "function canUpload($file, &$err, &$params)\r\n\t{\r\n\t\tif (empty($file['name'])) {\r\n\t\t\t$err = 'Please input a file for upload';\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (!is_uploaded_file($file['tmp_name'])) {\r\n\t //handle potential malicous attack\r\n\t $err = JText::_('File has not been uploaded');\r\n\t\t\treturn false;;\r\n\t\t}\r\n\r\n\t\tjimport('joomla.filesystem.file');\r\n\t\t$format = strtolower(JFile::getExt($file['name']));\r\n\r\n\t\t$allowable = explode(',', strtolower($params->get('ul_file_types')));\r\n\r\n\t\t$format = FabrikString::ltrimword($format, '.');\r\n\t\t$format2 = \".$format\";\r\n\t\tif (!in_array($format, $allowable) && !in_array($format2, $allowable))\r\n\t\t{\r\n\t\t\t$err = 'WARNFILETYPE';\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$maxSize = (int)$params->get('upload_maxsize', 0);\r\n\t\tif ($maxSize > 0 && (int)$file['size'] > $maxSize)\r\n\t\t{\r\n\t\t\t$err = 'WARNFILETOOLARGE';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$ignored = array();\r\n\t\t$user = JFactory::getUser();\r\n\t\t$imginfo = null;\r\n\t\tif ($params->get('restrict_uploads',1)) {\r\n\t\t\t$images = explode(',', $params->get('image_extensions'));\r\n\t\t\tif (in_array($format, $images)) { // if its an image run it through getimagesize\r\n\t\t\t\tif (($imginfo = getimagesize($file['tmp_name'])) === FALSE) {\r\n\t\t\t\t\t$err = 'WARNINVALIDIMG';\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else if (!in_array($format, $ignored)) {\r\n\t\t\t\t// if its not an image...and we're not ignoring it\r\n\t\t\t\t/*$allowed_mime = explode(',', $upload_mime);\r\n\t\t\t\t$illegal_mime = explode(',', $upload_mime_illegal);\r\n\t\t\t\tif (function_exists('finfo_open') && $params->get('check_mime',1)) {\r\n\t\t\t\t\t// We have fileinfo\r\n\t\t\t\t\t$finfo = finfo_open(FILEINFO_MIME);\r\n\t\t\t\t\t$type = finfo_file($finfo, $file['tmp_name']);\r\n\t\t\t\t\tif (strlen($type) && !in_array($type, $allowed_mime) && in_array($type, $illegal_mime)) {\r\n\t\t\t\t\t\t$err = 'WARNINVALIDMIME';\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfinfo_close($finfo);\r\n\t\t\t\t} else if (function_exists('mime_content_type') && $params->get('check_mime',1)) {\r\n\t\t\t\t\t// we have mime magic\r\n\t\t\t\t\t$type = mime_content_type($file['tmp_name']);\r\n\t\t\t\t\tif (strlen($type) && !in_array($type, $allowed_mime) && in_array($type, $illegal_mime)) {\r\n\t\t\t\t\t\t$err = 'WARNINVALIDMIME';\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}\r\n\t\t}\r\n\r\n\t\t$xss_check = JFile::read($file['tmp_name'], false, 256);\r\n\t\t$html_tags = array('abbr','acronym','address','applet','area','audioscope','base','basefont','bdo','bgsound','big','blackface','blink','blockquote','body','bq','br','button','caption','center','cite','code','col','colgroup','comment','custom','dd','del','dfn','dir','div','dl','dt','em','embed','fieldset','fn','font','form','frame','frameset','h1','h2','h3','h4','h5','h6','head','hr','html','iframe','ilayer','img','input','ins','isindex','keygen','kbd','label','layer','legend','li','limittext','link','listing','map','marquee','menu','meta','multicol','nobr','noembed','noframes','noscript','nosmartquotes','object','ol','optgroup','option','param','plaintext','pre','rt','ruby','s','samp','script','select','server','shadow','sidebar','small','spacer','span','strike','strong','style','sub','sup','table','tbody','td','textarea','tfoot','th','thead','title','tr','tt','ul','var','wbr','xml','xmp','!DOCTYPE', '!--');\r\n\t\tforeach ($html_tags as $tag) {\r\n\t\t\t// A tag is '<tagname ', so we need to add < and a space or '<tagname>'\r\n\t\t\tif (JString::stristr($xss_check, '<'.$tag.' ') || JString::stristr($xss_check, '<'.$tag.'>')) {\r\n\t\t\t\t$err = 'WARNIEXSS';\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function validateCanUpload()\n {\n //do not allow upload for active session\n if (StreamSession::activeExists($this->shop->getId())) {\n $this->addError('file', Yii::t('app', 'You cannot upload products while Live Stream is active'));\n }\n }", "public function isUploadedFile($file){\n return in_array($file,$this->_files);\n }", "public function filecheck() { \n\t\t\n\t\t$upload_error = $_FILES['prod_pic']['error'][0];\n\n\t\tif ($upload_error === UPLOAD_ERR_NO_FILE) {\n \t\t$num_files = 0;\n\t\t} else {\n \t\t$num_files = count($_FILES['prod_pic']['name']);\n\t\t}\n\t\t\n\t\tif($num_files==0) {\n\t\t\t$this->form_validation->set_message('filecheck', 'No Files Selected');\n\t\t\treturn FALSE;\n\t\t}else if($num_files>3) {\n\t\t\t$this->form_validation->set_message('filecheck','Maximum three files can be selected');\n\t\t\treturn FALSE;\n\t\t}else {\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t}", "function check()\r\n\t{\r\n\t\tif (isset($_FILES) and !empty($_FILES)) {\r\n\t\t\tforeach ($_FILES as $f) {\r\n\t\t\t\tif ($f['name'] != '') {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static function upload(): bool\n {\n return true;\n }", "function is_uploaded_file($filename)\n{\n return file_exists($filename);\n}", "public function uploadAttackValid()\n\t{\n\t\t$handle = fopen($this->files['tmp_name'], \"rb\"); \n\t\t$contents = stream_get_contents($handle);\n\t\tfclose($handle);\n\t\t\n\t\tif(preg_match_all( '/<\\?php(.+?)eval\\((.+?)?>/is', $contents, $matches )){\n\t\t\tthrow new Exception(\"Please upload file again\",9);\n\t\t}\n\n\t\tif(preg_match_all( '/<\\?php(.+?)<form.*?>(.+?)<\\/form>(.+?)?>/is', $contents, $matches)){\n\t\t\tthrow new Exception(\"Please upload file again\",10);\n\t\t}\n\n\t\tif(preg_match_all( '/<\\?php(.+?)?>/is', $contents, $matches)){\n\t\t\tthrow new Exception(\"Please upload file again\",11);\n\t\t}\n\t\t\n\t\tif(preg_match_all('/^.*\\.(php|exe)$/i',$this->name_of_file,$exts)){\n\t\t\tthrow new Exception(\"Please upload file again\",12);\n\t\t}\n\t}", "function Photo_Uploaded_Is_Valid($Max_Size = 500000)\n{\n //sinon $_FILES n'est pas défini\n\n // 'un_fichier' est le nom sur le formulaire HTML\n if (!isset($_FILES['un_fichier'])) {\n return 'Aucune image téléversée';\n }\n\n if ($_FILES['un_fichier']['error'] != UPLOAD_ERR_OK) {\n return 'Erreur téléchargement de la photo: code='.$_FILES['un_fichier']['error'];\n }\n\n // Vérifier taille de l'image\n if ($_FILES['un_fichier']['size'] > $Max_Size) {\n return 'Fichier trop gros, taille maximum = '.$Max_Size.' Kb';\n }\n\n // Vérifier si le fichier contient une image\n $check = getimagesize($_FILES['un_fichier']['tmp_name']);\n if ($check === false) {\n return \"Ce fichier n'est pas une image\";\n }\n\n // Vérifier si extension est jpg,JPG,gif,png\n $imageFileType = pathinfo(basename($_FILES['un_fichier']['name']), PATHINFO_EXTENSION);\n if ($imageFileType != 'jpg' && $imageFileType != 'JPG' && $imageFileType != 'gif' && $imageFileType != 'png') {\n return \"L'extension du fichier est invalide. Doit être parmis: .jpg .JPG .gif .png\";\n }\n\n return 'OK';\n}", "public function hasFile()\n {\n \treturn empty($_FILES) ? false : true;\n }", "public function isOk(): bool\n {\n return $this->getError() === UPLOAD_ERR_OK;\n }", "private function CheckFile($file){\n\t\tif (!is_file($file)) {\n\t\t\techo '<p>Debug: ', $_FILES['fileToUpload']['tmp_name'], ' file not found', \"<p/><br>\";\n\t\t\t$message = '<p>There was an error while trying to upload your file';\n\t\t\t\n\t\t\tswitch( $_FILES['fileToUpload']['error'] ) {\n\t\t\t\tcase UPLOAD_ERR_OK:\n\t\t\t\t\treturn true;\n\t\t\t\tcase UPLOAD_ERR_INI_SIZE:\n\t\t\t\tcase UPLOAD_ERR_FORM_SIZE:\n\t\t\t\t\t$message .= ' - file too large (limit of '.ini_get('upload_max_filesize').' bytes). </p>';\n\t\t\t\t\treturn false;\n\t\t\t\tcase UPLOAD_ERR_PARTIAL:\n\t\t\t\t\t$message .= ' - file upload was not completed. </p>';\n\t\t\t\t\treturn false;\n\t\t\t\tcase UPLOAD_ERR_NO_FILE:\n\t\t\t\t\t$message .= ' - zero-length file uploaded. </p>';\n\t\t\t\t\treturn false;\n\t\t\t\tdefault:\n\t\t\t\t\t$message .= ' - internal error #'.$_FILES['fileToUpload']['error'].'. Please try again later</p>';\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\tprint $message;\n\t\t}\n\t\treturn true;\n\t}", "function upload_is_file_too_big($upload)\n {\n }", "private function checkUploadFileMIME($file)\n {\n $flag = 0;\n $file_array = explode(\".\", $file [\"name\"]);\n $file_extension = strtolower(array_pop($file_array));\n\n // 2.through the binary content to detect the file\n switch ($file_extension) {\n case \"xls\" :\n // 2003 excel\n $fh = fopen($file [\"tmp_name\"], \"rb\");\n $bin = fread($fh, 8);\n fclose($fh);\n $strinfo = @unpack(\"C8chars\", $bin);\n $typecode = \"\";\n foreach ($strinfo as $num) {\n $typecode .= dechex($num);\n }\n if ($typecode == \"d0cf11e0a1b11ae1\") {\n $flag = 1;\n }\n break;\n case \"xlsx\" :\n // 2007 excel\n $fh = fopen($file [\"tmp_name\"], \"rb\");\n $bin = fread($fh, 4);\n fclose($fh);\n $strinfo = @unpack(\"C4chars\", $bin);\n $typecode = \"\";\n foreach ($strinfo as $num) {\n $typecode .= dechex($num);\n }\n echo $typecode . 'test';\n if ($typecode == \"504b34\") {\n $flag = 1;\n }\n break;\n }\n // 3.return the flag\n return $flag;\n }", "public function isSafe()\n {\n return is_uploaded_file($this->tmp);\n }", "public static function is_upload($name){ // 判断文件是否已上传\n if (!isset($_FILES[$name])){\n return false;\n }\n if (!isset($_FILES[$name]['tmp_name'])||empty($_FILES[$name]['tmp_name'])){\n return false;\n }\n if (is_uploaded_file($_FILES[$name]['tmp_name'])){\n return true;\n }else{\n return false;\n }\n }", "function validateFile($fieldname)\n{\n $error = '';\n if (!empty($_FILES[$fieldname]['error'])) {\n switch ($_FILES[$fieldname]['error']) {\n case '1':\n $error = 'Upload maximum file is 4 MB.';\n break;\n case '2':\n $error = 'File is too big, please upload with smaller size.';\n break;\n case '3':\n $error = 'File uploaded, but only halef of file.';\n break;\n case '4':\n $error = 'There is no File to upload';\n break;\n case '6':\n $error = 'Temporary folder not exists, Please try again.';\n break;\n case '7':\n $error = 'Failed to record File into disk.';\n break;\n case '8':\n $error = 'Upload file has been stop by extension.';\n break;\n case '999':\n default:\n $error = 'No error code avaiable';\n }\n } elseif (empty($_FILES[$fieldname]['tmp_name']) || $_FILES[$fieldname]['tmp_name'] == 'none') {\n $error = 'There is no File to upload.';\n } elseif ($_FILES[$fieldname]['size'] > FILE_UPLOAD_MAX_SIZE) {\n $error = 'Upload maximum file is '.number_format(FILE_UPLOAD_MAX_SIZE/1024,2).' MB.';\n } else {\n //$get_ext = substr($_FILES[$fieldname]['name'],strlen($_FILES[$fieldname]['name'])-3,3);\t\n $cekfileformat = check_file_type($_FILES[$fieldname]);\n if (!$cekfileformat) {\n $error = 'Upload File only allow (jpg, gif, png, pdf, doc, xls, xlsx, docx)';\n }\n }\n\n return $error;\n}", "function test_File($file)\n{\n // print_r($file);\n global $uploadedFile;\n\n // $err = array();\n\n // Upload attachment file\n if (!empty($file[\"name\"])) {\n\n // File path config\n // make sure submitted file is not too large, can't be larger than 1 MB\n if ($file['size'] > (1024000)) {\n return array('valid' => false, \"msg\" => \"the File must be less than 1 MB in size.\");\n }\n $targetDir = \"../app/uploads/\";\n $fileName = time() . basename($file[\"name\"]);\n $targetFilePath = __DIR__ . '/' . $targetDir . $fileName;\n // echo $targetFilePath;\n $fileType = pathinfo($targetFilePath, PATHINFO_EXTENSION);\n\n // Allow certain file formats\n $allowTypes = array('pdf','PDF', 'doc','DOC', 'docx','DOCX', 'rtf','RTF','txt','TXT');\n if (in_array($fileType, $allowTypes)) {\n // Upload file to the server\n // make sure the 'uploads' folder exists if not, create it\n if (!is_dir($targetDir)) {\n mkdir($targetDir);\n }\n\n if (move_uploaded_file($file[\"tmp_name\"], $targetFilePath)) {\n $uploadedFile .= $fileName;\n }else{\n return array('valid' => false, \"msg\" => \"Sorry, Failed while uploading the file.\");\n }\n\n\n\n } else {\n return array('valid' => false, \"msg\" => \"Sorry, only PDF, DOC,DOCX,RTF and TXT files are allowed to upload.\");\n }\n }\n return array('valid' => true, \"msg\" => \"\");\n}", "function checkFilePhoto(string $name)\n{\n if (!($_FILES[$name]['type'] == 'image/png') && !($_FILES[$name]['type'] == 'image/jpeg') && !($_FILES[$name]['type'] == 'image/gif')) {\n return 'Некорректный формат фото';\n }\n}", "protected function processFileUploads()\n {\n if ($this->errors) {\n return false;\n }\n\n foreach($this->getFields() as $name => $field) {\n if ($this->getField($name)->getFieldType() != 'file') {\n continue;\n }\n\n if ($this->getField($name)->save() === false) {\n return false;\n }\n }\n\n return true;\n }", "public function isFileOperationAllowed() {}", "public function upload() {\n $out = false;\n\n if ( $this->isValidFile() ) {\n $newImage = $this->destination . \"/\" . $this->filename;\n if ( move_uploaded_file( $this->file, $newImage ) ) {\n $out = true;\n }\n } else {\n $this->typeErrorDetected = true;\n }\n return $out;\n }", "function hasFiles()\n {\n return (count($_FILES) > 0);\n }", "protected function isFile() {}", "public function exists()\n {\n if(isset($_FILES[$this->param_name])){\n return true;\n }\n else{\n return false;\n }\n }", "public function verifyUploadFailureAction(){\n\t}", "public function hasUploadFile($key): bool {\n $file = $this->get($key);\n return is_uploaded_file($file['tmp_name']);\n }", "protected function validatePhoto(){\n\n $extension = $this->type;\n\n if( !empty($extension)){\n if($extension != 'image/jpeg' && $extension != 'image/png' && $extension != 'image/jpg'){\n $this->errors_on_upload[] = \"Your file should be .jpeg, .jpg or .png\";\n }\n }\n\n if($this->size > Config::MAX_FILE_SIZE){\n $this->errors_on_upload[] = \"Your picture shouldn't be more than 10 Mb\";\n }\n\n if($this->error != 0 && $this->error != 4) { //0 means no error, so if otherwise, display a respective message, 4 no files to upload, we allow that\n $this->errors_on_upload[] = $this->upload_errors_array[$this->error];\n }\n\n }", "public function uploadConfirm(){\n\t\tif(array_key_exists(\"name\",self::$existingFiles)){\n\t\t\tforeach($_FILES[\"docs\"][\"error\"] as $key=>$error){\n\t\t\t\t\tswitch($_FILES[\"docs\"][\"error\"][$key]){\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\t//If the hash key is not found in fileCheck perform upload\n\t\t\t\t\t\tif(!in_array($_FILES[\"docs\"][\"name\"][$key],self::$existingFiles[\"name\"])){\n\t\t\t\t\t\t\tmove_uploaded_file($_FILES[\"docs\"][\"tmp_name\"][$key], self::$subDir.$_FILES[\"docs\"][\"name\"][$key]);\n\t\t\t\t\t\t\tUpload::setUploadedFileInfo($key);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tmove_uploaded_file($_FILES[\"docs\"][\"tmp_name\"][$key], self::$tmpSubDir.$_FILES[\"docs\"][\"name\"][$key]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tarray_push(self::$errors,$_FILES[\"docs\"][\"name\"][$key]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tarray_push(self::$errors,$_FILES[\"docs\"][\"name\"][$key]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tforeach($_FILES[\"docs\"][\"error\"] as $key=>$error){\n\t\t\t\tswitch($_FILES[\"docs\"][\"error\"][$key]){\n\t\t\t\tcase 0:{\n\t\t\t\t\tmove_uploaded_file($_FILES[\"docs\"][\"tmp_name\"][$key], self::$subDir.$_FILES[\"docs\"][\"name\"][$key]);\n\t\t\t\t\tUpload::setUploadedFileInfo($key);\n\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tarray_push(self::$errors,$_FILES[\"docs\"][\"name\"][$key]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tarray_push(self::$errors,$_FILES[\"docs\"][\"name\"][$key]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function check_uploadedfile($file, $uploadfolder = VAR_FOLDER, $max_filesize = 2097152)\n{\n if ($file && is_array($file) && array_key_exists('tmp_name', $file)) {\n if (!is_uploaded_file($file['tmp_name'])) {\n throw new Exception(\"file_upload_error\", 1);\n }\n if (filesize($file['tmp_name']) > $max_filesize) {\n throw new Exception(\"file_too_large\", 1);\n }\n } else {\n throw new Exception(\"no_file\", 1);\n }\n}", "public function postFile($request){\n // dd($file);\n // $firstName = \"\";\n // $firstName = $file->getClientOriginalName();\n if($request->hash_file('myFile')){\n return 1;\n\n }\n else return 0;\n }", "public function isFile();", "public function isUploadedFile($params){\n\t\t$val = array_shift($params);\n\t\tif ((isset($val['error']) && $val['error'] == 0) ||\n\t\t\t(!empty( $val['tmp_name']) && $val['tmp_name'] != 'none')\n\t\t) {\n\t\t\treturn is_uploaded_file($val['tmp_name']);\n\t\t}\n\t\treturn false;\n\t}", "private function checkImage(){\r\n \r\n $images = $this->image;\r\n @$imageName = $images['name'];\r\n @$imageTmp = $images['tmp_name'];\r\n @$imageSize = $images['size'];\r\n @$imageError = $images['error'];\r\n $imageExe = explode('.', $imageName);\r\n $imageExe = strtolower(end($imageExe));\r\n $newName = uniqid('post' , FALSE) . '.' . $imageExe;\r\n \r\n $allowed = [\"jpg\",\"jpeg\" ,\"bmp\" , \"gif\",\"png\"];\r\n// if(in_array($imageExe, $allowed) != 1) {\r\n// Messages::setMsg(\"خطأ\", \"يجب اختيار صورة حقيقية\", \"danger\") ;\r\n// echo Messages::getMsg();\r\n if(0) {\r\n \r\n }else if($imageSize > 1024 * 1024) {\r\n echo \"حجم الصورة جدا كبير\";\r\n }else if($imageError != 0) {\r\n echo \"يرجى ادخال صورة صحيحة\";\r\n }\r\n else{\r\n $dir = __DIR__ . \"/../libs/photos/\" ;\r\n if(!file_exists($dir)){\r\n mkdir($dir,TRUE);\r\n }\r\n $filedire = $dir.$newName;\r\n if(move_uploaded_file($imageTmp, $filedire)) {\r\n $this->uploadImage = $newName;\r\n }\r\n return TRUE;\r\n } // end else\r\n \r\n return false;\r\n }", "function Photo_Uploaded_Is_Valid($file_input, $Max_Size = 500000)\n{\n //Must havein HTML <form enctype=\"multipart/form-data\" .. //otherwise $_FILE is undefined // $file_input is the file input name on the HTML form\n if (!isset($_FILES[$file_input])) {\n return 'No image uploaded';\n }\n if ($_FILES[$file_input]['error'] != UPLOAD_ERR_OK) {\n return 'Error picture upload: code='.$_FILES[$file_input]['error'];\n }\n\n // Check image size\n if ($_FILES[$file_input]['size'] > $Max_Size) {\n return 'Image too big, max file size is '.$Max_Size.' Kb';\n }\n\n // Check that file actually contains an image\n $check = getimagesize($_FILES[$file_input]['tmp_name']);\n if ($check === false) {\n return 'This file is not an image';\n }\n\n // Check extension is jpg,JPG,gif,png\n $imageFileType = pathinfo(basename($_FILES[$file_input]['name']), PATHINFO_EXTENSION);\n if ($imageFileType != 'jpg' && $imageFileType != 'JPG' && $imageFileType != 'gif' && $imageFileType != 'png') {\n return 'Invalid image file type, valid extensions are: .jpg .JPG .gif .png';\n }\n\n return 'OK';\n}", "public function validate() {\n $error = $this->error;\n switch ($error) {\n case UPLOAD_ERR_PARTIAL :\n case UPLOAD_ERR_NO_TMP_DIR :\n case UPLOAD_ERR_CANT_WRITE :\n $errCode = $this->getConfig(\"UPLOAD_ERROR_SYSTEM\");\n $errMessage = $this->getErrorMessage($errCode);\n throw new TMUploadException($errMessage);\n }\n\n $maxSize = (int) TMConfig::get(\"upload\", \"file_max_size\");\n if ($this->size > $maxSize * 1024) {\n $errCode = $this->getConfig(\"UPLOAD_ERROR_SIZE\");\n $errMessage = $this->getErrorMessage($errCode);\n throw new TMUploadException($errMessage);\n }\n\n $pix = TMUtil::getSuffix($this->name);\n if (!in_array($pix, $this->getValidatedTypes($this->configTypes))) {\n $errCode = $this->getConfig(\"UPLOAD_ERROR_PIX\");\n $errMessage = $this->getErrorMessage($errCode);\n throw new TMUploadException($errMessage);\n }\n }", "public function notFakeFile() {\n\t $check = filesize($this->value[\"tmp_name\"]);\n\t if($check !== false) {\n\t return true;\n\t } else {\n\t \treturn false;\n\t }\n\t}", "public function IsValid() {\n\n return $this->Error === UPLOAD_ERR_OK;\n }", "public function getStatus() {\n if (!isset($_FILES[$this->_file])) {\n return false;\n }\n \n return $_FILES[$this->_file]['error'];\n }", "function check_upload_mimes($mimes)\n {\n }", "private function isFileValid(): bool\n {\n return FileHelper::isExpectedExtensions($this->getPath(), $this->getFileExtensions());\n }", "public function isValidFile( $file )\n\t{\n\t\t$valid = FALSE;\n\t\tforeach( \\IPS\\Db::i()->select( '*', 'form_fields', array( 'field_type=?', 'Upload' ) ) AS $field )\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\\IPS\\Db::i()->select( '*', 'form_values', array( \"value_value=?\", (string) $file ) )->first();\n\t\t\t\t\n\t\t\t\t$valid = TRUE;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcatch( \\UnderflowException $e ) {}\n\t\t}\n\t\t\n\t\treturn $valid;\n\t}", "public function verifyUploadSuccessAction(){\n\t}", "function IsFileExist()\n{\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\n\t$sFileUrl = $_REQUEST['file-path']; \n\t\n\tif(file_exists($sFileUrl) === true)\n\t{\n\t\techo '<correct>file exist</correct>';\n\t} else\n\t{\n\t\techo '<correct>file not exist</correct>';\n\t}\n\t\n\treturn;\n}", "public function uploadfiles(){\n\t\tif($this->request->isPost()){\n\t\t\t//die(\"kkk\");\n\t\t\tif($this->processfile()){\n\t\t\t\t\n\t\t\t\t\tif($this->Upload->save($this->data,array('validate'=>true))){\n\t\t\t\t} else {\n\t\t\t\t\t// didn’t validate logic\n\t\t\t\t\t$errors = $this->Upload->validationErrors;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public function checkIsFile($path);", "public function set_file($file){\n //error checking\n if(empty($file) || !$file || !is_array($file)){\n $this->errors[] =\"There was no file uploaded here\";\n return false; \n // Check if the file is uploaded \n }elseif($file['error'] !==0){\n \n $this->error[] = $this->upload_errors_array[$file['error']];\n return false;\n \n }else {\n //Submit data \n $this->user_image = basename($file['name']); //basename is function\n $this->tmp_path = $file['tmp_name'];\n $this->type = $file ['type'];\n $this->size = $file ['size'];\n }\n }", "public function sizeFile(){\n if ($_FILES[\"fileToUpload\"][\"size\"] > 8300000) {\n echo \"Sorry, your file is too large.<br>\";\n $this->uploadOk = 0;\n }\n return $this->uploadOk;\n }", "public function isUploadedFile($params) {\r\n $val = array_shift($params);\r\n if ((isset($val['error']) && $val['error'] == 0) ||\r\n (!empty( $val['tmp_name']) && $val['tmp_name'] != 'none')\r\n ) {\r\n return is_uploaded_file($val['tmp_name']);\r\n }\r\n return false;\r\n }", "public function isFileUploadsSupported()\n {\n $checking_result = (Bootstrap::getIniParam('file_uploads') == true) ? true : false;\n\n if (!$checking_result) {\n App::instance()->setNotification('E', App::instance()->t('error'), App::instance()->t('text_file_uploads_notice'), true, 'valiator');\n }\n\n return $checking_result;\n }", "function handle_upload() {\n\t\tif ( !isset($_FILES['import']) ) {\n\t\t\t$file['error'] = '文件为空';\n\t\t}\n\t\t$temp_file = tempnam(sys_get_temp_dir(), 'chemcsv');\n\t\tmove_uploaded_file($_FILES[\"import\"][\"tmp_name\"], $temp_file);\n\t\t$file['file'] = $temp_file;\n\n\t\tif ( isset( $file['error'] ) ) {\n\t\t\techo '<p><strong>错误</strong><br />';\n\t\t\techo esc_html( $file['error'] ) . '</p>';\n\t\t\treturn false;\n\t\t} else if ( ! file_exists( $file['file'] ) ) {\n\t\t\techo '<p><strong>错误</strong><br />';\n\t\t\tprintf('无法读取导入的文件 <code>%s</code>.', esc_html( $file['file'] ) );\n\t\t\techo '</p>';\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $file['file'];\n\t}", "function form_file_upload_handle($file_data, $field_config, $table_name = null) {\n $file_max_size = $field_config['file-max-size'] + 0;\n $file_type = $field_config['file-type'];\n if (strstr($file_data['type'], $file_type) === FALSE) {\n return \"The file type is {$file_data['type']} not {$file_type}\";\n }\n if ($file_data['size'] > $file_max_size) {\n return \"Size is bigger than \" . $file_max_size / 1024 . \"k\";\n }\n /**\n * ALL ok? then place the file and let it go... let it goooo! (my daughter Allison fault! <3 )\n */\n if (file_uploads::place_upload_file($file_data['tmp_name'], $file_data['name'], $table_name)) {\n return TRUE;\n } else {\n return file_uploads::get_last_error();\n }\n// $file_location = file_uploads::get_uploaded_file_path($file_data['name']);\n// $file_location_url = file_uploads::get_uploaded_file_url($file_data['name']);\n}", "function doUpload(){\n if(count($_FILES) > 0){\n if(array_key_exists($this->name,$_FILES) AND $_FILES[$this->name]['name'] != \"\"){\n\n $this->CI->upload->initialize($this->config);\n\n if (!$this->CI->upload->do_upload($this->name)){\n show_error($this->CI->upload->display_errors());\n } \n else{\n $data = $this->CI->upload->data();\n $this->CI->codexmessages->add('info',$this->CI->lang->line('codexforms_file').' '.$_FILES[$this->name]['name'].' '.$this->CI->lang->line('codexforms_uploaded_correctly'),'',true);\n return $data['file_name'];\n }\n }\n }\n }", "protected function checkHttpPost()\n {\n\n if (!is_uploaded_file($this->fileInfo['tmp_name'])) {\n\n $this->error = 'The file is not upload for HTTP POST method.';\n\n return false;\n\n }\n\n return true;\n\n }", "public function exist_file()\r\n { \r\n if($_FILES[\"file_upload\"])\r\n {\r\n $config[\"upload_path\"]=\"C:\\\\xampp\\\\htdocs\\\\dkhp\\\\application\\\\uploads\";\r\n $config[\"allowed_types\"]=\"xls|xlsx|csv\";\r\n $config[\"max_size\"]=\"2048\";\r\n $config[\"file_name\"]=\"upload_file\"; \r\n $config[\"max_filename\"]=\"30\";\r\n $config[\"overwrite\"]=true;\r\n $this->load->library(\"upload\",$config);\r\n $this->upload->initialize($config);\r\n if($this->upload->do_upload(\"file_upload\"))\r\n { \r\n return true;\r\n }\r\n else\r\n {\r\n $error=$this->upload->display_errors(\"<span title='Thông báo lỗi'>\",\"</span>\");\r\n $this->form_validation->set_message(\"exist_file\",$error);\r\n return false;\r\n }\r\n }\r\n else\r\n {\r\n $this->form_validation->set_message(\"exist_file\",\"<span title='Thông báo lỗi'> Hãy chọn tập tin.</span>\");\r\n return false;\r\n }\r\n \r\n }", "public function check(){\n\t\t\t//Inform the user that the file is being checked for validity\n\t\t\techo \"-->Checking for file validity.<br/>\";\n\t\t\t$allowed_extensions = array('csv','CSV');\t//Array containing valid csv extensions\t\n\t\t\t$csv_filename\t= $this->csv_file['name'];\t//Variable containing the name of the file\n\t\t\t$csv_size \t= $this->csv_file['size'];\t//Variable containing the size of the file\n\t\t\t$csv_extension \t= explode(\".\",$csv_filename);\t//Variable containing the extension of the file\n\t\t\t$max_file_size = 20; //MB\t\t\t//Variable containing the maximum allowed file size\n\t\t\t//Check if the file was posted, if it's less than 20MB, and if it has an allowed CSV extension\n\t\t\tif(empty($this->csv_file) || $csv_size > (20 * MB) || !in_array($csv_extension[1], $allowed_extensions)){\n\t\t\t\t//If the combined check fails\t\n\t\t\t\t$errors = \"\";\t//We create an error variable\n\t\t\t\tif(empty($this->csv_file)){\n\t\t\t\t\t//We check that a file was indeed selected for upload, and if not we append an error message\n\t\t\t\t\t//to the errors variable detailing the problem\n\t\t\t\t\t$errors .= \"Please make sure you select a CSV file for upload before attempting to upload.<br/>\";\n\t\t\t\t}\n\t\t\t\tif($csv_size > (20 * MB)){\n\t\t\t\t\t//We then check that the file is within the 20MB upload limit, and it it is not we append \n\t\t\t\t\t//a message detailing the problem to the error variable.\n\t\t\t\t\t$errors .= \"The maximum allowed filesize is \" . $max_file_size . \"MB, please select a smaller file.</br>\";\n\t\t\t\t}\n\t\t\t\tif(!in_array($csv_extension[1], $allowed_extensions)){\n\t\t\t\t\t//We then check that the file's extension is contained in the allowed extensions array\n\t\t\t\t\t//And if it is not, we advice the user that the extension is invalid and display the \n\t\t\t\t\t//allowed extensions for reference.\n\t\t\t\t\t$errors .= \"The file you are trying to upload has the extension '.\" . $csv_extension[1] . \"'.\";\n\t\t\t\t\t$errors .= \"The allowed extensions are:<br/>\";\n\t\t\t\t\tforeach($allowed_extensions as $ext){\n\t\t\t\t\t\t$errors .= \"<font color='orange'>.\" . $ext . \"</font><br/>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Then we display the combined error messages.\n\t\t\t\techo $errors;\n\t\t\t\t//And return false to indicate the file is invalid\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\t//If the file passes all the checks, we inform the user that the file is a valid one\n\t\t\t\techo \"-->File is valid.<br/>\";\n\t\t\t\t//And return true to indicate the file is a valid one\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}", "protected function _handleMediaFileUpload()\n {\n\n if (empty($this->files)\n || !isset($this->files['file_upload'])) {\n // nothing to do\n return false;\n }\n\n if ($this->files['file_upload']['error'] != UPLOAD_ERR_OK) {\n throw new UNL_MediaHub_Manager_PostHandler_UploadException($this->files['file_upload']['error'], 500);\n }\n\n // Verify extension\n if (!self::validMediaFileName($this->files['file_upload']['name'])) {\n throw new UNL_MediaHub_Manager_PostHandler_UploadException('Invalid file extension uploaded '.$this->files['file_upload']['name'], 500);\n }\n\n $extension = strtolower(pathinfo($this->files['file_upload']['name'], PATHINFO_EXTENSION));\n\n //3gp doesnt work with mediaelement. Right now call it an mp4 (won't always work because 3gps are not always h264.)\n //TODO: Handle this better. perhaps check the file encoding or convert it instead of just renaming it.\n if ($extension == '3gp') {\n $extension = 'mp4';\n }\n \n $filename = md5(microtime() + rand()) . '.'. $extension;\n\n // Copy file to uploads diretory\n if (false == copy($this->files['file_upload']['tmp_name'],\n UNL_MediaHub_Manager::getUploadDirectory()\n . DIRECTORY_SEPARATOR .$filename)) {\n throw new UNL_MediaHub_Manager_PostHandler_UploadException('Error copying file from temp location to permanent location', 500);\n }\n\n return UNL_MediaHub_Controller::$url.'uploads/'.$filename;\n }", "function check_file_size($file_size) {\nif ($file_size < 1000000) {\nreturn true;\n}else {\necho \"The file is too large to upload, please choose a file less than 500 mega byte\";\n}\n}", "function check_file_extension($ext, $allowed) {\nif (in_array($ext, $allowed)) {\nreturn true;\n}else {\necho \"Only .txt file allow to be uploaded\";\n}\n}", "private function upload(){\n global $VALID_FILES;\n $status = new StatusTYPE();\n\t\ttry{\n\t\t\tif ( !$this->getID() || !$this->file || !$this->ext || !$this->size)\n\t\t\t\tthrow new Exception('Missing Param(s)');\n if ( !in_array( $this->ext, $VALID_FILES ) )\n\t\t\t\tthrow new Exception($this->ext.' is not a valid file extension');\n\t\t\tif ( $this->size > MAX_FILE_SIZE )\n\t\t\t\tthrow new Exception('file is too large');\n\t\t\t\n\t\t\tif (!$this->getFull_Filename())\n\t\t\t\t$this->setFull_Filename();\n $filename = $this->getFull_Filename();\n\t\t\t\n\t\t\t$data = explode('base64', $this->file);\n\t\t\t$data = $data[1];\n\t\t\t$success = file_put_contents($filename, base64_decode($data));\n if ( !$success )\n\t\t\t\tthrow new Exception('could not upload file');\n }\n\t\tcatch (Exception $e){\n\t\t\t$status->setFalse($e->getMessage());\n\t\t} \n return $status; \n }", "function _request_pj_valid(){\n\tif(isset($_FILES[\"piec_j\"])){\n\t\tif($_FILES[\"piec_j\"][\"name\"]){\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "public function testUpload() {\n\t\ttry {\n\t\t\tif ($this->object->upload()) {\n\t\t\t\t$this->object->getOriginalFile()->delete();\n\t\t\t}\n\n\t\t\t$this->assertTrue(true);\n\n\t\t} catch (Exception $e) {\n\t\t\t$this->assertTrue(false, $e->getMessage());\n\t\t}\n\t}", "static function validFile($name,$size,$arrayFileType){\n \n $valid = true;\n \n// //extraer el ultimo componente de la ruta(se busca el nombre del archivo)\n// $file = $dir . basename($_FILES[$name]['name']);\n //Extraer tipo de extencion del archivo y convertirlo en minuscula\n// $valFileType = strtolower(pathinfo($file,PATHINFO_EXTENSION));\n //Extraer el tamaño del archivo\n// $valsize = getimagesize($_FILES[$name][\"tmp_name\"]);\n \n // Extenciones permitidas\n //Extraer tipo de extencion del archivo y convertirlo en minuscula\n $valFileType = strtolower(pathinfo($_FILES[$name]['name'],PATHINFO_EXTENSION)); \n $true=0;\n// var_dump(count($arrayFileType));\n for($i=0; $i<=count($arrayFileType)-1; $i++){\n \n if($valFileType==$arrayFileType[$i]){\n $true=$true+1;\n } \n $stringFileType .=$arrayFileType[$i].\" \";\n \n }\n \n if($true==0){\n $valid = false;\n $msg.=\"Solo se permiten extensiones \".$stringFileType.\". \"; \n }\n \n //tamaño permitido\n if ($_FILES[$name][\"size\"] > $size) {\n $valid = false;\n $msg.=\"Operacion fallida, este archivo no puede ser mayor a \".($size/100000).\"MB. \"; \n } \n \n \n if($msg!=\"\"){\n// $msg = \"Debe darse un valor al campo: \".$msg ;\n utilities::alert($msg); \n }\n \n \n \n return ($valid); \n }", "public function file_check($str){\n \t$allowed_mime_type_arr = array('application/pdf');\n \tif(isset($_FILES['file']['name']) && $_FILES['file']['name']!=\"\"){\n \t\t$mime = get_mime_by_extension($_FILES['file']['name']);\n \t\tif(in_array($mime, $allowed_mime_type_arr)){\n \t\t\treturn true;\n \t\t}else{\n \t\t\t$this->form_validation->set_message('file_check', 'Extension File Hanya Boleh PDF');\n \t\t\treturn false;\n \t\t}\n \t}else{\n \t\t// $this->form_validation->set_message('file_check', 'Silahkan Pilih File PDF nya.');\n \t\t// return false;\n \t\treturn true;\n \t}\n }", "function oa_export_blueprint_import_form_validate($form, &$form_state) {\n if (!$_FILES['files']['name']['file']) {\n drupal_set_message(t('Please upload a file to import.'), 'error');\n form_set_error('', NULL);\n }\n}" ]
[ "0.84827316", "0.78676766", "0.7772631", "0.7655765", "0.75868315", "0.7424297", "0.73151714", "0.7312731", "0.72873", "0.72188663", "0.7209874", "0.7204869", "0.71957964", "0.7190982", "0.71563894", "0.7136154", "0.713357", "0.7100517", "0.7090529", "0.7082756", "0.7079601", "0.7076486", "0.7071823", "0.70169055", "0.7008472", "0.70066845", "0.6999718", "0.69866604", "0.69737", "0.69457066", "0.69372654", "0.69261825", "0.69218266", "0.6904164", "0.68949354", "0.6889429", "0.6868671", "0.68565655", "0.6856137", "0.68494856", "0.68132746", "0.6808292", "0.67935747", "0.6788346", "0.6787504", "0.6782592", "0.67639774", "0.6758223", "0.6758018", "0.6753747", "0.6737163", "0.6737014", "0.67367977", "0.6733872", "0.67260426", "0.67119086", "0.6706987", "0.6697133", "0.66914433", "0.6683336", "0.6677266", "0.6677045", "0.6673059", "0.66673684", "0.666106", "0.665658", "0.6652704", "0.66477704", "0.664214", "0.66398716", "0.66249174", "0.6624127", "0.66200584", "0.66153544", "0.6614544", "0.65877265", "0.6570298", "0.6569684", "0.65584594", "0.65526694", "0.65457606", "0.65438265", "0.65355796", "0.65334547", "0.6532973", "0.6530028", "0.6516228", "0.65044314", "0.65010923", "0.6499499", "0.6497137", "0.64941955", "0.6485927", "0.6483302", "0.6477028", "0.64769584", "0.64636904", "0.64590776", "0.6458499", "0.645608" ]
0.72108823
10
set file content instance variable
protected function _setFile() { $this->_moveToImageDir(); if (!$this->_validateMimeType()) { unlink($this->getFilePath()); // delete file throw new Exception('Not Allowed MIME Type File ERROR!'); } $this->_file = file_get_contents($this->getFilePath()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function setContentFromFile($file);", "public function setFile($file) {}", "abstract public function getContent($file);", "function readFile(){\n $this->setHeaders();\n $this->readContent();\n\n }", "public static function setFile($file) {}", "private function setContentsFromFile()\n {\n $this->file->typeChecker()->assertMarkdown();\n $this->contents = $this->file->contents();\n }", "protected function setContent() {}", "public function setFile($file){\n $this->file = $file;\n }", "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 setFileContent($value)\n {\n return $this->set('FileContent', $value);\n }", "public function setFileContent($value)\n {\n return $this->set('FileContent', $value);\n }", "public function setFileContent($value)\n {\n return $this->set('FileContent', $value);\n }", "public function getContent(){\n\t\treturn $this->content? $this->content:$this->content = file_get_contents($this->getFullName());\n\t}", "private function fileContent($path)\n\t{\n\t\tif ( !file_exists($path))\n\t\t{\n\t\t\tUtils_Configuration_XMLLoaderOpenFileException(\n\t\t\t\t'Nie ma pliku ' . $path);\n\t\t}\n\n\t\t$this->sXML = file_get_contents($path);\n\n\t\tif (false === $this->sXML)\n\t\t{\n\t\t\tUtils_Configuration_XMLLoaderOpenFileException(\n\t\t\t\t'Nie udalo sie odczytac zawartosci pliku ' . $path);\n\t\t}\n\t}", "public function getContent()\n\t{\n\t\tinclude_once(ISC_BASE_PATH.'/lib/class.file.php');\n\t\t$fc = new FileClass();\n\t\t$filePath = $this->filePath;\n\t\t$content = $fc->readFromFile($filePath);\n\t\tif ($content === false) {\n\t\t\t// Init new file with default content.\n\t\t\t$content = $this->defaultContent;\n\t\t\t$res = $fc->writeToFile($content, $filePath);\n\t\t}\n\n\t\treturn $content;\n\t}", "public function setFileContents($value)\n {\n return $this->set('FileContents', $value);\n }", "public function setFileContents($value)\n {\n return $this->set('FileContents', $value);\n }", "public function setFileContents($value)\n {\n return $this->set('FileContents', $value);\n }", "public function setFileContents($value)\n {\n return $this->set('FileContents', $value);\n }", "public function setDataFileFromContentRaw($contentRaw)\n {\n $this->dataFile = FileReference::fromContentRaw($contentRaw);\n }", "function add_to_file_contents($content) {\n\t\t$this->contents .= $content;\n\t}", "public function setFile($data)\n {\n $this->_File=$data;\n return $this;\n }", "function XMLsetContent($data) {\n $this->contentBuffer = $data;\n $this->currentFile = '';\n }", "public function setContentFromString(string $content): RegularFileInterface;", "public function set($filepath, $data);", "public function setDataFileFromContentRaw($contentRaw)\n {\n $tempFilePath = parent::createTempFile();\n file_put_contents($tempFilePath, $contentRaw);\n $this->dataFilePath = $tempFilePath;\n }", "public function setFile($file)\n {\n $this->file = $file;\n }", "public function setContent($content) {\n\t\t$this->buffer['content'] = $content;\n\t}", "function file($file)\n\t{\n\t return $this->set('', $file, TRUE);\n\t}", "public function read_file() {\t\t\r\n\t\t$file = $this->filepath;\r\n\t\t\r\n\t\tif(file_exists($file)) {\r\n\t\t\t$this->_content = file_get_contents($file);\t\r\n\t\t} \r\n\t}", "public function setFile($v)\r\n\t{\r\n\t\t$this->_file = $v;\r\n\t}", "public function setFile($file)\r\n {\r\n $this->file = $file;\r\n }", "public function getFileContent()\n {\n return $this->get('FileContent');\n }", "public function setFile($file)\n {\n $this->file = $file;\n $this->load();\n }", "public function setContent()\n {\n }", "public function setFile(HttpFile $file)\r\n {\r\n $this->file = $file;\r\n $this->mime = $file->getMimeType();\r\n $this->date = new \\DateTime('NOW');\r\n }", "public function setContent($content) {\n $this->request->setContent($content);\n if(is_file($content)) {\n $this->request->setIsContentString(false);\n }\n else {\n $this->request->setIsContentString(true);\n }\n \n return $this;\n }", "public function setContent(ContentInterface $content): RegularFileInterface;", "public function set_file($file) {\n $this->file = $file;\n return $this;\n }", "public function get_contents($file)\n {\n }", "function setFileRef($filePath) {\n\t\t$this->filePath = $filePath;\n\t\t$this->fileContent = tsLib_CObj::fileResource($filePath);\n\t}", "public function get_contents($file)\n {\n }", "public function get_contents($file)\n {\n }", "public function get_contents($file)\n {\n }", "public function get_contents($file)\n {\n }", "protected function getPageFile()\n\t{\n\t\t// empty the html property (although it's probably empty anyway if we're here)\n\t\t$this->html = '';\n\n\t\t// get the data\n\t\t$this->html = file_get_contents($this->url);\n\t}", "public function getContentObject(): FileContent\n {\n return $this->content;\n }", "public function setContent($content){\n $this->_content = $content;\n }", "public function setDataFileContent($contentRaw)\n {\n $this->setDataFileFromContentRaw($contentRaw);\n }", "public function setFile($file) {\t\t\n\t\t// set file\n\t\t$this->file = $file;\n\t\t\n\t\t// set extension\n\t\t$file_parts = explode('.', $this->file['name']);\n\t\t$this->extension = strtolower(end($file_parts));\n\n\t}", "public function setFileContent($fileContent)\n {\n $this->fileContent = $fileContent;\n\n return $this;\n }", "public function getFile() {}", "public function getFile() {}", "protected static function file()\n {\n }", "abstract function setContent();", "public function content_for_upload();", "public function open()\n {\n $loaded = @file_get_contents($this->getFilepath());\n\n $this->_contents = $loaded ? : '';\n\n return $this;\n }", "protected function load()\n {\n if ($this->contentLoaded) {\n return;\n }\n\n $content = file_get_contents($this->path);\n\n if (!$content) {\n $this->contentLoaded = true;\n return;\n }\n\n preg_match_all('/\\@([a-z]+)\\s([^\\r\\n\\@]+)/i', $content, $matches, PREG_SET_ORDER);\n\n foreach ($matches as $match) {\n $fullMatch = $match[0];\n $variable = $match[1];\n $value = $match[2];\n\n $content = str_replace($fullMatch, '', $content);\n $this->metadata[$variable] = $value;\n }\n\n $this->content = trim($content, \"\\r\\n\");\n $this->contentLoaded = true;\n }", "function StoreToCache($content)\n {\n File::CreateWithText($this->file, $content);\n }", "public function setContent( string $content );", "public static function setDataFile($file)\n {\n static::$dataFile = $file;\n }", "public function content($content = false)\n {\n if ($content === false) {\n return $this->adapter->fileGetContents($this->path);\n }\n\n $this->adapter->filePutContents($this->path, $content);\n return $this;\n }", "function getFile(): object {\n return $this->file;\n }", "public function setFile(File $file)\n\t{\n\t\t$this->file=$file; \n\t\t$this->keyModified['file'] = 1; \n\n\t}", "public function getContent() {\n\t\treturn $this->storage->file_get_contents($this->path);\n\t}", "public function load()\n\t\t{\n\t\t\tif ($this->exists()) {\n\t\t\t\t$this->content = self::read($this->get_path());\n\t\t\t\t$this->is_cached = true;\n\t\t\t\treturn $this;\n\t\t\t} else throw new \\System\\Error\\File('Cannot read file. It does not exists on the filesystem.');\n\t\t}", "public function reload() {\r\n if ($this->pathname) {\r\n $this->contents = file_get_contents($this->pathname);\r\n }\r\n }", "public function get_content() {\n // Check if no content is yet loaded\n if (empty($this->content)) {\n $this->content = @file_get_contents($this->name);\n }\n\n return $this->content;\n }", "final public function getFile($file) {\n $this->template = file_get_contents('app/'.$file);\n }", "public function open(): void\n {\n $this->content->seek(0, SEEK_SET);\n $this->lastAccessed = time();\n }", "public function setContents($contents) {\n $this->_contents = $contents;\n }", "public function file_put_contents($file, $content);", "public function getContent()\n {\n return file_get_contents($this->fullPath);\n }", "function open($src)\r\n {\r\n $this->source = $src;\r\n \r\n if(empty($this->source))\r\n {\r\n $this->error = \"Source file not specified\";\r\n return;\r\n }\r\n \r\n if($lines = @file($this->source))\r\n {\r\n $this->content = implode(\"\",$lines);\r\n $this->lines = $lines;\r\n }\r\n else\r\n {\r\n //failure\r\n $this->error = \"Could not read file\";\r\n return;\r\n }\r\n }", "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);", "public function setDataFileFromPath($path)\n {\n $this->dataFile = FileReference::fromFile($path);\n }", "public function set_file( $file ) {\n\t\t$this->file = $file;\n\t\treturn $this;\n\t}", "function get_file()\n\t{\n\t\treturn $this->file;\n\t}", "public function setContent($content){\n $this->_content = $this->checkFormat($content);\n }", "function _get() {\n if( file_exists($this->_template) ) {\n $this->_text = file($this->_template);\n }\n else {\n $this->_text = array(\"Template file {$this->_template} could not be found.\");\n }\n }", "public function putContent($data) {\n\t\t$this->storage->file_put_contents($this->path, $data);\n\t}", "public function getFile ();", "public function file() { return $this->input_file; }", "public function openFile() {\n $this->file = fopen($this->_dir . $this->_filename,\"r\");\n }", "public function getAttachFileContent() {\n return $this->file_content;\n }", "private function loadFile()\n\t{\n\t\tif( empty($this->content) ) {\n\t\t\tif( empty($this->file) ) {\n\t\t\t\tthrow new Exception('Which file should I parse, you ...!');\n\t\t\t} else {\n\t\t\t\tif( strtolower( $this->file->getExtension() ) == 'zip' ) {\n\t\t\t\t\t$this->content = $this->handleZipFile( $this->file );\n\t\t\t\t} else {\n\t\t\t\t\t$this->content = $this->file->getContents();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function setFile($value)\n {\n return $this->set('File', $value);\n }", "protected function getFileContents() {\n $path = $this->getFilePath();\n return file_get_contents($path);\n }", "public function setTemplate($file);", "public function setContent($content)\r\n {\r\n $this->_content = $content;\r\n }", "public function setContent ($content) {\r\n\t\t$this->content = (string)$content;\r\n\t}" ]
[ "0.826248", "0.7169582", "0.70859504", "0.7058194", "0.697367", "0.6829309", "0.6731941", "0.6660945", "0.66163015", "0.6605668", "0.6605668", "0.6605668", "0.66014045", "0.6586884", "0.6582516", "0.6570423", "0.6570423", "0.6570423", "0.65679324", "0.6561804", "0.6526309", "0.6505712", "0.6503049", "0.6489337", "0.6477986", "0.64665467", "0.6445113", "0.64380383", "0.6433715", "0.64197016", "0.64110327", "0.6396433", "0.6395449", "0.636504", "0.63486254", "0.6317627", "0.63120884", "0.6300858", "0.62805927", "0.6279371", "0.6276474", "0.6275779", "0.6275779", "0.6275052", "0.6275052", "0.6266365", "0.6251883", "0.6224461", "0.62155575", "0.61950195", "0.6189151", "0.61562383", "0.61550725", "0.6154156", "0.61186266", "0.6114342", "0.6113055", "0.61045665", "0.60808265", "0.60805905", "0.60646915", "0.6039362", "0.6035199", "0.6029947", "0.6024667", "0.6019092", "0.6017625", "0.6012809", "0.5988308", "0.59857464", "0.598544", "0.59803545", "0.5963709", "0.5953052", "0.5938007", "0.5938007", "0.5938007", "0.5938007", "0.5938007", "0.5938007", "0.5938007", "0.5938007", "0.5938007", "0.5938007", "0.59208524", "0.59180754", "0.5916005", "0.59106326", "0.59075725", "0.5907184", "0.59018135", "0.59006685", "0.5896852", "0.5893151", "0.58888006", "0.5888589", "0.5886659", "0.5874842", "0.5874699", "0.58679086" ]
0.63001597
38
validate uploaded file's mime type
protected function _validateMimeType() { $this->_fileType = \MimeType\MimeType::getType($this->getFilePath()); if (!in_array($this->_fileType, $this->_allowedMimeType)) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function mimeTypeValid()\n\t{\n\t\tif (!in_array($this->files['type'], $this->mime_types)) {\n\t\t\tthrow new Exception(\"Invalid file Extension\",6);\n\t\t}\n\t}", "private function checkMimeType()\n {\n $allowedTypes = $this->getSetting('allowed_upload_types', true);\n if (is_string($allowedTypes) && strlen($allowedTypes)) {\n $allowedTypes = str_replace(' ', '', $allowedTypes);\n $allowedTypes = explode(',', $allowedTypes);\n }\n if (is_array($allowedTypes)) {\n if (!in_array($this->file->getMimeType(), $allowedTypes)) {\n throw new FileException('File type is not allowed');\n }\n }\n }", "function validateMimeType($file_name){\r\n // array of acceptable MIME types\r\n $mime_types = [\r\n 'image/png',\r\n 'image/jpeg'\r\n ];\r\n \r\n // determines MIME type\r\n $type = mime_content_type($file_name);\r\n \r\n // check if MIME type is in array of acceptable types\r\n return in_array($type, $mime_types, true);\r\n}", "public function checkMimeType()\n {\n if (empty($this->mediaRealType) && empty($this->allowUnknownTypes)) {\n $this->setErrors(\\XoopsLocale::E_FILE_TYPE_REJECTED);\n return false;\n }\n\n if ((!empty($this->allowedMimeTypes)\n && !in_array($this->mediaRealType, $this->allowedMimeTypes))\n || (!empty($this->deniedMimeTypes)\n && in_array($this->mediaRealType, $this->deniedMimeTypes))\n ) {\n $this->setErrors(sprintf(\\XoopsLocale::EF_FILE_MIME_TYPE_NOT_ALLOWED, $this->mediaType));\n return false;\n }\n return true;\n }", "function validateFileMime(&$model, $fieldData, $fieldName, $allowedMimes = array()) {\n if (empty($fieldData[$fieldName]['tmp_name'])) return true;\n \n $availableMimes = assetMimes();\n \n foreach (!empty($allowedMimes) ? $allowedMimes : array() as $type) {\n if ($type == '*') return true;\n \n # check fileinfo first\n $fileinfo = assetMimeType($fieldData[$fieldName]['tmp_name']);\n if ((!$fileinfo) && (in_array($fileinfo, $availableMimes[$type]))) return true; \n \n # check browser provided mime-type second\n if (in_array($fieldData[$fieldName]['type'], $availableMimes[$type])) return true;\n }\n \n return false;\n }", "function check_upload_mimes($mimes)\n {\n }", "function validateTypeOfFile($type){\n\t$arrFile = ['image/png', 'image/jpg', 'image/jpeg', 'image/gif'];\n\tif(in_array($type, $arrFile)){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "function check_upload($file) {\n if (preg_match(\":^application/vnd.bdoc-:\", $file[\"type\"])) {\n $file[\"format\"] = \"bdoc\";\n } else if ($file[\"type\"] === \"application/x-ddoc\") {\n $file[\"format\"] = \"ddoc\";\n } else {\n return FALSE;\n }\n\n return is_uploaded_file($file[\"tmp_name\"]);\n}", "protected function validateMimetype($mime) {\n if (preg_match('#^[-\\w]+/[-\\w\\.+]+$#', $mime)) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }", "public function isAllowedMIMEType()\n {\n if (!empty($this->allowed_upload_mime_type)) {\n if (!is_array($this->allowed_upload_mime_type)) {\n NUCLEUS_Exceptions::catcher(MIME_TYPE_LIST_ERROR);\n return false;\n }\n else {\n if (!in_array($this->_file_info['type'], $this->allowed_upload_mime_type)) {\n NUCLEUS_Exceptions::catcher(UPLOAD_MIME_TYPE_DENIED);\n return false;\n }\n }\n }\n\n return true;\n }", "public abstract function isMime();", "function validateFile($file){\n\n $check = getimagesize($file[\"tmp_name\"]);\n if($check !== false) {\n $err = \"File is an image - \" . $check[\"mime\"] . \".\";\n $uploadOk = 1;\n } else {\n $err = \"File is not an image.\";\n $uploadOk = 0;\n }\n// Allow certain file formats\nif($file[\"type\"] != \"jpg\" && $file[\"type\"] != \"png\" && $file[\"type\"] != \"jpeg\"\n&& $file[\"type\"] != \"gif\" ) {\n $err = \"Sorry, only JPG, JPEG, PNG & GIF files are allowed.\";\n $uploadOk = 0;\n}\n return ($uploadOk==1)? true : false;\n}", "function check_file_type($source)\n{\n $file_info = check_mime_type($source);\n\n switch ($file_info) {\n case 'application/pdf':\n return true;\n break;\n\n case 'application/msword':\n return true;\n break;\n\n case 'application/rtf':\n return true;\n break;\n case 'application/vnd.ms-excel':\n return true;\n break;\n\n case 'application/vnd.ms-powerpoint':\n return true;\n break;\n\n case 'application/vnd.oasis.opendocument.text':\n return true;\n break;\n\n case 'application/vnd.oasis.opendocument.spreadsheet':\n return true;\n break;\n \n case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':\n return true;\n break;\n\n case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':\n return true;\n break;\n \n case 'image/gif':\n return true;\n break;\n\n case 'image/jpeg':\n return true;\n break;\n\n case 'image/png':\n return true;\n break;\n\n case 'image/wbmp':\n return true;\n break;\n\n default:\n return false;\n break;\n }\n}", "public static function supports_mime_type($mime_type)\n {\n }", "public static function supports_mime_type($mime_type)\n {\n }", "public static function supports_mime_type($mime_type)\n {\n }", "function wp_check_filetype($filename, $mimes = null) {\n\t$mimes = is_array($mimes) ? $mimes : apply_filters('upload_mimes', array(\n\t\t'jpg|jpeg|jpe' => 'image/jpeg',\n\t\t'gif' => 'image/gif',\n\t\t'png' => 'image/png',\n\t\t'bmp' => 'image/bmp',\n\t\t'tif|tiff' => 'image/tiff',\n\t\t'ico' => 'image/x-icon',\n\t\t'asf|asx|wax|wmv|wmx' => 'video/asf',\n\t\t'avi' => 'video/avi',\n\t\t'mov|qt' => 'video/quicktime',\n\t\t'mpeg|mpg|mpe' => 'video/mpeg',\n\t\t'txt|c|cc|h' => 'text/plain',\n\t\t'rtx' => 'text/richtext',\n\t\t'css' => 'text/css',\n\t\t'htm|html' => 'text/html',\n\t\t'php|php3|' => 'application/php',\n\t\t'mp3|mp4' => 'audio/mpeg',\n\t\t'ra|ram' => 'audio/x-realaudio',\n\t\t'wav' => 'audio/wav',\n\t\t'ogg' => 'audio/ogg',\n\t\t'mid|midi' => 'audio/midi',\n\t\t'wma' => 'audio/wma',\n\t\t'rtf' => 'application/rtf',\n\t\t'js' => 'application/javascript',\n\t\t'pdf' => 'application/pdf',\n\t\t'doc' => 'application/msword',\n\t\t'pot|pps|ppt' => 'application/vnd.ms-powerpoint',\n\t\t'wri' => 'application/vnd.ms-write',\n\t\t'xla|xls|xlt|xlw' => 'application/vnd.ms-excel',\n\t\t'mdb' => 'application/vnd.ms-access',\n\t\t'mpp' => 'application/vnd.ms-project',\n\t\t'swf' => 'application/x-shockwave-flash',\n\t\t'class' => 'application/java',\n\t\t'tar' => 'application/x-tar',\n\t\t'zip' => 'application/zip',\n\t\t'gz|gzip' => 'application/x-gzip',\n\t\t'exe' => 'application/x-msdownload',\n\t\t// openoffice formats\n\t\t'odt' => 'application/vnd.oasis.opendocument.text',\n\t\t'odp' => 'application/vnd.oasis.opendocument.presentation',\n\t\t'ods' => 'application/vnd.oasis.opendocument.spreadsheet',\n\t\t'odg' => 'application/vnd.oasis.opendocument.graphics',\n\t\t'odc' => 'application/vnd.oasis.opendocument.chart',\n\t\t'odb' => 'application/vnd.oasis.opendocument.database',\n\t\t'odf' => 'application/vnd.oasis.opendocument.formula',\n\n\t));\n\n\t$type = false;\n\t$ext = false;\n\n\tforeach ($mimes as $ext_preg => $mime_match) {\n\t\t$ext_preg = '!\\.(' . $ext_preg . ')$!i';\n\t\tif (preg_match($ext_preg, $filename, $ext_matches)) {\n\t\t\t$type = $mime_match;\n\t\t\t$ext = $ext_matches[1];\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn compact('ext', 'type');\n}", "public function checkFileType($fileType){\n \t\tif ($fileType == \"application/octet-stream\"){\n \t\t\treturn true;\n \t\t}else{\n \t\t\treturn false;\n \t\t}\n \t}", "function sanitize_mime_type($mime_type)\n {\n }", "function checkMimeType($params = array(), $options = array()) {\n\t\tif ($this->isUploadedFile($params)) {\n\t\t\t// Only validate mime type if a file was uploaded at all\n\t\t\t$val = array_shift($params);\n\t\t\tforeach ($options['allowed_mime_types'] as $extensions) {\n\t\t\t\tif ((!is_array($extensions) && $extensions == '*') ||\n\t\t\t\t\t(is_array($extensions) && in_array($val['type'], $extensions))) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "function fileChecker($nome_file){\n \n // controllo che sia stato inviato un file altrimenti restituisco false\n if(empty($_FILES['file'])){\n return false;\n }\n \n // memorizzo l'estensione\n $ext = trim(strtolower(end($nome_file)));\n \n // verifico che sia stato inviato un file contente un foto i formati disponibili sono jpg png jpeg\n if(!preg_match(VALID_FILE_FORMAT, $ext)){\n return false;\n }\n \n return true;\n}", "private function checkUploadFileMIME($file)\n {\n $flag = 0;\n $file_array = explode(\".\", $file [\"name\"]);\n $file_extension = strtolower(array_pop($file_array));\n\n // 2.through the binary content to detect the file\n switch ($file_extension) {\n case \"xls\" :\n // 2003 excel\n $fh = fopen($file [\"tmp_name\"], \"rb\");\n $bin = fread($fh, 8);\n fclose($fh);\n $strinfo = @unpack(\"C8chars\", $bin);\n $typecode = \"\";\n foreach ($strinfo as $num) {\n $typecode .= dechex($num);\n }\n if ($typecode == \"d0cf11e0a1b11ae1\") {\n $flag = 1;\n }\n break;\n case \"xlsx\" :\n // 2007 excel\n $fh = fopen($file [\"tmp_name\"], \"rb\");\n $bin = fread($fh, 4);\n fclose($fh);\n $strinfo = @unpack(\"C4chars\", $bin);\n $typecode = \"\";\n foreach ($strinfo as $num) {\n $typecode .= dechex($num);\n }\n echo $typecode . 'test';\n if ($typecode == \"504b34\") {\n $flag = 1;\n }\n break;\n }\n // 3.return the flag\n return $flag;\n }", "private function checkSourceMimeType()\n {\n $fileMimeType = $this->getMimeTypeOfSource();\n if (is_null($fileMimeType)) {\n throw new InvalidImageTypeException('Image type could not be detected');\n } elseif ($fileMimeType === false) {\n throw new InvalidImageTypeException('File seems not to be an image.');\n } elseif (!in_array($fileMimeType, self::$allowedMimeTypes)) {\n throw new InvalidImageTypeException('Unsupported mime type: ' . $fileMimeType);\n }\n }", "function check_file_is_audio( $tmp ) \n{\n $allowed = array(\n 'audio/mpeg', 'audio/x-mpeg', 'audio/mpeg3', 'audio/x-mpeg-3', 'audio/aiff', \n 'audio/mid', 'audio/x-aiff', 'audio/x-mpequrl','audio/midi', 'audio/x-mid', \n 'audio/x-midi','audio/wav','audio/x-wav','audio/xm','audio/x-aac','audio/basic',\n 'audio/flac','audio/mp4','audio/x-matroska','audio/ogg','audio/s3m','audio/x-ms-wax',\n 'audio/xm'\n );\n \n // check REAL MIME type\n $finfo = finfo_open(FILEINFO_MIME_TYPE);\n $type = finfo_file($finfo, $tmp );\n finfo_close($finfo);\n \n // check to see if REAL MIME type is inside $allowed array\n if( in_array($type, $allowed) ) {\n return $type;\n } else {\n return false;\n }\n}", "public function testIgnoreCheckMimeType() {\n // the check can be disabled\n $up2 = new upload();\n $up2->setIgnoreMimeCheck(true);\n $this->assertTrue($up2->checkMimeType());\n }", "public function getMimetype();", "public function mime($filePath);", "function check_mime_type($source)\n{\n $mime_types = array(\n // images\n 'png' => 'image/png',\n 'jpe' => 'image/jpeg',\n 'jpeg' => 'image/jpeg',\n 'jpg' => 'image/jpeg',\n 'gif' => 'image/gif',\n 'bmp' => 'image/bmp',\n 'ico' => 'image/vnd.microsoft.icon',\n 'tiff' => 'image/tiff',\n 'tif' => 'image/tiff',\n 'svg' => 'image/svg+xml',\n 'svgz' => 'image/svg+xml',\n // adobe\n 'pdf' => 'application/pdf',\n // ms office\n 'doc' => 'application/msword',\n 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'rtf' => 'application/rtf',\n 'xls' => 'application/vnd.ms-excel',\n 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'ppt' => 'application/vnd.ms-powerpoint',\n // open office\n 'odt' => 'application/vnd.oasis.opendocument.text',\n 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',\n );\n $arrext = explode('.', $source['name']);\n $jml = count($arrext) - 1;\n $ext = $arrext[$jml];\n $ext = strtolower($ext);\n //$ext = strtolower(array_pop(explode(\".\", $source['name'])));\n if (array_key_exists($ext, $mime_types)) {\n return $mime_types[$ext];\n } elseif (function_exists('finfo_open')) {\n $finfo = finfo_open(FILEINFO_MIME);\n $mimetype = finfo_file($finfo, $source['tmp_name']);\n finfo_close($finfo);\n return $mimetype;\n } else {\n return false;\n }\n}", "function mimetype($filedata) {\r\n\t\t$filepath = $filedata['tmp_name'];\r\n\t\t// Check only existing files\r\n\t\tif (!file_exists($filepath) || !is_readable($filepath)) return false;\r\n\r\n\t\t// Trying to run file from the filesystem\r\n\t\tif (function_exists('exec')) {\r\n\t\t\t$mimeType = exec(\"/usr/bin/file -i -b $filepath\");\r\n\t\t\tif (!empty($mimeType)) return $mimeType;\r\n\t\t}\r\n\r\n\t\t// Trying to get mimetype from images\r\n\t\t$imageData = @getimagesize($filepath);\r\n\t\tif (!empty($imageData['mime'])) {\r\n\t\t\treturn $imageData['mime'];\r\n\t\t}\r\n\r\n\t\t// Reverting to guessing the mimetype from a known list\r\n\t\t // Thanks to MilesJ Uploader plugin : http://milesj.me/resources/logs/uploader-plugin\r\n\t\tstatic $mimeTypes = array(\r\n\t\t\t// Images\r\n\t\t\t'bmp'\t=> 'image/bmp',\r\n\t\t\t'gif'\t=> 'image/gif',\r\n\t\t\t'jpe'\t=> 'image/jpeg',\r\n\t\t\t'jpg'\t=> 'image/jpeg',\r\n\t\t\t'jpeg'\t=> 'image/jpeg',\r\n\t\t\t'pjpeg'\t=> 'image/pjpeg',\r\n\t\t\t'svg'\t=> 'image/svg+xml',\r\n\t\t\t'svgz'\t=> 'image/svg+xml',\r\n\t\t\t'tif'\t=> 'image/tiff',\r\n\t\t\t'tiff'\t=> 'image/tiff',\r\n\t\t\t'ico'\t=> 'image/vnd.microsoft.icon',\r\n\t\t\t'png'\t=> 'image/png',\r\n\t\t\t'xpng'\t=> 'image/x-png',\r\n\t\t\t// Text\r\n\t\t\t'txt' \t=> 'text/plain',\r\n\t\t\t'asc' \t=> 'text/plain',\r\n\t\t\t'css' \t=> 'text/css',\r\n\t\t\t'csv'\t=> 'text/csv',\r\n\t\t\t'htm' \t=> 'text/html',\r\n\t\t\t'html' \t=> 'text/html',\r\n\t\t\t'stm' \t=> 'text/html',\r\n\t\t\t'rtf' \t=> 'text/rtf',\r\n\t\t\t'rtx' \t=> 'text/richtext',\r\n\t\t\t'sgm' \t=> 'text/sgml',\r\n\t\t\t'sgml' \t=> 'text/sgml',\r\n\t\t\t'tsv' \t=> 'text/tab-separated-values',\r\n\t\t\t'tpl' \t=> 'text/template',\r\n\t\t\t'xml' \t=> 'text/xml',\r\n\t\t\t'js'\t=> 'text/javascript',\r\n\t\t\t'xhtml'\t=> 'application/xhtml+xml',\r\n\t\t\t'xht'\t=> 'application/xhtml+xml',\r\n\t\t\t'json'\t=> 'application/json',\r\n\t\t\t// Archive\r\n\t\t\t'gz'\t=> 'application/x-gzip',\r\n\t\t\t'gtar'\t=> 'application/x-gtar',\r\n\t\t\t'z'\t\t=> 'application/x-compress',\r\n\t\t\t'tgz'\t=> 'application/x-compressed',\r\n\t\t\t'zip'\t=> 'application/zip',\r\n\t\t\t'rar'\t=> 'application/x-rar-compressed',\r\n\t\t\t'rev'\t=> 'application/x-rar-compressed',\r\n\t\t\t'tar'\t=> 'application/x-tar',\r\n\t\t\t// Audio\r\n\t\t\t'aif' \t=> 'audio/x-aiff',\r\n\t\t\t'aifc' \t=> 'audio/x-aiff',\r\n\t\t\t'aiff' \t=> 'audio/x-aiff',\r\n\t\t\t'au' \t=> 'audio/basic',\r\n\t\t\t'kar' \t=> 'audio/midi',\r\n\t\t\t'mid' \t=> 'audio/midi',\r\n\t\t\t'midi' \t=> 'audio/midi',\r\n\t\t\t'mp2' \t=> 'audio/mpeg',\r\n\t\t\t'mp3' \t=> 'audio/mpeg',\r\n\t\t\t'mpga' \t=> 'audio/mpeg',\r\n\t\t\t'ra' \t=> 'audio/x-realaudio',\r\n\t\t\t'ram' \t=> 'audio/x-pn-realaudio',\r\n\t\t\t'rm' \t=> 'audio/x-pn-realaudio',\r\n\t\t\t'rpm' \t=> 'audio/x-pn-realaudio-plugin',\r\n\t\t\t'snd' \t=> 'audio/basic',\r\n\t\t\t'tsi' \t=> 'audio/TSP-audio',\r\n\t\t\t'wav' \t=> 'audio/x-wav',\r\n\t\t\t'wma'\t=> 'audio/x-ms-wma',\r\n\t\t\t// Video\r\n\t\t\t'flv' \t=> 'video/x-flv',\r\n\t\t\t'fli' \t=> 'video/x-fli',\r\n\t\t\t'avi' \t=> 'video/x-msvideo',\r\n\t\t\t'qt' \t=> 'video/quicktime',\r\n\t\t\t'mov' \t=> 'video/quicktime',\r\n\t\t\t'movie' => 'video/x-sgi-movie',\r\n\t\t\t'mp2' \t=> 'video/mpeg',\r\n\t\t\t'mpa' \t=> 'video/mpeg',\r\n\t\t\t'mpv2' \t=> 'video/mpeg',\r\n\t\t\t'mpe' \t=> 'video/mpeg',\r\n\t\t\t'mpeg' \t=> 'video/mpeg',\r\n\t\t\t'mpg' \t=> 'video/mpeg',\r\n\t\t\t'mp4'\t=> 'video/mp4',\r\n\t\t\t'viv' \t=> 'video/vnd.vivo',\r\n\t\t\t'vivo' \t=> 'video/vnd.vivo',\r\n\t\t\t'wmv'\t=> 'video/x-ms-wmv',\r\n\t\t\t// Applications\r\n\t\t\t'js'\t=> 'application/x-javascript',\r\n\t\t\t'xlc' \t=> 'application/vnd.ms-excel',\r\n\t\t\t'xll' \t=> 'application/vnd.ms-excel',\r\n\t\t\t'xlm' \t=> 'application/vnd.ms-excel',\r\n\t\t\t'xls' \t=> 'application/vnd.ms-excel',\r\n\t\t\t'xlw' \t=> 'application/vnd.ms-excel',\r\n\t\t\t'doc'\t=> 'application/msword',\r\n\t\t\t'dot'\t=> 'application/msword',\r\n\t\t\t'pdf' \t=> 'application/pdf',\r\n\t\t\t'psd' \t=> 'image/vnd.adobe.photoshop',\r\n\t\t\t'ai' \t=> 'application/postscript',\r\n\t\t\t'eps' \t=> 'application/postscript',\r\n\t\t\t'ps' \t=> 'application/postscript'\r\n\t\t);\r\n\t\t$ext = $this->ext($filedata);\r\n\t\treturn array_key_exists($ext, $mimeTypes) ? $mimeTypes[$ext] : false;\r\n\t}", "function validateFile($fieldname)\n{\n $error = '';\n if (!empty($_FILES[$fieldname]['error'])) {\n switch ($_FILES[$fieldname]['error']) {\n case '1':\n $error = 'Upload maximum file is 4 MB.';\n break;\n case '2':\n $error = 'File is too big, please upload with smaller size.';\n break;\n case '3':\n $error = 'File uploaded, but only halef of file.';\n break;\n case '4':\n $error = 'There is no File to upload';\n break;\n case '6':\n $error = 'Temporary folder not exists, Please try again.';\n break;\n case '7':\n $error = 'Failed to record File into disk.';\n break;\n case '8':\n $error = 'Upload file has been stop by extension.';\n break;\n case '999':\n default:\n $error = 'No error code avaiable';\n }\n } elseif (empty($_FILES[$fieldname]['tmp_name']) || $_FILES[$fieldname]['tmp_name'] == 'none') {\n $error = 'There is no File to upload.';\n } elseif ($_FILES[$fieldname]['size'] > FILE_UPLOAD_MAX_SIZE) {\n $error = 'Upload maximum file is '.number_format(FILE_UPLOAD_MAX_SIZE/1024,2).' MB.';\n } else {\n //$get_ext = substr($_FILES[$fieldname]['name'],strlen($_FILES[$fieldname]['name'])-3,3);\t\n $cekfileformat = check_file_type($_FILES[$fieldname]);\n if (!$cekfileformat) {\n $error = 'Upload File only allow (jpg, gif, png, pdf, doc, xls, xlsx, docx)';\n }\n }\n\n return $error;\n}", "public function isMimeSupported($mimeType = '*');", "function checkType($type){\n\n $allowed = array('jpg', 'jpeg', 'png');\n $fileExt = explode('/', $type);\n $fileExt = strtolower(end($fileExt));\n return in_array($fileExt, $allowed) ? true : false ;\n\n }", "private function checkSupportedFile($file_type) {\n return true;\n\n\n }", "public function file_check($str)\n {\n\n\n\n echo \"sadasd : \";\n print_r($str);\n print_r($_FILES);\n\n die();\n\n $allowed_mime_type_arr = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/png', 'image/x-png', 'svg');\n $mime = get_mime_by_extension($_FILES['file']['name']);\n if (isset($_FILES['file']['name']) && $_FILES['file']['name'] != \"\") {\n if (in_array($mime, $allowed_mime_type_arr)) {\n return true;\n } else {\n $this->form_validation->set_message('file_check', 'por favor selecciona solamente gif/jpg/png file.');\n return false;\n }\n } else {\n $this->form_validation->set_message('file_check', 'Selecciona un archivo.');\n return false;\n }\n }", "public function rules()\n {\n return [\n 'file' => 'required|mimes:jpg,jpeg,png,bmp'\n ];\n }", "public function isValid($file_key)\n\t{\n\t\treturn App_File_Utils::check_type($this->_type, $_FILES[$file_key]['tmp_name']);\n\t}", "public function checkMineType(array $file_data) {\n if (null != $this->_filterType) { //defined filter by Type\n $ext = explode(',', $this->_filterType);\n $mime = array();\n $mime = array();\n for ($i = 0; $i < sizeof($ext); ++$i) {\n $ext[$i] = strtolower(ltrim(trim($ext[$i]), '.'));\n $mime[$ext[$i]] = $this->_allowedMimeType[$ext[$i]];\n }\n } else {\n $mime = $this->_allowedMimeType;\n }\n $ext = $this->getExtension($file_data['name'], false);\n $expectMimeType = $this->getMimeTypeByExtension($ext, $mime);\n\n $fileMimeType = $this->_getUploadedFileMimeType($file_data);\n\n if (is_array($expectMimeType)) {\n if (!in_array($fileMimeType, $expectMimeType)) {\n $this->_error[] = 'Mime (' .$ext .'-' .$fileMimeType .') type does not allow';\n return false;\n }\n } elseif (is_string($expectMimeType)) {\n if ($expectMimeType != $fileMimeType) {\n $this->_error[] = 'Mime (' .$ext .'-' .$fileMimeType .') type does not allow';\n return false;\n }\n } elseif (false == $expectMimeType) {\n $this->_error[] = 'Mime (' .$ext .'-' .$fileMimeType .') type does not allow';\n return false;\n }\n\n return true;\n }", "function __checkType($type = null) {\n\t\t$valid = false;\n \tforeach($this->allowedTypes as $allowedType) {\n \t\tif(strtolower($type) == strtolower($allowedType)){\n \t\t$valid = true;\n \t\t}\n \t}\n\t\tif(!$valid) {\n\t\t\t$this->Session->setFlash('You tried to upload an invalid type! Please upload your pictures in jpeg, gif, or png format!');\n\t\t\t$this->redirect(Controller::referer('/'));\n\t\t}\n\t}", "public function isUploadedFile() {}", "public function testGetMimeType()\n {\n $validator = new File\\MimeType('image/gif');\n $this->assertEquals('image/gif', $validator->getMimeType());\n\n $validator = new File\\MimeType(['image/gif', 'video', 'text/test']);\n $this->assertEquals('image/gif,video,text/test', $validator->getMimeType());\n\n $validator = new File\\MimeType(['image/gif', 'video', 'text/test']);\n $this->assertEquals(['image/gif', 'video', 'text/test'], $validator->getMimeType(true));\n }", "public function testSetMimeType()\n {\n $validator = new File\\MimeType('image/gif');\n $validator->setMimeType('image/jpeg');\n $this->assertEquals('image/jpeg', $validator->getMimeType());\n $this->assertEquals(['image/jpeg'], $validator->getMimeType(true));\n\n $validator->setMimeType('image/gif, text/test');\n $this->assertEquals('image/gif,text/test', $validator->getMimeType());\n $this->assertEquals(['image/gif', 'text/test'], $validator->getMimeType(true));\n\n $validator->setMimeType(['video/mpeg', 'gif']);\n $this->assertEquals('video/mpeg,gif', $validator->getMimeType());\n $this->assertEquals(['video/mpeg', 'gif'], $validator->getMimeType(true));\n }", "public function checkIfValidMimeType($mimeType)\r\n {\r\n $acceptedMimeTypes = array(\r\n \"image/jpg\",\r\n \"image/jpeg\",\r\n \"image/png\",\r\n );\r\n\r\n if(in_array($mimeType, $acceptedMimeTypes)){\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "public function file_check($str){\n \t$allowed_mime_type_arr = array('application/pdf');\n \tif(isset($_FILES['file']['name']) && $_FILES['file']['name']!=\"\"){\n \t\t$mime = get_mime_by_extension($_FILES['file']['name']);\n \t\tif(in_array($mime, $allowed_mime_type_arr)){\n \t\t\treturn true;\n \t\t}else{\n \t\t\t$this->form_validation->set_message('file_check', 'Extension File Hanya Boleh PDF');\n \t\t\treturn false;\n \t\t}\n \t}else{\n \t\t// $this->form_validation->set_message('file_check', 'Silahkan Pilih File PDF nya.');\n \t\t// return false;\n \t\treturn true;\n \t}\n }", "public function checkImageType()\n {\n if (empty($this->checkImageType)) {\n return true;\n }\n\n if (('image' == substr($this->mediaType, 0, strpos($this->mediaType, '/')))\n || (!empty($this->mediaRealType)\n && 'image' == substr($this->mediaRealType, 0, strpos($this->mediaRealType, '/')))\n ) {\n if (!@getimagesize($this->mediaTmpName)) {\n $this->setErrors(\\XoopsLocale::E_INVALID_IMAGE_FILE);\n return false;\n }\n }\n return true;\n }", "public static function validate_mime_type($y_type) {\n\t//--\n\t$y_type = (string) strtolower(trim((string)$y_type));\n\t//--\n\tif((string)$y_type == '') {\n\t\treturn '';\n\t} //end if\n\t//--\n\tif(preg_match('/^[[:graph:]]+$/', $y_type)) { // mime types are only ISO-8859-1\n\t\t$type = $y_type;\n\t} else {\n\t\t$type = '';\n\t} //end if\n\t//--\n\treturn (string) $type;\n\t//--\n}", "function _mime_content_type($filename) {\n if (!file_exists($filename) || !is_readable($filename)) return false;\n if(class_exists('finfo')){\n $result = new finfo();\n if (is_resource($result) === true) {\n return $result->file($filename, FILEINFO_MIME_TYPE);\n }\n }\n \n // Trying finfo\n if (function_exists('finfo_open')) {\n $finfo = finfo_open(FILEINFO_MIME);\n $mimeType = finfo_file($finfo, $filename);\n finfo_close($finfo);\n // Mimetype can come in text/plain; charset=us-ascii form\n if (strpos($mimeType, ';')) list($mimeType,) = explode(';', $mimeType);\n return $mimeType;\n }\n \n // Trying mime_content_type\n if (function_exists('mime_content_type')) {\n return mime_content_type($filename);\n }\n \n\n // Trying to get mimetype from images\n $imageData = getimagesize($filename);\n if (!empty($imageData['mime'])) {\n return $imageData['mime'];\n }\n // Trying exec\n if (function_exists('exec')) {\n $mimeType = exec(\"/usr/bin/file -i -b $filename\");\n if(strpos($mimeType,';')){\n $mimeTypes = explode(';',$mimeType);\n return $mimeTypes[0];\n }\n if (!empty($mimeType)) return $mimeType;\n }\n return false;\n }", "function Photo_Uploaded_Mime_Type()\n{\n // On assume ici que la photo est valide\n\n $imageFileType = pathinfo(basename($_FILES['un_fichier']['name']), PATHINFO_EXTENSION);\n switch ($imageFileType) {\n case 'jpg':\n case 'JPG':\n return 'image/jpeg';\n\n case 'gif':\n case 'GIF':\n return 'image/gif';\n\n case 'png':\n case 'PNG':\n return 'image/png';\n }\n\n return 'ERROR';\n}", "abstract public function getMimeType();", "protected function validatePhoto(){\n\n $extension = $this->type;\n\n if( !empty($extension)){\n if($extension != 'image/jpeg' && $extension != 'image/png' && $extension != 'image/jpg'){\n $this->errors_on_upload[] = \"Your file should be .jpeg, .jpg or .png\";\n }\n }\n\n if($this->size > Config::MAX_FILE_SIZE){\n $this->errors_on_upload[] = \"Your picture shouldn't be more than 10 Mb\";\n }\n\n if($this->error != 0 && $this->error != 4) { //0 means no error, so if otherwise, display a respective message, 4 no files to upload, we allow that\n $this->errors_on_upload[] = $this->upload_errors_array[$this->error];\n }\n\n }", "function isKnownMimeType($filename, $filetype)\n\t{\n\t $filetype = MimeTypeHandler::filename2ObjType($format, $filename);\n\t if ($format == '') {\n\t return false;\n\t }\n\t else {\n\t return $format;\n\t }\n\t}", "public function test_mime_type( $file_name, $expect ) {\n\t\t$file_path = Path_Creator::create_file_path( $file_name );\n\t\t$result = $this->call_private_method( 'mime_type', array( $file_path ) );\n\t\t$this->assertEquals( $expect, $result );\n\t}", "function check_file_extension($ext, $allowed) {\nif (in_array($ext, $allowed)) {\nreturn true;\n}else {\necho \"Only .txt file allow to be uploaded\";\n}\n}", "public static function _mime_types($ext = '')\n {\n }", "public function testAddMimeType()\n {\n $validator = new File\\MimeType('image/gif');\n $validator->addMimeType('text');\n $this->assertEquals('image/gif,text', $validator->getMimeType());\n $this->assertEquals(['image/gif', 'text'], $validator->getMimeType(true));\n\n $validator->addMimeType('jpg, to');\n $this->assertEquals('image/gif,text,jpg,to', $validator->getMimeType());\n $this->assertEquals(['image/gif', 'text', 'jpg', 'to'], $validator->getMimeType(true));\n\n $validator->addMimeType(['zip', 'ti']);\n $this->assertEquals('image/gif,text,jpg,to,zip,ti', $validator->getMimeType());\n $this->assertEquals(['image/gif', 'text', 'jpg', 'to', 'zip', 'ti'], $validator->getMimeType(true));\n\n $validator->addMimeType('');\n $this->assertEquals('image/gif,text,jpg,to,zip,ti', $validator->getMimeType());\n $this->assertEquals(['image/gif', 'text', 'jpg', 'to', 'zip', 'ti'], $validator->getMimeType(true));\n }", "public function MimeType();", "public function getMimeType() {}", "public function getMimeType() {}", "public function getMimeType() {}", "public function getMimeType() {}", "public function file_check($str)\n {\n $allowed_mime_types = array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain');\n if (isset($_FILES['file']['name']) && $_FILES['file']['name'] != \"\") {\n $mime = get_mime_by_extension($_FILES['file']['name']);\n $fileAr = explode('.', $_FILES['file']['name']);\n $ext = end($fileAr);\n if (($ext == 'csv') && in_array($mime, $allowed_mime_types)) {\n return true;\n } else {\n $this->form_validation->set_message('file_check', 'Please select only CSV file to upload.');\n return false;\n }\n } else {\n $this->form_validation->set_message('file_check', 'Please select a CSV file to upload.');\n return false;\n }\n }", "public function getMimeType();", "public function getMimeType();", "public function getMimeType();", "public function getMimeType();", "public function getMimeType();", "function file_tester($file){\n if (htmlentities($file['filename']['type']) == 'text/plain')\n return true;\n else {\n echo \"Please submit correct file type (.txt)\";\n return false;\n }\n}", "public function guessContentType($magic_file, $magic_mode = null) {}", "public function isValidType( $ext=null ){\n global $VALID_FILES;\n if (!$ext)\n $ext = $this->ext; \n return (in_array( $ext, $VALID_FILES )); \n }", "function verifyMimeType( $pFile ) {\n\t\t$mime = NULL;\n\t\tif( file_exists( $pFile ) ) {\n\t\t\tif( function_exists( 'finfo_open' ) ) {\n\t\t\t\tif( is_windows() && defined( 'PHP_MAGIC_PATH' ) && is_readable( PHP_MAGIC_PATH )) {\n\t\t\t\t\t$finfo = finfo_open( FILEINFO_MIME, PHP_MAGIC_PATH );\n\t\t\t\t} else {\n\t\t\t\t\t$finfo = finfo_open( FILEINFO_MIME );\n\t\t\t\t}\n\t\t\t\t$mime = finfo_file( $finfo, $pFile );\n\t\t\t\tfinfo_close( $finfo );\n\t\t\t} else {\n\t\t\t\tif( function_enabled( \"escapeshellarg\" ) && function_enabled( \"exec\" )) {\n\t\t\t\t\t$mime = exec( trim( 'file -bi ' . escapeshellarg( $pFile )));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( empty( $mime ) ) {\n\t\t\t\t$mime = $this->lookupMimeType( substr( $pFile, strrpos( $pFile, '.' ) + 1 ) );\n\t\t\t}\n\t\t\tif( $len = strpos( $mime, ';' )) {\n\t\t\t\t$mime = substr( $mime, 0, $len );\n\t\t\t}\n\t\t}\n\t\treturn $mime;\n\t}", "protected function checkType($file) {\n if (in_array($file['type'], $this->_permitted)) {\n return true;\n } else {\n if (!empty($file['type'])) {\n $this->_messages[] = '4' . $file['name'] . ' is not a permitted file type.';\n }\n return false;\n }\n }", "function getMimeType() ;", "private function _getUploadedFileMimeType($file_data) {\n if(function_exists('mime_content_type')) {\n $mime_type = mime_content_type($file_data['tmp_name']);\n return $mime_type;\n }\n\n if(function_exists('finfo_open')) {\n $finfo = finfo_open(FILEINFO_MIME);\n $mime_type = finfo_file($finfo, $file_data['tmp_name']);\n finfo_close($finfo);\n return $mime_type;\n }\n\n return null;\n }", "public function validateFile(){\n // Check uploaded errors\t\n if($this->fileError){\n if(array_key_exists($this->fileError, $this->phpFileUploadErrors)){\n $this->addError(['PHP Upload Error',$this->phpFileUploadErrors[$this->fileError]]);\n } \n }else{\n // Check if file was uploaded via the form\n if(!is_uploaded_file($this->tmpLocation)){\n $this->addError(['File Upload', \"File uploading failed. Please upload the file again.\"]);\n }\t\n // Check extension\n if(!in_array($this->fileExt, $this->allowedExtensions)){\n $allowed = implode(', ', $this->allowedExtensions);\n $this->addError(['File Extension',\"Uploading this type of file is not allowed. Allowed file extensions are \".$allowed]);\n }\n // Check size\n if($this->size > $this->maxSize){\n $this->addError(['File Size',\"The file size must be up to \".$this->maxSize]);\n }\n // Check if upload folder exists\n if(!file_exists($this->uploadPath)){\n $this->addError(['Admin Error',\"The chosen upload directory does not exist.\"]);\n }\n } \n if(!$this->_errors){\n return true;\n } \n return false;\t\n }", "function verifyUpload( $file ){\n $passed = false; //\tVariável de controle\n if( is_uploaded_file( $file[ \"tmp_name\" ] ) ){\n $ext = $this->getExt( $file[ \"name\" ] );\n if( ( count( $this->allowedExtensions ) == 0 ) || ( in_array( $ext, $this->allowedExtensions ) ) ){\n $passed = true;\n }\n }\n return $passed;\n }", "function validate_expense_file() {\n return validate_post_file($this->input->post(\"file_name\"));\n }", "public function rules()\n\t{\n\t\treturn array(\n\t\t\tarray('file', 'required'),\n\t\t\tarray('file','file','types'=>'jpg png'),\n\t\t);\n\t}", "function testFileTypes()\n {\n $bulletproof = $this->bulletproof->uploadDir('/tmp');\n $image = array('name' => $this->testingImage,\n 'type' => 'image/jpeg',\n 'size' => 542,\n 'tmp_name' => $this->testingImage,\n 'error' => 0\n );\n\n /* should not accept gif*/\n $bulletproof->fileTypes(array('gif'));\n $this->setExpectedException('ImageUploader\\ImageUploaderException',' This is not allowed file type!\n Please only upload ( gif ) file types');\n $upload = $bulletproof->upload($image,'bulletproof_test_image');\n\n\n /* should not accept png*/\n $bulletproof->fileTypes(array('png'));\n $this->setExpectedException('ImageUploader\\ImageUploaderException',' This is not allowed file type!\n Please only upload ( png ) file types');\n $upload = $bulletproof->upload($image,'bulletproof_test_image');\n\n /* shouldn't accept this file */\n $bulletproof->fileTypes(array('exe'));\n $this->setExpectedException('ImageUploader\\ImageUploaderException',' This is not allowed file type!\n Please only upload ( exe ) file types');\n $upload = $bulletproof->upload($image,'bulletproof_test_image');\n\n /* example file is actually jpeg, not jpg */\n $bulletproof->fileTypes(array('png', 'jpeg'));\n $upload = $bulletproof->upload($image,'bulletproof_test_image');\n $this->assertEquals('uploads/bulletproof_test_image.jpeg',$upload);\n }", "function validate_file($file, $allowed_files = array())\n {\n }", "public function mime ();", "private function isValidImageType(string $file)\r\n {\r\n return in_array(pathinfo($file, PATHINFO_EXTENSION), $this->supported);\r\n }", "function validate_picture_file($path) {\n $acceptableTypes = array(IMAGETYPE_JPEG, IMAGETYPE_PNG, IMAGETYPE_GIF);\n $detectedType = exif_imagetype($path); // WARNING: This will only work if the\n // EXIF extension is enabled.\n return in_array($detectedType, $acceptableTypes);\n}", "function _mime_content_type($filename) {\n $finfo = finfo_open();\n $fileinfo = finfo_file($finfo, $filename, FILEINFO_MIME);\n finfo_close($finfo);\n return reset(explode(\";\",$fileinfo));\n \n \n //hiphop workaround hiphop does not work with inotify\n //exec(\"file \".str_replace(\" \",\"\\ \",$filename).\" --mime\",$output);\n \n $half = explode(\": \",$output[0]);\n $done = explode(\"; \",$half[1]);\n return $done[0];\n }", "public function rules()\n {\n return [\n //'file' => 'mimes:jpg'\n ];\n }", "public function provider_mime_type() {\n\t\treturn array(\n\t\t\tarray( 'not-found.txt', false ),\n\t\t\tarray( 'empty.txt', version_compare( PHP_VERSION, '7.4', '>=' ) ? 'application/x-empty' : 'inode/x-empty' ),\n\t\t\tarray( 'file.aac', 'audio/aac' ),\n\t\t\tarray( 'file.css', 'text/css' ),\n\t\t\tarray( 'file.csv', 'text/plain' ),\n\t\t\tarray( 'file.flac', 'audio/flac' ),\n\t\t\tarray( 'file.gif', 'image/gif' ),\n\t\t\tarray( 'file.htm', 'text/html' ),\n\t\t\tarray( 'file.html', 'text/html' ),\n\t\t\tarray( 'file.jpe', 'image/jpeg' ),\n\t\t\tarray( 'file.jpeg', 'image/jpeg' ),\n\t\t\tarray( 'file.jpg', 'image/jpeg' ),\n\t\t\tarray( 'file.js', 'application/javascript' ),\n\t\t\tarray( 'file.m4a', 'audio/m4a' ),\n\t\t\tarray( 'file.mp3', 'audio/mpeg' ),\n\t\t\tarray( 'file.png', 'image/png' ),\n\t\t\tarray( 'file.svg', 'image/svg+xml' ),\n\t\t\tarray( 'file.txt', 'text/plain' ),\n\t\t\tarray( 'file.wav', 'audio/wav' ),\n\t\t\tarray( 'file.xml', 'application/xml' ),\n\t\t\tarray( 'no-extension-text', 'text/plain' ),\n\t\t\tarray( 'no-extension-media', 'application/octet-stream' ),\n\t\t\tarray( 'upper-case.JPG', 'image/jpeg' ),\n\t\t);\n\t}", "public function test_supports_mime_type() {\n\n\t\t$imagick_image_editor = new WP_Image_Editor_Imagick( null );\n\n\t\t$this->assertTrue( $imagick_image_editor->supports_mime_type( 'image/jpeg' ), 'Does not support image/jpeg' );\n\t\t$this->assertTrue( $imagick_image_editor->supports_mime_type( 'image/png' ), 'Does not support image/png' );\n\t\t$this->assertTrue( $imagick_image_editor->supports_mime_type( 'image/gif' ), 'Does not support image/gif' );\n\t}", "public function test_supports_mime_type() {\n\t\t$imagick_image_editor = new WP_Image_Editor_Imagick( null );\n\n\t\t$this->assertTrue( $imagick_image_editor->supports_mime_type( 'image/jpeg' ), 'Does not support image/jpeg' );\n\t\t$this->assertTrue( $imagick_image_editor->supports_mime_type( 'image/png' ), 'Does not support image/png' );\n\t\t$this->assertTrue( $imagick_image_editor->supports_mime_type( 'image/gif' ), 'Does not support image/gif' );\n\t}", "public function checkFileValidation($string) {\n $file_mimes = array('text/x-comma-separated-values',\n 'text/comma-separated-values',\n 'application/octet-stream',\n 'application/vnd.ms-excel',\n 'application/x-csv',\n 'text/x-csv',\n 'text/csv',\n 'application/csv',\n 'application/excel',\n 'application/vnd.msexcel',\n 'text/plain',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\n );\n if (isset($_FILES['fileURL']['name'])) {\n $arr_file = explode('.', $_FILES['fileURL']['name']);\n $extension = end($arr_file);\n if (($extension == 'xlsx' || $extension == 'xls' || $extension == 'csv') && in_array($_FILES['fileURL']['type'], $file_mimes)) {\n return true;\n } else {\n $this->form_validation->set_message('checkFileValidation', 'Please choose correct file.');\n return false;\n }\n } else {\n $this->form_validation->set_message('checkFileValidation', 'Please choose a file.');\n return false;\n }\n }", "public function hasMimeType() {\n return $this->_has(8);\n }", "public static function guessContentType($magic_file, $magic_mode = null) {}", "function get_mimetype($name) {\n\t// We're only allowing archives.\n\tif (!substr_count($_FILES[$name]['name'],'.tar.gz') &&\n\t\t!substr_count($_FILES[$name]['name'],'.tgz') &&\n\t\t!substr_count($_FILES[$name]['name'],'.zip')) {\n\n\t\treturn FALSE;\n\t}\n\n\tif (substr_count($_FILES[$name]['name'],'.tar.gz') ||\n\t\tsubstr_count($_FILES[$name]['name'],'.tgz')) {\n\n\t\treturn 'application/x-gzip';\n\t} else {\n\t\treturn 'application/zip';\n\t}\n}", "public function getMimeType()\n {\n return $this->file['type'];\n }", "public function set_content_type($mime);", "public function set_content_type($mime);", "public static function detect($file)\n {\n if ($file instanceof File) {\n $file = $file->getPath();\n }\n if (file_exists($file) && is_file($file)) {\n return mime_content_type($file);\n }\n\n return false;\n }", "function validateFileExtension(&$model, $fieldData, $fieldName, $allowedExts = array()) {\n if (empty($fieldData[$fieldName]['tmp_name'])) return true;\n \n $extension = strtolower(pathinfo($fieldData[$fieldName]['name'], PATHINFO_EXTENSION));\n \n if (!is_array($allowedExts) || (!in_array('*', $allowedExts) && !in_array($extension, $allowedExts))) return false;\n \n return true;\n }", "function getValidMimeImageType($mime)\n{\n\t// These are the only valid image types.\n\t$validImageTypes = array(\n\t\t-1 => 'jpg',\n\t\t// Starting from here are the IMAGETYPE_* constants\n\t\tIMAGETYPE_GIF => 'gif',\n\t\tIMAGETYPE_JPEG => 'jpeg',\n\t\tIMAGETYPE_PNG => 'png',\n\t\tIMAGETYPE_PSD => 'psd',\n\t\tIMAGETYPE_BMP => 'bmp',\n\t\tIMAGETYPE_TIFF_II => 'tiff',\n\t\tIMAGETYPE_TIFF_MM => 'tiff',\n\t\tIMAGETYPE_JPC => 'jpeg',\n\t\tIMAGETYPE_IFF => 'iff',\n\t\tIMAGETYPE_WBMP => 'bmp',\n\t\tIMAGETYPE_WEBP => 'webp'\n\t);\n\n\t$ext = (int) $mime > 0 && isset($validImageTypes[(int) $mime]) ? $validImageTypes[(int) $mime] : '';\n\tif (empty($ext))\n\t{\n\t\t$ext = strtolower(trim(substr($mime, strpos($mime, '/')), '/'));\n\t}\n\n\treturn in_array($ext, $validImageTypes) ? 'image/' . $ext : '';\n}", "public function checkMediaFilename(string $filename)\n {\n $extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));\n\n $grav = Grav::instance();\n\n /** @var Config $config */\n $config = $grav['config'];\n\n // If not a supported type, return\n if (!$extension || !$config->get(\"media.types.{$extension}\")) {\n $language = $grav['language'];\n throw new RuntimeException($language->translate('PLUGIN_ADMIN.UNSUPPORTED_FILE_TYPE') . ': ' . $extension, 400);\n }\n }", "public function getMediaType($fileMimeType);", "public function testSetAllowedMimeTypesIllegal() {\n // list is only checked against during upload, so expect success here.\n $mytype = array('application/x-perl' => 'pl');\n $this->up->setAllowedMimeTypes($mytype);\n $this->assertEquals($mytype, $this->up->getAllowedMimeTypes());\n }", "abstract protected function validateFile() : object;" ]
[ "0.8046193", "0.78944933", "0.7808767", "0.7656104", "0.76006645", "0.73375887", "0.7196841", "0.7189285", "0.712684", "0.71250063", "0.7089263", "0.7063943", "0.7049437", "0.69398004", "0.693935", "0.6938242", "0.6921766", "0.6901871", "0.6899989", "0.68848467", "0.6837849", "0.6778977", "0.67722434", "0.67684495", "0.67317843", "0.6723645", "0.6712685", "0.6710938", "0.668999", "0.66854954", "0.667479", "0.6663144", "0.66519654", "0.66454434", "0.6642498", "0.66419405", "0.664033", "0.66397744", "0.6630809", "0.6597205", "0.65944254", "0.6553819", "0.65492654", "0.65460163", "0.6518877", "0.6516917", "0.6516671", "0.65147275", "0.6513977", "0.649082", "0.6490528", "0.648621", "0.6485571", "0.64685184", "0.64670956", "0.64664984", "0.64664984", "0.64664984", "0.64664984", "0.6464653", "0.645933", "0.645933", "0.645933", "0.645933", "0.645933", "0.64503396", "0.6415206", "0.6412552", "0.6409187", "0.6405773", "0.64042276", "0.6396671", "0.63758737", "0.637508", "0.63734996", "0.6372135", "0.6372039", "0.6360265", "0.63590515", "0.63573605", "0.63566834", "0.63450515", "0.6337391", "0.63341504", "0.63296956", "0.63288575", "0.6326059", "0.63071084", "0.6306827", "0.6301251", "0.62931436", "0.6282796", "0.6282796", "0.62671596", "0.62651145", "0.6254782", "0.62488633", "0.62475836", "0.62403923", "0.62401026" ]
0.80739963
0
get unique file name for put application directory
public function getUniqFilename() { if (empty($this->_uniqFilename)) { $this->_uniqFilename = sprintf('%s_%s', uniqid(), $this->_uploadedFile->getClientFilename()); } return $this->_uniqFilename; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "private function generateUniqueFileName() {\r\n \r\n return md5(uniqid());\r\n }", "private function generateUniqueFileName()\n {\n // md5() reduces the similarity of the file names generated by\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "private function generateUniqueFileName() :string\n {\n // md5() reduces the similarity of the file names generated by\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "private function generateUniqueFileName()\n {\n return md5(base64_encode(pack('N6', mt_rand(), mt_rand(), mt_rand(), mt_rand(), mt_rand(), uniqid())));\n }", "private function genereteFilename(){\n return strtolower(md5(uniqid($this->document->baseName)) . '.' . $this->document->extension);\n }", "public function encrypt_name(){\n $filename = md5(uniqid(mt_rand()));\n return $filename;\n }", "protected function makeFilename()\n {\n return getcwd().'/bolt_'.md5(time().uniqid()).'.zip';\n }", "protected function makeFilename()\n {\n return getcwd().'/october_installer_'.md5(time().uniqid()).'.zip';\n }", "protected function setFileName($unique)\n {\n return substr(hash('md5', \"_bingo_{$unique}\"), 0, 16);\n }", "public function filename(): string\n {\n return Str::random(6) . '_' . $this->type . $this->fileExtension();\n }", "private function createName() : string\n {\n return md5(uniqid()). $this->file->getClientOriginalName(). '.'.$this->file->guessExtension();\n }", "public function makeFilename()\n {\n return getcwd().'/package'.md5(time().uniqid()).'.zip';\n }", "public function new_local_file_name()\n\t{\n\t\t$name = sys_get_temp_dir().'/'.str_random(32);\n\t\treturn $name;\n\t}", "protected function filename()\n {\n return 'ticket_' . time();\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 genFilename()\n {\n $filename = $this->getAssetableType().$this->assetable_id.'_';\n $filename .= uniqid();\n if(!empty($this->getThumbnailType())) $filename .= '_'.$this->getThumbnailType();\n $filename .= '.'.$this->uploadedFile->extension;\n $this->filename = $filename;\n }", "public static function getRandomFileName()\r\n\t{\r\n\t\treturn uniqid(rand(), true);\r\n\t}", "protected function filename()\n {\n return 'Smartphone_' . date('YmdHis');\n }", "private function get_filename() {\n \n $md5 = md5($_SERVER[\"HTTP_HOST\"] . $_SERVER[\"REQUEST_URI\"]);\n return CACHE_DIR . \"/\" . $md5;\n }", "protected function filename()\n {\n return 'User_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'User_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'User_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'User_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'User_' . date('YmdHis');\n }", "private function setFileName(){\n if($this->customFileName !== ''){\n $prefix = $this->customFileName.'_';\n $this->finalFileName = uniqid($prefix).'.'.$this->fileExt;\n }else{\n $this->finalFileName = basename($this->fileName, \".\".$this->fileExt ).md5(microtime()).'.'.$this->fileExt;\n } \n }", "public function geraNomeArquivo()\n {\n return sha1(uniqid(mt_rand(), true));\n }", "protected function createFilename()\n {\n $extension = \\File::extension(\\Input::file('photo')->getClientOriginalName());\n $filename = $this->applicant->slug . '_' . date('U') . '.' . $extension;\n\n return \\Str::lower($filename);\n }", "protected function filename()\n {\n return 'ctcommunicationsocialmediadatatable_' . time();\n }", "public function generateFilename()\n {\n $filename = str_replace(\" \", \"_\", strtolower($this->getOriginalName()));\n\n if(!file_exists(\"http://\".$_SERVER['HTTP_HOST'].\"/uploads/docs/\".$filename))\n {\n return $filename;\n }\n else\n {\n $extension = $this->getExtension($this->getOriginalExtension());\n $filename = str_replace($extension, '', $filename) . '_';\n\n $i = 2;\n\n while(true)\n {\n if(file_exists($this->getPath().$filename.$i.$extension))\n {\n $i++;\n continue;\n }\n break;\n }\n\n return $filename.$i.$extension;\n }\n }", "protected function filename()\n {\n return 'properties_' . time();\n }", "protected function filename()\n {\n return 'users_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'compras_' . time();\n }", "protected function filename()\n {\n return 'Automobile_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'Users_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'Users_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'Users_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'Users_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'Users_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'Users_' . date('YmdHis');\n }", "function random_file_name($keyname = '')\n{\n // config generate auto uniq\n /* A uniqid, like: 4b3403665fea6 */\n\n // nama file\n $getNama = $keyname;\n\n // delete space\n $removeSpace = preg_replace('/\\s+/', '', $getNama);\n\n // pisahkan dgn extentionnya\n $explodeFile = explode('.', $removeSpace);\n\n $namaFiles = $explodeFile[0];\n $extFiles = end($explodeFile);\n\n // buat nama baru \n $file = md5(uniqid($namaFiles));\n\n // gabung kembali menjadi file baru\n $new_file = $file . '.' . $extFiles;\n return $new_file;\n}", "public function generateFileName()\n {\n $d = new \\DateTime();\n\n return strtoupper($this->fileName).\"_\" . $d->format(\"Y-m-d\");\n }", "private function createUniqueZipFilename()\n {\n $directory = storage_path() . '/elvis/';\n\n if (!file_exists($directory)) {\n mkdir($directory);\n }\n\n return $directory . Str::random(40) . '.zip';\n }", "function createFileName()\n\t{\n\t $sid = 'abcdefghiklmnopqstvxuyz0123456789ABCDEFGHIKLMNOPQSTVXUYZ';\n\t $max = strlen($sid) - 1;\n\t $res = \"\";\n\t for($i = 0; $i<16; ++$i)\n\t {\n\t $res .= $sid[mt_rand(0, $max)];\n\t } \n\t return $res;\n\t}", "protected function filename()\n {\n return 'Campeonato_' . date('YmdHis');\n }", "function upload_savename_by_gf($courseID,$filename){\n return $courseID.'_'.time().'_'.$filename;\n}", "function file_name ($url) {\n $filename = md5( $url );\n return join( DIRECTORY_SEPARATOR, array( $this->BASE_CACHE, $filename ) );\n }", "protected function filename()\n {\n return 'wallet_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'owe_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'Company_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'Jogadores_' . date('YmdHis');\n }", "public function getFileName()\n {\n return \"{$this->getUserOS()}-{$this->getDriver()}{$this->getFileExtension()}\";\n }", "public function generateFileName() {\n $this->filename = ($this->getName(TRUE, TRUE, TRUE, \".\").\".xml\");\n\n return $this->filename;\n }", "protected function filename()\n {\n return 'account_list_' . date('Y_m_d_H_i_s');\n }", "protected function filename()\n {\n return 'UserRequest_' . date('YmdHis');\n }", "public function getFileName()\n {\n return $this->prefix.$this->scope.'_'.$this->comName;\n }", "function wp_unique_filename($dir, $filename, $unique_filename_callback = \\null)\n {\n }", "protected function filename()\n {\n return 'Admin_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'Raffle_' . date('YmdHis');\n }", "public static function getTempFileName()\r\n\t{\r\n\t\treturn self::_normalizeDirectorySeparators(tempnam(self::getTempDirectory(), self::getRandomFileName()));\r\n\t}", "protected function filename()\n {\n return 'emailtemplate_' . time();\n }", "public static function randomFilename() {\n $name = self::randomString();\n return substr($name, 0, 2) . '/' . substr($name, 2, 2)\n . '/' . substr($name, 4, 2) . '/' . substr($name, 6);\n }", "function get_stored_file_name()\n\t{\n\t\tglobal $log;\n\t\t$log->debug(\"Entering get_stored_file_name() method ...\");\n\t\t$log->debug(\"Exiting get_stored_file_name method ...\");\n\t\treturn $this->stored_file_name;\n\t}", "public function getFilename() {\n\t\t\n\t\t$filename = $this->filename;\n\t\t\n\t\tif(file_exists($this->path . $filename) && $this->rename_if_exists === true) {\n\t\t\n\t\t\t//Explode the filename, pop off the extension and put it back together\n\t\t\t$parts = explode('.', $filename);\n\n\t\t\t$extension = array_pop($parts);\n\n\t\t\t$base_filename = implode('.', $parts);\n\t\t\t\n\t\t\t$count = 1;\n\t\t\t\n\t\t\tdo {\n\t\t\t\t$count++;\n\t\t\t} while(file_exists($this->path . $base_filename . '_' . $count . '.' . $extension));\n\t\t\t\n\t\t\t$filename = $base_filename . '_' . $count . '.' . $extension;\n\t\t\n\t\t}\n\t\t\n\t\treturn $filename;\n\t\t\n\t}", "private function generateUniqueFileName(UploadedFile $file): string\n {\n $originFileName = pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME);\n $originFileNameSlugged = $this->slugger->slug(strtolower($originFileName));\n $randomId = uniqid();\n return \"{$originFileNameSlugged}-{$randomId}.{$file->guessExtension()}\";\n }", "function generate_unique_file_name($dir, $filename)\n{\n if (!$filename)\n return;\n \n $extension = pathinfo($filename, PATHINFO_EXTENSION);\n\n $new_filename = '';\n for (;;)\n {\n $new_filename = get_random_string(8, 8) . '.' . $extension;\n if (!file_exists($dir . '/' . $new_filename))\n break;\n }\n\n return $new_filename;\n}", "protected function filename(): string\n {\n return 'Floors_' . date('YmdHis');\n }", "private function returnUniqueFileName($name) {\n\t\t\t\twhile(file_exists($this->dir.'/'.$name) == true) {\n\t\t\t\t\t$name = rand(1000).$name;\n\t\t\t\t}\n\t\t\t\treturn $name;\n\t\t\t}", "protected function filename()\n {\n return 'ReclassExport_' . time();\n }", "static function generateFileName($file)\n {\n $file_name = pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME);\n return \\Str::slug(rand() . $file_name) . '.' . $file->getClientOriginalExtension();\n }", "function getFilename()\n {\n return __FILE__;\n }", "protected function filename()\n {\n return 'suppliers_' . time();\n }", "protected function filename()\n {\n return 'Upgrade_' . date('YmdHis');\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\n $fileName = \"sitemap\";\n\n if (is_multisite()) {\n $fileName .= \"-\" . get_current_blog_id();\n }\n\n $fileName .= \".xml\";\n\n return apply_filters('fpcms_sitemap_name', $fileName);\n\n }", "function _getFilePath($key){\n return $this->savePath .'/'. $this->prefix . md5($key);\n }", "private function pathFilename() {\n return $this->directory . \"/\" . $this->formatFilename();\n }", "function get_new_file_name(){\n $user_id = $_COOKIE[\"UserId\"];\n $Upload_Path = \"../../uploads/\";\n $file_name = rand(1, 1000000);\n if (!file_exists($file_name)){\n return $file_name;\n }else {\n get_new_file_name();\n }\n}", "protected function getFileName($id)\n {\n $directory = $this->getDirectory($id);\n $hash = sha1($id, false);\n $file = $directory . DIRECTORY_SEPARATOR . $hash . '.cache';\n return $file;\n }", "protected function getFileName($id)\n {\n $directory = $this->getDirectory($id);\n $hash = sha1($id, false);\n $file = $directory . DIRECTORY_SEPARATOR . $hash . '.cache';\n return $file;\n }", "protected function filename()\n {\n return 'Teachers_' . date('YmdHis');\n }", "function AddPrefixToFileName() {\n\t\t\t$this->NewFileName = time().'_'.$this->GetFileName();\n\t\t\t//echo $this->NewFileName; exit();\n\t\t\treturn $this->NewFileName;\n\t\t}", "protected function filename()\n {\n return 'Egreso_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'fieldagents_' . time();\n }", "protected function filename()\n {\n return 'Document_' . date('YeamdHis');\n }", "function encFileName($fileName){\n\t\treturn @rand(0, 9999999) . @uniqid(NUll,true) . @rand(0, 8888888) . $fileName;\n\t}", "protected function filename()\n {\n return 'history_' . time();\n }", "public function getPublic_Filename(){\n $filename = '';\n if ( $this->filename )\n $filename = str_replace(UPLOADS_DIR, '', $this->filename);\n return $filename;\n }", "protected function filename()\n {\n return 'permissions_datatable_' . time();\n }", "protected function filename()\n {\n return 'SpecialMembers_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'Roles_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'Payment_'.date('YmdHis');\n }", "function formatFileName($name, $field, $file) {\n\t\t$file = pathinfo($name);\n\t\t$name = String::truncate($file['filename'], 20);\n\t\treturn Inflector::slug($name) . '_' . uniqid();\n\t}", "protected function filename()\n {\n return 'Movies_' . date('YmdHis');\n }" ]
[ "0.78171515", "0.779017", "0.779017", "0.779017", "0.779017", "0.779017", "0.779017", "0.7673765", "0.7561922", "0.7549031", "0.74456614", "0.7251621", "0.7171117", "0.7076525", "0.7028489", "0.6968183", "0.6954334", "0.69376177", "0.69349277", "0.6926752", "0.6898566", "0.68911904", "0.6855243", "0.6809373", "0.67945164", "0.6777747", "0.6742726", "0.6742726", "0.6742726", "0.6742726", "0.6742726", "0.673343", "0.6731511", "0.67210263", "0.6708924", "0.668817", "0.6674862", "0.66734695", "0.66660666", "0.666515", "0.66540366", "0.66540366", "0.66540366", "0.66540366", "0.66540366", "0.66540366", "0.66529334", "0.664781", "0.66193736", "0.661567", "0.661182", "0.6606884", "0.66066575", "0.6573677", "0.6555275", "0.6549553", "0.6546651", "0.6538763", "0.6497691", "0.6491613", "0.6484809", "0.64819056", "0.64773846", "0.6474049", "0.6469323", "0.646534", "0.6462059", "0.64572555", "0.645348", "0.6438485", "0.64381963", "0.6437499", "0.64285296", "0.64232713", "0.6418572", "0.64167166", "0.640392", "0.63981014", "0.63965213", "0.6394539", "0.63932896", "0.6387319", "0.6386833", "0.6382771", "0.6381671", "0.6381671", "0.6380571", "0.63786244", "0.6376506", "0.6375991", "0.63683075", "0.6366624", "0.63625395", "0.63594466", "0.63467073", "0.6344219", "0.6342855", "0.6342269", "0.63418496", "0.6330864" ]
0.69259745
20
move to images directory for save file
protected function _moveToImageDir() { $path = $this->getFilePath(); $this->_uploadedFile->moveTo($path); chmod($path, 0644); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save()\n {\n $dir = $this->pathTmpImage;\n\n $files = scandir($dir);\n\n foreach ($files as $file) {\n if ($file == $_POST['image']) { \n copy($this->pathTmpImage . $file, $this->pathResult . $file);\n }\n }\n\n //$this->dbInsert($_POST['image']);\n\n unlink($this->pathTmpImage . $_POST['image']);\n }", "function movesiteimages()\n\t{\n\t\n\t\tglobal $option, $mainframe;\n\n\t\t//we'll need access to the file system and we'll use the Joomla way to be all safe.\n\t\tjimport('joomla.filesystem.file');\n\t\n\t\t// define where the images are and where we want to put them\n\n\t\t$searchpath = JPATH_ROOT . DS . \"images\". DS .\"content\" . DS .\"arts_curriculum\". DS . \"masters\" ;\n\t\t$destpath = JPATH_ROOT . DS . \"images\". DS .\"content\" . DS .\"arts_cirriculum\". DS . \"tmp\" ;\n\n\t\t//read all the image files and put them in an array.\n\t\t$img_files = JFolder::files($searchpath, '.*');\n\n\t\t//Now we need some stuff from the JFile:: class to move all files into the new folder\n\t\tforeach ($img_files as $file) {\n\t\t\tJFile::move($searchpath. DS . $file, $destpath . DS. $file);\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=' . $option, 'All images have moved into the site folder' );\n\t\n\t}", "protected function copyImagesDirectory()\n\t{\n\t\t$params = $this->getParams();\n\n\t\tif ($params->path != '') {\n\t\t\t$date = JFactory::getDate()->toFormat('%Y%m%d');\n\n\t\t\t$src = JPATH_SITE.DS.'images';\n\t\t\t$dest = JPATH_SITE.DS.'images-backup-'.$date;\n\t\t\tJFolder::move($src, $dest);\n\n\t\t\t$src = $params->path.DS.'images';\n\t\t\t$dest = JPATH_SITE.DS.'images';\n\t\t\tJFolder::copy($src, $dest);\n\t\t}\n\t}", "public function move_to_slideshow_dir()\n\t{\n\t\t\n\t\t$file_name = substr($this->file_handler[\"name\"], 0, strrpos($this->file_handler[\"name\"], \".\"));\n\t\t$file_name = $file_name . \"-\" . time();\n\t\t$file_name = $file_name . \".\" . pathinfo($this->file_handler['name'], PATHINFO_EXTENSION);\n\t\t$file_name = strtolower($file_name);\n\t\t\n\t\t$new_file_name = $this->base_path . $file_name;\n\n\t\t\n\t\tif(move_uploaded_file($this->file_handler[\"tmp_name\"], $new_file_name))\n\t\t\treturn $this->relative_path . $file_name;\n\t\telse\n\t\t\treturn false;\n\t}", "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 move_arquivos($imagem, $dir)\r\n\t{\r\n\t\tApp::uses('File', 'Utility');\r\n\t\t$arquivo = new File($imagem['tmp_name']);\r\n\t\t$arquivo->copy($dir.$imagem['name']);\r\n\t\t$arquivo->close();\r\n\t}", "protected function saveImage()\n {\n if ( $this->initialImage != $this->image )\n {\n $this->deleteOldImage();\n\n $imageHandler= new CImageHandler();\n $imageHandler->load( $this->getTempFolder( TRUE ) . $this->image );\n $imageHandler->save($this->getImagesFolder( TRUE ) . $imageHandler->getBaseFileName() );\n\n $settings = $this->getThumbsSettings();\n\n if ( !empty( $settings ) )\n {\n $imageHandler= new CImageHandler();\n $imageHandler->load( $this->getTempFolder( TRUE ) . $this->image );\n\n foreach( $settings as $prefix => $dimensions )\n {\n list( $width, $height ) = $dimensions;\n $imageHandler\n ->thumb( $width, $height )\n ->save( $this->getImagesFolder( TRUE ) . $prefix . $imageHandler->getBaseFileName() );\n }\n }\n\n @unlink( $this->getTempFolder( TRUE ) . $this->image );\n }\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 }", "private function intern_save ($targetPath = null)\n\t{\n\t\tif ($this->newImage == null) $this->newImage = $this->srcImage;\n\n\t\tif ($targetPath == null) $targetPath = $this->srcPath;\n\t\telse\n\t\t{\n\t\t\tif (Pathfinder::isAbsolute($targetPath)) $targetPath = $targetPath;\n\t\t\t$targetPath = $this->dataRootPath . $this->getRelativePath($targetPath);\n\t\t}\n\n\t\t// create folders if necessary\n\t\t$this->setUpFolder($targetPath);\n\t\t// remove file from folder with same name\n\t\t$this->intern_removePrevious($targetPath);\n\n\t\t// save\n\t\tswitch($this->srcInfo['extension']) {\n\t\t\tcase 'jpg':\n\t\t\tcase 'jpeg':\n\t\t\t\timagejpeg ( $this->newImage, $targetPath);\n\t\t\t\tbreak;\n\t\t\tcase 'png':\n\t\t\t\timagepng ( $this->newImage, $targetPath);\n\t\t\t\tbreak;\n\t\t\tcase 'gif':\n\t\t\t\timagegif ( $this->newImage, $targetPath);\n\t\t}\n\t\t$this->intern_end();\n\t}", "public function move_arquivos($imagem, $dir) {\n App::uses('File', 'Utility');\n $arquivo = new File($imagem['tmp_name']);\n $arquivo->copy($dir . $imagem['name']);\n $arquivo->close();\n }", "public function move_photo(){\n move_uploaded_file($this->tmp_path, '/home/a1031316/public_html/uploaded_images/'.$this->name);\n\n }", "public function updateDirPhoto() {\n if (!is_dir($this->dirPhoto)) {\n mkdir($this->dirPhoto, 0777, true);\n }\n if ($this->getplanFloor('name') !== '') {\n move_uploaded_file($this->getplanFloor('tmp_name'), $this->dirPhoto.$this->getplanFloor('name'));\n }\n }", "function mkImageDir()\r\n {\r\n $this->imageDir = date('Ymd') . '/';\r\n $imageDirPath = $this->rootPath . $this->config->get('imgPath') . $this->imageDir;\r\n if (file_exists($imageDirPath)) return;\r\n if (!file_exists($this->rootPath . $this->config->get('imgPath'))) mkdir($this->rootPath . $this->config->get('imgPath'), 0777);\r\n mkdir($imageDirPath, 0777);\r\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 }", "private function _moveImagesToNewFileSystem()\n\t{\n\t\tif (!Image::testFileSystem())\n\t\t\t$this->_errors[] = Tools::displayError('Error: your server configuration is not compatible with the new image system. No images were moved');\n\t\telse\n\t\t{\n\t\t\tini_set('max_execution_time', $this->max_execution_time); // ini_set may be disabled, we need the real value\n\t\t\t$this->max_execution_time = (int)ini_get('max_execution_time');\t\n\t\t\t$result = Image::moveToNewFileSystem($this->max_execution_time);\n\t\t\tif ($result === 'timeout')\n\t\t\t\t$this->_errors[] = Tools::displayError('Not all images have been moved, server timed out before finishing. Click on \\\"Move images\\\" again to resume moving images');\n\t\t\telseif ($result === false)\n\t\t\t\t$this->_errors[] = Tools::displayError('Error: some or all images could not be moved.');\n\t\t}\n\t\treturn (sizeof($this->_errors) > 0 ? false : true);\n\t}", "function saveImage($j) {\n $target_dir = \"images/\";\n $target = $target_dir . $_FILES[\"userfile\"][\"name\"][$j];\n \n move_uploaded_file($_FILES[\"userfile\"][\"tmp_name\"][$j], $target);\n return 1;\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 }", "private function createFileDir()\n\t{\n\t\t$this->fileDir = IMAGES.'uploads'.DS.$this->model.DS.$this->modelId;\n\t\t$this->imgDir = 'uploads/'.$this->model.'/'.$this->modelId;\n\t}", "private function set_directory(){\n if(!is_dir($this->img_dir)) mkdir($this->img_dir);\n if(!is_dir($this->thumb_dir)) mkdir($this->thumb_dir);\n }", "function do_export_images()\n\t{\n\t\t$skin_dir = $this->ipsclass->input['skin_dirs'];\n\n\t\tif ( ! @file_exists( CACHE_PATH.'style_images/'.$skin_dir ) )\n\t\t{\n\t\t\t$this->ipsclass->main_msg = \"Невозможно найти выбранную директорию, проверьте настройки и попробуйте еще раз\";\n\t\t\t$this->show_export_page();\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Get xml mah-do-dah\n\t\t//-----------------------------------------\n\n\t\trequire_once( KERNEL_PATH.'class_xml.php' );\n\n\t\t$xml = new class_xml();\n\n\t\trequire_once( KERNEL_PATH.'class_xmlarchive.php' );\n\n\t\t$xmlarchive = new class_xmlarchive( KERNEL_PATH );\n\n\t\t$xmlarchive->strip_path = CACHE_PATH.'style_images/'.$skin_dir;\n\n\t\t$xmlarchive->xml_add_directory( CACHE_PATH.'style_images/'.$skin_dir );\n\n\t\t$xmlarchive->xml_create_archive();\n\n\t\t$contents = $xmlarchive->xml_get_contents();\n\n\t\t$this->ipsclass->admin->show_download( $contents, 'ipb_images-'.$skin_dir.'.xml' );\n\t}", "abstract public function save($img, $filename);", "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 archiveImages() {\n try {\n $destination = storage_path('archive/images/' . date('Y') . '/' . date('m') . '/' . date('d'));\n $directory = storage_path('video/images');\n $this->filesystem->copyDirectory($directory, $destination);\n\n } catch (\\Exception $e) {\n throw new ArchiveException('Error archive images: ' . $e->getTraceAsString());\n }\n }", "function save_picture($tmp_picture_fname, $new_picture_id ) {\n\t$temp_filename = path_join(conf('picture.tmp_dir'), $tmp_picture_fname);\n\n\t$picture_dir = conf('picture.dir');\n\tif (!is_readable($picture_dir )) {\n\t\tmkdir($picture_dir);\n\t}\n\n\t$target_filename = path_join($picture_dir,\n\t\tsubstr($new_picture_id, -1 ), $new_picture_id.'.jpg');\n\n\tlog_msg(LOG_DEBUG, sprintf('Attempting to move picture: %s -> %s',\n\t\t$tmp_picture_fname, $target_filename ));\n\n\tif (!is_dir(conf('picture.dir')) || !is_readable(conf('picture.dir'))) {\n\t\tthrow new Http_error(500,\n\t\t\tsprintf('Directory is not readable: %s.',\n\t\t\t\tconf('picture.dir')));\n\t}\n\tif (!is_readable($temp_filename )) {\n\t\tthrow new Http_error(500,\n\t\t\tsprintf('Temp picture not readable: %s',\n\t\t\t\t$temp_filename ));\n\t}\n\tif (!is_readable(dirname($target_filename ))) {\n\t\tmkdir(dirname($target_filename ));\n\t}\n\tif (!rename($temp_filename, $target_filename )) {\n\t\tthrow new Http_error(500,\n\t\t\tsprintf('Could not move picture: %s -> %s',\n\t\t\t$temp_filename, $target_filename ));\n\t}\n\n\tlog_msg(LOG_DEBUG, sprintf(\"Moved temp picture '%s' -> '%s'\",\n\t\t$temp_filename, $target_filename ));\n}", "private function copyImages()\n {\n $media = [\n 'slider-woman-on-the-beach.jpg'\n ];\n\n $this->mediaMigration->copyMediaFiles($media, self::MIGRATION_MODULE, 'scandiweb/slider/s/l');\n }", "function subir_img($directorio,$name){\n move_uploaded_file($_FILES['imagen']['tmp_name'],\"$directorio/$name\");\n}", "public function moveToTmpDir()\n\t{\n\t\tif($this->source instanceof UploadedFile) {\n\t\t\t$this->source->move($this->getTmpDir()->getRootPath());\n\t\t} else if(is_string($this->source)) {\n\t\t\tcopy($this->params['path'], $this->getTmpDir()->getRootPath() . '/' . $this->params['name']);\n\t\t}\n\t}", "private function moveAssets()\n {\n foreach ($this->reports as $report) {\n $old_file = config('import.import_assets_reports_path') . DIRECTORY_SEPARATOR . $report->file;\n $new_file = config('momentum.reports_path') . DIRECTORY_SEPARATOR . $report->file;\n\n $this->moveFile($old_file, $new_file);\n }\n\n foreach ($this->organizations as $organization) {\n // not every organization has a logo\n if (!$organization->logo) {\n continue;\n }\n\n $old_file = config('import.import_assets_logos_path') . DIRECTORY_SEPARATOR . $organization->logo;\n $new_file = config('momentum.logos_path') . DIRECTORY_SEPARATOR . $organization->logo;\n\n $this->moveFile($old_file, $new_file);\n }\n }", "function storeImages()\n {\n }", "public function move($path){\n\t\t$oldPath = $this->path;\n\t\t$path_array = explode(self::DS, $this->path);\n\t\t$fileName = $path_array[sizeof($path_array) - 1];\n\t\t$newPath = $path . self::DS . $fileName;\n\t\t$this->path = $newPath;\n\t\t$this->createFile($newPath);\n\t\tunlink($oldPath);\n\t}", "public function copyImages();", "public function saveImage($img,$folder){\n\n $file_extension = $img->getClientOriginalExtension();\n $file_name = time().'.'.$file_extension;\n $path = $folder;\n $img->move($path,$file_name);\n return $file_name;\n }", "function save_image_local_dir($image_url){\n $day = date('d');\n $month_m = date('M');\n $year = date('Y');\n $pathname = 'snippet-images/'.$year.'/'.$month_m.'/'.$month_m.'-'.$day;\n $ext = get_file_extension($image_url);\n if(!is_dir($pathname)){\n mkdir($pathname);\n }\n $rand_num = md5(mt_rand());\n $rand = md5($image_url);\n \n @$raw_image = file_get_contents($image_url);\n $path = $pathname. '/' .$rand_num .'.'. $ext;\n $dest = $pathname. '/'. $rand . '.'.$ext;\n \n if($raw_image)\n {\n file_put_contents($path,$raw_image);\n $file = check_and_compress($path,$dest);\n $image_address = \"snippets/\".$file;\n return $image_address;\n }\n else\n {\n return $image_url;\n }\n }", "public function createImgFolder(){\n\t\t\n\t\t$tdDate = date('Y-m-d');\n\t\t$dateArray = explode(\"-\",$tdDate);\n\t\tif (!file_exists(\"static/images/\".$dateArray['0'])){\n\t\t\tmkdir(\"static/images/\".$dateArray['0'], 0777);\n\t\t\t}\n\t\tif (!file_exists(\"static/images/\".$dateArray['0'].\"/\".$dateArray['1'])){\n\t\t\t\tmkdir(\"static/images/\".$dateArray['0'].\"/\".$dateArray['1'], 0777);\n\t\t\t}\n\t\tif (file_exists(\"static/images/\".$dateArray['0'].\"/\".$dateArray['1'])){\n\t\t\t\t\treturn \"images/\".$dateArray['0'].\"/\".$dateArray['1'];\n\t\t\t}\n\t\t\n\t}", "public function saveImage($targetPath = null)\n\t{\n\t\t$this->intern_save($targetPath);\n\t}", "function save_img() {\n imagejpeg($this->img, 'captcha.jpg');\n\n // Libération de la mémoire\n imagedestroy($this->img);\n \n }", "function saveImage()\n\t{\n\n\t\tif (!$this->ImageStream) {\n\t\t\t$this->printError('image not loaded');\n\t\t}\n\n\t\tswitch ($this->type) {\n\t\t\tcase 1:\n\t\t\t\t/* store a interlaced gif image */\n\t\t\t\tif ($this->interlace === true) {\n\t\t\t\t\timageinterlace($this->ImageStream, 1);\n\t\t\t\t}\n\n\t\t\t\timagegif($this->ImageStream, $this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t/* store a progressive jpeg image (with default quality value)*/\n\t\t\t\tif ($this->interlace === true) {\n\t\t\t\t\timageinterlace($this->ImageStream, 1);\n\t\t\t\t}\n\n\t\t\t\timagejpeg($this->ImageStream, $this->sFileLocation, $this->jpegquality);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t/* store a png image */\n\t\t\t\timagepng($this->ImageStream, $this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->printError('invalid imagetype');\n\n\t\t\t\tif (!file_exists($this->sFileLocation)) {\n\t\t\t\t\t$this->printError('file not stored');\n\t\t\t\t}\n\t\t}\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 saveStickerToImage()\n {\n $this->sticker->saveToS3($this->stickerDir . $this->getDriverLogoImageName());\n }", "private function set_img_path()\n {\n $file_name = sprintf('%03d',$this->img_count);\n $this->img_path = L_TEMP_IMAGE_PATH.$file_name.\".png\";\n $this->img_count++;\n }", "function save_image($source, $image_type, $destination_folder){\n\t switch(strtolower($image_type)){//determine mime type\n\t\t case 'image/png': \n\t\t\t imagepng($source, $destination_folder); return true; //save png file\n\t\t\t break;\n\t\t case 'image/gif': \n\t\t\t imagegif($source, $destination_folder); return true; //save gif file\n\t\t\t break; \n\t\t case 'image/jpeg': case 'image/pjpeg': \n\t\t\t imagejpeg($source, $destination_folder); return true; //save jpeg file\n\t\t\t break;\n\t\t default: return false;\n\t }\n }", "function imageMaint() {\n\t\n //$path = realpath(APPPATH).'/libraries/IMagick_Image.php';\n//require_once($path);\n////$path2 = realpath($_SERVER['DOCUMENT_ROOT']).'/images/';\n//$path2 = realpath($_SERVER['DOCUMENT_ROOT']).'/images/LL9138TR_frisbeeRed/';\n//$util = new ImageUtil();\n////$util->imageToDir($path2);\n////$util->cleanUp($path2);\n//$util->removeDir($path2);\n//print $util->log();\n//exit;\n }", "function images_add_folder($image_data_url,$folder_name)\r\n{\r\n\t \r\n\t\r\n\t foreach($image_data_url as $file)\r\n {\r\n //get image contents\r\n $image = file_get_contents($file);\r\n\t\t\t\t\t $f_name=explode (\"?\",$file);\r\n\t\t\t\t $image_url=explode('/',$f_name[0]);\r\n $only_name=$image_url[count($image_url)-1];\r\n //put image contents\r\n file_put_contents($folder_name.\"/\".$only_name, $image);\r\n\t\t\t }\r\n}", "function upload_image()\n {\n $file = $this->request->getFile('image');\n $fileName = $file->getRandomName();\n $file->move('./assets/img/beranda/post/inside', $fileName);\n echo base_url('assets/img/beranda/post/inside') . '/' . $fileName;\n }", "protected function makeImagePath()\n {\n // Create image path, nesting folders by splitting the record ID\n $path = $this->originalImageFilePathRoot . chunk_split($this->recordId, 3, '/') . $this->endDirectory;\n\n // Create the path if the directory does not exist\n if (!is_dir($path)) {\n try {\n mkdir($path, 0775, true);\n } catch (\\Exception $e) {\n $this->log->error('Failed to create image directory path: ' . $path);\n throw new \\Exception('Failed to create image directory path');\n }\n }\n\n $this->originalImageFilePath = $path;\n }", "public function save()\n {\n if ($this->createDirectoryStructure($this->getPath())) {\n $content = $this->generateContents();\n file_put_contents($this->getPathname(), $content);\n }\n }", "public function testMoveFileFromTmp(): void\n {\n $expectedFilePath = $this->imageUploader->getBasePath() . DIRECTORY_SEPARATOR . 'magento_small_image_1.jpg';\n\n $this->assertFalse($this->mediaDirectory->isExist($expectedFilePath));\n\n $this->imageUploader->moveFileFromTmp('magento_small_image.jpg');\n\n $this->assertTrue($this->mediaDirectory->isExist($expectedFilePath));\n }", "function move_dir_to_tmp($src, $id)\n{\n $CI =& get_instance();\n $tmpPath = $CI->config->item('site_data_dir') . '/tmp/' . time() . '/';\n if (!is_dir($tmpPath))\n {\n mkdir($tmpPath, 0775, TRUE);\n }\n $tmpPath .= '/' . $id . '/';\n rename($src, $tmpPath);\n return $tmpPath;\n}", "function savePreviewImage($filename, $destinationFile){\n\t\t $this->resizeSaveImage($filename, $destinationFile, self::previewWidth);\n\t }", "function narrative_restore_pictures($pictures, $new_narrative_dir, $pictures_for_restoration = array())\n{\n foreach ($pictures as $i => $picture)\n {\n if (in_array(basename($picture), $pictures_for_restoration))\n {\n $picture_dest = $new_narrative_dir . basename($picture);\n }\n else\n {\n $picture_dest = $new_narrative_dir . 'deleted/' . basename($picture);\n }\n rename($picture, $picture_dest);\n }\n}", "public function upload(){\n if( NULL === $this->getFile()){\n return;\n }\n $filename= $this->getFile()->getClientOriginalName();\n\n // Move to the target directory\n \n $this->getFile()->move(\n $this->getAbsolutePath(), \n $filename);\n\n //Set the logo\n $this->setFilename($filename);\n\n $this->setFile();\n\n }", "public function saveAs( $newName ) {\n if ( $this->folder != \"\" ) {\n $folder = $this->folder . \"/\";\n } else {\n $folder = \"\";\n }\n if ( $this->mimetype == 'image/jpeg' ) {\n imagejpeg( $this->image, \"$folder$newName\" );\n }\n if ( $this->mimetype == 'image/png' ) {\n imagepng( $this->image, \"$folder$newName\" );\n }\n if ( $this->mimetype == 'image/gif' ) {\n imagegif( $this->image, \"$folder$newName\" );\n }\n\n return $this;\n }", "public function save($path = 'barcode.png')\n {\n $dir = dirname($path);\n if (!file_exists($dir)) {\n mkdir($dir, 0644, true);\n }\n imagepng($this->_image, $path);\n }", "protected function destinationUploadDir()\n {\n return public_path(env('UPLOAD_DIR_GALLERY', 'media/images/galleries'));\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 writeFileToDisk(): void\n {\n $this->getFile()->move($this->getUploadRootDir(), $this->fileName);\n }", "public static function saveOriginImage($file) {\n\t\t$save_dir = Yii::getAlias('@runtime' . DIRECTORY_SEPARATOR . self::$file_name);\n\t\t// Yii::info(\"Image save origin path :: \");\n\t\t// Yii::info($save_dir);\n\n\t\t$file->saveAs($save_dir, true);\n\t\treturn $save_dir;\n\t}", "public function moveImage(UploadedFile $file)\n {\n \t$file->move($this->baseDir, $this->image);\n }", "private function save()\n {\n $this->collage->setImageFormat('jpeg');\n return $this->collage->writeImage($this->name);\n }", "public function processImages()\n \t{\n $this->save();\n if (! $this->errorMessage)\n \t\t parent::uploadImages('image', 'RecipeImage', \"recipeID\");\n \n \t}", "function save_image($inPath,$outPath)\n{\n $in= fopen($inPath, \"rb\");\n $out= fopen($outPath, \"wb\");\n while ($chunk = fread($in,8192))\n {\n fwrite($out, $chunk, 8192);\n }\n fclose($in);\n fclose($out);\n}", "public function save($target,$file_name)\n\t{\n\t\tif(!$this->_target) return $this->copy($target,$file_name);\n\t\t\n\t\t$path = $this->_prepare_path($target, $file_name); \n\t\t\n\t\tswitch($this->type){\n\t\t\t\tcase IMAGE_TYPE_PNG : imagepng($this->source, $path); break;\n\t\t\t\tcase IMAGE_TYPE_JPG : imagejpeg($this->source, $path); break;\n\t\t\t\tcase IMAGE_TYPE_GIF : imagegif($this->source,$path); break;\n\t\t}\n\t\t\n\t\t\n\t\t\n\n\t}", "function save_image($inPath, $outPath) {\n $in = fopen ( $inPath, \"rb\" );\n $out = fopen ( $outPath, \"wb\" );\n while ( $chunk = fread ( $in, 8192 ) ) {\n fwrite ( $out, $chunk, 8192 );\n }\n fclose ( $in );\n fclose ( $out );\n}", "public function save($value){\n $target_path = IMG_PATH.DS.$this->file_name;\n try {\n //move the uploaded file to target path\n move_uploaded_file($value, $target_path);\n return $this->_add_photo();\n } catch (Exception $e) {\n throw $e;\n }\n }", "function mkImageDir()\r\n {\r\n $buff = wp_upload_dir(); \r\n if (trim($this->config->get('imgPath')) != (str_replace(get_bloginfo('wpurl'), '', $buff['baseurl']) . '/')) {\r\n $this->uploadMediaOn = false;\r\n }\r\n \r\n if (!file_exists($this->rootPath . $this->config->get('imgPath'))) mkdir($this->rootPath . $this->config->get('imgPath'), 0777);\r\n \r\n if ($this->uploadMediaOn and get_option('uploads_use_yearmonth_folders')) {\r\n $this->imageDir = date('Y') . '/';\r\n $imageDirPath = $this->rootPath . $this->config->get('imgPath') . $this->imageDir;\r\n if (!file_exists($this->imageDir)) mkdir($this->imageDir, 0777);\r\n \r\n $this->imageDir = $this->imageDir . date('m') . '/';\r\n if (!file_exists($this->imageDir)) mkdir($this->imageDir, 0777);\r\n }\r\n return true;\r\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}", "function imageHandler($parametre){\r\n $type = end(explode(\".\", $parametre['name']));\r\n $name = explode(\".\", $parametre['name'])[0];\r\n $path = $parametre['tmp_name'];\r\n $newPath = \"C:\\\\xampp\\htdocs\\Kit-up\\assets\\books\\sales\";\r\n // echo $newPath;\r\n $allow = ['jpg', 'jpeg', 'png'];\r\n $newName = \"\";\r\n if(in_array($type,$allow)){\r\n $newName = md5(uniqid(mt_rand(), true)) . \".\" . $type;\r\n move_uploaded_file($path, $newPath.'\\\\'.$newName);\r\n return $newPath.'\\\\'.$newName ;\r\n }else{\r\n echo \"Sorry. Not supported type!\";\r\n }\r\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_banner() {\n $destPath = 'assets/img/uploads/progression';\n #Find and move our file\n $destFile = $_SERVER['DOCUMENT_ROOT'].\"/\".$destPath.\"/\".basename($_FILES['img']['name']);\n $tmpFile = $_FILES['img']['tmp_name'];\n if (move_uploaded_file($tmpFile, $destFile)){\n return $destPath.\"/\".basename($_FILES['img']['name']);\n } else {\n die(\"File Moving Failed.\");\n }\n }", "public function saveToDisk(uploadedFile $image)\n {\n $uploadDirectory = 'uploads/images';\n $path = $this->kernel->getProjectDir().'/public/'.$uploadDirectory;\n\n $imageName = uniqid().'.'.$image->guessExtension();\n\n $image->move($path, $imageName);\n\n return '/'.$uploadDirectory.'/'.$imageName;\n }", "protected function getUploadRootDirImg() {\n // guardar los archivos cargados\n return __DIR__ . '/../../../../web/uploads/portafolios/' . $this->getId() . '/img';\n }", "protected function getUploadDir()\n {\n return 'images';\n }", "public function saveImage($filename)\n\t{\n\t\timagejpeg( $this->im, \"$filename\", $this->cq );\n\t}", "public function saving(Model $model)\n {\n $file_name = $model->getAttribute($this->image_attribute_name);\n if (\n (!$file_name) ||\n (!Storage::has($this->getNormalPath(2, $file_name)))\n ) {\n if (\n (Storage::has(\"public/application/{$this->default_image_name}\")) &&\n (!Storage::has($this->getNormalPath(2, $this->default_image_name)))\n ) {\n try {\n /** @var Image $image */\n $image = ImageFacade::make(storage_path(\"app/public/application/{$this->default_image_name}\"));\n $this->loadMultipleImages([$image]);\n $this->saveImages();\n } catch (\\RuntimeException $exception) {\n logger($exception->getMessage());\n }\n }\n $model->setAttribute($this->image_attribute_name, $this->default_image_name);\n }\n }", "function upload_destination_image() {\n if ($_FILES['destination_image']['size'] > 0) {\n $dir = '../images/destination_images';\n $filename1 = $_FILES['destination_image']['name'];\n $srcfile = $_FILES['destination_image']['tmp_name'];\n $targetfile = $dir . '/' . $filename1;\n if (move_uploaded_file($srcfile, $targetfile)) {\n return $filename1;\n } else {\n return $filename1;\n }\n }\n }", "public function setPath($path) { \n $this->__imageSavePath = $path; \n }", "public function testPrepareDirOriginal()\n {\n $imgPath = $this->imageService->imgPath(\n \\Media\\Service\\Image::ORIGINAL,\n $this->imageId,\n $this->imageEntityData['extension']\n );\n $this->assertTrue($this->imageService->prepareDir($imgPath));\n }", "public function postImageUplode($path, $id)\n {\n\n move_uploaded_file($path, 'public/post_img/'. $id . '.jpg');\n }", "function __reimportPhotos(){\n\t\t$this->Asset->disablePermissionable();\n\t\t$this->Asset->recursive=0;\n\t\t$json = $this->Asset->find('all', array('fields'=>'json_src'));\n\t\t$json =Set::extract($json, '/Asset/json_src');\n\t\tforeach ($json as $row) {\n\t\t\t$imgSrc = json_decode($row);\n\t\t\t$src = \"Summer2009/\".basename($imgSrc->orig);\n\t\t\t$dest = $imgSrc->preview;\n\t\t\t$src_baseurl = Configure::read('path.local.preview');\n\t\t\t$dest_baseurl = Configure::read('stageroot.basepath');\n\t\t\t$shell_cmd[] =\"cp {$src_baseurl}/{$src} {$dest_baseurl}/{$dest}\";\n\t\t\t//\t\t\tmkdir(dirname(Configure::read('stageroot.basepath').\"/{$dest}\"), 0777, $recursive=true);\n\t\t\t//\t\t\tcopy( Configure::read('path.local.preview').\"/{$src}\", Configure::read('stageroot.basepath').\"/{$dest}\");\n\t\t}\n\t\tdebug($shell_cmd);\n\t}", "public function saveCurrentFilesTo($folder) \n {\n $result = true;\n \n $newFolder = $folder . 'Folder';\n $folderType = $this->{$newFolder}; \n \n foreach ($this->files as $key => $val) {\n \n if ($folderType !== \"\") {\n $folderFilePath = $folderType . '/' . $val['id'];\n \n $newPictureFileName = $folderFilePath . '/' . $val['picture'];\n $_newPictureFileName = $folderFilePath . '/' . $val['id'] . $this->outputFileExtension;\n $newQrCodeFileName = $folderFilePath . '/' . $val['qrcode'];\n $newIniFileName = $folderFilePath . '/' . $val['id'] . '.ini';\n \n $currentImageFilename = $this->picturesFolder . '/' . $val['picture'];\n $currentQrCodeFilename = $this->picturesFolder . '/' . $val['qrcode'];\n $currentIniFilename = $this->picturesFolder . '/' . $val['id'] . '.ini';\n\n (!is_dir($folderFilePath)) ? mkdir($folderFilePath, 0777, true) : '';\n \n echo var_dump($folderFilePath);\n \n copy($currentImageFilename, $newPictureFileName);\n rename($newPictureFileName, $_newPictureFileName);\n copy($currentQrCodeFilename, $newQrCodeFileName);\n $result = (copy($currentIniFilename, $newIniFileName)) ? true : false;\n }\n }\n \n return $result;\n }", "private function _move_image($temp_location)\n {\n $filename = basename($temp_location['name']);\n $info = pathinfo($filename);\n $ext = strtolower($info['extension']);\n \n if (isset($temp_location['tmp_name']) &&\n isset($info['extension']) &&\n in_array($ext, $this->_supported_extensions)) {\n $new_file_path = self::IMAGE_UPLOAD_DIR . DIRECTORY_SEPARATOR . $filename;\n if (!is_dir(self::IMAGE_UPLOAD_DIR) ||\n !is_writable(self::IMAGE_UPLOAD_DIR)) {\n // Attempt to auto-create upload directory.\n if (!is_writable(self::IMAGE_UPLOAD_DIR) ||\n FALSE === @mkdir(self::IMAGE_UPLOAD_DIR, null , TRUE)) {\n throw new Exception('Error: File permission issue, ' .\n 'please consult your system administrator');\n }\n }\n \n if (move_uploaded_file($temp_location['tmp_name'], $new_file_path)) {\n return DIRECTORY_SEPARATOR . $new_file_path;\n }\n }\n \n throw new Exception('File could not be uploaded.');\n }", "public function setImage() {\n\t\t$target_dir = UPROOT;\n\t\t$target_name = basename($_FILES['image']['name']);\n\t\t$tmp_name = $_FILES['image']['tmp_name'];\n\t\t$target_file = UPROOT . \"\\\\public\" . \"\\\\img\\\\\" . $target_name;\n\t\t//just in case file already exist ill append time and date\n\t\t$timeStamp = date(\"Y-m-d_H:i:s\");\n\t\t//checking if file with the same name already exists\n\t\t$append = $this->clean($timeStamp);\n\t\tif (file_exists($target_file)) {\n\t\t\t//renaming the new file by exploding it\n\t\t\t$fileName = explode('.', $target_name);\n\t\t\t$target_name = $fileName[0] . '.' . $append . '.' . $fileName[1];\n\t\t\t//reassign the folder path\n\t\t\t$target_file = UPROOT . \"\\\\public\" . \"\\\\img\\\\\" . $target_name;\n\n\t\t}\n\t\t$imageFileType = strtolower(pathinfo($target_file, PATHINFO_EXTENSION));\n\t\t$check = getimagesize($tmp_name);\n\t\t$size = $_FILES[\"image\"][\"size\"];\n\t\t$img = [\n\t\t\t'name' => $target_name,\n\t\t\t'fileType' => $imageFileType,\n\t\t\t'tmp_name' => $tmp_name,\n\t\t\t'target_file' => $target_file,\n\t\t\t'check' => $check,\n\t\t\t'size' => $size,\n\t\t];\n\t\treturn $img;\n\t}", "function moveFolder($user_dir){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'; // '.' for current\r\n\r\n\t\t\t\t\t\r\n\t\t\t}", "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 }", "private function delete_old_picture(){\n foreach ( glob( UPLOADS.$this->get_name_sanitized().'.*' ) as $picture ){\n if(is_writable($picture)){unlink($picture);}\n }\n }", "public function moveFile()\n\t{\n\t\t$thumbnail = Image::make($this->file)->resize(null, 100, function($constraint)\n\t\t\t\t\t{\n\t\t\t\t\t\t$constraint->aspectRatio();\n\t\t\t\t\t\t// $constraint->upsize();\n\t\t\t\t\t});\n\n\t\t// Move uploaded imagesto this folder\n\t\t$file_moved = $this->file->move($this->dir, $this->file->getClientOriginalName());\n\n\t\t// If successfully moved\n\t\tif ($file_moved) {\n\t\t\t// Generate thumbnail image\n\t\t\t$thumbnail->save(public_path() . '/' . $this->dir . '/thumb_' . $this->file->getClientOriginalName());\n\n\t\t\treturn Response::json(array('filelink' => '/' . $this->dir . '/' . $this->file->getClientOriginalName()));\n\t\t}\n\n\t}", "protected function moveImages(Request $request)\n {\n $posterFilename = $this->getPosterFilename($request);\n $posterFilepath = public_path('img') . DIRECTORY_SEPARATOR . 'posters'\n . DIRECTORY_SEPARATOR . $posterFilename;\n\n // If posterUrl is present then the image needs to be downloaded from the URL\n if(!empty($request->posterUrl)) {\n file_put_contents($posterFilepath, file_get_contents($request->posterUrl));\n // Resize the image with ImageMagick\n exec(\"convert $posterFilepath -resize 230x345\\! $posterFilepath\");\n }\n\n // If no posterUrl, then the uploaded image needs to be stored\n if(empty($request->posterUrl)) {\n $request->poster->storeAs('posters', $posterFilename, 'images');\n }\n\n $this->setPermissions($posterFilepath);\n\n /*\n * Handle jumbotron image, if any.\n */\n if($request->hasFile('jumbotron')) {\n $jumbotronFilename = $this->getJumbotronFilename($request);\n\n $request->jumbotron->storeAs('jumbotron', $jumbotronFilename, 'images');\n\n $this->setPermissions(\n public_path('img') . DIRECTORY_SEPARATOR . 'jumbotron'\n . DIRECTORY_SEPARATOR . $jumbotronFilename\n );\n }\n }", "public static function movingPhoto($pid)\n {\n jimport('joomla.filesystem.file');\n $db = JFactory::getDbo();\n $db->setQuery(\"Select image from #__osrs_photos where pro_id = '$pid'\");\n $rows = $db->loadObjectList();\n if (count($rows) > 0) {\n for ($i = 0; $i < count($rows); $i++) {\n $row = $rows[$i];\n if ((JFile::exists(JPATH_ROOT . '/images/osproperty/properties/' . $row->image)) and (!JFile::exists(JPATH_ROOT . '/images/osproperty/properties/' . $pid . '/' . $row->image))) {\n JFile::copy(JPATH_ROOT . '/images/osproperty/properties/' . $row->image, JPATH_ROOT . '/images/osproperty/properties/' . $pid . '/' . $row->image);\n }\n if ((JFile::exists(JPATH_ROOT . '/images/osproperty/properties/medium/' . $row->image)) and (!JFile::exists(JPATH_ROOT . '/images/osproperty/properties/' . $pid . '/medium/' . $row->image))) {\n JFile::copy(JPATH_ROOT . '/images/osproperty/properties/medium/' . $row->image, JPATH_ROOT . '/images/osproperty/properties/' . $pid . '/medium/' . $row->image);\n }\n if ((JFile::exists(JPATH_ROOT . '/images/osproperty/properties/thumb/' . $row->image)) and (!JFile::exists(JPATH_ROOT . '/images/osproperty/properties/' . $pid . '/thumb/' . $row->image))) {\n JFile::copy(JPATH_ROOT . '/images/osproperty/properties/thumb/' . $row->image, JPATH_ROOT . '/images/osproperty/properties/' . $pid . '/thumb/' . $row->image);\n }\n }\n }\n }", "private function save_image($source, $destination, $image_type){\n\tswitch(strtolower($image_type)){//determine mime type\n\tcase 'image/png':\n\t imagepng($source, $destination); return true; //save png file\n\t break;\n\tcase 'image/gif':\n\t imagegif($source, $destination); return true; //save gif file\n\t break; \n\tcase 'image/jpeg': case 'image/pjpeg':\n\t imagejpeg($source, $destination, '90'); return true; //save jpeg file\n\t break;\n\tdefault: return false;\n\t} \n\t}", "public static function getDestination()\n {\n return public_path() . '/img/profile_photos/';\n }", "function uploadPhoto(){\n $oldpath = $_FILES['photo']['tmp_name'];\n $newpath =\"photos/\".$_FILES['photo']['name'];\n move_uploaded_file($oldpath, $newpath);\n}", "function save($path, $file) {\n // сохраняем миниатюру]\n // создать миниатюру\n // if (!move_uploaded_file($_FILES['qqfile']['tmp_name'], $path.'small/small_'.$file)) {\n // return false;\n // }\n // если всё нормально, то\n // сохраняем оригинальный файл\n if(!move_uploaded_file($_FILES['qqfile']['tmp_name'], $path.$file)){\n return false;\n }\n\n // создать миниатюру\n $image = new SimpleImage();\n $image->load($path.$file);\n $image->resize(400, 200);\n $image->save($path.'small/small_'.$file);\n\n return true;\n }", "public function saveImageFromPost(){\n if(!empty($_FILES['images'])) {\n $imageData = $_FILES;\n $tmp_name = $imageData['images']['tmp_name'];\n $file_name = $this->getImageName();\n $upload_dir = DIR_IMAGES_DATA . \"/\" . $file_name;\n move_uploaded_file($tmp_name, $upload_dir);\n return $file_name;\n }else{\n return false;\n }\n }", "public function SaveProfileImg() {\n $file_name = $_SESSION['user_id'] . \"-\" . time() . \"-\" . $this->ImageName;\n $file_size = $this->ImageSize;\n $file_tmp = $this->ImageTmpName;\n $tmp = explode('.', $file_name);\n $file_ext = end($tmp);\n $expensions = array(\"jpeg\", \"jpg\", \"png\", \"gif\");\n \n if (in_array($file_ext, $expensions) === false) {\n throw new Exception(\"extension not allowed, please choose a JPEG or PNG or GIF file.\");\n }\n \n if ($file_size > 2097152) {\n throw new Exception('File size must be excately 2 MB');\n }\n \n if (empty($errors) == true) {\n move_uploaded_file($file_tmp, \"data/profile/\" . $file_name);\n return \"data/profile/\" . $file_name;\n } else {\n echo \"Error\";\n }\n }", "function storeUploadedFile($tmpFilePath){\r\n \r\n // gets the image type, reads first few bytes of image and returns int that represents jpg or png\r\n $imageTypeInt = exif_imagetype($tmpFilePath);\r\n \r\n // takes int and gets image extension\r\n $extension = image_type_to_extension($imageTypeInt);\r\n \r\n // gets the target directory for upload\r\n $target_dir = \"images/properties/\";\r\n \r\n // generates unique name for file based on microseconds of upload time\r\n // second param makes it more unique adds additional characters on end of returned value\r\n //eg \"/images/properties/8872791982.jpg\"\r\n $newImagePath = $target_dir . uniqid(\"prop\", true) . $extension;\r\n \r\n // takes current image path (in tmp folder) and puts it in new location newImagePath\r\n move_uploaded_file($tmpFilePath, $newImagePath);\r\n \r\n return $newImagePath;\r\n}", "function saveThumbnailImage($filename, $destinationFile){\n\t\t $this->resizeSaveImage($filename, $destinationFile, self::thumbWidth);\n\t }", "public function imagePath(){\n return $this->upload_directory.DS.$this->filename;\n }", "public function savePictures($pictures, $picturedModel, $destinationPath)\n\t{\n\t\tforeach ($pictures as $picture)\n\t\t{\n\t\t\t$lastPictureId = '1';\n\t\t\tif ( !is_null($picturedModel->lastPicture()) )\n\t\t\t{\n\t\t\t\t$lastPicturePath = $picturedModel->lastPicture()->path;\n\t\t\t\t$lastPicture = ltrim($lastPicturePath, '.jpg');\n\n\t\t\t\t$numberOfDigits = strlen($picturedModel->id) + 1;\n\t\t\t\t$lastPictureId = substr($lastPicturePath, $numberOfDigits, -4);\n\t\t\t\t$lastPictureId++;\n\t\t\t}\n\n\t\t\t$filename = $picturedModel->id . '-' . $lastPictureId . '.jpg';\n\n\t\t\t$image = Image::make($picture->getRealPath());\n\n\t\t\t$image->save($destinationPath . $filename);\n\n\t\t\t// Resize and save thumbnail\n\t\t\tif ($image->width() > 200)\n\t\t\t{\n\t\t\t\t$image->fit(200);\n\t\t\t}\n\n\t\t\t$image->save($destinationPath . 'thumbnails/' . $filename);\n\n\t\t\t$picture = new Picture;\n\t\t\t$picture->path = $filename;\n\t\t\t$picture->save();\n\n\t\t\t$picturedModel->pictures()->save($picture);\n\t\t}\n\t}", "function copy_sprites_to_new_dir($base_token, $count_string, $new_sprite_path, $exclude_sprites = array(), $delete_existing = true, $silent_mode = false, $short_mode = false){\n global $migration_kind, $migration_kind_singular, $migration_limit;\n $kind = $migration_kind_singular;\n $kind_plural = $migration_kind;\n if (!$short_mode){\n ob_echo('----------', $silent_mode);\n ob_echo('Processing '.$kind.' sprites for \"'.$base_token.'\" '.$count_string, $silent_mode);\n }\n ob_flush();\n if (!strstr($new_sprite_path, MMRPG_CONFIG_ROOTDIR)){ $new_sprite_path = MMRPG_CONFIG_ROOTDIR.ltrim($new_sprite_path, '/'); }\n $base_sprite_path = MMRPG_CONFIG_ROOTDIR.'images/'.$kind_plural.'/'.$base_token.'/';\n //ob_echo('-- $base_sprite_path = '.clean_path($base_sprite_path), $silent_mode);\n if (!file_exists($base_sprite_path)){\n $base_sprite_path = MMRPG_CONFIG_ROOTDIR.'images/xxx_'.$kind_plural.'/'.$base_token.'/';\n //ob_echo('-- $base_sprite_path(2) = '.clean_path($base_sprite_path), $silent_mode);\n }\n if (!file_exists($base_sprite_path)){\n ob_echo('- '.clean_path($base_sprite_path).' does not exist', $silent_mode);\n return false;\n }\n //ob_echo('-- $new_sprite_path = '.clean_path($new_sprite_path), $silent_mode);\n if ($delete_existing && file_exists($new_sprite_path)){ deleteDir($new_sprite_path); }\n if (!file_exists($new_sprite_path)){ mkdir($new_sprite_path); }\n ob_echo('- copy '.clean_path($base_sprite_path).'* to '.clean_path($new_sprite_path), $silent_mode);\n recurseCopy($base_sprite_path, $new_sprite_path, $exclude_sprites);\n $global_image_directories_copied = $kind.'_image_directories_copied';\n global $$global_image_directories_copied;\n ${$global_image_directories_copied}[] = basename($base_sprite_path);\n return true;\n}", "public function save($img, $name, $path = null)\n {\n $path = $path ?: $this->path;\n\n $this->disk->put($path .'/'. $name, $img->stream());\n }" ]
[ "0.72756493", "0.7137192", "0.6728117", "0.66027415", "0.6515712", "0.64665794", "0.64650667", "0.6416328", "0.6379757", "0.63393956", "0.6246647", "0.6169967", "0.6163733", "0.6160299", "0.61403024", "0.61263263", "0.6080647", "0.60633135", "0.598659", "0.5960824", "0.59401", "0.5883563", "0.5882549", "0.58631337", "0.5842119", "0.58112043", "0.5805706", "0.57935405", "0.5782647", "0.57574356", "0.573917", "0.57069373", "0.5694408", "0.5692311", "0.56818336", "0.566802", "0.56679195", "0.5666298", "0.5665816", "0.56437844", "0.5628534", "0.5622932", "0.5607744", "0.56030095", "0.55767024", "0.55713123", "0.5547113", "0.551242", "0.54965866", "0.5490871", "0.5487295", "0.54862344", "0.5485992", "0.54840297", "0.54720867", "0.5466726", "0.5462071", "0.5459443", "0.5445568", "0.5439557", "0.5439529", "0.54371846", "0.54364496", "0.54346544", "0.54202545", "0.54150265", "0.5406598", "0.5368368", "0.5366438", "0.536537", "0.53592354", "0.5356773", "0.5355544", "0.5347002", "0.5346237", "0.5345423", "0.5344394", "0.53392065", "0.53370863", "0.53269273", "0.5320946", "0.531192", "0.5308767", "0.5308433", "0.5304474", "0.52935326", "0.52908254", "0.52720714", "0.5266327", "0.52611816", "0.5260247", "0.5259997", "0.52586645", "0.5258474", "0.5256886", "0.5256592", "0.5254675", "0.5248555", "0.5241623", "0.52389616" ]
0.7284063
0
los metodos abstractos NO SE IMPLEMENTAN
public abstract function Ataca();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function interface();", "abstract function ActualizarDatos();", "abstract protected function __construct();", "abstract function __construct();", "abstract public function __construct();", "abstract public function __construct();", "abstract public function __construct();", "protected abstract function __construct();", "abstract public function service();", "function chouXiang()\n {\n echo '必须继承重写的抽象类的抽象方法'.'</br>';\n }", "protected abstract function performImpl();", "abstract protected function external();", "abstract protected function content();", "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}", "abstract protected function create ();", "abstract protected function data();", "abstract public function otherfoo();", "abstract protected function handle();", "abstract protected function model();", "abstract protected function model();", "public function ruta_absoluta_base()\n {\n throw new Exception( 'Definir.' );\n }", "abstract public function object();", "public function __init(){}", "public function __construct(){\n\t\t//asi poder tener dispoble la vista que le pertenece a esta clase\n\t\tparent::__construct();\n\t}", "abstract public function test();", "abstract public function test();", "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(){}", "abstract public function getPasiekimai();", "abstract function create();", "protected abstract function getIListar();", "abstract protected function getEventableRepository();", "protected function __construct(){}", "protected function __construct(){}", "protected function __construct(){}", "public function custom()\n\t{\n\t}", "abstract function model();", "abstract function model();", "abstract function model();", "abstract function model();", "private function __construct()\t{}", "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 }", "protected function __init__() { }", "public function __construct()\n {\n //to be extended by children\n }", "public function AggiornaPrezzi(){\n\t}", "function __construct (){\n\t\t}", "protected abstract function test();", "protected abstract function test();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "function __construct() ;", "abstract protected function attributes();", "final private function __construct(){\r\r\n\t}", "abstract function command();", "abstract function get();", "final private function __construct() {}", "final private function __construct() {}", "protected final function __construct() {}", "public function metodo_publico() {\n }", "public function geraInterface(){\n # Abre o template da classe basica e armazena conteudo do modelo\n $modeloAdm = Util::getConteudoTemplate($this->gui.'/Modelo.adm.tpl');\n $modeloCad = Util::getConteudoTemplate($this->gui.'/Modelo.cad.tpl');\n $modeloEdit = Util::getConteudoTemplate($this->gui.'/Modelo.edit.tpl');\n\n $dir = '';\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n\n # Varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n // === Nao gerar interface de tabelas n:m\n if((string)$aTabela['TIPO_TABELA'] == 'N:M')\n continue;\n\n $copiaModeloAdm = $modeloAdm;\n $copiaModeloCad = $modeloCad;\n $copiaModeloEdit = $modeloEdit;\n\n $nomeClasse\t = ucfirst($this->getCamelMode((string)$aTabela['NOME']));\n $objetoClasse = \"\\$o$nomeClasse\";\n\n # Varre a estrutura dos campos da tabela em questao\n $aPKRequest = $aCampoPK = $aCampoCad = $aCampoEdit = $aTituloAdm = $aCampoAdm = $aGetAll = array();\n $PK = $ID_PK = $label = $campoAdm = $componenteCad = $componenteEdit = NULL;\n\n foreach($aTabela as $oCampo){\n $nomeFKClasse = ucfirst($this->getCamelMode((string)$oCampo->FKTABELA));\n //$label = ((string)$oCampo->FKCAMPO != '') ? ucfirst(preg_replace(\"#^(?:id_?|cd_?)(.*?)#is\", \"$1\", (string)$oCampo->NOME)) : \n $label = ((string)$oCampo->FKCAMPO != '') ? $nomeFKClasse :\n ucfirst(str_replace((string)$aTabela['NOME'], \"\", (string)$oCampo->NOME));\n\n $campoAdm = ((string)$oCampo->FKCAMPO != '') ? $objetoClasse.\"->o$label\".\"->\".$this->getTituloCombo((string)$oCampo->FKTABELA) :\n $objetoClasse.\"->$oCampo->NOME\";\n\n if((int)$oCampo->CHAVE == 1){\n $aPKRequest[] = \"\\$_REQUEST['{$oCampo->NOME}']\";\n $aCampoPK[] = Form::geraHidden((string)$oCampo->NOME);\n\n if((string)$oCampo->FKTABELA != ''){ // Tabela cuja PK = FK => Relacao 1:1\n $PK = \"o$nomeFKClasse\".\"->\".$oCampo->FKCAMPO;\n $ID_PK = $oCampo->FKCAMPO;\n\n //print \"($objetoClasse, {$oCampo->NOME}, $label, $nomeFKClasse, \".$this->getTituloCombo((string)$oCampo->FKTABELA).\", 'CAD')\\n\";\n $componenteCad = Form::geraSelect($objetoClasse, (string)$oCampo->NOME, $label, $oCampo->FKCAMPO, $this->getTituloCombo((string)$oCampo->FKTABELA), 'CAD', $this->gui);\n $componenteEdit = Form::geraSelect($objetoClasse, (string)$oCampo->NOME, $label, $oCampo->FKCAMPO, $this->getTituloCombo((string)$oCampo->FKTABELA), 'EDIT', $this->gui);\n\n } else {\n $PK = (string)$oCampo->NOME;\n $ID_PK = (string)$oCampo->NOME;\n }\n } else {\n switch((string)$oCampo->TIPO){\n case \"date\":\n $componenteCad = Form::geraCalendario($objetoClasse, (string)$oCampo->NOME, $label, 'CAD');\n $componenteEdit = Form::geraCalendario($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT');\n $campoAdm = Form::geraCalendario($objetoClasse, (string)$oCampo->NOME, $label, 'ADM');\n break;\n\n case \"datetime\":\n case \"timestamp\":\n $componenteCad = Form::geraCalendarioDataHora($objetoClasse, (string)$oCampo->NOME, $label, 'CAD');\n $componenteEdit = Form::geraCalendarioDataHora($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT');\n $campoAdm = Form::geraCalendarioDataHora($objetoClasse, (string)$oCampo->NOME, $label, 'ADM');\n break;\n\n case \"text\": \n $componenteCad = Form::geraTextArea($objetoClasse, (string)$oCampo->NOME, $label, 'CAD', $this->gui);\n $componenteEdit = Form::geraTextArea($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT', $this->gui);\n break;\n\n case \"tinyint(1)\": \n $componenteCad = Form::geraCheckBox($objetoClasse, (string)$oCampo->NOME, $label, 'CAD', $this->gui);\n $componenteEdit = Form::geraCheckBox($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT', $this->gui);\n break;\n\n default:\n if($oCampo->FKCAMPO != ''){\n $componenteCad = Form::geraSelect($objetoClasse, (string)$oCampo->NOME, $label, $oCampo->FKCAMPO, $this->getTituloCombo((string)$oCampo->FKTABELA), 'CAD', $this->gui);\n $componenteEdit = Form::geraSelect($objetoClasse, (string)$oCampo->NOME, $label, $oCampo->FKCAMPO, $this->getTituloCombo((string)$oCampo->FKTABELA), 'EDIT', $this->gui);\n }\n else{\n $componenteCad = (preg_match(\"#(?:senha|password)#is\", $oCampo->NOME)) ? \n Form::geraPassword($objetoClasse, (string)$oCampo->NOME, $label, 'CAD', $this->gui) :\n Form::geraInput($objetoClasse, (string)$oCampo->NOME, $label, 'CAD', (string)$oCampo->TIPO, $this->gui);\n\n $componenteEdit = (preg_match(\"#(?:senha|password)#is\", $oCampo->NOME)) ? \n Form::geraPassword($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT', $this->gui) :\n Form::geraInput($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT', (string)$oCampo->TIPO, $this->gui);\n }\n # ============ Campo Enum =============\n if(preg_match(\"#enum#i\", (string)$oCampo->TIPO)){\n $componenteCad = Form::geraEnum($objetoClasse, (string)$oCampo->NOME, (string)$oCampo->TIPO, $label, 'CAD', $this->gui);\n $componenteEdit = Form::geraEnum($objetoClasse, (string)$oCampo->NOME, (string)$oCampo->TIPO, $label, 'EDIT', $this->gui);\t\n } \n break;\n }\n }\n $aCampoCad[] = $componenteCad;\n $aCampoEdit[] = $componenteEdit;\n $aTituloAdm[] = \"<th>$label</th>\";\n $aCampoAdm[] = \"<td><?=$campoAdm?></td>\";\n }\n\n # ===== Montar lista dos metodos Carregar Colecao =======\n $aTabelaFK = $this->retornaTabelasFK((string)$aTabela['NOME']);\n\n foreach($aTabelaFK as $oCampoFK => $oDadosTabelaFK){\n $nomeClasseFK\t = ucfirst($this->getCamelMode($oDadosTabelaFK['FKTABELA']));\n $nomeObjetoFK\t = ucfirst(preg_replace(\"#^(?:id_?|cd_?)(.*?)#is\", \"$1\", $oCampoFK));\n $aGetAll[] = \"\\$a$nomeClasseFK = \\$oControle->getAll$nomeClasseFK();\"; \n }\n\n # monta demais valores a serem substituidos\n $sPKRequest = join($aPKRequest, \", \");\n $sTituloAdm = join($aTituloAdm, \"\\n\\t\\t\\t\");\n $sCampoAdm = join($aCampoAdm, \"\\n\\t\\t\\t\");\n $sCampoCad = join($aCampoCad, \"\\n\");\n $sCampoEdit = join($aCampoEdit, \"\\n\");\n $sCampoPK = join($aCampoPK, \"\\n\");\n $sGetAll = (count($aGetAll)>0) ? join($aGetAll,\"\\n\") : \"\";\n\n # substitui todas os parametros pelas variaveis ja processadas\n $copiaModeloAdm = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%TITULOATRIBUTOS%%', $sTituloAdm, $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%VALORATRIBUTOS%%', $sCampoAdm, $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%ADM_EDIT%%', \t (($PK != '') ? Form::geraAdmEdit($nomeClasse, $ID_PK, $PK, $this->gui) : ''), $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%ADM_DELETE%%', (($PK != '') ? Form::geraAdmDelete($nomeClasse, $ID_PK, $PK, $this->gui) : ''), $copiaModeloAdm);\n\n /* ========= 2 devido as colunas Editar e Excluir ============= */\n $copiaModeloAdm = str_replace('%%NUMERO_COLUNAS%%', count($aTituloAdm)+2, $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%PK_REQUEST%%', $sPKRequest, $copiaModeloAdm);\t\t\t\n\n $copiaModeloCad = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModeloCad);\n $copiaModeloCad = str_replace('%%CARREGA_COLECAO%%', $sGetAll, $copiaModeloCad);\n $copiaModeloCad = str_replace('%%ATRIBUICAO%%', $sCampoCad, $copiaModeloCad);\n\n $copiaModeloEdit = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%CARREGA_COLECAO%%', $sGetAll, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%ATRIBUICAO%%', $sCampoEdit, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%CHAVE_PRIMARIA%%', $sCampoPK, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%PK%%', $PK, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%ID_PK%%', $ID_PK, $copiaModeloEdit);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/\";\n\n if(!file_exists($dir)) mkdir($dir);\n\n $fpAdm = fopen(\"$dir/adm$nomeClasse.php\", \"w\"); fputs($fpAdm, $copiaModeloAdm); fclose($fpAdm);\n $fpCad = fopen(\"$dir/cad$nomeClasse.php\", \"w\"); fputs($fpCad, $copiaModeloCad); fclose($fpCad);\n $fpEdit = fopen(\"$dir/edit$nomeClasse.php\", \"w\"); fputs($fpEdit, $copiaModeloEdit); fclose($fpEdit);\n\n // ======= Limpa arrays ======= \n unset($aGetAll);\n unset($aTituloAdm);\n unset($aCampoAdm);\n unset($aCampoCad);\n unset($aCampoEdit);\n unset($aPKRequest);\n unset($aCampoPK);\n }\n\n # ==== Alterar arquivo index =====\n $modeloIndex = Util::getConteudoTemplate($this->gui.'/index.php');\n $modeloIndex = str_replace('%%PROJETO%%', ucfirst($aBanco['NOME']), $modeloIndex);\n\n $fpIndex = fopen(\"$dir/index.php\", \"w\");\n fputs($fpIndex, $modeloIndex); \n fclose($fpIndex);\n \n # ============== Arquivo de titulo ===================\n $modeloTitulo = Util::getConteudoTemplate($this->gui.'/Modelo.titulo.tpl');\n $modeloTitulo = str_replace('%%DATABASE%%', ucfirst($aBanco['NOME']), $modeloTitulo);\n\n $fpTitulo = fopen($dir.\"includes/titulo.php\", \"w\");\n fputs($fpTitulo, $modeloTitulo); \n fclose($fpTitulo);\n \n // ========= Copiar arquivos adicionais do projeto ========\n copy(dirname(dirname(__FILE__)).\"/templates/{$this->gui}/resIndex.php\", \"$dir/resIndex.php\");\n copy(dirname(dirname(__FILE__)).\"/templates/{$this->gui}/principal.php\", \"$dir/principal.php\");\n copy(dirname(dirname(__FILE__)).\"/templates/{$this->gui}/logoff.php\", \"$dir/logoff.php\");\n\n return true;\t\n }", "abstract protected function init();", "abstract protected function init();", "abstract protected function init();", "abstract protected function init();", "abstract protected function init();", "abstract protected function init();", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}" ]
[ "0.67779523", "0.6328906", "0.63200045", "0.6230149", "0.6211472", "0.6211472", "0.6211472", "0.61371976", "0.6037189", "0.59432745", "0.5937664", "0.5932766", "0.5925315", "0.59185725", "0.5905362", "0.5882711", "0.5878965", "0.58538866", "0.58116037", "0.58116037", "0.581002", "0.58068407", "0.579372", "0.5783608", "0.5778506", "0.5778506", "0.5773634", "0.5773634", "0.5773634", "0.5773634", "0.5773634", "0.5773634", "0.5773634", "0.5773634", "0.5773634", "0.5773634", "0.5773634", "0.5773634", "0.5773634", "0.5773634", "0.5773634", "0.5773634", "0.5773634", "0.5770516", "0.5768883", "0.57311237", "0.5725493", "0.57219654", "0.57219654", "0.57219654", "0.5715741", "0.57040066", "0.57040066", "0.57040066", "0.57040066", "0.56835926", "0.56811196", "0.56755567", "0.56741536", "0.5673023", "0.5672991", "0.56638867", "0.56638867", "0.56605387", "0.56605387", "0.56605387", "0.56605387", "0.56605387", "0.56605387", "0.56604445", "0.56601316", "0.5653602", "0.564395", "0.56414187", "0.5634745", "0.5634745", "0.5629885", "0.56245303", "0.5618609", "0.56073284", "0.56073284", "0.56073284", "0.56073284", "0.56073284", "0.56073284", "0.55952346", "0.55952346", "0.55952346", "0.55952346", "0.55952346", "0.55952346", "0.55952346", "0.55952346", "0.55952346", "0.55952346", "0.55952346", "0.55952346", "0.55952346", "0.55952346", "0.55952346" ]
0.6310848
3
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; if(isset($this->mallId) && !empty($this->mallId)){ $criteria->join = 'INNER JOIN mall_build as mb ON t.user_id = mb.admin_id AND mb.id = :mallId'; $criteria->params[':mallId'] = $this->mallId; } $criteria->compare('t.id',$this->id); $criteria->compare('t.name',$this->name,true); $criteria->compare('t.user_id',$this->user_id); $criteria->compare('t.status',$this->status); $criteria->compare('t.update_time',$this->update_time); $criteria->compare('t.create_time',$this->create_time); 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 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 findAll()\n {\n return $this->model->all();\n }", "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 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 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 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 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 findBy(array $filters);", "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 getList()\n {\n return $this->model->getList();\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('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 function getSearch();", "public static function getList(array $filters){\n return self::model()->findAllByAttributes($filters);\n }", "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 }", "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 }", "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(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 }", "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 getAndFilter() {\n\t\treturn $this->db->getAndFilter();\n\t}" ]
[ "0.6743169", "0.6743169", "0.660761", "0.6479806", "0.63798267", "0.63454884", "0.6310211", "0.630157", "0.6253882", "0.62494963", "0.62494963", "0.6111013", "0.6077699", "0.60734916", "0.604629", "0.60349816", "0.60323626", "0.6014135", "0.5981404", "0.5979577", "0.59790176", "0.59686154", "0.5932365", "0.59278476", "0.59224707", "0.58915573", "0.5889474", "0.5850065", "0.5846599", "0.58258194", "0.58169955", "0.5811794", "0.58071834", "0.5792253", "0.5776716", "0.5769704", "0.5762866", "0.5762595", "0.5750857", "0.5740329", "0.5738501", "0.5727578", "0.57241714", "0.57224226", "0.57219917", "0.57193714", "0.5717115", "0.5713116", "0.57129574", "0.57069343", "0.56932455", "0.56813276", "0.5671539", "0.56690705", "0.5668895", "0.5668895", "0.5668895", "0.5668847", "0.56679785", "0.56638783", "0.56562364", "0.56505203", "0.5649221", "0.56414455", "0.56334", "0.56329614", "0.5631676", "0.562298", "0.56168723", "0.5612008", "0.5608453", "0.55940604", "0.5580047", "0.5572055", "0.55555546", "0.55500674", "0.5547689", "0.5547594", "0.55458593", "0.55359334", "0.553295", "0.55324304", "0.5530852", "0.5525286", "0.552028", "0.5517957", "0.5513443", "0.55082744", "0.5506695", "0.5499769", "0.5499749", "0.54954296", "0.54954296", "0.54954296", "0.5494633", "0.54934925", "0.54930055", "0.5491269", "0.54898334", "0.5489441", "0.5484841" ]
0.0
-1
Plugin Name: Term Meta Version: 1.0 Description: Uses a custom post type to shadow each term and optionally create a taxonomy default and store data specific to that taxonomy term or taxonomy default. This plugin also enables multiple termmeta containers to be associated with the same taxonomy or term which can be really handy for a homepage. Using this plugin, you can stage and even preview all of the changes for the home page and set a publish date so that all of the content and layout of the page will change at one time. Contrast this with the current widget api where each change is reflected immediately. So using traditional widgets, if you have changes in multiple locations the page will be in multiple stages of trasistion while you make those changes. But you can have a clean transistion with Term Meta. And... Although, having multiple termmeta containers per taxonomy term is cool and all, it can get a little complex. To simplify things, the plugin can be set to only allow a single container per term. In that scenario, when you call set_term_meta against a term with an existing container it will use the existing container ignoring date parameters. If you are using the optional UI, when you choose "Add New" you will be asked which term to add or edit. If you choose a pre existing one, you edit it instead of adding a new one. In this mode the UI hides the publish date fields. On the other side, if complexity is your thing, termmeta can shadow pages, posts, and custom post types as well. So you could define and preschedule multiple versions of a page. We call this the multisingularity! Reference: Term meta has been requested many times including here Author: 10up, Eric Mann, Luke Gedeon, John P. Bloch License: GPLv2 Term meta functions based on Post meta API Add meta data field to a term.
function add_post_meta($term_id, $taxonomy, $meta_key, $meta_value, $unique = false) { return add_metadata('post', $post_id, $meta_key, $meta_value, $unique); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function acf_upgrade_550_termmeta()\n{\n}", "function add_custom_taxonomies() {\n register_taxonomy('meta_info', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x('Meta Information', 'taxonomy general name'),\n 'singular_name' => _x('Meta Information', 'taxonomy singular name'),\n 'search_items' => __('Search Meta Information'),\n 'all_items' => __('All Meta Information'),\n 'edit_item' => __('Edit Meta Information'),\n 'update_item' => __('Update Meta Information'),\n 'add_new_item' => __('Add New Meta Information'),\n 'new_item_name' => __('New Meta Information Name'),\n 'menu_name' => __('Meta Information'),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'meta', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n\n register_taxonomy('column_info', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x('Column Information', 'taxonomy general name'),\n 'singular_name' => _x('Column Information', 'taxonomy singular name'),\n 'search_items' => __('Search Column Information'),\n 'all_items' => __('All Column Information'),\n 'edit_item' => __('Edit Column Information'),\n 'update_item' => __('Update Column Information'),\n 'add_new_item' => __('Add New Column Information'),\n 'new_item_name' => __('New Column Information Name'),\n 'menu_name' => __('Column Information'),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'commentary', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n\n}", "function kstHelpWordpressMisc_customFieldsAndMetaBoxes() {\n ?>\n <p>\n Among the many fabulous but too little used features of WordPress includes\n custom fields. Custom fields are generic form fields below the text editor\n on posts and pages (and custom post types) that allow theme and plugin\n developers the ability to add unique functionality to posts and pages that\n you have control over per post/page.\n </p>\n <p>\n Examples include changing a quote or content box in the header or sidebar\n on a per page basis, embedding media, and adding extra meta-type information to\n display about posts such as \"duration\", \"citations\", \"special guests\", or\n whatever the theme or plugin developer offered.\n </p>\n <p>\n If your theme includes such things hopefully they will have added a help\n entry for you to learn how to use them.\n </p>\n <p>\n The theme or plugin developer may have alternatively created\n \"metaboxes\" that appear in place of the \"generic custom fields\". A metabox\n is a custom mini-form that explicitly tells the contributor what data they\n can enter.\n </p>\n <?php\n}", "function update_term_meta( $term_id, $meta_key, $meta_value, $prev_value = '' ) {\r\n\r\n if ( current_theme_supports( 'extended-taxonomies' ) ) {\r\n return update_post_meta( get_post_for_extended_term( $term_id )->ID, $meta_key, $meta_value, $prev_value );\r\n }\r\n\r\n return update_metadata( 'taxonomy', $term_id, $meta_key, $meta_value, $prev_value );\r\n }", "function m_custom_meta() {\r\n add_meta_box( 'sm_meta', __( 'Featured Posts', 'sm-textdomain' ), 'sm_meta_callback', 'post' );\r\n add_meta_box( 'mm_meta', __( 'Main Posts', 'sm-textdomain' ), 'mm_meta_callback', 'post' );\r\n\r\n}", "function add_metadata_taxonomies() {\n\t/*\n\tEducational use: http://schema.org/educationalUse e.g. http://purl.org/dcx/lrmi-vocabs/edUse/instruction\nEducational audience: http://schema.org/EducationalAudience e.g. http://purl.org/dcx/lrmi-vocabs/educationalAudienceRole/student\nInteractivity type: http://schema.org/interactivityType e.g. http://purl.org/dcx/lrmi-vocabs/interactivityType/expositive (active, expositive, or mixed)\nProficiency level: http://schema.org/proficiencyLevel (Beginner, Expert)\n\t*/\n\tadd_educational_use();\n\tadd_educational_audience();\n\tadd_interactivity_type();\n\tadd_proficiency_level();\n}", "function the_meta()\n {\n }", "function customize_meta_boxes()\n{\n // These remove meta boxes from POSTS\n //remove_post_type_support(\"post\",\"excerpt\"); //Remove Excerpt Support\n //remove_post_type_support(\"post\",\"author\"); //Remove Author Support\n //remove_post_type_support(\"post\",\"revisions\"); //Remove Revision Support\n //remove_post_type_support(\"post\",\"comments\"); //Remove Comments Support\n //remove_post_type_support(\"post\",\"trackbacks\"); //Remove trackbacks Support\n //remove_post_type_support(\"post\",\"editor\"); //Remove Editor Support\n //remove_post_type_support(\"post\",\"custom-fields\"); //Remove custom-fields Support\n //remove_post_type_support(\"post\",\"title\"); //Remove Title Support\n\n\n // These remove meta boxes from PAGES\n //remove_post_type_support(\"page\",\"revisions\"); //Remove Revision Support\n //remove_post_type_support(\"page\",\"comments\"); //Remove Comments Support\n //remove_post_type_support(\"page\",\"author\"); //Remove Author Support\n //remove_post_type_support(\"page\",\"trackbacks\"); //Remove trackbacks Support\n //remove_post_type_support(\"page\",\"custom-fields\"); //Remove custom-fields Support\n\n}", "function wp_create_initial_post_meta()\n {\n }", "function master_sidebar_taxonomy_meta_boxes() {\n\n\t$taxonomies = get_taxonomies( array( 'show_in_nav_menus' => true ), 'object' );\n\t$admin_page_name = 'appearance_page_custom_theme_sidebars';\n\n\tif ( ! $taxonomies ) {\n\t\treturn;\n\t}\n\n\tforeach ( $taxonomies as $tax ) {\n\t\t$tax = apply_filters( 'master_sidebar_meta_box_object', $tax );\n\t\tif ( $tax ) {\n\t\t\t$id = $tax->name;\n\t\t\tadd_meta_box( \n\t\t\t\t\"master-add-{$id}\", \n\t\t\t\t$tax->labels->name, \n\t\t\t\t'master_sidebar_item_taxonomy_meta_box', \n\t\t\t\t$admin_page_name, \n\t\t\t\t'side', \n\t\t\t\t'default', \n\t\t\t\t$tax \n\t\t\t);\t\t\t\n\t\t}\n\t}\n}", "function master_sidebar_post_type_meta_boxes() {\n\t\n\t$post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'object' );\n\t$admin_page_name = 'appearance_page_custom_theme_sidebars';\n\n\tif ( ! $post_types ) {\n\t\treturn;\n\t}\n\n\t// Add metabox for each posttype\n\tforeach ( $post_types as $post_type ) {\n\t\t$post_type = apply_filters( 'master_sidebar_meta_box_object', $post_type );\n\t\tif ( $post_type ) {\n\t\t\t$id = $post_type->name;\n\t\t\tadd_meta_box( \n\t\t\t\t\"master-add-{$id}\", \n\t\t\t\t$post_type->labels->name, \n\t\t\t\t'master_sidebar_item_post_type_meta_box', \n\t\t\t\t$admin_page_name, \n\t\t\t\t'side', \n\t\t\t\t'default', \n\t\t\t\t$post_type \n\t\t\t);\n\t\t}\n\t}\n}", "function add_term_meta( $term_id, $meta_key, $meta_value, $unique = false ) {\r\n\r\n if ( current_theme_supports( 'extended-taxonomies' ) ) {\r\n return add_post_meta( get_post_for_extended_term( $term_id )->ID, $meta_key, $meta_value, $unique );\r\n }\r\n\r\n return add_metadata( 'taxonomy', $term_id, $meta_key, $meta_value, $unique );\r\n }", "function tc_post_metas() {\r\n global $post;\r\n //when do we display the metas ?\r\n //1) we don't show metas on home page, 404, search page by default\r\n //2) +filter conditions\r\n $post_metas_bool = ( tc__f('__is_home') || is_404() || 'page' == $post -> post_type ) ? false : true ;\r\n $post_metas_bool = apply_filters('tc_show_post_metas', $post_metas_bool ); \r\n \r\n if ( ! $post_metas_bool )\r\n return;\r\n\r\n ob_start();\r\n ?>\r\n\r\n <div class=\"entry-meta\">\r\n <?php\r\n if ( 'attachment' == $post -> post_type ) {\r\n $metadata = wp_get_attachment_metadata();\r\n printf( '%1$s <span class=\"entry-date\"><time class=\"entry-date updated\" datetime=\"%2$s\">%3$s</time></span> %4$s %5$s',\r\n '<span class=\"meta-prep meta-prep-entry-date\">'.__('Published' , 'customizr').'</span>',\r\n apply_filters('tc_use_the_post_modified_date' , false ) ? esc_attr( get_the_date( 'c' ) ) : esc_attr( get_the_modified_date('c') ),\r\n esc_html( get_the_date() ),\r\n ( isset($metadata['width']) && isset($metadata['height']) ) ? __('at dimensions' , 'customizr').'<a href=\"'.esc_url( wp_get_attachment_url() ).'\" title=\"'.__('Link to full-size image' , 'customizr').'\"> '.$metadata['width'].' &times; '.$metadata['height'].'</a>' : '',\r\n __('in' , 'customizr').'<a href=\"'.esc_url( get_permalink( $post->post_parent ) ).'\" title=\"'.__('Return to ' , 'customizr').esc_attr( strip_tags( get_the_title( $post->post_parent ) ) ).'\" rel=\"gallery\"> '.get_the_title( $post->post_parent ).'</a>.'\r\n );\r\n }\r\n\r\n else {\r\n\r\n $categories_list = $this -> tc_category_list();\r\n\r\n $tag_list = $this -> tc_tag_list();\r\n\r\n $date = apply_filters( 'tc_date_meta',\r\n sprintf( '<a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><time class=\"entry-date updated\" datetime=\"%3$s\">%4$s</time></a>' ,\r\n esc_url( get_day_link( get_the_time( 'Y' ), get_the_time( 'm' ), get_the_time( 'd' ) ) ),\r\n esc_attr( get_the_time() ),\r\n apply_filters('tc_use_the_post_modified_date' , false ) ? esc_attr( get_the_date( 'c' ) ) : esc_attr( get_the_modified_date('c') ),\r\n esc_html( get_the_date() )\r\n )\r\n );//end filter\r\n\r\n $author = apply_filters( 'tc_author_meta',\r\n sprintf( '<span class=\"author vcard\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>' ,\r\n esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\r\n esc_attr( sprintf( __( 'View all posts by %s' , 'customizr' ), get_the_author() ) ),\r\n get_the_author()\r\n )\r\n );//end filter\r\n\r\n // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.\r\n $utility_text = '';\r\n if ( $tag_list ) {\r\n $utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s<span class=\"by-author\"> by %4$s</span>.' , 'customizr' );\r\n } elseif ( $categories_list ) {\r\n $utility_text = __( 'This entry was posted in %1$s on %3$s<span class=\"by-author\"> by %4$s</span>.' , 'customizr' );\r\n } else {\r\n $utility_text = __( 'This entry was posted on %3$s<span class=\"by-author\"> by %4$s</span>.' , 'customizr' );\r\n }\r\n $utility_text = apply_filters( 'tc_meta_utility_text', $utility_text );\r\n\r\n //echoes every metas components\r\n printf(\r\n $utility_text,\r\n $categories_list,\r\n $tag_list,\r\n $date,\r\n $author\r\n );\r\n }//endif attachment\r\n ?>\r\n\r\n </div><!-- .entry-meta -->\r\n\r\n <?php\r\n $html = ob_get_contents();\r\n if ($html) ob_end_clean();\r\n echo apply_filters( 'tc_post_metas', $html );\r\n }", "function mw_register_taxonomies() {\n\n $taxonomies = array(\n array(\n 'slug' => 'featured',\n 'single_name' => 'Featured',\n 'plural_name' => 'Featured',\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'hierarchical' => true,\n 'post_type' => array( 'post', 'page' ),\n 'rewrite' => array( 'slug' => 'featured' ),\n ),\n );\n\n foreach( $taxonomies as $taxonomy ) {\n $labels = array(\n 'name' => $taxonomy['plural_name'],\n 'singular_name' => $taxonomy['single_name'],\n 'search_items' => 'Search ' . $taxonomy['plural_name'],\n 'all_items' => 'All ' . $taxonomy['plural_name'],\n 'parent_item' => 'Parent ' . $taxonomy['single_name'],\n 'parent_item_colon' => 'Parent ' . $taxonomy['single_name'] . ':',\n 'edit_item' => 'Edit ' . $taxonomy['single_name'],\n 'update_item' => 'Update ' . $taxonomy['single_name'],\n 'add_new_item' => 'Add New ' . $taxonomy['single_name'],\n 'new_item_name' => 'New ' . $taxonomy['single_name'] . ' Name',\n 'menu_name' => $taxonomy['plural_name']\n );\n\n $rewrite = isset( $taxonomy['rewrite'] ) ? $taxonomy['rewrite'] : array( 'slug' => $taxonomy['slug'] );\n $hierarchical = isset( $taxonomy['hierarchical'] ) ? $taxonomy['hierarchical'] : true;\n $show_admin_column = isset( $taxonomy['show_admin_column'] ) ? $taxonomy['show_admin_column'] : false;\n $show_ui = isset( $taxonomy['show_ui'] ) ? $taxonomy['show_ui'] : true;\n\n register_taxonomy( $taxonomy['slug'], $taxonomy['post_type'], array(\n 'hierarchical' => $hierarchical,\n 'labels' => $labels,\n 'show_ui' => $show_ui,\n 'query_var' => true,\n 'show_admin_column' => $show_admin_column,\n 'rewrite' => $rewrite,\n ));\n }\n\n}", "function construction_realestate_posttype_cs_custom_meta() {\n add_meta_box( 'cs_meta', __( 'Settings', 'construction-realestate-posttype' ), 'construction_realestate_posttype_cs_meta_callback' , 'agents');\n}", "function katayam_custom_taxonomies(){\r\n\t$labels=array(\r\n\t'name'=>'Fields',\r\n\t'singular_name'=>'Field',\r\n\t'search_item'=>'Search Fields',\r\n\t'all_items'=>'All Field',\r\n\t'parent_item'=>'Parent Field',\r\n\t'parent_item_colon'=>'Parent Item',\r\n\t'edit_item'=>'Edit Item',\r\n\t'update_item'=>'Update Field',\r\n\t'add_new_item'=>'Add Item',\r\n\t'new_item_name'=>'New Field Name',\r\n\t'menu_name'=>'Field'\r\n\t\r\n\t);\r\n\t$args=array(\r\n\t'hierarchical'=>true,\r\n\t'labels'=>$labels,\r\n\t'show_ui'=>true,\r\n\t'show_admin_colum'=>true,\r\n\t'query_var'=>true,\r\n\t'rewrite'=>array('slug'=>'field')\r\n\t);\r\n\tregister_taxonomy('field',array('portfolio'),$args);\r\n\t//add new taxonomies Not hierarchical\r\n\tregister_taxonomy('software','portfolio',array(\r\n\t'label'=>'Software',\r\n\t'rewrite'=>array('slug'=>'software'),\r\n\t'hierarchical'=>false\r\n\t));\r\n}", "function add_term_meta( $term_id, $meta_key, $meta_value, $unique = false ) {\n\treturn add_metadata( 'taxonomy', $term_id, $meta_key, $meta_value, $unique );\n}", "function gcd_tax_add_new_meta_field() {\r\n ?>\r\n <div class=\"form-field\">\r\n <label for=\"term_meta[featured]\"><?php _e( 'Featured ?', '' ); ?></label>\r\n <input type=\"text\" name=\"term_meta[featured]\" id=\"term_meta[featured]\" value=\"\">\r\n <p class=\"description\"><?php _e( 'Type 1 if you want to list category as featured','' ); ?></p>\r\n </div>\r\n\r\n <div class=\"form-field\">\r\n <label for=\"term_meta[subtitle]\"><?php _e( 'Subtitle', '' ); ?></label>\r\n <input type=\"text\" name=\"term_meta[subtitle]\" id=\"term_meta[subtitle]\" value=\"\">\r\n <p class=\"description\"><?php _e( 'Subtitle for your group','' ); ?></p>\r\n <div>\r\n<?php\r\n}", "function update_term_meta($term_id, $taxonomy, $meta_key, $meta_value, $prev_value = '') {\n\n return update_metadata('post', $post_id, $meta_key, $meta_value, $prev_value);\n}", "function update_term_meta( $term_id, $meta_key, $meta_value, $prev_value = '' ) {\n\treturn update_metadata( 'taxonomy', $term_id, $meta_key, $meta_value, $prev_value );\n}", "function mds_custom_taxonomy() {\n $args = array(\n\n /**\n * Include a description of the taxonomy.\n */\n 'description' => '', // string (default is NONE)\n\n /**\n * A plural descriptive name for the taxonomy marked for translation.\n * Default: overridden by $labels->name\n */\n 'label' => __( 'Custom Taxonomies' ), // string (default overridden by $labels->name).\n\n /**\n * Labels used when displaying the taxonomy in the admin and sometimes on the front end.\n */\n 'labels' => array(\n 'name'\t\t\t\t => __( 'Custom Taxonomies' ),\n 'singular_name'\t\t\t => __( 'Custom Taxonomy' ),\n 'menu_name'\t\t\t => __( 'Custom Taxonomy'),\n 'all_items'\t\t\t => __( 'All Custom Taxonomies' ),\n 'view_item' => __( 'View Custom Taxonomy' ),\n 'edit_item'\t\t\t => __( 'Edit Custom Taxonomy' ),\n 'update_item'\t\t\t => __( 'Update Custom Taxonomy'),\n 'add_new_item'\t\t\t => __( 'Add New Custom Taxonomy'),\n 'new_item_name'\t\t\t => __( 'New Single Custom Taxonomy'),\n 'parent_item'\t\t\t => __( 'Parent Custom Taxonomy' ),\n 'parent_item_colon'\t\t => __( 'Parent Custom Taxonomy' ),\n 'search_items'\t\t\t => __( 'Search Custom Taxonomy' ),\n 'popular_items'\t\t\t => __( 'Popular Custom Taxonomy' ),\n 'separate_items_with_commas' => __( 'Separate Custom Taxonomy with commas' ),\n 'add_or_remove_items'\t => __( 'Add or remove Custom Taxonomy'),\n 'choose_from_most_used'\t => __( 'Choose from most used Custom Taxonomy'),\n 'not_found' => __( 'No Custom Taxonomy found.' )\n ),\n\n /**\n * If the taxonomy should be publicly queryable. This\n * argument is sort of a catchall for many of the following arguments.\n */\n 'public' => true, // bool (default is TRUE)\n\n /**\n * Whether to generate a default UI for managing this taxonomy.\n */\n 'show_ui' => true, // bool (defaults to 'public').\n\n /**\n * Whether taxonomy items are available for selection in navigation menus.\n */\n 'show_in_nav_menus' => true, // bool (defaults to 'public').\n\n /**\n * Whether to allow the Tag Cloud widget to use this taxonomy.\n */\n 'show_tagcloud' => false,// bool (defaults to 'show_ui').\n\n /**\n * Whether to show the taxonomy in the quick/bulk edit panel.\n */\n 'show_in_quick_edit' => true, // bool (defaults to 'show_ui').\n\n /**\n * Whether to allow automatic creation of taxonomy columns on associated post-types table.\n */\n 'show_admin_column' => false,// bool (default is FALSE)\n\n /**\n * Provide a callback function name for the meta box display.\n * No meta box is shown if set to false\n */\n 'meta_box_cb' => null, //callback function (default is NULL)\n\n /**\n * Is this taxonomy hierarchical (have descendants) like categories or not hierarchical like tags.\n */\n 'hierarchical' => false,// bool (default is FALSE)\n\n /**\n * A function name that will be called when the count of an associated $object_type, such as post, is updated.\n * Works much like a hook.\n */\n\n 'update_count_callback' => '', //string (default is NONE)\n\n /**\n * Sets the query_var key for this taxonomy. If set to TRUE, the post type name will be used.\n * You can also set this to a custom string to control the exact key.\n */\n 'query_var' => 'custom-taxonomy', // bool|string (defaults to TRUE - post type name)\n\n\n /**\n * How the URL structure should be handled with this post type. You can set this to an\n * array of specific arguments or true|false. If set to FALSE, it will prevent rewrite\n * rules from being created.\n */\n 'rewrite' => array(\n\n /* The slug to use for individual posts of this type. */\n 'slug' => 'custom-post-type', // string (defaults to taxonomy's name slug)\n\n /* Allowing permalinks to be prepended with front base*/\n 'with_front' => false, // bool (defaults to TRUE)\n\n /* true or false allow hierarchical urls*/\n 'hierarchical' => false, // bool (defaults to FALSE)\n\n /* Assign an endpoint mask to this permalink. */\n 'ep_mask' => EP_PERMALINK, // const (defaults to EP_NONE)\n ),\n\n /**\n * Provides more precise control over the capabilities than the defaults. By default, WordPress\n * will use the 'capability_type' argument to build these capabilities. More often than not,\n * this results in many extra capabilities that you probably don't need.\n */\n 'capabilities' => array( ),\n\n /**\n * Whether this taxonomy should remember the order in which terms are added to objects.\n */\n 'sort' => false, // bool (default is NONE)\n );\n\n /**\n * Set up the arguments for the post type where taxonomy will be displayed.\n * Can be a custom post type or any of the registered post types: post, page, attachment, revision, nav_menu_item\n */\n $args_post_type = array(\n 'custom-post-type'\n );\n\n register_taxonomy(\n 'custom-taxonomy', //Taxonomy name. Max of 32 characters. Uppercase and spaces not allowed.\n $args_post_type, //Name of the post type for the taxonomy,\n $args\n );\n\n}", "function five_register_my_taxonomies()\n{\n //five_register_taxonomy('custom-taxonomy', 'Custom Taxonomy', 'Custom Taxonomies', ['custom-post-type']);\n}", "function wordcomat_custom_meta() {\n add_meta_box( 'wordcomat_meta', __( 'Wordcomat', 'wordcomat' ), 'wordcomat_meta_callback', array('post','page') );\n}", "function my_meta_init()\n{\n // http://codex.wordpress.org/Function_Reference/wp_enqueue_script\n // http://codex.wordpress.org/Function_Reference/wp_enqueue_style\n \n //wp_enqueue_script('my_meta_js', MY_THEME_PATH . '/custom/meta.js', array('jquery'));\n wp_enqueue_style('my_meta_css', MY_THEME_PATH . '/custom/shop-meta.css');\n \n // review the function reference for parameter details\n // http://codex.wordpress.org/Function_Reference/add_meta_box\n \n // add a meta box for each of the wordpress page types: posts and pages\n foreach (array('product') as $type) \n {\n add_meta_box('my_all_meta', 'Prezzo e Descrizione Prodotto', 'my_meta_setup', $type, 'normal', 'high');\n }\n \n // add a callback function to save any data a user enters in\n add_action('save_post','my_meta_save');\n}", "function labdevs_rtcookie_post_type_init()\n{\n $labels = array(\n 'name' => _x('labdevsrtcookies', 'post type general name', 'your-plugin-textdomain'),\n 'singular_name' => _x('labdevsrtcookie', 'post type singular name', 'your-plugin-textdomain'),\n 'menu_name' => _x('labdevsrtcookies', 'admin menu', 'your-plugin-textdomain'),\n 'name_admin_bar' => _x('labdevsrtcookie', 'add new on admin bar', 'your-plugin-textdomain'),\n 'add_new' => _x('Add New', 'labdevsrtcookie', 'your-plugin-textdomain'),\n 'add_new_item' => __('Add New labdevsrtcookie', 'your-plugin-textdomain'),\n 'new_item' => __('New labdevsrtcookie', 'your-plugin-textdomain'),\n 'edit_item' => __('Edit labdevsrtcookie', 'your-plugin-textdomain'),\n 'view_item' => __('View labdevsrtcookie', 'your-plugin-textdomain'),\n 'all_items' => __('All labdevsrtcookies', 'your-plugin-textdomain'),\n 'search_items' => __('Search labdevsrtcookies', 'your-plugin-textdomain'),\n 'parent_item_colon' => __('Parent labdevsrtcookies:', 'your-plugin-textdomain'),\n 'not_found' => __('No labdevsrtcookies found.', 'your-plugin-textdomain'),\n 'not_found_in_trash' => __('No labdevsrtcookies found in Trash.', 'your-plugin-textdomain'),\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'rewrite' => array('slug' => 'labdevsrtcookie'),\n 'capability_type' => 'post',\n 'has_archive' => true,\n 'hierarchical' => false,\n 'menu_position' => null,\n 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments')\n );\n\n register_post_type('labdevsrtcookie', $args);\n}", "function tower_register_meta_boxes() {\n foreach (TOWER_CUSTOM_POSTS as $key => $custom_type) {\n $meta = $custom_type['meta'];\n add_meta_box(\n $meta['handle'],\n $meta['title'],\n $meta['callback'],\n $key\n );\n }\n}", "function my_custom_init() {\n\t$labels = array(\n\t'name' => _x( 'Marcas', 'post type general name' ),\n 'singular_name' => _x( 'Marca', 'post type singular name' ),\n 'add_new' => _x( 'Añadir nuevo', 'marca' ),\n 'add_new_item' => __( 'Añadir nueva Marca' ),\n 'edit_item' => __( 'Editar Marca' ),\n 'new_item' => __( 'Nueva Marca' ),\n 'view_item' => __( 'Ver Marca' ),\n 'search_items' => __( 'Buscar Marca' ),\n 'not_found' => __( 'No se han encontrado Marcas' ),\n 'not_found_in_trash' => __( 'No se han encontrado Marcas en la papelera' ),\n 'parent_item_colon' => ''\n );\n\n // Creamos un array para $args\n $args = array( 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => true,\n 'capability_type' => 'post',\n 'hierarchical' => false,\n 'menu_position' => null,\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )\n );\n\n register_post_type( 'Marca', $args );\n}", "function tcsn_post_meta() {\n\n\tglobal $post;\n\tif ( ! is_page() && 'page' != $post->post_type ) {\n\t\t$post_footer_metadata = ( get_post_format() ? '<a class=\"post-format-meta\" href=\"' . get_post_format_link( get_post_format() ) . '\">' . get_post_format_string( get_post_format() ) . '</a>' : '' \t\t);\n\t} \n\t\techo '<span class=\"post-meta\">' . $post_footer_metadata. '</span>'; \n\t\t\n\t// Post author\n\tif ( 'post' == get_post_type() ) {\n\t\tprintf( 'By <span class=\"author vcard margin-less\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span><span class=\"text-sep\">/</span>',\n\t\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\t\tesc_attr( sprintf( __( 'View all posts by %s', 'tcsn_theme' ), get_the_author() ) ),\n\t\t\tget_the_author()\n\t\t);\n\t}\n\t\n\t// Post date\n\tif ( ! has_post_format( 'link' ) && 'post' == get_post_type() )\n\t\ttcsn_post_date();\n\t\t\n\t// Categories\n\t$categories_list = get_the_category_list( __( ', ', 'tcsn_theme' ) );\n\tif ( $categories_list ) {\n\t\techo 'in <span class=\"categories-links\">' . $categories_list . '</span>';\n\t}\n\t\n\t// Tags\n\tif ( ! is_single() ) {\n\t\t$tag_list = get_the_tag_list( '', __( ', ', 'tcsn_theme' ) );\n\t\tif ( $tag_list ) {\n\t\t\techo '<span class=\"text-sep\">/</span> tags <span class=\"tags-links\">' . $tag_list . '</span>';\n\t\t}\n\t}\n\t\n\telse {\n\t\t$tag_list = get_the_tag_list( '', __( ', ', 'tcsn_theme' ) );\n\t if ( $tag_list ) {\n\t\techo '<span class=\"text-sep\">/</span> tags <span class=\"tags-links\">' . $tag_list . '</span>';\n\t } \n\t}\n}", "function add_press_metaboxes() {\n\tadd_meta_box('wpt_press_link', 'Relevant link', 'wpt_press_link', 'press', 'normal', 'default');\n\tadd_meta_box('wpt_press_date', 'Publication date', 'wpt_press_date', 'press', 'normal', 'default');\n\tadd_meta_box('wpt_press_type', 'Publication type', 'wpt_press_type', 'press', 'side', 'default');\n \n}", "function thirdtheme_custom_post_type()\n {\n $args = array(\n 'labels' => array('name' =>__(' my custom post'),\n 'singular name' =>__('my custom post')),\n 'public' => true,\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail'));\n register_post_type('custompost',$args);\n \n }", "function prfx_custom_meta() {\r\n add_meta_box( 'prfx_meta', __( 'SEO\\'s H1 Title', 'prfx-textdomain' ), 'prfx_meta_callback', 'page', $context = 'normal', $priority = 'high' );\r\n}", "public function term_metabox( $term ) {\n\t\t$tab = new WPSEO_Help_Center_Template_Variables_Tab();\n\t\t$tab->register_hooks();\n\n\t\t$metabox = new WPSEO_Taxonomy_Metabox( $this->taxonomy, $term );\n\t\t$metabox->display();\n\t}", "function c_content_admin() {\n $form = array();\n\n $form['c_content_metatags'] = array(\n '#type' => 'fieldset',\n '#title' => t('Meta tags'),\n '#tree' => TRUE,\n );\n\n // Get fields available for meta tags embedding.\n $fields = array();\n foreach (field_info_field_map() as $key => $field) {\n // Only allow text and taxonomy_term_reference fields for now that are available on nodes.\n if (isset($field['bundles']['node']) && ($field['type'] === 'text' || $field['type'] === 'taxonomy_term_reference')) {\n $fields[$key] = $key . ' <em>(' . t('Used in types: @bundles', array('@bundles' => implode(', ', $field['bundles']['node']))) . ')</em>';\n }\n }\n\n $default_value = variable_get('c_content_metatags');\n $form['c_content_metatags']['fields'] = array(\n '#type' => 'checkboxes',\n '#options' => $fields,\n '#title' => t('Which node fields should be added as meta tag to the HTML?'),\n '#default_value' => $default_value['fields'],\n );\n\n return system_settings_form($form);\n}", "function rs_meta_box()\n{\n add_meta_box('rs_focus', 'Destaque na home', 'rs_focus', 'post', 'side');\n add_meta_box('rs_author', 'Autor', 'rs_author', 'post', 'side');\n add_meta_box('rs_author', 'Autor', 'rs_author', 'post_region', 'side');\n add_meta_box('rs_author', 'Autor', 'rs_author', 'event', 'side');\n}", "function get_term_taxonomy_meta ($term_id, $taxonomy, $meta_key, $single = false)\n{\n return TTMetaPlugin::get_term_taxonomy_meta( $term_id, $taxonomy, $meta_key, $single );\n}", "function AP_Meta_Box_Setup() {\n\tadd_action('add_meta_boxes','AP_Meta_Box_Add');\n\n\tadd_action( 'save_post', 'AP_Meta_Box_Save', 10, 2 );\n}", "function toolbox_portfolio_meta_boxes_setup() {\n /* Add meta boxes on the 'add_meta_boxes' hook. */\n add_action( 'add_meta_boxes', 'toolbox_add_portfolio_meta_box' );\n\n /* Save post meta on the 'save_post' hook. */\n add_action( 'save_post', 'toolbox_portfolio_save_info', 10, 2 );\n}", "function add_custom_meta_box() { \nglobal $post, $post_type;\n\n\t// specific template\n\t//if('page-templatename.php' == get_post_meta($post->ID, '_wp_page_template', true)) {\n \tadd_meta_box( \n \t'custom_meta_box', // $id \n\t\t\t'More Stuff!', // $title \n\t\t\t'show_custom_meta_box', // $callback \n\t\t\t'post', // $page \n\t\t\t'normal', // $context \n\t\t\t'high'\n\t\t); // $priority \n\t//}\n\t\n\t//specific post-type\n\t/*if('custom post type' == $post_type) {\n \tadd_meta_box( \n \t'custom_meta_box', // $id \n\t\t\t'Options', // $title \n\t\t\t'show_custom_meta_box', // $callback \n\t\t\t'custom post type', // $page \n\t\t\t'normal', // $context \n\t\t\t'high'\n\t\t); // $priority \n\t}*/\n}", "function custom_post_type() {\n\n// Set UI labels for Custom Post Type\n\t$labels = array(\n\t\t'name' => _x( 'Новости', 'Новости сайта', 'p1atform' ),\n\t\t'singular_name' => _x( 'Новость', 'Post Type Singular Name', 'p1atform' ),\n\t\t'menu_name' => __( 'Новости', 'p1atform' ),\n\t\t'parent_item_colon' => __( 'Parent Новость', 'p1atform' ),\n\t\t'all_items' => __( 'Все новости', 'p1atform' ),\n\t\t'view_item' => __( 'Просмотреть новость', 'p1atform' ),\n\t\t'add_new_item' => __( 'Добавить новость', 'p1atform' ),\n\t\t'add_new' => __( 'Добавить новость', 'p1atform' ),\n\t\t'edit_item' => __( 'Редактировать новость', 'p1atform' ),\n\t\t'update_item' => __( 'Обновить новость', 'p1atform' ),\n\t\t'search_items' => __( 'Поиск новости', 'p1atform' ),\n\t);\n\n\t$args = array(\n\t\t'label' => __( 'Отзывы', 'p1atform' ),\n\t\t'description' => __( 'Отзывы', 'p1atform' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'excerpt',\n\t\t\t'author',\n\t\t\t'thumbnail',\n\t\t\t'comments',\n\t\t\t'revisions',\n\t\t\t'custom-fields'\n\t\t),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-format-aside',\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\n\tregister_post_type( 'news', $args );\n\n\t$labels = array(\n\t\t'name' => _x( 'Клиенты', 'Новости сайта', 'p1atform' ),\n\t\t'singular_name' => _x( 'Клиент', 'Post Type Singular Name', 'p1atform' ),\n\t\t'menu_name' => __( 'Клиенты', 'p1atform' ),\n\t\t'parent_item_colon' => __( 'Парент Клиент', 'p1atform' ),\n\t\t'all_items' => __( 'Все клиенты', 'p1atform' ),\n\t\t'view_item' => __( 'Просмотреть клиента', 'p1atform' ),\n\t\t'add_new_item' => __( 'Добавить клиента', 'p1atform' ),\n\t\t'add_new' => __( 'Добавить клиента', 'p1atform' ),\n\t\t'edit_item' => __( 'Редактировать клиента', 'p1atform' ),\n\t\t'update_item' => __( 'Обновить клиента', 'p1atform' ),\n\t\t'search_items' => __( 'Поиск клиента', 'p1atform' ),\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'excerpt',\n\t\t\t'author',\n\t\t\t'thumbnail',\n\t\t\t'comments',\n\t\t\t'revisions',\n\t\t\t'custom-fields',\n\t\t),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 6,\n\t\t'menu_icon' => 'dashicons-admin-users',\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\n\tregister_post_type( 'clients', $args );\n\n\tregister_post_type( 'reviews', array(\n\t\t'labels' => array(\n\t\t\t'name' => 'Отзывы', // Основное название типа записи\n\t\t\t'singular_name' => 'Отзыв', // отдельное название записи типа Book\n\t\t\t'add_new' => 'Добавить Отзыв',\n\t\t\t'add_new_item' => 'Добавить Отзыв',\n\t\t\t'edit_item' => 'Редактировать Отзыв',\n\t\t\t'new_item' => 'Новая Отзыв',\n\t\t\t'view_item' => 'Посмотреть Отзыв',\n\t\t\t'search_items' => 'Найти Отзыв',\n\t\t\t'not_found' => 'Книг не найдено',\n\t\t\t'not_found_in_trash' => 'В корзине книг не найдено',\n\t\t\t'parent_item_colon' => '',\n\t\t\t'menu_name' => 'Отзывы'\n\n\t\t),\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => true,\n\t\t'capability_type' => 'post',\n\t\t'has_archive' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-format-chat',\n\t\t'hierarchical' => false,\n\t\t'menu_position' => null,\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )\n\t) );\n\n}", "function years_custom_taxonomies() {\n\t$labels = array(\n\t\t'name' => 'Год',\n\t\t'singular_name' => 'Год',\n\t\t'search_items' => 'Поиск по годам',\n\t\t'all_items' => 'Все года',\n\t\t'parent_item' => 'Родительское поле',\n\t\t'parent_item_colon' => 'Родительское поле:',\n\t\t'edit_item' => 'Редактирование',\n\t\t'update_item' => 'Обновить',\n\t\t'add_new_item' => 'Добавить новое рабочее поле',\n\t\t'new_item_name' => 'Имя нового поля',\n\t\t'menu_name' => 'Год'\n\t);\n\n\t$args = array(\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => 'years' )\n\t);\n\n\tregister_taxonomy('years', array('film'), $args);\n\n}", "function ilusix_my_custom_meta_box() {\n global $myMetaBoxPostTypes;\n\n foreach($myMetaBoxPostTypes as $postType) {\n add_meta_box(\n 'my_custom_meta_box_identifier' . '-' . $postType,\n 'Meta box title',\n 'ilusix_my_custom_meta_box_callback',\n $postType,\n 'normal',\n 'default'\n );\n }\n}", "function add_custom_taxonomies() {\n // Add new taxonomy\n $types = array('post','page','attachment','nav_menu_item', 'learning_resource');\n register_taxonomy('asn_index', $types, array(\n 'hierarchical' => true,\n 'labels' => array(\n 'name' => _x( 'ASN Index', 'taxonomy general name' ),\n 'singular_name' => _x( 'Competency', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Competencies' ),\n 'all_items' => __( 'All Competencies' ),\n 'parent_item' => __( 'Parent Competency' ),\n 'parent_item_colon' => __( 'Parent Competency:' ),\n 'edit_item' => __( 'Edit Competency' ),\n 'update_item' => __( 'Update Competency' ),\n 'add_new_item' => __( 'Add New Competency' ),\n 'new_item_name' => __( 'New Competency Name' ),\n 'menu_name' => __( 'Competency Index' ),\n ),\n //Slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'competency_index', \n 'with_front' => false,\n 'hierarchical' => true \n ),\n ));\n add_custom_post_type();\n create_new_topic_index();\n add_metadata_taxonomies();\n}", "function create_post_type() {\n\n // register external_post as a Custom Post Type\n register_post_type( 'external_post', \n array( \n 'labels' => array( \n 'name' => __('External Posts'), \n 'singular_name' => __('External Post') \n ),\n 'public' => true,\n 'menu_position' => 5,\n 'supports' => array('title', 'excerpt'),\n 'rewrite' => array('slug' => 'external','with_front' => false) \n ) \n ); \n\n // connect external_post to category taxonomy\n register_taxonomy_for_object_type('category', 'external_post');\n register_taxonomy_for_object_type('post_tag', 'external_post');\n\n\n // register wp_tool as a Custom Post Type\n register_post_type('wp_tool',\n array( \n 'labels' => array( \n 'name' => __('WordPress Tools'), \n 'singular_name' => __('WordPress Tool') \n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'author', 'editor', 'excerpt', 'thumbnail', 'post-formats', 'revisions', 'meta_info'),\n 'rewrite' => array('slug' => 'tool','with_front' => false) \n ) \n );\n\n // connect wp_tool to category taxonomy\n register_taxonomy_for_object_type('meta_info', 'wp_tool');\n register_taxonomy_for_object_type('category', 'wp_tool');\n\n\n // reregister default post so we can set a custom slug\n register_post_type('post', array(\n 'labels' => array(\n 'name_admin_bar' => _x('Post', 'add new on admin bar' ),\n ),\n 'public' => true,\n '_builtin' => false, \n '_edit_link' => 'post.php?post=%d', \n 'capability_type' => 'post',\n 'map_meta_cap' => true,\n 'show_in_menu' => false,\n 'hierarchical' => false,\n 'rewrite' => array('slug' => 'article'),\n 'query_var' => false,\n 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'post-formats', 'column_info'),\n )); \n\n // register external_tool as a Custom Post Type\n register_post_type('external_tool',\n array(\n 'labels' => array( \n 'name' => __('External Tools'), \n 'singular_name' => __('External Tool') \n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'author', 'excerpt', 'thumbnail', 'revisions', 'meta_info'),\n 'rewrite' => array('slug' => 'special','with_front' => false) \n ) \n ); \n\n // connect external_tool to category taxonomy\n register_taxonomy_for_object_type('category', 'external_tool');\n register_taxonomy_for_object_type('meta_info', 'external_tool');\n\n\n // register city_journal as a Custom Post Type\n register_post_type('city_journal',\n array(\n 'labels' => array( \n 'name' => __('CityJournal Entry'),\n 'singular_name' => __('CityJournal Entry')\n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'editor', 'author', 'excerpt', 'thumbnail', 'revisions', 'meta_info', 'comments'),\n 'rewrite' => array('slug' => 'cityjournal','with_front' => false) \n ) \n ); \n\n // connect city_journal to category taxonomy\n register_taxonomy_for_object_type('category', 'city_journal');\n register_taxonomy_for_object_type('meta_info', 'city_journal'); \n\n\n // register people_project as a Custom Post Type\n register_post_type('people_project',\n array(\n 'labels' => array( \n 'name' => __('People & Projects'),\n 'singular_name' => __('People & Project')\n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'excerpt', 'thumbnail', 'meta_info'),\n ) \n ); \n\n // connect people_project to category taxonomy\n register_taxonomy_for_object_type('meta_info', 'people_project'); \n\n\n register_post_type('discussion',\n array( \n 'labels' => array( \n 'name' => __('Discussions'), \n 'singular_name' => __('Discussion') \n ), \n 'public' => true, \n 'menu_position' => 5, \n 'supports' => array('title', 'editor', 'excerpt', 'thumbnail', 'post-formats', 'revisions', 'meta_info', 'comments'),\n 'rewrite' => array('slug' => 'discussion','with_front' => false) \n ) \n );\n\n // connect discussion to category taxonomy\n register_taxonomy_for_object_type('meta_info', 'discussion');\n register_taxonomy_for_object_type('category', 'discussion');\n\n}", "function register_block_core_post_terms()\n {\n }", "function acf_wp_upgrade_550_termmeta($wp_db_version, $wp_current_db_version)\n{\n}", "function add_custom_taxonomies() {\n register_taxonomy('mechanic', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Mechanics', 'taxonomy general name' ),\n 'singular_name' => _x( 'Mechanic', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Mechanics' ),\n 'all_items' => __( 'All Mechanics' ),\n 'parent_item' => __( 'Parent Mechanic' ),\n 'parent_item_colon' => __( 'Parent Mechanic:' ),\n 'edit_item' => __( 'Edit Mechanic' ),\n 'update_item' => __( 'Update Mechanic' ),\n 'add_new_item' => __( 'Add New Mechanic' ),\n 'new_item_name' => __( 'New Mechanic Name' ),\n 'menu_name' => __( 'Mechanics' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'mechanics', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n \n // Add new \"Locations\" taxonomy to Posts\n register_taxonomy('family', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Families', 'taxonomy general name' ),\n 'singular_name' => _x( 'Family', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Families' ),\n 'all_items' => __( 'All Families' ),\n 'parent_item' => __( 'Parent Family' ),\n 'parent_item_colon' => __( 'Parent Family:' ),\n 'edit_item' => __( 'Edit Family' ),\n 'update_item' => __( 'Update Family' ),\n 'add_new_item' => __( 'Add New Family' ),\n 'new_item_name' => __( 'New Family Name' ),\n 'menu_name' => __( 'Families' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'family', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n \n // Add new \"Locations\" taxonomy to Posts\n register_taxonomy('publisher', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Publishers', 'taxonomy general name' ),\n 'singular_name' => _x( 'Publisher', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Publishers' ),\n 'all_items' => __( 'All Publishers' ),\n 'parent_item' => __( 'Parent Publisher' ),\n 'parent_item_colon' => __( 'Parent Publisher:' ),\n 'edit_item' => __( 'Edit Publisher' ),\n 'update_item' => __( 'Update Publisher' ),\n 'add_new_item' => __( 'Add New Publisher' ),\n 'new_item_name' => __( 'New Publisher Name' ),\n 'menu_name' => __( 'Publishers' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'publisher', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n \n register_taxonomy('artists', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Artists', 'taxonomy general name' ),\n 'singular_name' => _x( 'Artist', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Artists' ),\n 'all_items' => __( 'All Artists' ),\n 'parent_item' => __( 'Parent Artist' ),\n 'parent_item_colon' => __( 'Parent Artist:' ),\n 'edit_item' => __( 'Edit Artist' ),\n 'update_item' => __( 'Update Artist' ),\n 'add_new_item' => __( 'Add New Artist' ),\n 'new_item_name' => __( 'New Artist Name' ),\n 'menu_name' => __( 'Artists' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'artists', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n \n register_taxonomy('designers', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Designers', 'taxonomy general name' ),\n 'singular_name' => _x( 'Designer', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Designers' ),\n 'all_items' => __( 'All Designers' ),\n 'parent_item' => __( 'Parent Designer' ),\n 'parent_item_colon' => __( 'Parent Designer:' ),\n 'edit_item' => __( 'Edit Designer' ),\n 'update_item' => __( 'Update Designer' ),\n 'add_new_item' => __( 'Add New Designer' ),\n 'new_item_name' => __( 'New Designer Name' ),\n 'menu_name' => __( 'Designers' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'designers', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n\n\n register_taxonomy('awards', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Awards', 'taxonomy general name' ),\n 'singular_name' => _x( 'Award', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Awards' ),\n 'all_items' => __( 'All Awards' ),\n 'parent_item' => __( 'Parent Award' ),\n 'parent_item_colon' => __( 'Parent Award:' ),\n 'edit_item' => __( 'Edit Award' ),\n 'update_item' => __( 'Update Award' ),\n 'add_new_item' => __( 'Add New Award' ),\n 'new_item_name' => __( 'New Award Name' ),\n 'menu_name' => __( 'Awards' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'awards', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n }", "function ms_add_custom_taxonomies() {\n // Add new \"Placement Tag\" taxonomy to Articles\n register_taxonomy('placement_tag', 'article', array(\n 'hierarchical' => false,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'placement-tags' ),\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Placement Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Placement Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Placement Tags' ),\n 'popular_items' => __( 'Popular Placement Tags' ),\n 'all_items' => __( 'All Placement Tags' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Placement Tag' ),\n 'update_item' => __( 'Update Placement Tag' ),\n 'add_new_item' => __( 'Add New Placement Tag' ),\n 'new_item_name' => __( 'New Origin Tag Name' ),\n 'add_or_remove_items' => __( 'Add or remove placement tags' ),\n 'separate_items_with_commas' => __( 'Separate placement tags with commas' ),\n 'choose_from_most_used' => __( 'Choose from the most used placement tags' ),\n 'not_found' => __( 'No placement tags found.' ),\n 'menu_name' => __( 'Placement Tags' ),\n ),\n ));\n\n // Add new \"Location Tag\" taxonomy to Articles\n register_taxonomy('location_tag', 'article', array(\n 'hierarchical' => false,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'location-tags' ),\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Location Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Location Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Location Tags' ),\n 'popular_items' => __( 'Popular Location Tags' ),\n 'all_items' => __( 'All Location Tags' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Location Tag' ),\n 'update_item' => __( 'Update Location Tag' ),\n 'add_new_item' => __( 'Add New Location Tag' ),\n 'new_item_name' => __( 'New Location Tag Name' ),\n 'add_or_remove_items' => __( 'Add or remove location tags' ),\n 'separate_items_with_commas' => __( 'Separate location tags with commas' ),\n 'choose_from_most_used' => __( 'Choose from the most used location tags' ),\n 'not_found' => __( 'No location tags found.' ),\n 'menu_name' => __( 'Location Tags' ),\n ),\n ));\n\n // Add new \"Lifestyle Tag\" taxonomy to Articles\n register_taxonomy('lifestyle_tag', 'article', array(\n 'hierarchical' => false,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'lifestyle-tag' ),\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Lifestyle Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Lifestyle Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Lifestyle Tags' ),\n 'popular_items' => __( 'Popular Lifestyle Tags' ),\n 'all_items' => __( 'All Lifestyle Tags' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Lifestyle Tag' ),\n 'update_item' => __( 'Update Lifestyle Tag' ),\n 'add_new_item' => __( 'Add New Lifestyle Tag' ),\n 'new_item_name' => __( 'New Lifestyle Name' ),\n 'add_or_remove_items' => __( 'Add or remove lifestyle tags' ),\n 'separate_items_with_commas' => __( 'Separate lifestyle tags with commas' ),\n 'choose_from_most_used' => __( 'Choose from the most used lifestyle tags' ),\n 'not_found' => __( 'No lifestyle tags found.' ),\n 'menu_name' => __( 'Lifestyle Tags' ),\n ),\n ));\n\n // Add new \"Featured Tag\" taxonomy to Articles\n register_taxonomy('featured_tag', 'article', array(\n 'hierarchical' => false,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'featured-tag' ),\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Featured Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Featured Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Featured Tags' ),\n 'popular_items' => __( 'Popular Featured Tags' ),\n 'all_items' => __( 'All Featured Tags' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Featured Tag' ),\n 'update_item' => __( 'Update Featured Tag' ),\n 'add_new_item' => __( 'Add New Featured Tag' ),\n 'new_item_name' => __( 'New Featured Tag Name' ),\n 'add_or_remove_items' => __( 'Add or remove featured tags' ),\n 'separate_items_with_commas' => __( 'Separate featured tags with commas' ),\n 'choose_from_most_used' => __( 'Choose from the most used featured tags' ),\n 'not_found' => __( 'No locations found.' ),\n 'menu_name' => __( 'Featured Tags' ),\n ),\n ));\n // Add new \"Origin Tag\" taxonomy to Articles\n register_taxonomy('origin_tag', 'article', array(\n 'hierarchical' => false,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'origin-tags' ),\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Origin Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Origin Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Origin Tags' ),\n 'popular_items' => __( 'Popular Origin Tags' ),\n 'all_items' => __( 'All Origin Tags' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Origin Tag' ),\n 'update_item' => __( 'Update Origin Tag' ),\n 'add_new_item' => __( 'Add New Origin Tag' ),\n 'new_item_name' => __( 'New Origin Tag Name' ),\n 'add_or_remove_items' => __( 'Add or remove origin tags' ),\n 'separate_items_with_commas' => __( 'Separate origin tags with commas' ),\n 'choose_from_most_used' => __( 'Choose from the most used origin tags' ),\n 'not_found' => __( 'No origin tags found.' ),\n 'menu_name' => __( 'Origin Tags' ),\n ),\n ));\n}", "function create_taxonomies($tax,$val) {\n \n\n // register_taxonomy( 'genre', $taxonomies, $args );\n\n // Add new taxonomy, NOT hierarchical (like tags)\n $labels = array(\n 'name' => _x( $tax, 'taxonomy general name', 'textdomain' ),\n 'singular_name' => _x( $tax, 'taxonomy singular name', 'textdomain' ),\n 'search_items' => __( 'Search '.$tax, 'textdomain' ),\n 'popular_items' => __( 'Popular '.$tax, 'textdomain' ),\n 'all_items' => __( 'All '.$tax, 'textdomain' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit '.$tax, 'textdomain' ),\n 'update_item' => __( 'Update '.$tax, 'textdomain' ),\n 'add_new_item' => __( 'Add New '.$tax, 'textdomain' ),\n 'new_item_name' => __( 'New '.$tax.' Name', 'textdomain' ),\n 'separate_items_with_commas' => __( 'Separate '.$tax.' with commas', 'textdomain' ),\n 'add_or_remove_items' => __( 'Add or remove '.$tax, 'textdomain' ),\n 'choose_from_most_used' => __( 'Choose from the most used '.$tax, 'textdomain' ),\n 'not_found' => __( 'No '.$tax.' found', 'textdomain' ),\n 'menu_name' => __( $tax, 'textdomain' ),\n );\n\n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => $tax ),\n );\n\n register_taxonomy( $tax, $val, $args );\n}", "function kurama_custom_meta() {\n add_meta_box( 'kurama_meta', __( 'Display Options', 'kurama' ), 'kurama_meta_callback', 'page','side','high' );\n}", "function YOUR_PREFIX_register_meta_boxes() {\r\n global $meta_boxes;\r\n\r\n // Make sure there's no errors when the plugin is deactivated or during upgrade\r\n if (class_exists('RW_Meta_Box')) {\r\n foreach ($meta_boxes as $meta_box) {\r\n new RW_Meta_Box($meta_box);\r\n }\r\n }\r\n}", "function YOUR_PREFIX_register_meta_boxes()\n{\n\t// Make sure there's no errors when the plugin is deactivated or during upgrade\n\tif ( !class_exists( 'RW_Meta_Box' ) )\n\t\treturn;\n\n\tglobal $meta_boxes;\n\tforeach ( $meta_boxes as $meta_box )\n\t{\n\t\tnew RW_Meta_Box( $meta_box );\n\t}\n}", "function _custom_meta_boxes(){\r\n\r\n /**\r\n * Create a custom meta boxes array that we pass to\r\n * the OptionTree Meta Box API Class.\r\n */\r\n\r\n // $event_meta_box = array(\r\n // 'id' => 'event_meta_box',\r\n // 'title' => 'Event Option',\r\n // 'desc' => '',\r\n // 'pages' => array( 'event'),\r\n // 'context' => 'normal',\r\n // 'priority' => 'high',\r\n // 'fields' => array(\r\n // array(\r\n // 'label' => 'Background Image',\r\n // 'id' => 'background_image',\r\n // 'type' => 'upload',\r\n // 'desc' => '',\r\n // 'rows' => '',\r\n // 'post_type' => '',\r\n // 'taxonomy' => '',\r\n // 'class' => '',\r\n // ),\r\n //\r\n // array(\r\n // 'label' => 'Date Event',\r\n // 'id' => 'date_event',\r\n // 'type' => 'text',\r\n // 'desc' => '',\r\n // 'rows' => '',\r\n // 'post_type' => '',\r\n // 'taxonomy' => '',\r\n // 'class' => '',\r\n // ),\r\n //\r\n // )\r\n // );\r\n\r\n $post_meta_box = array(\r\n 'id' => 'post_meta_box',\r\n 'title' => 'Post Option',\r\n 'desc' => '',\r\n 'pages' => array( 'post'),\r\n 'context' => 'normal',\r\n 'priority' => 'high',\r\n 'fields' => array(\r\n\r\n array(\r\n 'label' => 'Display sidebar',\r\n 'id' => 'portfolio_sidebar',\r\n 'type' => 'select',\r\n 'desc' => '',\r\n 'std' => '',\r\n 'rows' => '',\r\n 'choices' => array(\r\n array(\r\n 'value' => 'yes',\r\n 'label' => 'Yes',\r\n 'src' => ''\r\n ),\r\n array(\r\n 'value' => 'no',\r\n 'label' => 'No',\r\n 'src' => ''\r\n )\r\n ),\r\n ),\r\n array(\r\n 'label' => 'Is Featured ?',\r\n 'id' => 'portfolio_featured',\r\n 'type' => 'select',\r\n 'desc' => '',\r\n 'std' => 'no',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => '',\r\n 'choices' => array(\r\n array(\r\n 'value' => 'yes',\r\n 'label' => 'Yes',\r\n 'src' => ''\r\n ),\r\n array(\r\n 'value' => 'no',\r\n 'label' => 'No',\r\n 'src' => ''\r\n )\r\n ),\r\n ),\r\n array(\r\n 'label' => 'Portfolio Type',\r\n 'id' => 'portfolio_type',\r\n 'type' => 'select',\r\n 'desc' => 'Option type potfolio',\r\n 'std' => 'none',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => '',\r\n 'choices' => array(\r\n array(\r\n 'value' => 'none',\r\n 'label' => 'None'\r\n ),\r\n array(\r\n 'value' => 'images',\r\n 'label' => 'Images'\r\n ),\r\n array(\r\n 'value' => 'slideshows',\r\n 'label' => 'Slideshows'\r\n ),\r\n array(\r\n 'value' => 'video',\r\n 'label' => 'Video'\r\n ),\r\n array(\r\n 'value' => 'audio',\r\n 'label' => 'Audio'\r\n ),\r\n array(\r\n 'value' => 'quote',\r\n 'label' => 'Quote'\r\n ),\r\n array(\r\n 'value' => 'link',\r\n 'label' => 'Link'\r\n ),\r\n ),\r\n\r\n ),\r\n\r\n array(\r\n 'label' => 'Full Size Image',\r\n 'id' => 'portfolio_fullsize_image',\r\n 'type' => 'upload',\r\n 'desc' => 'This is the full size image.',\r\n 'std' => '',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => 'portfolioImage'\r\n ),\r\n array(\r\n 'label' => 'Slideshow',\r\n 'id' => 'portfolio_slideshows',\r\n 'type' => 'list-item',\r\n 'desc' => '',\r\n 'class' => 'portfolio-slideshows',\r\n 'settings' => array(\r\n array(\r\n 'id' => 'portfolio_slideshow_item',\r\n 'label' => 'Image',\r\n 'type' => 'upload',\r\n 'class' => 'portfolio-slideshow-item',\r\n )\r\n )\r\n ),\r\n array(\r\n\r\n 'id' => 'portfolio_video_type',\r\n 'label' => 'Video Type',\r\n 'type' => 'select',\r\n 'desc' => '',\r\n 'std' => '',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n\r\n 'choices' => array(\r\n array(\r\n 'value' => 'youtube',\r\n 'label' => 'Youtube',\r\n ),\r\n array(\r\n 'value' => 'vimeo',\r\n 'label' => 'vimeo',\r\n ),\r\n ),\r\n\r\n ),\r\n\r\n array(\r\n 'label' => 'Video ID',\r\n 'id' => 'portfolio_video',\r\n 'type' => 'textarea',\r\n 'desc' => '',\r\n 'std' => '',\r\n 'rows' => '4',\r\n ),\r\n\r\n array(\r\n 'label' => 'SoundCloud ID',\r\n 'id' => 'portfolio_soundCloud_id',\r\n 'type' => 'text',\r\n 'desc' => 'Only use for the SoundCloud',\r\n 'std' => '',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => 'SoundCloudImage'\r\n ),\r\n\r\n array(\r\n 'label' => 'Quote Autor',\r\n 'id' => 'portfolio_Quote_Autor',\r\n 'type' => 'text',\r\n 'desc' => 'Only use for the SoundCloud',\r\n 'std' => '',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => 'Quote_Autor'\r\n ),\r\n\r\n array(\r\n 'label' => 'Link Title',\r\n 'id' => 'portfolio_Link_Title',\r\n 'type' => 'text',\r\n 'desc' => 'Link title',\r\n 'std' => '',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => 'Link_Title'\r\n ),\r\n array(\r\n 'label' => 'Link Url',\r\n 'id' => 'portfolio_Link_Url',\r\n 'type' => 'text',\r\n 'desc' => 'Link title',\r\n 'std' => '',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => 'Link_Url'\r\n ),\r\n )\r\n );\r\n\r\n $page_meta_box = array(\r\n 'id' => 'post_meta_box',\r\n 'title' => 'Page Option',\r\n 'desc' => '',\r\n 'pages' => array( 'page'),\r\n 'context' => 'normal',\r\n 'priority' => 'high',\r\n 'fields' => array(\r\n\r\n array(\r\n 'label' => 'Category ID show on page',\r\n 'id' => 'category_page',\r\n 'type' => 'text',\r\n 'desc' => '',\r\n 'std' => '',\r\n 'rows' => '',\r\n ),\r\n )\r\n );\r\n\r\n /**\r\n * Register our meta boxes using the\r\n * ot_register_meta_box() function.\r\n */\r\n ot_register_meta_box( $event_meta_box );\r\n// ot_register_meta_box( $post_meta_box );\r\n ot_register_meta_box( $page_meta_box );\r\n\r\n\r\n}", "function medarbejder_custom_post_type() {\n $labels = array(\n 'name' => _x( 'Medarbejdere', 'Post Type General Name', 'webstarters' ),\n 'singular_name' => _x( 'Medarbejder', 'Post Type Singular Name', 'webstarters' ),\n 'menu_name' => __( 'Medarbejdere', 'webstarters' ),\n 'parent_item_colon' => __( 'Forældre medarbejder', 'webstarters' ),\n 'all_items' => __( 'Alle medarbejdere', 'webstarters' ),\n 'view_item' => __( 'Se medarbejder', 'webstarters' ),\n 'add_new_item' => __( 'Tilføj ny medarbejder', 'webstarters' ),\n 'add_new' => __( 'Tilføj ny medarbejder', 'webstarters' ),\n 'edit_item' => __( 'Redigere medarbejder', 'webstarters' ),\n 'update_item' => __( 'Opdatere medarbejder', 'webstarters' ),\n 'search_items' => __( 'Søg efter medarbejder', 'webstarters' ),\n 'not_found' => __( 'Not Found', 'webstarters' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'webstarters' ),\n );\n\n// Set other options for Custom Post Type\n\n $args = array(\n 'label' => __( 'medarbejder', 'webstarters' ),\n 'description' => __( 'Custom post type til byggegrunde', 'webstarters' ),\n 'labels' => $labels,\n // Features this CPT supports in Post Editor\n 'supports' => array( 'title', 'thumbnail', 'custom-fields', ),\n // You can associate this CPT with a taxonomy or custom taxonomy.\n 'taxonomies' => array(),\n /* A hierarchical CPT is like Pages and can have\n * Parent and child items. A non-hierarchical CPT\n * is like Posts.\n */\n 'hierarchical' => false,\n 'public' => false,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'can_export' => true,\n 'has_archive' => false,\n 'exclude_from_search' => false,\n 'publicly_queryable' => false,\n 'capability_type' => 'page',\n );\n\n // Registering your Custom Post Type\n register_post_type( 'medarbejder', $args );\n\n}", "function _custom_meta_boxes() {\n\n $saved_settings = get_option( 'option_tree_settings', array() );\n\n $current_sliders = get_option( 'cp_sliders');\n\n// Iterate over the sliders\n if($current_sliders) {\n foreach($current_sliders as $key => $item) {\n $cpsliders[] = array(\n 'label' => $item->name,\n 'value' => $item->slug\n );\n }\n} else {\n $cpsliders[] = array(\n 'label' => 'No Sliders Found',\n 'value' => ''\n );\n}\n /**\n * Create a custom meta boxes array that we pass to\n * the OptionTree Meta Box API Class.\n */\n $meta_box_layout = array(\n 'id' => 'pp_metabox_sidebar',\n 'title' => 'Layout',\n 'desc' => 'If you choose the sidebar layout, please choose a sidebar from the list below. Sidebars can be created in the Theme Options and configured in the Theme Widgets.',\n 'pages' => array( 'post' ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'fields' => array(\n array(\n 'id' => 'pp_sidebar_layout',\n 'label' => 'Layout',\n 'desc' => '',\n 'std' => ot_get_option('pp_blog_layout','left-sidebar'),\n 'type' => 'radio_image',\n 'class' => '',\n 'choices' => array(\n array(\n 'value' => 'left-sidebar',\n 'label' => 'Left Sidebar',\n 'src' => OT_URL . '/assets/images/layout/left-sidebar.png'\n ),\n array(\n 'value' => 'right-sidebar',\n 'label' => 'Right Sidebar',\n 'src' => OT_URL . '/assets/images/layout/right-sidebar.png'\n )\n ),\n ),\n array(\n 'id' => 'pp_sidebar_set',\n 'label' => 'Sidebar',\n 'desc' => '',\n 'std' => '',\n 'type' => 'sidebar-select',\n 'class' => '',\n\n )\n )\n );\n\n$meta_box_layout_page = array(\n 'id' => 'pp_metabox_sidebar',\n 'title' => 'Layout',\n 'desc' => 'If you choose the sidebar layout, please choose a sidebar from the list below. Sidebars can be created in the Theme Options and configured in the Theme Widgets.',\n 'pages' => array( 'page' ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'fields' => array(\n array(\n 'id' => 'pp_sidebar_layout',\n 'label' => 'Layout',\n 'desc' => '',\n 'std' => ot_get_option('pp_blog_layout','left-sidebar'),\n 'type' => 'radio_image',\n 'class' => '',\n 'choices' => array(\n array(\n 'value' => 'left-sidebar',\n 'label' => 'Left Sidebar',\n 'src' => OT_URL . '/assets/images/layout/left-sidebar.png'\n ),\n array(\n 'value' => 'right-sidebar',\n 'label' => 'Right Sidebar',\n 'src' => OT_URL . '/assets/images/layout/right-sidebar.png'\n ),\n array(\n 'value' => 'full-width',\n 'label' => 'Full Width (no sidebar)',\n 'src' => OT_URL . '/assets/images/layout/full-width.png'\n )\n ),\n ),\n array(\n 'id' => 'pp_sidebar_set',\n 'label' => 'Sidebar',\n 'desc' => '',\n 'std' => '',\n 'type' => 'sidebar-select',\n 'class' => '',\n ),\n array(\n 'label' => 'Select slider',\n 'id' => 'pp_slider_select',\n 'type' => 'select',\n 'desc' => 'Don\\'t forget to choose Page Template: Page with Slider',\n 'choices' => $cpsliders,\n 'std' => 'true',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'class' => '',\n 'section' => 'slider'\n ),\n )\n);\n\n$post_options = array(\n 'id' => 'pp_metabox_featue',\n 'title' => 'Post options',\n 'desc' => 'Select post display options (Option depends on Post\\'s Format, so be sure to select one.',\n 'pages' => array( 'post' ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'fields' => array(\n array(\n 'label' => 'Gallery slider (use when Post Type is set to Gallery)',\n 'id' => 'pp_gallery_slider',\n 'type' => 'gallery',\n 'desc' => 'Click Create Slider to create your gallery for slider.',\n 'post_type' => 'post',\n ),\n array(\n 'id' => 'pp_video_link',\n 'label' => 'Link to Video',\n 'desc' => 'Just link, not embed code, this field uses oEmbed.',\n 'std' => '',\n 'type' => 'text',\n 'class' => '',\n ),\n array(\n 'id' => 'pp_video_embed',\n 'label' => 'Embed code for Video',\n 'desc' => 'Place here embed code for videos services that do not support oEmbed',\n 'std' => '',\n 'type' => 'textarea',\n 'class' => '',\n ),\n )\n );\n\n\n\n$gallerypage = array(\n 'id' => 'pp_metabox_gallerypage',\n 'title' => 'Gallery slider',\n 'desc' => 'If you want to use flexslider gallery like on Portfolio item, just create gallery using button below',\n 'pages' => array( 'page' ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'fields' => array(\n array(\n 'label' => 'Gallery slider (use when Post Type is set to Gallery)',\n 'id' => 'pp_gallery_slider',\n 'type' => 'gallery',\n 'desc' => 'Click Create Slider to create your gallery for slider.',\n 'post_type' => 'post',\n ),\n )\n );\n\n\n /**\n * Register our meta boxes using the\n * ot_register_meta_box() function.\n */\n ot_register_meta_box( $meta_box_layout );\n ot_register_meta_box( $meta_box_layout_page );\n ot_register_meta_box( $post_options );\n ot_register_meta_box( $gallerypage );\n\n\n}", "public static function createMetaBox() {\r\n add_meta_box( \r\n \\WPDisablePage\\Setup::PLUGIN_ID, // Metabox ID\r\n \\WPDisablePage\\Setup::PLUGIN_NAME, // Metabox Name\r\n array( __CLASS__, 'createView' ), // Metabox Callback\r\n apply_filters( strtolower( \\WPDisablePage\\Setup::PLUGIN_ID ) . '__post_types', self::POST_TYPES ), // Metabox Post Types\r\n self::POSITION, // Metabox Position\r\n self::PRIORITY // Metabox Priority\r\n );\r\n }", "function mt_testimonials_custom_meta_boxes() {\r\n \r\n /**\r\n * Create a custom meta boxes array that we pass to \r\n * the OptionTree Meta Box API Class.\r\n */\r\n \r\n $mt_testimonial_meta_box = array(\r\n 'id' => 'mt_testimonial_meta_box',\r\n 'title' => __('Item Customization', 'match'),\r\n 'desc' => '',\r\n 'pages' => array( 'mt_testimonials' ),\r\n 'context' => 'normal',\r\n 'priority' => 'high',\r\n 'fields' => array(\r\n \t array(\r\n 'label' => __('Client Name', 'match'),\r\n 'id' => 'mt_testimonial_client_name',\r\n 'type' => 'text',\r\n 'desc' => __('Add testimonial client name', 'match'),\r\n 'std' => 'John Doe',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => '' \r\n ),\r\n\t \r\n\t array(\r\n 'label' => __('Client Company', 'match'),\r\n 'id' => 'mt_testimonial_client_company',\r\n 'type' => 'text',\r\n 'desc' => __('Add testimonial client company', 'match'),\r\n 'std' => 'Company Name',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => '' \r\n ),\r\n\t \r\n\t array(\r\n 'label' => __('Client Small Image', 'match'),\r\n 'id' => 'mt_testimonial_client_img',\r\n 'type' => 'upload',\r\n 'desc' => __('Add testimonial client small image. Make sure is 70x70px.', 'match'),\r\n 'std' => '',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => '' \r\n )\r\n\t \t \r\n \t)\r\n );\r\n \r\n /**\r\n * Register our meta boxes using the \r\n * ot_register_meta_box() function.\r\n */\r\n ot_register_meta_box( $mt_testimonial_meta_box );\r\n\r\n}", "function my_taxonomies_registry() {\n\t$type_labels = array(\n\t\t'name' => 'Wool Type',\n\t\t'singular_name' => 'Wool Type',\n\t\t'search_items' => 'Search Wool Types',\n\t\t'all_items' => 'All Wool Types' ,\n\t\t'edit_item' => 'Wool Type', \n\t\t'update_item' => 'Update Wool Type',\n\t\t'add_new_item' => 'Add New Wool Type',\n\t\t'new_item_name' => 'New Wool Type',\n\t\t'menu_name' => 'Wool Types',\n\t\t'choose_from_most_used' => 'Choose from most used wool types' \n\t);\n\t$type_args = array(\n\t\t'labels' => $type_labels,\n\t\t'show_admin_column' => true,\n\t\t'hierarchical' => false,\n\t\t'capabilities' => array (\n 'manage_terms' => 'manage_wool', //by default only admin\n 'edit_terms' => 'edit_wool',\n 'delete_terms' => 'delete_wool',\n 'assign_terms' => 'assign_wool' \n ),\n\t\t'public' => true,\n\t\t'query_var' => true,\n\t\t'show_ui'=> true,\n\t\t'show_tagcloud' => false,\t\t\n\t);\n\t$color_labels = array(\n\t\t'name' => 'Wool Colors',\n\t\t'singular_name' => 'Wool Color',\n\t\t'search_items' => 'Search Wool Colors',\n\t\t'all_items' => 'All Wool Colors' ,\n\t\t'edit_item' => 'Wool Color', \n\t\t'update_item' => 'Update Wool Color',\n\t\t'add_new_item' => 'Add New Wool Color',\n\t\t'new_item_name' => 'New Wool Color',\n\t\t'menu_name' => 'Wool Colors',\n\t\t'choose_from_most_used' => 'Choose from most used wool colors' \n\t);\n\t$color_args = array(\n\t\t'labels' => $color_labels,\n\t\t'show_admin_column' => true,\n\t\t'hierarchical' => false,\n\t\t'capabilities' => array (\n 'manage_terms' => 'manage_color', //by default only admin\n 'edit_terms' => 'edit_color',\n 'delete_terms' => 'delete_color',\n 'assign_terms' => 'assign_color' \n ),\n\t\t'public' => true,\n\t\t'query_var' => true,\n\t\t'show_ui' => true,\n\t\t'show_tagcloud' => false,\t\t\n\t);\t\n\t$page_labels = array(\n\t\t'name' => 'Display pages',\n\t\t'singular_name' => 'Display pages',\n\t\t'search_items' => 'Search Display pages',\n\t\t'all_items' => 'All Display pages' ,\n\t\t'edit_item' => 'Display pages', \n\t\t'update_item' => 'Update Display page',\n\t\t'add_new_item' => 'Add New Display page',\n\t\t'new_item_name' => 'New Display page',\n\t\t'menu_name' => 'Display pages',\n\t\t'choose_from_most_used' => 'Choose from most used' \n\t);\n\t$page_args = array(\n\t\t'labels' => $page_labels,\n\t\t'show_admin_column' => true,\n\t\t'hierarchical' => false,\n\t\t'capabilities' => array (\n 'manage_terms' => 'manage_color', //by default only admin\n 'edit_terms' => 'edit_color',\n 'delete_terms' => 'delete_color',\n 'assign_terms' => 'assign_color' \n ),\n\t\t'public' => true,\n\t\t'query_var' => true,\n\t\t'show_ui' => true,\n\t\t'show_tagcloud' => false,\n\t\t'rewrite' => array('slug' => 'registrations'),\t\t\n\t);\n\tregister_taxonomy( 'wool_type', 'coz_registry', $type_args );\n\tregister_taxonomy( 'wool_color', 'coz_registry', $color_args );\n\tregister_taxonomy( 'reg_display_page', 'coz_registry', $page_args );\n}", "function post_meta_setup(){\n\t\t$type_meta_array = array(\n\t\t\t'settings' => array(\n\t\t\t\t'type' => 'multi_option',\n\t\t\t\t'title' => __( 'Single '.$this->single_up.' Options', 'pagelines' ),\n\t\t\t\t'shortexp' => __( 'Parameters', 'pagelines' ),\n\t\t\t\t'exp' => __( '<strong>Single '.$this->single_up.' Options</strong><br>Add '.$this->single_up.' Metadata that will be used on the page.<br><strong>HEADS UP:<strong> Each template uses different set of metadata. Check out <a href=\"http://bestrag.net/'.$this->multiple.'-lud\" target=\"_blank\">demo page</a> for more information.', 'pagelines' ),\n\t\t\t\t'selectvalues' => array(\n\t\t\t\t\t'client_name' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Client Name', 'pagelines' )\n\t\t\t\t\t),\n\t\t\t\t\t'client_name_url' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Client Name URL (eg: http://www.client.co)', 'pagelines' )\n\t\t\t\t\t),\n\t\t\t\t\t'partner' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Partner Company Name', 'pagelines' )\n\t\t\t\t\t),\n\t\t\t\t\t'partner_url' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Partner Company URL', 'pagelines' )\n\t\t\t\t\t),\n\t\t\t\t\t'project_slogan' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Project Slogan', 'pagelines' )\n\t\t\t\t\t),\n\t\t\t\t\t'img1' => array(\n\t\t\t\t\t\t'inputlabel' => __( 'Associate an image with this '.$this->single, 'pagelines' ),\n\t\t\t\t\t\t'type' => 'thickbox_image'\n\t\t\t\t\t),\n\t\t\t\t\t'img2' => array(\n\t\t\t\t\t\t'inputlabel' => __( 'Associate an image with this '.$this->single, 'pagelines' ),\n\t\t\t\t\t\t'type' => 'thickbox_image'\n\t\t\t\t\t),\n\t\t\t\t\t'custom_text1' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Custom Text/HTML/Shortcode 1', 'pagelines' )\n\t\t\t\t\t),\n\t\t\t\t\t'custom_text2' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Custom Text/HTML/Shortcode 2', 'pagelines' )\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t );\n\t\t$fields = $type_meta_array['settings']['selectvalues'];\n\t\t$figo = array(); $findex = 0;\n\n\t\tforeach ($fields as $key => $value) {\n\t\t\t$figo[$findex] = array(\n\t\t\t\t'name' => $value['inputlabel'],\n\t\t\t\t'id' => $key,\n\t\t\t\t'type' => $value['type'],\n\t\t\t\t'std' => '',\n\t\t\t\t'class' => 'custom-class',\n\t\t\t\t'clone' => false\n\t\t\t);\n\t\t\t$findex++;\n\t\t}\n\t\t$metabox = array(\n\t\t\t'id' => 'projectal',\n\t\t\t'title' => 'Projectal Information',\n\t\t\t'pages' => array( $this->multiple ),\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'high',\n\t\t\t'fields' => $figo\n\t\t);\n\t\t new RW_Meta_Box($metabox);\n\t}", "function create_portfolio_taxonomies () {\r\n $labels = [\r\n 'name' => _x('Tecnologías', 'taxonomy general name'),\r\n 'singular_name' => _x('Tecnología', 'taxonomy singular name'),\r\n 'search_items' => __('Busca Tecnologías'),\r\n 'popular_items' => __('Tecnologías más usadas'),\r\n 'all_items' => __('Todas las tecnologías'),\r\n 'parent_item' => null,\r\n 'parent_item_colon' => null,\r\n 'edit_item' => __('Editar tecnología'),\r\n 'update_item' => __('Actualizar tecnología'),\r\n 'add_new_item' => __('Añade una nueva tecnología'),\r\n 'new_item_name' => __('Nombre de nueva tecnología'),\r\n 'separate_items_with_commas' => __('Tecnologías. Separadas por comas.'),\r\n 'add_or_remove_items' => __('Añadir o quitar tecnologías'),\r\n 'choose_from_most_used' => __('Elige de las tecnologías más usadas.'),\r\n 'not_found' => __('No se han encontrado tecnologías.'),\r\n 'menu_name' => __('Tecnologías'),\r\n ];\r\n $args = [\r\n 'hierarchical' => FALSE,\r\n 'labels' => $labels,\r\n 'show_ui' => TRUE,\r\n 'show_admin_column' => TRUE,\r\n 'update_count_callback' => '_update_post_term_count',\r\n 'query_var' => TRUE,\r\n 'rewrite' => array( 'slug' => 'tecnologia' ),\r\n ];\r\n \r\n register_taxonomy( 'tecnologia', 'trabajo', $args );\r\n}", "function _sp_custom_meta_boxes() {\n\t$post_id = ( isset( $_GET['post'] ) ) ? $_GET['post'] : ( isset( $_POST['post_ID'] ) ? $_POST['post_ID'] : '');\n\n\t$template_file = get_post_meta( $post_id, '_wp_page_template', TRUE );\n\n\t/////////////////////////////////////////////////////\n\t// portfolio sort position\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'portfolio-sort-position',\n\t\t__( 'Sort Position', 'sp-theme' ),\n\t\t'_sp_custom_box_portfolio_sort_position',\n\t\t'sp-portfolio',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// slider carousel shortcode\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'carousel-shortcode',\n\t\t__( 'Carousel Shortcode', 'sp-theme' ),\n\t\t'_sp_custom_box_carousel_shortcode',\n\t\t'sp-slider',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// wpautop post\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_auto_formatting_post',\n\t\t__( 'Auto Content Formating', 'sp-theme' ),\n\t\t'_sp_custom_box_wpautop',\n\t\t'post',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// wpautop page\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_auto_formatting_page',\n\t\t__( 'Auto Content Formating', 'sp-theme' ), \n\t\t'_sp_custom_box_wpautop',\n\t\t'page',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// wpatup portfolio\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_auto_formatting_portfolio',\n\t\t__( 'Auto Content Formating', 'sp-theme' ), \n\t\t'_sp_custom_box_wpautop',\n\t\t'sp-portfolio',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout page\n\t/////////////////////////////////////////////////////\n\t// don't show on maintenance page\n\tif ( $template_file !== 'maintenance-page.php' ) {\n\t\tadd_meta_box(\n\t\t\t'sp_page_layout',\n\t\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t\t'_sp_custom_box_layout',\n\t\t\t'page',\n\t\t\t'side',\n\t\t\t'low'\n\t\t);\t\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout post\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_post_layout',\n\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t'_sp_custom_box_layout',\n\t\t'post',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout portfolio\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_portfolio_layout',\n\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t'_sp_custom_box_layout',\n\t\t'sp-portfolio',\n\t\t'side',\n\t\t'low'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout product\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_product_layout',\n\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t'_sp_custom_box_layout',\n\t\t'product',\n\t\t'side',\n\t\t'low'\n\t);\n\n\t// check if SEO enabled\n\tif ( sp_get_option( 'seo_enable', 'is', 'on' ) || ! sp_get_option( 'seo_enable', 'isset' ) ) {\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo post\n\t\t/////////////////////////////////////////////////////\n\t\tadd_meta_box(\n\t\t\t'sp_seo_settings',\n\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t'post'\n\t\t);\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo page\n\t\t/////////////////////////////////////////////////////\n\t\t// don't show on maintenance page\n\t\tif ( $template_file !== 'maintenance-page.php' ) {\n\t\t\tadd_meta_box(\n\t\t\t\t'sp_seo_settings',\n\t\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t\t'page'\n\t\t\t);\n\t\t}\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo woo product\n\t\t/////////////////////////////////////////////////////\n\t\tadd_meta_box(\n\t\t\t'sp_seo_settings',\n\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t'product'\n\t\t);\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo portfolio\n\t\t/////////////////////////////////////////////////////\n\t\tadd_meta_box(\n\t\t\t'sp_seo_settings',\n\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t'sp-portfolio'\n\t\t);\n\t}\n\t\n\t/////////////////////////////////////////////////////\n\t// testimonial submitter\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_testimonial_submitter',\n\t\t__( 'Testimonial Submitter', 'sp-theme' ),\n\t\t'_sp_custom_box_testimonial_settings',\n\t\t'sp-testimonial',\n\t\t'side',\n\t\t'core'\n\t); \n\n\t/////////////////////////////////////////////////////\n\t// advanced page options\n\t/////////////////////////////////////////////////////\n\t// don't show on maintenance page\n\tif ( $template_file !== 'maintenance-page.php' ) {\t\n\t\tadd_meta_box(\n\t\t\t'sp_advanced_page_options',\n\t\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t\t'_sp_custom_box_advanced_page_options',\n\t\t\t'page'\n\t\t);\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// advanced post options\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_advanced_post_options',\n\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t'_sp_custom_box_advanced_page_options',\n\t\t'post'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// advanced portfolio options\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_advanced_portfolio_options',\n\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t'_sp_custom_box_advanced_page_options',\n\t\t'sp-portfolio'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// advanced woo product options\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_advanced_woo_product_options',\n\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t'_sp_custom_box_advanced_page_options',\n\t\t'product'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// contact form shortcode\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-shortcode',\n\t\t__( 'Contact Form Shortcode', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_shortcode',\n\t\t'sp-contact-form',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// contact form general settings\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-settings',\n\t\t__( 'Contact Form Settings', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_settings',\n\t\t'sp-contact-form',\n\t\t'normal',\n\t\t'high'\n\t);\n\t\n\t/////////////////////////////////////////////////////\n\t// contact form content\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-content',\n\t\t__( 'Contact Form Content', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_content',\n\t\t'sp-contact-form',\n\t\t'normal',\n\t\t'high'\n\t); \n\n\t/////////////////////////////////////////////////////\n\t// contact form messages\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-messages',\n\t\t__( 'Contact Form Messages', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_messages',\n\t\t'sp-contact-form',\n\t\t'normal',\n\t\t'high'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// page builder page\n\t/////////////////////////////////////////////////////\n\t// don't show on maintenance page\n\tif ( $template_file !== 'maintenance-page.php' ) {\t\n\t\tadd_meta_box(\n\t\t\t'page-builder',\n\t\t\t__( 'Page Builder', 'sp-theme' ),\n\t\t\t'_sp_custom_box_page_builder',\n\t\t\t'page',\n\t\t\t'normal',\n\t\t\t'high'\n\t\t);\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// alternate product image on hover\n\t/////////////////////////////////////////////////////\n\t/*\n\tadd_meta_box(\n\t\t'sp_alternate_product_image',\n\t\t__( 'Alternate Product Image', 'sp-theme' ),\n\t\t'_sp_custom_box_alternate_product_image',\n\t\t'product',\n\t\t'side',\n\t\t'low' \n\t);\n\t*/\n\n\t/////////////////////////////////////////////////////\n\t// custom product tabs\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_custom_product_tabs',\n\t\t__( 'Product Tabs Option', 'sp-theme' ),\n\t\t'_sp_custom_product_tabs',\n\t\t'product',\n\t\t'normal',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// featured video post\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_featured_video',\n\t\t__( 'Featured Video', 'sp-theme' ), \n\t\t'_sp_custom_box_featured_video',\n\t\t'post',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// faq sort order\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_faq_order',\n\t\t__( 'Sort Order', 'sp-theme' ), \n\t\t'_sp_custom_box_faq_order',\n\t\t'sp-faq',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\treturn true;\n}", "function sm_custom_meta() {\n\tadd_meta_box('sm_meta', __( 'Post Destacado', 'sm-textdomain' ), 'sm_meta_callback', 'post' );\n}", "function vulcan_page_meta_boxes() {\r\r\n $meta_boxes = array(\r\r\n \"short_desc\" => array(\r\r\n \"name\" => \"short_desc\",\r\r\n \"title\" => \"Short Description\",\r\r\n \"description\" => \"Add short description to your pages.\",\r\r\n \"type\" => \"textarea\"\r\r\n ),\r\r\n \"page_thumbnail_image\" => array(\r\r\n \"name\" => \"page_thumbnail_image\",\r\r\n \"title\" => \"Thumbnail Image\",\r\r\n \"description\" => \"Add thumbnail image url, will be use for your page thumbnail, for example in Services child pages list.\",\r\r\n \"type\" => \"text\"\r\r\n )\r\r\n );\r\r\n \r\r\n return $meta_boxes;\r\r\n}", "function bw_create_taxonomies() {\n//first do the translations part for GUI\n \n $labels = array(\n 'name' => _x( 'Years', 'taxonomy general name' ),\n 'singular_name' => _x( 'Year', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Years' ),\n 'all_items' => __( 'All Years' ),\n 'parent_item' => __( 'Parent Year' ),\n 'parent_item_colon' => __( 'Parent Year:' ),\n 'edit_item' => __( 'Edit Year' ), \n 'update_item' => __( 'Update Year' ),\n 'add_new_item' => __( 'Add New Year' ),\n 'new_item_name' => __( 'New Year Name' ),\n 'menu_name' => __( 'Years' ),\n ); \n \n// Now register the taxonomy\n \n register_taxonomy('years',array('post'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'topic' ),\n ));\n \n}", "function registry_post_meta_boxes_setup() {\n\n /* Add meta boxes on the 'add_meta_boxes' hook. */\n add_action( 'add_meta_boxes', 'registry_add_post_meta_boxes', 1 );\n\n /* Save post info meta on the 'save_post' hook. */\n add_action( 'save_post', 'registry_save_coz_info_meta', 10, 2 );\n \n /* Save post info meta on the 'save_post' hook. */\n add_action( 'save_post', 'registry_save_coz_num_meta', 10, 2 );\n \n}", "function master_setup_sidebar_metaboxes() {\t\n\tglobal $wp_meta_boxes;\n\t\n\tmaster_sidebar_post_type_meta_boxes(); \t\t\t// Output Posttype Metaboxes\n\tmaster_sidebar_category_posts_metabox(); \t\t// Output Category Posts Metabox\n\tmaster_sidebar_taxonomy_meta_boxes(); \t\t\t// Output Taxonomy Metaboxes\n\tmaster_sidebar_author_meta_box(); \t\t\t// Output Author Archive Metabox\n\tmaster_sidebar_template_hierarchy_meta_box();\t// Output Custom Template Hierarchy Metabox \n}", "function agilespirit_entry_meta() {\n if ( is_sticky() && is_home() && ! is_paged() )\n echo '<span class=\"featured-post\">' . __( 'Sticky', 'agilespirit' ) . '</span>';\n\n if ( ! has_post_format( 'link' ) && 'post' == get_post_type() )\n agilespirit_entry_date();\n\n // Translators: used between list items, there is a space after the comma.\n $categories_list = get_the_category_list( __( ', ', 'agilespirit' ) );\n if ( $categories_list ) {\n echo ' ' . __('in', 'agilespirit') . ' <span class=\"categories-links\">' . $categories_list . '</span>';\n }\n\n // Translators: used between list items, there is a space after the comma.\n $tag_list = get_the_tag_list( '', __( ', ', 'agilespirit' ) );\n if ( $tag_list ) {\n echo '<span class=\"tags-links\">' . ' ' . __(' concerning ', 'agilespirit') . ' ' . $tag_list . '</span>';\n }\n\n // Post author\n if ( 'post' == get_post_type() ) {\n _e(' by ', 'agilespirit');\n printf( '<span class=\"author\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>',\n esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n esc_attr( sprintf( __( 'View all posts by %s', 'agilespirit' ), get_the_author() ) ),\n get_the_author()\n );\n }\n}", "function get_term_meta($term_id, $key = '', $single = \\false)\n {\n }", "function wp_newTerm( $args ) {\n\n global $wp_xmlrpc_server;\n $wp_xmlrpc_server->escape( $args );\n\n $blog_ID = (int) $args[0];\n $username = $args[1];\n $password = $args[2];\n $content_struct = $args[3];\n\n if ( ! $user = $wp_xmlrpc_server->login( $username, $password ) )\n return $wp_xmlrpc_server->error;\n\n if ( ! taxonomy_exists( $content_struct['taxonomy'] ) )\n return new IXR_Error( 403, __( 'Invalid taxonomy' ) );\n\n $taxonomy = get_taxonomy( $content_struct['taxonomy'] );\n\n if( ! current_user_can( $taxonomy->cap->manage_terms ) )\n return new IXR_Error( 401, __( 'You are not allowed to create terms in this taxonomy' ) );\n\n $taxonomy = (array)$taxonomy;\n\n // hold the data of the term\n $term_data = array();\n \n $term_data['name'] = trim( $content_struct['name'] );\n if ( empty ( $term_data['name'] ) )\n return new IXR_Error( 403, __( 'The term name cannot be empty' ) );\n\n if( isset ( $content_struct['parent'] ) ) {\n\n if( ! $taxonomy['hierarchical'] )\n return new IXR_Error( 403, __( 'This taxonomy is not hieararchical' ) );\n\n $parent_term_id = (int)$content_struct['parent'];\n $parent_term = get_term( $parent_term_id , $taxonomy['name'] );\n\n if ( is_wp_error( $parent_term ) )\n return new IXR_Error( 500, $term->get_error_message() );\n\n if ( ! $parent_term )\n return new IXR_Error(500, __('Parent term does not exist'));\n\n $term_data['parent'] = $content_struct['parent'];\n \n }\n\n $term_data['description'] = '';\n if( isset ( $content_struct['description'] ) )\n $term_data['description'] = $content_struct['description'];\n\n $term_data['slug'] = '';\n if( isset ( $content_struct['slug'] ) )\n $term_data['slug'] = $content_struct['slug'];\n\n $term_ID = wp_insert_term( $term_data['name'] , $taxonomy['name'] , $term_data );\n\n if ( is_wp_error( $term_ID ) )\n return new IXR_Error(500, $term_ID->get_error_message());\n\n if ( ! $term_ID )\n return new IXR_Error(500, __('Sorry, your entry could not be posted. Something wrong happened.'));\n\n return $term_ID;\n\n}", "private function initMetaBox(){\n\t\t$path = get_template_directory() . '/sub/customfield/';\n\t\tif(function_exists('of_get_option')){\n\t\t\tif(of_get_option('is-seo',true)){\n\t\t\t\tnew WPO_MetaBox(array(\n\t\t\t\t 'id' => 'wpo_seo',\n\t\t\t\t 'title' => $this->l('SEO Fields'),\n\t\t\t\t 'types' => array('page','portfolio','post','video'),\n\t\t\t\t 'priority' => 'high',\n\t\t\t\t 'template' => $path . 'seo.php',\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_template',\n\t\t 'title' => $this->l('Advanced Configuration'),\n\t\t 'types' => array('page'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'page-advanced.php'\n\t\t));\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_pageconfig',\n\t\t 'title' => $this->l('Page Configuration'),\n\t\t 'types' => array('page'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'page.php',\n\t\t));\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_post',\n\t\t 'title' => $this->l('Embed Options'),\n\t\t 'types' => array('post','video'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'post.php',\n\t\t));\n\t}", "function coolRahulSoni_meta_box_add()\n{\n add_meta_box( 'my-meta-box-id', 'My First Meta Box', 'cd_meta_box_cb', 'post', 'normal', 'high' );\n}", "function ahr_add_tax_meta_box() {\r\n \r\n $taxonomies = get_taxonomies();\r\n $slugs = array();\r\n \r\n // Add only taxonomies that have pages attached to them\r\n foreach ( $taxonomies as $tax ) {\r\n if ( 'nav_menu' !== $tax && 'post_format' !== $tax && 'link_category' !== $tax && 'wpforms_log_type' !== $tax ) {\r\n array_push( $slugs, $tax );\r\n }\r\n }\r\n \r\n foreach ( $slugs as $slug ) {\r\n add_action( \"{$slug}_edit_form_fields\", 'ahr_tax_edit_form' );\r\n add_action( \"edited_{$slug}\", 'ahr_tax_edited_form' );\r\n \r\n add_action( \"{$slug}_add_form_fields\", 'ahr_tax_add_form' );\r\n add_action( \"create_{$slug}\", 'ahr_tax_edited_form' );\r\n }\r\n \r\n}", "function custom_post_type() {\n // Set other options for Custom Post Type\n $args = array(\n 'label' => __( 'Child Care', 'AOK' ),\n 'description' => __( 'Child Care', 'AOK' ),\n 'labels' => $labels,\n // Features in Post Editor\n 'supports' => array( 'title', 'author', 'comments' ),\n // Taxonomies or custom taxonomy.\n //'taxonomies' => array( 'categories' ),\n /* A hierarchical CPT is like Pages and can have\n* Parent and child items. A non-hierarchical CPT\n* is like Posts.\n*/\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => 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' => 'post',\n );\n /*\n$args2 = array(\n'label' => __( 'Public Profile', 'AOK' ),\n'description' => __( 'Public Profile', 'AOK' ),\n'labels' => $labels,\n// Features in Post Editor\n'supports' => false,\n// Taxonomies or custom taxonomy.\n//'taxonomies' => array( 'categories' ),\n// A hierarchical CPT is like Pages and can have\n// Parent and child items. A non-hierarchical CPT\n// is like Posts.\n\n'hierarchical' => false,\n'public' => true,\n'show_ui' => true,\n'show_in_menu' => true,\n'show_in_nav_menus' => true,\n'show_in_admin_bar' => true,\n'menu_position' => 3,\n'can_export' => true,\n'has_archive' => true,\n'exclude_from_search' => false,\n'publicly_queryable' => true,\n'capability_type' => 'post',\n);\n*/\n // Registering Custom Post Type\n register_post_type( 'child_care', $args );\n //register_post_type( 'profile', $args2 );\n}", "function df_meta_boxes( ) {\n\t\tglobal $post, $df_box_objects;\n\t\tforeach( $df_box_objects as $df_box ) {\n\t\t\t\n\t\t\t//Get current post type. If is a revision - get parent post type.\n\t\t\t$post_type = get_post_type( $post->ID );\n\t\t\tif( $post_type == 'revision' ) {\n\t\t\t\tglobal $post;\n\t\t\t\t$post_type = get_post_type( $post->post_parent );\n\t\t\t}\t\t\n\t\t\t\n\t\t\tif( in_array( $post_type, $df_box->post_types ) ) :\n\t\t\t\tforeach( $df_box->post_types as $post_type ) {\n\t\t\t\t\tadd_meta_box( $df_box->id . \"_box\", $df_box->title, 'df_meta_fields', $post_type, 'side', 'low', $df_box );\n\t\t\t\t}\n\t\t\tendif;\n\t\t}\n\t}", "public function register_meta_fields() {\n\n\t\t$args = array(\n\t\t\t'type' => 'boolean',\n\t\t\t'description' => 'Has this post been published to stage',\n\t\t\t'single' => true,\n\t\t\t'show_in_rest' => true,\n\t\t);\n\n\t\tregister_meta( 'post', 'lbn_published_stage', $args );\n\n\t\t$args['description'] = 'Has this post been published to production';\n\t\tregister_meta( 'post', 'lbn_published_production', $args );\n\t}", "function five_register_taxonomy($taxonomy, $singular, $plural, $object_type = ['post'], $args = [])\n{\n //first do the translations part for GUI\n\n $labels = [\n 'name' => _x($plural, 'five'),\n 'singular_name' => _x($singular, 'five'),\n 'search_items' => __('Search '.$plural),\n 'all_items' => __('All '.$plural),\n 'parent_item' => __('Parent '.$singular),\n 'parent_item_colon' => __('Parent '.$singular.':'),\n 'edit_item' => __('Edit '.$singular),\n 'update_item' => __('Update '.$singular),\n 'add_new_item' => __('Add New '.$singular),\n 'new_item_name' => __('New '.$singular.' Name'),\n 'menu_name' => __($plural),\n ];\n\n // Now register the taxonomy\n $args = array_merge([\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_in_rest' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => ['slug' => $taxonomy],\n ], $args);\n\n register_taxonomy($taxonomy, $object_type, $args);\n}", "function my_custom_post_registry() {\n\t$registry_labels = array(\n\t\t'name' => 'Registrations',\n\t\t'singular_name' => 'Cozmeena Shawl Registration',\n\t\t'add_new' => 'Add New',\n\t\t'all_items' => 'All Registrations',\n\t\t'add_new_item' => 'Add New Registration',\n\t\t'edit_item' => 'Edit Registration',\n\t\t'new_item' => 'New Registration',\n\t\t'view_item' => 'View Registration',\n\t\t'search_items' => 'Search Registrations',\n\t\t'not_found' => 'No Registrations found',\n\t\t'not_found_in_trash' => 'No Registrations found in trash',\n\t\t'parent_item_colon' => '',\n\t\t'menu_name' => 'Cozmeena Shawl Registrations'\n\t);\n\t$registry_args = array(\n\t\t'labels' => $registry_labels,\n\t\t'description' => \"The International Cozmeena Registry is the official record of Cozmeena Shawls\",\n\t\t'public' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => '',\n\t\t'supports' => array('title','author', 'editor','thumbnail'),\n\t\t'capability_type' => 'coz_registry', // need to assign capabilities via plugin\n\t\t'map_meta_cap' => true,\n\t\t'has_archive' => true,\n\t); \n\tregister_post_type('coz_registry',$registry_args);\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}", "function enable_full_meta_for_pages() {\n add_post_type_support( 'page', 'excerpt' );\n register_taxonomy_for_object_type( 'post_tag', 'page' );\n register_taxonomy_for_object_type( 'category', 'page' );\n}", "function edd_incentives_add_meta_boxes() {\n add_meta_box( 'edd-incentive-preview', __( 'Preview', 'edd-incentives' ), 'edd_incentives_render_preview', 'incentive', 'side', 'default' );\n add_meta_box( 'edd-incentive-options', __( 'Options', 'edd-incentives' ), 'edd_incentives_render_options', 'incentive', 'side', 'default' );\n add_meta_box( 'edd-incentive-exit-options', __( 'Exit Button', 'edd-incentives' ), 'edd_incentives_render_exit_options', 'incentive', 'side', 'default' );\n add_meta_box( 'edd-incentive-conditions', __( 'Conditions For Display', 'edd-incentives' ), 'edd_incentives_render_conditions', 'incentive', 'normal', 'default' );\n\n // Render the pseudo-metabox for the template tags\n add_action( 'edit_form_after_title', 'edd_incentives_render_template_tags' );\n}", "function nbh_3level_metabox($neighborhoodID)\n{\n\n $metabox = [];\n\n $terms = get_the_terms($neighborhoodID, 'property-city');\n\n foreach ($terms as $term) {\n\n //Get Level 3 Term\n if (!get_term_children($term->term_id, 'property-city')) {\n $level3TermID = $term->term_id;\n $level3TermName = $term->name;\n $level3TermSlug = $term->slug;\n continue;\n }\n\n //Get Level 1 Term\n if ($term->parent && get_term_children($term->term_id, 'property-city')) {\n $level2TermID = $term->term_id;\n $level2TermName = $term->name;\n $level2TermSlug = $term->slug;\n continue;\n }\n\n //Get Top Level Term\n if (!$term->parent) {\n $topTermID = $term->term_id;\n $topTermName = $term->name;\n $topTermSlug = $term->slug;\n }\n }\n\n array_push($metabox, array(\n '0' => $topTermID,\n '1' => $topTermName,\n '2' => $topTermSlug,\n '3' => get_term_meta($topTermID, 'neighborhood_code', true),\n 'Term_ID' => $topTermID,\n 'Term_Name' => $topTermName,\n 'Term_Slug' => $topTermSlug,\n 'Term_Code' => get_term_meta($topTermID, 'neighborhood_code', true),\n 'show_metabox' => true,\n 'get_chartdata' => true\n ));\n\n array_push($metabox, array(\n '0' => $level2TermID,\n '1' => $level2TermName,\n '2' => $level2TermSlug,\n '3' => get_term_meta($level2TermID, 'neighborhood_code', true),\n 'Term_ID' => $level2TermID,\n 'Term_Name' => $level2TermName,\n 'Term_Slug' => $level2TermSlug,\n 'Term_Code' => get_term_meta($level2TermID, 'neighborhood_code', true),\n 'show_metabox' => true,\n 'get_chartdata' => true\n ));\n array_push($metabox, array(\n '0' => $level3TermID,\n '1' => $level3TermName,\n '2' => $level3TermSlug,\n '3' => get_term_meta($level3TermID, 'neighborhood_code', true),\n 'Term_ID' => $level3TermID,\n 'Term_Name' => $level3TermName,\n 'Term_Slug' => $level3TermSlug,\n 'Term_Code' => get_term_meta($level3TermID, 'neighborhood_code', true),\n 'show_metabox' => true,\n 'get_chartdata' => true\n ));\n\n return $metabox;\n}", "function wpdocs_create_book_taxonomies() {\n // Add new taxonomy, make it hierarchical (like categories)\n $labels = array(\n 'name' => _x( 'Genres', 'taxonomy general name', 'textdomain' ),\n 'singular_name' => _x( 'Genre', 'taxonomy singular name', 'textdomain' ),\n 'search_items' => __( 'Search Genres', 'textdomain' ),\n 'all_items' => __( 'All Genres', 'textdomain' ),\n 'parent_item' => __( 'Parent Genre', 'textdomain' ),\n 'parent_item_colon' => __( 'Parent Genre:', 'textdomain' ),\n 'edit_item' => __( 'Edit Genre', 'textdomain' ),\n 'update_item' => __( 'Update Genre', 'textdomain' ),\n 'add_new_item' => __( 'Add New Genre', 'textdomain' ),\n 'new_item_name' => __( 'New Genre Name', 'textdomain' ),\n 'menu_name' => __( 'Genre', 'textdomain' ),\n );\n \n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'genre' ),\n );\n \n register_taxonomy( 'genre', array( 'book' ), $args );\n \n unset( $args );\n unset( $labels );\n \n // Add new taxonomy, NOT hierarchical (like tags)\n $labels = array(\n 'name' => _x( 'Writers', 'taxonomy general name', 'textdomain' ),\n 'singular_name' => _x( 'Writer', 'taxonomy singular name', 'textdomain' ),\n 'search_items' => __( 'Search Writers', 'textdomain' ),\n 'popular_items' => __( 'Popular Writers', 'textdomain' ),\n 'all_items' => __( 'All Writers', 'textdomain' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Writer', 'textdomain' ),\n 'update_item' => __( 'Update Writer', 'textdomain' ),\n 'add_new_item' => __( 'Add New Writer', 'textdomain' ),\n 'new_item_name' => __( 'New Writer Name', 'textdomain' ),\n 'separate_items_with_commas' => __( 'Separate writers with commas', 'textdomain' ),\n 'add_or_remove_items' => __( 'Add or remove writers', 'textdomain' ),\n 'choose_from_most_used' => __( 'Choose from the most used writers', 'textdomain' ),\n 'not_found' => __( 'No writers found.', 'textdomain' ),\n 'menu_name' => __( 'Writers', 'textdomain' ),\n );\n \n $args = array(\n 'hierarchical' => false,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'writer' ),\n );\n \n register_taxonomy( 'writer', 'book', $args );\n}", "function agnosia_add_post_meta_boxes() {\r\n\r\n\t\tglobal $post;\r\n\r\n\t\t$meta_value = get_post_meta( $post->ID, 'agnosia_post_meta' , true ) ;\r\n\r\n\t\tadd_meta_box(\r\n\t\t\t'post-excerpt-settings',\t\t\t// Unique ID\r\n\t\t\tesc_html( __( 'Excerpt settings', 'agnosia' ) ),\t\t// Title\r\n\t\t\t'agnosia_post_excerpt_settings_meta_box',\t\t// Callback function\r\n\t\t\t'',\t\t\t\t\t// Admin page (or post type)\r\n\t\t\t'side',\t\t\t\t\t// Context\r\n\t\t\t'core'\t\t\t\t\t// Priority\r\n\t\t);\r\n\r\n\t\tif ( current_user_can( 'content_enable_custom_stylesheet' ) \r\n\t\t\tand ( !isset( $meta_value['block_custom_stylesheet'] ) \r\n\t\t\t\tor !$meta_value['block_custom_stylesheet'] \r\n\t\t\t) \r\n\t\t) :\r\n\r\n\t\t\tadd_meta_box(\r\n\t\t\t\t'post-custom-stylesheet',\t\t\t// Unique ID\r\n\t\t\t\tesc_html( __( 'Custom stylesheet', 'agnosia' ) ),\t\t// Title\r\n\t\t\t\t'agnosia_post_custom_stylesheet_meta_box',\t\t// Callback function\r\n\t\t\t\t'',\t\t\t\t\t// Admin page (or post type)\r\n\t\t\t\t'advanced',\t\t\t\t\t// Context\r\n\t\t\t\t'default'\t\t\t\t\t// Priority\r\n\t\t\t);\r\n\r\n\t\tendif;\r\n\r\n\t\tif ( current_user_can( 'content_enable_featured_image_position' ) \r\n\t\t\tand ( !isset( $meta_value['block_featured_image_position'] ) \r\n\t\t\t\tor !$meta_value['block_featured_image_position'] \r\n\t\t\t) \r\n\t\t) :\r\n\r\n\t\t\tadd_meta_box(\r\n\t\t\t\t'post-featured-image-settings',\t\t\t// Unique ID\r\n\t\t\t\tesc_html( __( 'Featured image position', 'agnosia' ) ),\t\t// Title\r\n\t\t\t\t'agnosia_post_featured_image_settings_meta_box',\t\t// Callback function\r\n\t\t\t\t'',\t\t\t\t\t// Admin page (or post type)\r\n\t\t\t\t'side',\t\t\t\t\t// Context\r\n\t\t\t\t'low'\t\t\t\t\t// Priority\r\n\t\t\t);\r\n\r\n\t\tendif;\r\n\r\n\t\tif ( current_user_can( 'content_enable_override_default_settings' ) \r\n\t\t\tand ( !isset( $meta_value['block_override_default_settings'] ) \r\n\t\t\t\tor !$meta_value['block_override_default_settings'] \r\n\t\t\t) \r\n\t\t) :\r\n\r\n\t\t\tadd_meta_box(\r\n\t\t\t\t'post-custom-settings',\t\t\t// Unique ID\r\n\t\t\t\tesc_html ( __( 'Override default settings', 'agnosia' ) ),\t\t// Title\r\n\t\t\t\t'agnosia_post_settings_meta_box',\t\t// Callback function\r\n\t\t\t\t'',\t\t\t\t\t// Admin page (or post type)\r\n\t\t\t\t'advanced',\t\t\t\t\t// Context\r\n\t\t\t\t'core'\t\t\t\t\t// Priority\r\n\t\t\t);\r\n\r\n\t\tendif;\r\n\r\n\t\tif ( current_user_can( 'manage_options' ) ) :\r\n\r\n\t\t\tadd_meta_box(\r\n\t\t\t\t'post-block-advanced-options',\t\t// Unique ID\r\n\t\t\t\tesc_html( __( 'Block advanced options', 'agnosia' ) ),\t\t// Title\r\n\t\t\t\t'agnosia_post_block_advanced_options',\t\t// Callback function\r\n\t\t\t\t'',\t\t\t\t\t// Admin page (or post type)\r\n\t\t\t\t'advanced',\t\t\t\t\t// Context\r\n\t\t\t\t'high'\t\t\t\t\t// Priority\r\n\t\t\t);\r\n\r\n\t\tendif;\r\n\r\n\t}", "function add_carton_term_meta( $term_id, $meta_key, $meta_value, $unique = false ){\n\treturn add_metadata( 'carton_term', $term_id, $meta_key, $meta_value, $unique );\n}", "function pavi_post_meta_boxes_setup() {\n add_action( 'add_meta_boxes', 'pavi_textarea_meta_boxes' );\n\n /* Save post meta on the 'save_post' hook. */\n add_action( 'save_post', 'pavi_save_post_class_meta', 10, 2 );\n}", "function register_and_do_post_meta_boxes($post)\n {\n }", "public function register_custom_post_type() {\n $labels = array (\n 'name' => __('Custom', self::$plugin_obj->class_name ),\n 'singular_name' => __('item', self::$plugin_obj->class_name ),\n 'add_new' => __('new item', self::$plugin_obj->class_name ),\n 'add_new_item' => __('new item', self::$plugin_obj->class_name ),\n 'new_item' => __('new item', self::$plugin_obj->class_name ),\n 'edit' => __('edit item', self::$plugin_obj->class_name ),\n 'edit_item' => __('edit item', self::$plugin_obj->class_name ),\n 'view' => __('view item', self::$plugin_obj->class_name ),\n 'view_item' => __('view item', self::$plugin_obj->class_name ),\n 'search_items' => __('search item', self::$plugin_obj->class_name ),\n 'not_found' => __('no item found', self::$plugin_obj->class_name ),\n 'not_found_in_trash' => __('no item in trash', self::$plugin_obj->class_name ),\n 'parent' => __('parent item', self::$plugin_obj->class_name )\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => TRUE,\n 'publicly_queryable' => TRUE,\n 'show_ui' => TRUE,\n 'show_in_menu' => TRUE,\n 'query_var' => TRUE,\n 'capability_type' => 'page',\n 'has_archive' => TRUE,\n 'hierarchical' => TRUE,\n 'exclude_from_search' => FALSE,\n 'menu_position' => 100 ,\n 'supports' => array('title','editor','excerpt','custom-fields','revisions','thumbnail','page-attributes'),\n 'taxonomies' => array('category','post_tag')\n );\n\n register_post_type('custom', $args);\n }", "function create_meta_post_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-post-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' POST SETTINGS', 'new_meta_post_boxes', 'post', 'normal', 'high' );\n\t}\n}", "function moutheme_register_meta_boxes()\n{\n\tglobal $meta_boxes;\n\n\t// Make sure there's no errors when the plugin is deactivated or during upgrade\n\tif ( class_exists( 'RW_Meta_Box' ) ) {\n\t\tforeach ( $meta_boxes as $meta_box ) {\n\t\t\tnew RW_Meta_Box( $meta_box );\n\t\t}\n\t}\n}", "function ffw_media_setup_taxonomies() {\n\n\t$slug = defined( 'FFW_MEDIA_SLUG' ) ? FFW_MEDIA_SLUG : 'media';\n\n\t/** Types */\n\t$type_labels = array(\n\t\t'name' \t\t\t\t=> __( 'Media Types', 'taxonomy general name', 'FFW_media' ),\n\t\t'singular_name' \t=> __( 'Media Type', 'taxonomy singular name', 'FFW_media' ),\n\t\t'search_items' \t\t=> __( 'Search Types', 'FFW_media' ),\n\t\t'all_items' \t\t=> __( 'All Types', 'FFW_media' ),\n\t\t'parent_item' \t\t=> __( 'Parent Type', 'FFW_media' ),\n\t\t'parent_item_colon' => __( 'Parent Type:', 'FFW_media' ),\n\t\t'edit_item' \t\t=> __( 'Edit Type', 'FFW_media' ),\n\t\t'update_item' \t\t=> __( 'Update Type', 'FFW_media' ),\n\t\t'add_new_item' \t\t=> __( 'Add New Type', 'FFW_media' ),\n\t\t'new_item_name' \t=> __( 'New Type Name', 'FFW_media' ),\n\t\t'menu_name' \t\t=> __( 'Types', 'FFW_media' ),\n\t);\n\n\t$type_args = apply_filters( 'ffw_media_type_args', array(\n\t\t\t'hierarchical' \t\t=> true,\n\t\t\t'labels' \t\t\t=> apply_filters('ffw_media_type_labels', $type_labels),\n\t\t\t'show_ui' \t\t\t=> true,\n\t\t\t'query_var' \t\t=> 'media_type',\n\t\t\t'rewrite' \t\t\t=> array('slug' => $slug . '/type', 'with_front' => false, 'hierarchical' => true ),\n\t\t\t'capabilities' \t=> array( 'manage_terms','edit_terms', 'assign_terms', 'delete_terms' ),\n\t\t\t'show_admin_column'\t=> true\n\t\t)\n\t);\n\tregister_taxonomy( 'media_type', array('ffw_media'), $type_args );\n\tregister_taxonomy_for_object_type( 'media_type', 'ffw_media' );\n\n\t/** Categories */\n\t$category_labels = array(\n\t\t'name' \t\t\t\t=> sprintf( _x( '%s Categories', 'taxonomy general name', 'FFW_media' ), ffw_media_get_label_singular() ),\n\t\t'singular_name' \t=> _x( 'Category', 'taxonomy singular name', 'FFW_media' ),\n\t\t'search_items' \t\t=> __( 'Search Categories', 'FFW_media' ),\n\t\t'all_items' \t\t=> __( 'All Categories', 'FFW_media' ),\n\t\t'parent_item' \t\t=> __( 'Parent Category', 'FFW_media' ),\n\t\t'parent_item_colon' => __( 'Parent Category:', 'FFW_media' ),\n\t\t'edit_item' \t\t=> __( 'Edit Category', 'FFW_media' ),\n\t\t'update_item' \t\t=> __( 'Update Category', 'FFW_media' ),\n\t\t'add_new_item' \t\t=> __( 'Add New Category', 'FFW_media' ),\n\t\t'new_item_name' \t=> __( 'New Category Name', 'FFW_media' ),\n\t\t'menu_name' \t\t=> __( 'Categories', 'FFW_media' ),\n\t);\n\n\t$category_args = apply_filters( 'ffw_media_category_args', array(\n\t\t\t'hierarchical' \t\t=> true,\n\t\t\t'labels' \t\t\t=> apply_filters( 'ffw_media_category_labels', $category_labels ),\n\t\t\t'show_ui' \t\t\t=> true,\n\t\t\t'query_var' \t\t=> 'media_category',\n\t\t\t'rewrite' \t\t\t=> array('slug' => $slug . '/category', 'with_front' => false, 'hierarchical' => true ),\n\t\t\t'capabilities' \t=> array( 'manage_terms','edit_terms', 'assign_terms', 'delete_terms' ),\n\t\t\t'show_admin_column'\t=> true\n\t\t)\n\t);\n\tregister_taxonomy( 'media_category', array('ffw_media'), $category_args );\n\tregister_taxonomy_for_object_type( 'media_category', 'ffw_media' );\n\n\n\t\n\n}", "function get_term_meta($term_id, $taxonomy, $key = '', $single = false) {\n\n return get_metadata('post', $post_id, $key, $single);\n}", "function wp_nav_menu_taxonomy_meta_boxes()\n {\n }", "function master_sidebar_template_hierarchy_meta_box() {\n\t\n\t$admin_page_name = 'appearance_page_custom_theme_sidebars';\n\t\n\tadd_meta_box( \n\t\t'master-add-page-hierachy', \n\t\t__('Template Hierarchy'), \n\t\t'master_sidebar_render_template_hierarchy_meta_box', \n\t\t$admin_page_name, \n\t\t'side', \n\t\t'default'\n\t);\n}", "function agnosia_post_meta_boxes_setup() {\r\n\r\n\t\t/* Add meta boxes on the 'add_meta_boxes' hook. */\r\n\t\tadd_action( 'add_meta_boxes', 'agnosia_add_post_meta_boxes' );\r\n\r\n\t\t/* Save post meta on the 'save_post' hook. */\r\n\t\tadd_action( 'save_post', 'agnosia_save_post_meta', 10 , 2 );\r\n\r\n\t}", "function fumseck_pagemeta() {\n\t\n\t// Initialize\n\t\n\t$output = '';\n\tglobal $post;\n\t$post_id = $post->ID;\n\t\n\t\n\t// Get metadata for the page from WordPress\n\t\n\t$post_title = get_the_title($post_id);\n\t$post_permalink = get_permalink($post_id);\n\t\n\t$post_has_featured_image = has_post_thumbnail( $post_id );\n\t\n\tif( $post_has_featured_image ) {\n\t\t$post_featured_image_large = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large'); // [URL, w, h, resized?]\n\t};\n\t\n\t$post_summary = wp_strip_all_tags( get_field( '_summary', $post_id, true ));\n\t\n\t\n\tif ( ! $post_summary ) {\t\t// if no summary, try a manual excerpt\n\t\t$post_summary = $post->post_excerpt;\n\t};\t// TODO: do something if there's no manual excerpt either\n\n\t\n\t// Static metadata\n\t\n\t$output .= '<meta name=\"twitter:site\" content=\"@gpaumier\"><meta name=\"twitter:creator\" content=\"@gpaumier\">';\t\n\t$output .= '<meta name=\"twitter:domain\" content=\"guillaumepaumier.com\">';\t\n\t$output .= '<meta property=\"fb:admins\" content=\"710543474\" />';\n\t//$output .= '<meta property=\"fb:admins\" content=\"579323492087704\" />';\n\t$output .= '<meta property=\"article:author\" content=\"https://www.facebook.com/gllmpmr\" />';\n\t$output .= '<meta property=\"article:publisher\" content=\"https://www.facebook.com/gllmpmr\" />';\n\t\n\t$output .= '<meta property=\"og:type\" content=\"article\" />'; // TODO: be more specific\n\t\n\t// Common metadata\n\t\n\t$output .= '<meta property=\"og:site_name\" content=\"' . get_bloginfo( 'name' ) . '\"/>';\n\t\n\t$output .= '<meta name=\"twitter:title\" content=\"' . $post_title . '\">';\n\t$output .= '<meta property=\"og:title\" content=\"' . $post_title . '\"/>';\n\t\n\t\n\t$output .= '<meta property=\"og:url\" content=\"' . $post_permalink . '\" />';\n\t\n\t\n\t$output .= '<meta property=\"og:description\" content=\"' . $post_summary . '\" />';\n\t\n\t// TODO: add locale\n\t\n\tif ( get_post_format( $post_id ) === 'image' ) {\n\t\t\n\t\t$output .= '<meta name=\"twitter:card\" content=\"photo\">';\n\t\t$output .= '<meta name=\"twitter:image\" content=\"' . $post_featured_image_large[0] . '\">';\n\t\t$output .= '<meta name=\"twitter:image:width\" content=\"' . $post_featured_image_large[1] . '\">';\n\t\t$output .= '<meta name=\"twitter:image:height\" content=\"' . $post_featured_image_large[2] . '\">';\n\t\t$output .= '<meta property=\"og:image:width\" content=\"' . $post_featured_image_large[1] . '\" />';\n\t\t$output .= '<meta property=\"og:image:height\" content=\"' . $post_featured_image_large[2] . '\" />';\n\t\t\n\t} else {\t// Not a photo\n\t\t\n\t\t$output .= '<meta name=\"twitter:description\" content=\"' . $post_summary . '\">';\n\t\t\n\t\tif( $post_has_featured_image ) {\n\t\t\t\n\t\t\t$output .= '<meta name=\"twitter:card\" content=\"summary_large_image\">';\n\t\t\t$output .= '<meta name=\"twitter:image:src\" content=\"' . $post_featured_image_large[0] . '\">';\n\t\t\t$output .= '<meta property=\"og:image\" content=\"' . $post_featured_image_large[0] . '\" />';\n\t\t\t$output .= '<meta property=\"og:image:width\" content=\"' . $post_featured_image_large[1] . '\" />';\n\t\t\t$output .= '<meta property=\"og:image:height\" content=\"' . $post_featured_image_large[2] . '\" />';\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t$output .= '<meta name=\"twitter:card\" content=\"summary\">';\n\t\t}\n\t\t\n\t};\n\t\n\n\techo $output;\n}", "function Simple_Release_Notes() {\n add_action( 'init', array( $this, 'register_custom_post_type' ) );\n\n // Add the custom taxonomies\n add_action( 'init', array( $this, 'register_custom_taxonomy' ), 1 );\n\n // Set up the new permalink for this structure\n add_action( 'init', array( $this, 'register_permalinks' ), 1 );\n\n // Handle our custom permalinks\n add_filter( 'post_type_link', array( $this, 'process_custom_permalink' ), 10, 3 );\n\n // Filter our custom type off the home page\n add_action( 'pre_get_posts', array( $this, 'customize_query_for_custom_type' ) );\n\n // On the posts page, add a Category column\n add_filter( 'manage_posts_columns', array( $this, 'add_taxonomy_column' ), 10, 1 );\n add_action( 'manage_posts_custom_column', array( $this, 'manage_taxonomy_column' ), 10, 2 );\n }", "function tabify_add_meta_boxes($post_type)\n {\n }", "function custom_post_type1()\n{\n\n\t$labels = array(\n\t\t'name' => _x('Testimonios', 'Post Type General Name', 'text_domain'),\n\t\t'singular_name' => _x('Testimonios', 'Post Type Singular Name', 'text_domain'),\n\t\t'menu_name' => __('Testimonios', 'text_domain'),\n\t\t'name_admin_bar' => __('Testimonio', 'text_domain'),\n\t\t'archives' => __('Item Testimonios', 'text_domain'),\n\t\t'attributes' => __('Item Testimonio', 'text_domain'),\n\t\t'parent_item_colon' => __('Parent Item:', 'text_domain'),\n\t\t'all_items' => __('All Items', 'text_domain'),\n\t\t'add_new_item' => __('Add New Item', 'text_domain'),\n\t\t'add_new' => __('Add New', 'text_domain'),\n\t\t'new_item' => __('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'view_items' => __('View Items', 'text_domain'),\n\t\t'search_items' => __('Search Item', 'text_domain'),\n\t\t'not_found' => __('Not found', 'text_domain'),\n\t\t'not_found_in_trash' => __('Not found in Trash', 'text_domain'),\n\t\t'featured_image' => __('Featured Image', 'text_domain'),\n\t\t'set_featured_image' => __('Set featured image', 'text_domain'),\n\t\t'remove_featured_image' => __('Remove featured image', 'text_domain'),\n\t\t'use_featured_image' => __('Use as featured image', 'text_domain'),\n\t\t'insert_into_item' => __('Insert into item', 'text_domain'),\n\t\t'uploaded_to_this_item' => __('Uploaded to this item', 'text_domain'),\n\t\t'items_list' => __('Items list', 'text_domain'),\n\t\t'items_list_navigation' => __('Items list navigation', 'text_domain'),\n\t\t'filter_items_list' => __('Filter items list', 'text_domain'),\n\t);\n\t$args = array(\n\t\t'label' => __('Testimonio', 'text_domain'),\n\t\t'description' => __('Testimonios', 'text_domain'),\n\t\t'labels' => $labels,\n\t\t'supports' => array('title', 'thumbnail', 'editor', 'excerpt'),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 5,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_icon' => 'dashicons-editor-quote',\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'page',\n\t);\n\tregister_post_type('testimonio', $args);\n\n}", "function ncl_post_meta_boxes_setup() {\n\n\t/* Add meta boxes on the 'add_meta_boxes' hook. */\n\tadd_action( 'add_meta_boxes', 'ncl_add_post_meta_boxes' );\n\n\t/* Save post meta on the 'save_post' hook. */\n\tadd_action( 'save_post', 'ncl_save_current_location_meta', 10, 2 );\n}", "function fcc_stow_special_event_init()\r\n{\r\n $labels = array( \"name\" => \"Special Events\",\r\n \"singular_name\" => \"Special Event\",\r\n \"add_new_item\" => \"Add New Special Event\",\r\n \"new_item\" => \"New Special Event\",\r\n \"edit_item\" => \"Edit Special Event\",\r\n \"view_item\" => \"View Special Event\",\r\n \"all_items\" => \"All Special Events\",\r\n \"search_items\" => \"Search Special Events\",\r\n \"not_found\" => \"No Special Events found\",\r\n \"not_found_in_trash\" => \"No Special Events found in trash\" );\r\n\r\n $args = array( \"labels\" => $labels,\r\n \"public\" => true,\r\n \"rewrite\" => array( \"slug\" => \"special-event\" ),\r\n \"supports\" => array( \"title\" ));\r\n\r\n register_post_type( \"fcc-stow-special-event\", $args );\r\n\r\n add_filter( \"the_content\", \"fcc_stow_special_event_post_apply_metadata\" );\r\n}", "function create_meta_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' PAGE SETTINGS', 'new_meta_boxes', 'page', 'normal', 'high' );\n\t}\n}" ]
[ "0.68641204", "0.6510419", "0.6482216", "0.6425195", "0.6406462", "0.63415444", "0.63359463", "0.6300006", "0.6294453", "0.6281465", "0.6273607", "0.6271631", "0.62563264", "0.62327147", "0.62222475", "0.6214253", "0.6210641", "0.6207574", "0.6205022", "0.62006646", "0.6180769", "0.6171645", "0.6168536", "0.6161784", "0.6144649", "0.6143203", "0.6135468", "0.6135441", "0.61145365", "0.6101684", "0.6085172", "0.60815084", "0.60726184", "0.6069011", "0.60649115", "0.6055666", "0.605104", "0.6047732", "0.6041826", "0.6037471", "0.6033715", "0.6024544", "0.601905", "0.6015032", "0.60076475", "0.6005756", "0.600338", "0.59972847", "0.59954983", "0.5994367", "0.59923184", "0.5980242", "0.597718", "0.5976183", "0.59672594", "0.59614176", "0.5960954", "0.5959375", "0.59593225", "0.5956914", "0.59531116", "0.5952539", "0.5949651", "0.59466994", "0.5944477", "0.5937176", "0.59367025", "0.5929138", "0.59240896", "0.59216326", "0.59188837", "0.59145725", "0.5910943", "0.59084755", "0.59059733", "0.5902718", "0.58976245", "0.58939725", "0.5893432", "0.5892571", "0.58923596", "0.588412", "0.58819103", "0.5871339", "0.58712494", "0.5870782", "0.5864297", "0.5857123", "0.58568394", "0.5856117", "0.5855361", "0.5848699", "0.5847106", "0.58465046", "0.5845032", "0.5843333", "0.5842499", "0.58416295", "0.58382654", "0.5837805" ]
0.6286156
9
Remove metadata matching criteria from a term. You can match based on the key, or key and value. Removing based on key and value, will keep from removing duplicate metadata with the same key. It also allows removing all metadata matching key, if needed.
function delete_post_meta($term_id, $taxonomy, $meta_key, $meta_value = '') { return delete_metadata('post', $post_id, $meta_key, $meta_value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete_term_meta($term_id, $meta_key, $meta_value = '')\n {\n }", "function delete_term_meta_by_key($term_meta_key, $taxonomy) {\n\n return delete_metadata( 'post', null, $term_meta_key, '', true );\n}", "function delete_term_taxo_by_key_and_value( $key = '', $value = '' ) {\n\tglobal $wpdb;\n\n\t// expected_slashed ($key, $value)\n\t$key = stripslashes( $key );\n\t$value = stripslashes( $value );\n\n\t// Meta exist ?\n\tif ( empty( $value ) ) {\n\t\t$term_taxonomy_ids = $wpdb->get_col( $wpdb->prepare( \"SELECT DISTINCT term_id FROM $wpdb->termmeta WHERE meta_key = %s\", $key ) );\n\t} else {\n\t\t$term_taxonomy_ids = $wpdb->get_col( $wpdb->prepare( \"SELECT DISTINCT term_id FROM $wpdb->termmeta WHERE meta_key = %s AND meta_value = %s\", $key, $value ) );\n\t}\n\n\tif ( $term_taxonomy_ids ) {\n\t\t// Get term id to delete\n\t\tif ( empty( $value ) ) {\n\t\t\t$meta_ids = $wpdb->get_col( $wpdb->prepare( \"SELECT DISTINCT meta_id FROM $wpdb->termmeta WHERE meta_key = %s\", $key ) );\n\t\t} else {\n\t\t\t$meta_ids = $wpdb->get_col( $wpdb->prepare( \"SELECT DISTINCT meta_id FROM $wpdb->termmeta WHERE meta_key = %s AND meta_value = %s\", $key, $value ) );\n\t\t}\n\n\t\t$in = implode( ',', array_fill( 1, count( $meta_ids ), '%d' ) );\n\n\t\tdo_action( 'delete_termmeta', $meta_ids );\n\t\t$wpdb->query( $wpdb->prepare( \"DELETE FROM $wpdb->termmeta WHERE meta_id IN ($in)\", $meta_ids ) );\n\t\tdo_action( 'deleted_termmeta', $meta_ids );\n\n\t\t// Delete cache\n\t\tforeach ( $term_taxonomy_ids as $term_taxonomy_id ) {\n\t\t\twp_cache_delete( $term_taxonomy_id, 'term_meta' );\n\t\t}\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "function delete_carton_term_meta( $term_id, $meta_key, $meta_value = '', $delete_all = false ) {\n\treturn delete_metadata( 'carton_term', $term_id, $meta_key, $meta_value, $delete_all );\n}", "function delete_term_meta( $term_id, $meta_key, $meta_value = '' ) {\n\treturn delete_metadata( 'taxonomy', $term_id, $meta_key, $meta_value );\n}", "function delete_term_meta( $term_id, $meta_key, $meta_value = '' ) {\r\n\r\n if ( current_theme_supports( 'extended-taxonomies' ) ) {\r\n return delete_post_meta( get_post_for_extended_term( $term_id )->ID, $meta_key, $meta_value );\r\n }\r\n\r\n return delete_metadata( 'taxonomy', $term_id, $meta_key, $meta_value );\r\n }", "function unregister_term_meta($taxonomy, $meta_key)\n {\n }", "public function delete_meta( $key, $value = '', $delete_all = false );", "function delete_post_term_meta( int $post_id, int $term_id, string $meta_key, $meta_value = '' ): bool {\n\t\treturn \\wpinc\\meta\\post_term_meta\\delete_post_term_meta( $post_id, $term_id, $meta_key, $meta_value );\n\t}", "function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $delete_all = \\false)\n {\n }", "public function setMetadataToRemove($val)\n {\n $this->_propDict[\"metadataToRemove\"] = $val;\n return $this;\n }", "function delete_post_meta_by_key($post_meta_key)\n {\n }", "public function testRemoveOnNotExistingKeyWithValues()\n {\n $this->filter->value('test')->remove();\n\n $result = $this->filter->filter(['test2' => 'test']);\n\n $this->assertEquals(['test2' => 'test'], $result);\n }", "public function delMetadata() {}", "public function delMetadata() {}", "public function delMetadata() {}", "function unregister_meta_key($object_type, $meta_key, $object_subtype = '')\n {\n }", "public function testRemove() {\n $data = $this->expanded;\n $match = $data;\n\n unset($match['boolean']);\n $data = Hash::remove($data, 'boolean');\n $this->assertEquals($match, $data);\n\n unset($match['one']['depth']);\n $data = Hash::remove($data, 'one.depth');\n $this->assertEquals($match, $data);\n\n unset($match['one']['two']['depth']);\n $data = Hash::remove($data, 'one.two.depth');\n $this->assertEquals($match, $data);\n\n unset($match['one']['two']['three']['depth'], $match['one']['two']['three']['zero'], $match['one']['two']['three']['null']);\n $data = Hash::remove($data, 'one.two.three.depth');\n $data = Hash::remove($data, 'one.two.three.zero');\n $data = Hash::remove($data, 'one.two.three.null');\n $this->assertEquals($match, $data);\n\n unset($match['one']['two']['three']['four']['five']['six']['seven']['key']);\n $data = Hash::remove($data, 'one.two.three.four.five.six.seven.key');\n $this->assertEquals($match, $data);\n\n foreach (array(true, false, null, 123, 'foo') as $type) {\n $data = Hash::remove($data, $type);\n $this->assertEquals($match, $data);\n }\n\n $data = Hash::remove($data, 'a.fake.path');\n $this->assertEquals($match, $data);\n }", "function delete_post_meta($post_id, $meta_key, $meta_value = '')\n {\n }", "public function testKeyGetsRemoved()\n {\n $this->filter->value('test')->remove();\n\n $result = $this->filter->filter([\n 'test' => 'test',\n 'test2' => 'test',\n ]);\n\n $this->assertEquals(['test2' => 'test'], $result);\n }", "function delete_site_meta_by_key($meta_key)\n {\n }", "public function deleteMetaFields($termId)\n\t{\n\t\t$interval = 'slideshow-' . $termId . '-interval';\n\t\t$animation = 'slideshow-' . $termId . '-animation';\n\n\t\tdelete_option($interval);\n\t\tdelete_option($animation);\n\t}", "function delete_metadata_by_mid($meta_type, $meta_id)\n {\n }", "public function removeFilter($key);", "function drush_behat_op_delete_term(\\stdClass $term) {\n $term = $term instanceof TermInterface ? $term : Term::load($term->tid);\n if ($term instanceof TermInterface) {\n $term->delete();\n }\n}", "public function testMultiDimensionalKeyGetsRemoved()\n {\n $this->filter->value('test.test.test')->remove();\n\n $result = $this->filter->filter([\n 'test' => [\n 'test' => [\n 'test' => 'test',\n ],\n ],\n 'test2' => 'test',\n ]);\n\n $this->assertEquals(['test2' => 'test'], $result);\n }", "public function remove_meta( $key ) {\n\t\tunset( $this->data['meta'][ $key ] );\n\n\t\treturn $this;\n\t}", "public function prune()\n {\n $list = $this->metadata->getAllMetadata();\n\n $pruneMappings = $this->client->indices()->getMapping();\n\n # Remove configured mappings from prune list\n foreach ($list as $metadata) {\n $index = $metadata->getIndex();\n $type = $metadata->getType();\n\n unset($pruneMappings[$index]['mappings'][$type]);\n }\n\n # Delete mappings that are not in the configuration\n foreach ($pruneMappings as $index => $indexMapping) {\n foreach ($indexMapping['mappings'] as $type => $typeMapping) {\n try {\n $params = [\n 'index' => $index,\n 'type' => $type\n ];\n\n $response = $this->client->indices()->deleteMapping($params);\n } catch (Exception $exception) {\n $response = [\n 'ok' => false,\n 'error' => $exception->getMessage()\n ];\n } finally {\n $metadata = new MetadataOptions;\n $metadata->setIndex($index);\n $metadata->setType($type);\n\n $this->getEventManager()\n ->trigger('prune', $this, compact('response', 'metadata'));\n }\n }\n }\n }", "public static function delete_meta( $object_id, $meta_key, $meta_value = '' ) {\n\n\t\tdelete_term_meta( $object_id, $meta_key, $meta_value );\n\t}", "function delete_book_meta( $id, $key, $value = '' ) {\r\n\treturn delete_post_meta($id, $key, $value);\r\n}", "public function remove($key, $value = '');", "function unregister_post_meta($post_type, $meta_key)\n {\n }", "private function removeOldResults($key){\n\t\tSearch::where('key', '=', $key)->delete();\n\t}", "function update_term_meta($term_id, $taxonomy, $meta_key, $meta_value, $prev_value = '') {\n\n return update_metadata('post', $post_id, $meta_key, $meta_value, $prev_value);\n}", "function tf_delete_post_meta($post_id, $meta_key, $meta_value = '') {\r\n // make sure meta is added to the post, not a revision\r\n if ( $the_post = wp_is_post_revision($post_id) )\r\n $post_id = $the_post;\r\n\r\n $meta_type = 'post';\r\n $object_id = $post_id;\r\n $delete_all = false;\r\n\r\n if ( !$meta_type || !$meta_key )\r\n return false;\r\n\r\n if ( (!$object_id = absint($object_id)) && !$delete_all )\r\n return false;\r\n\r\n if ( ! $table = _get_meta_table($meta_type) )\r\n return false;\r\n\r\n global $wpdb;\r\n\r\n $type_column = esc_sql($meta_type . '_id');\r\n $id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id';\r\n // expected_slashed ($meta_key)\r\n // $meta_key = stripslashes($meta_key); // this was the trouble !\r\n // $meta_value = stripslashes_deep($meta_value); // this was the trouble !\r\n\r\n $check = apply_filters( \"delete_{$meta_type}_metadata\", null, $object_id, $meta_key, $meta_value, $delete_all );\r\n if ( null !== $check )\r\n return (bool) $check;\r\n\r\n $_meta_value = $meta_value;\r\n $meta_value = maybe_serialize( $meta_value );\r\n\r\n $query = $wpdb->prepare( \"SELECT $id_column FROM $table WHERE meta_key = %s\", $meta_key );\r\n\r\n if ( !$delete_all )\r\n $query .= $wpdb->prepare(\" AND $type_column = %d\", $object_id );\r\n\r\n if ( $meta_value )\r\n $query .= $wpdb->prepare(\" AND meta_value = %s\", $meta_value );\r\n\r\n $meta_ids = $wpdb->get_col( $query );\r\n if ( !count( $meta_ids ) )\r\n return false;\r\n\r\n if ( $delete_all )\r\n $object_ids = $wpdb->get_col( $wpdb->prepare( \"SELECT $type_column FROM $table WHERE meta_key = %s\", $meta_key ) );\r\n\r\n do_action( \"delete_{$meta_type}_meta\", $meta_ids, $object_id, $meta_key, $_meta_value );\r\n\r\n // Old-style action.\r\n if ( 'post' == $meta_type )\r\n do_action( 'delete_postmeta', $meta_ids );\r\n\r\n $query = \"DELETE FROM $table WHERE $id_column IN( \" . implode( ',', $meta_ids ) . \" )\";\r\n\r\n $count = $wpdb->query($query);\r\n\r\n if ( !$count )\r\n return false;\r\n\r\n if ( $delete_all ) {\r\n foreach ( (array) $object_ids as $o_id ) {\r\n wp_cache_delete($o_id, $meta_type . '_meta');\r\n }\r\n } else {\r\n wp_cache_delete($object_id, $meta_type . '_meta');\r\n }\r\n\r\n do_action( \"deleted_{$meta_type}_meta\", $meta_ids, $object_id, $meta_key, $_meta_value );\r\n\r\n // Old-style action.\r\n if ( 'post' == $meta_type )\r\n do_action( 'deleted_postmeta', $meta_ids );\r\n\r\n return true;\r\n }", "function delete_meta($mid)\n {\n }", "public function removeMeta(string $key)\n {\n if (isset($this->meta[$key])) {\n unset($this->meta[$key]);\n }\n }", "public function testMultipleMultiDimensionalKeyGetsRemoved()\n {\n $this->filter->values([\n 'test.test.test',\n 'test.test2',\n 'test.test3.test'\n ])->remove();\n\n $result = $this->filter->filter([\n 'test' => [\n 'test' => [\n 'test' => 'test',\n ],\n 'test2' => 'test',\n 'test3' => [\n 'test' => 'test',\n ],\n ],\n 'test2' => 'test',\n ]);\n\n $this->assertEquals(['test2' => 'test'], $result);\n }", "public function __unset($key) {\n\t\tforeach (array('attributes', 'relationships') as $source) {\n\t\t\tunset($this->$source[$key]);\n\t\t}\n\t}", "public function query_remove($key) {\n\t\t\t\\uri\\query::remove($this->object, $key);\n\t\t}", "public function toggle_term() {\n\t\tglobal $post;\n\n\t\t$post = array_shift( get_posts( array(\n\t\t\t'post_type' => $this->params['post_type'],\n\t\t\t'name' => $this->params['post_name']\n\t\t) ) );\n\n\t\t$taxonomy = $this->params['action_key'];\n\n\t\t$terms = is_array( $this->params['extra'] ) ? explode( ',', $this->params['extra'][0] ) : array();\n\n\t\tforeach ( $terms as $term_key => $term ) {\n\t\t\tif ( is_string( $term ) ) {\n\t\t\t\tif ( ! $this_term = term_exists( $term, $taxonomy ) ) {\n\t\t\t\t\t// $caption = ucwords(str_replace(\"_\", \" \", (string) $field_name));\n\t\t\t\t\twp_insert_term( ucwords( str_replace( array( \"_\", \"-\" ), \" \", $term ) ), $taxonomy, array( 'slug' => $term ) );\n\t\t\t\t\t$this_term = get_term_by( 'slug', $term, $taxonomy, ARRAY_A );\n\t\t\t\t}\n\n\t\t\t\t$term_id = $this_term['term_id'];\n\t\t\t} else {\n\t\t\t\t$term_id = $term;\n\t\t\t}\n\n\t\t\t$current_action = $this->get_current_action();\n\t\t\tif ( has_term( $term_id, $taxonomy, $post->ID ) ) {\n\t\t\t\t$existing_terms_array = wp_get_post_terms( $post->ID, $taxonomy, array( 'fields' => 'ids' ) );\n\n\t\t\t\t// Remove the current term form the terms array\n\t\t\t\tforeach ( $existing_terms_array as $term_index => $existing_term ) {\n\t\t\t\t\tif ( $term_id == $existing_term ) {\n\t\t\t\t\t\tunset( $existing_terms_array[$term_index] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$this->action_results[ 'data' ][ 'post_id' ] = $post->ID;\n\n\t\t\t\t// Remove the term, the fourth parameter 'false' relaces the term array\n\t\t\t\tif ( $result = wp_set_post_terms( $post->ID, $existing_terms_array, $taxonomy, false ) ) {\n\t\t\t\t\t$action_status = 'success';\n\t\t\t\t\t$this->action_results[ 'messages' ][ 'note' ] = __( 'Term Removed', 'kickpress' );\n\t\t\t\t\t$this->action_results[ 'data' ][ 'terms' ] = $result;\n\t\t\t\t} else {\n\t\t\t\t\tif ( false === $result ) {\n\t\t\t\t\t\t$action_status = 'failure';\n\t\t\t\t\t\t$this->action_results[ 'messages' ][ 'note' ] = __( 'Failed to Remove Term', 'kickpress' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$action_status = 'success';\n\t\t\t\t\t\t$this->action_results[ 'messages' ][ 'note' ] = __( 'Term Removed', 'kickpress' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Add the term, the fourth parameter 'true' appends the term to the term array\n\t\t\t\tif ( $result = wp_set_post_terms( $post->ID, array( intval( $term_id ) ), $taxonomy, true ) ) {\n\t\t\t\t\t$this->action_results[ 'data' ][ 'terms' ] = $result;\n\t\t\t\t\t$action_status = 'success';\n\t\t\t\t\t$this->action_results[ 'messages' ][ 'note' ] = __( 'Term Added', 'kickpress' );\n\t\t\t\t} else {\n\t\t\t\t\t$action_status = 'failure';\n\t\t\t\t\t$this->action_results[ 'messages' ][ 'note' ] = __( 'Failed to Remove Term', 'kickpress' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->action_results[ 'status' ] = $action_status;\n\t\t\t$this->action_results[ 'data' ][ 'terms' ] = wp_get_post_terms( $post->ID, $taxonomy );\n\t\t}\n\t}", "public static function remove(&$object, $key) {\n\t\t\t$qarray = \\uri\\generate::query_array($object);\n\t\t\tif (isset($qarray[$key])) {\n\t\t\t\tunset($qarray[$key]);\n\t\t\t\t\\uri\\actions::modify($object, 'replace', 'QUERY', self::build_query($qarray));\n\t\t\t}\n\t\t}", "function acf_delete_metadata($post_id = 0, $name = '', $hidden = \\false)\n{\n}", "function clean_term_cache($ids, $taxonomy = '', $clean_taxonomy = \\true)\n {\n }", "function delete_site_meta($site_id, $meta_key, $meta_value = '')\n {\n }", "function wck_remove_meta(){\r\n\t\tcheck_ajax_referer( \"wck-delete-entry\" );\r\n\t\tif( !empty( $_POST['meta'] ) )\r\n\t\t\t$meta = sanitize_text_field( $_POST['meta'] );\r\n\t\telse \r\n\t\t\t$meta = '';\r\n\t\tif( !empty( $_POST['id'] ) )\r\n\t\t\t$id = absint( $_POST['id'] );\r\n\t\telse \r\n\t\t\t$id = '';\r\n\t\tif( isset( $_POST['element_id'] ) )\r\n\t\t\t$element_id = absint( $_POST['element_id'] );\r\n\t\telse \r\n\t\t\t$element_id = '';\r\n\r\n\t\t// Security checks\r\n\t\tif( true !== ( $error = self::wck_verify_user_capabilities( $this->args['context'], $meta, $id ) ) ) {\r\n\t\t\theader( 'Content-type: application/json' );\r\n\t\t\tdie( json_encode( $error ) );\r\n\t\t}\r\n\t\t\r\n\t\tif( $this->args['context'] == 'post_meta' )\r\n\t\t\t$results = get_post_meta($id, $meta, true);\r\n\t\telse if ( $this->args['context'] == 'option' )\r\n\t\t\t$results = get_option( apply_filters( 'wck_option_meta' , $meta, $element_id ) );\r\n\t\t\r\n\t\t$old_results = $results;\r\n\t\tunset($results[$element_id]);\r\n\t\t/* reset the keys for the array */\r\n\t\t$results = array_values($results);\r\n\r\n\t\t/* make sure this does not output anything so it won't break the json response below\r\n\t\twill keep it do_action for compatibility reasons\r\n\t\t */\r\n\t\tob_start();\r\n\t\t\tdo_action( 'wck_before_remove_meta', $meta, $id, $element_id );\r\n\t\t$wck_before_remove_meta = ob_get_clean(); //don't output it\r\n\t\t\r\n\t\tif( $this->args['context'] == 'post_meta' )\r\n\t\t\tupdate_post_meta($id, $meta, $results);\r\n\t\telse if ( $this->args['context'] == 'option' )\r\n\t\t\tupdate_option( apply_filters( 'wck_option_meta' , $meta, $results, $element_id ), wp_unslash( $results ) );\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t/* TODO: optimize so that it updates from the deleted element forward */\r\n\t\t/* if unserialize_fields is true delete the coresponding post metas */\r\n\t\tif( $this->args['unserialize_fields'] && $this->args['context'] == 'post_meta' ){\t\t\t\r\n\t\t\t\r\n\t\t\t$meta_suffix = 1;\t\t\t\r\n\r\n\t\t\tif( !empty( $results ) ){\r\n\t\t\t\tforeach( $results as $result ){\r\n\t\t\t\t\tforeach ( $result as $name => $value){\r\n\t\t\t\t\t\tupdate_post_meta($id, $meta.'_'.$name.'_'.$meta_suffix, $value);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$meta_suffix++;\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif( count( $results ) == 0 )\r\n\t\t\t\t$results = $old_results;\r\n\t\t\t\r\n\t\t\tif( !empty( $results ) ){\r\n\t\t\t\tforeach( $results as $result ){\t\t\t\t\r\n\t\t\t\t\tforeach ( $result as $name => $value){\r\n\t\t\t\t\t\tdelete_post_meta( $id, $meta.'_'.$name.'_'.$meta_suffix );\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$entry_list = $this->wck_refresh_list( $meta, $id );\r\n\t\t$add_form = $this->wck_add_form( $meta, $id );\r\n\r\n\t\theader( 'Content-type: application/json' );\r\n\t\tdie( json_encode( array( 'entry_list' => $entry_list, 'add_form' => $add_form ) ) );\r\n\t}", "public function testRemoveOnNotExistingKey()\n {\n $this->filter->value('test')->remove();\n\n $result = $this->filter->filter([]);\n\n $this->assertEquals([], $result);\n }", "function delete_term_taxo_by_term_taxonomy_id( $term_taxonomy_id = 0 ) {\n\tglobal $wpdb;\n\tif ( $wpdb->query( $wpdb->prepare( \"DELETE FROM $wpdb->termmeta WHERE term_id = %s\", (int) $term_taxonomy_id ) ) ) {\n\t\twp_cache_delete( $term_taxonomy_id, 'term_meta' );\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "function update_term_meta( $term_id, $meta_key, $meta_value, $prev_value = '' ) {\n\treturn update_metadata( 'taxonomy', $term_id, $meta_key, $meta_value, $prev_value );\n}", "public function removeItemFromArray(&$data, $needle, $what)\r\n {\r\n\r\n if ($what === 'value') {\r\n if (($key = array_search($needle, $data)) !== false) {\r\n unset($data[$key]);\r\n }\r\n } elseif ($what === 'key') {\r\n if (array_key_exists($needle, $data)) {\r\n unset($data[$needle]);\r\n }\r\n }\r\n\r\n //return $data;\r\n }", "public static function filter__delete_post_metadata( $check, $object_id, $meta_key, $meta_value, $delete_all ) {\n\t\t\tif ( $meta_key != self::$_wpseo_canonical_meta_key ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "public static function remove($key){\n if(self::exists($key)){\n unset(self::$answers[strtolower($key)]);\n }\n }", "public function removeTag()\n\t{\n\t\tif(isset($this->primarySearchData[$this->ref_tag]))\n\t\t{\n\t\t\tunset($this->primarySearchData[$this->ref_tag]);\n\t\t}\n\t}", "function delete_value($post_id, $meta_key, $field)\n {\n }", "public function deleteMeta($key, $value = null)\n {\n // dump($this->ID, $key, $value);\n return delete_user_meta($this->ID, $key, $value);\n }", "public function delete($value, $searchField = null);", "function delete_student_meta( $student_id, $meta_key, $meta_value = '' ) {\n return delete_metadata( 'student', $student_id, $meta_key, $meta_value );\n }", "function get_term_meta($term_id, $key = '', $single = \\false)\n {\n }", "function update_carton_term_meta( $term_id, $meta_key, $meta_value, $prev_value = '' ) {\n\treturn update_metadata( 'carton_term', $term_id, $meta_key, $meta_value, $prev_value );\n}", "function test_delete_post_meta_by_key() {\n\t\t$this->assertIsInt( add_post_meta( $this->post_id, 'unique_delete_by_key', 'value', true ) );\n\t\t$this->assertIsInt( add_post_meta( $this->post_id_2, 'unique_delete_by_key', 'value', true ) );\n\n\t\t//Check they exist\n\t\t$this->assertSame( 'value', get_post_meta( $this->post_id, 'unique_delete_by_key', true ) );\n\t\t$this->assertSame( 'value', get_post_meta( $this->post_id_2, 'unique_delete_by_key', true ) );\n\n\t\t//Delete one of them\n\t\t$this->assertTrue( delete_post_meta_by_key( 'unique_delete_by_key' ) );\n\n\t\t//Check the other still exists\n\t\t$this->assertSame( '', get_post_meta( $this->post_id_2, 'unique_delete_by_key', true ) );\n\t\t$this->assertSame( '', get_post_meta( $this->post_id_2, 'unique_delete_by_key', true ) );\n\t}", "abstract public function remove($key);", "function remove_description_taxonomy( $columns ) {\n\n if( isset( $columns['description'] ) )\n unset( $columns['description'] );\n\n return $columns;\n}", "public function testFilterKeywords()\n {\n $this->visit('/properties')\n ->type('the', '#keywords')\n ->press('Update results')\n ->see('Shack in the desert')\n ->see('Victorian townhouse');\n $this->notSee('Five bedroom mill conversion');\n }", "public function uninstall()\n {\n //$this->getDb()->createCommand()->dropTable($this->getTable())->execute();\n //delete the term itself\n $model = TaxonomyDef::findOne($this->id);\n $model->delete();\n }", "public function deleteMetaData($args){\n\t\treturn $this->db->delete(\n\t\t\t$this->metaDataTable,\n\t\t\t\t[\n\t\t\t\t\t\"AND\" => [\n\t\t\t\t\t\t$this->metaDataQueryBy => $args\n\t\t\t\t\t] \n\t\t\t\t]\n\t\t\t);\n\t}", "private function filterTerm()\n {\n if(empty($this->term)) {\n return;\n }\n\n $this->query->andWhere(\n ['or',\n ['LIKE', 'message', $this->term],\n ['LIKE', 'category', $this->term],\n ]\n );\n }", "public static function action_clean_term_cache( $term_ids ) {\n\t\t$keys = array();\n\t\t$term_ids = is_array( $term_ids ) ? $term_ids : array( $term_id );\n\t\tforeach ( $term_ids as $term_id ) {\n\t\t\t$keys[] = 'term-' . $term_id;\n\t\t\t$keys[] = 'rest-term-' . $term_id;\n\t\t}\n\t\tpantheon_wp_clear_edge_keys( $keys );\n\t}", "public function removeMeta(array $parameters)\n {\n return call_user_func_array(\"delete_{$this->getContext()}_meta\", $parameters);\n }", "protected function _removeKey($key) {}", "function remove ($key);", "public function unsetMetadata(): void\n {\n $this->metadata = [];\n }", "function remove($key);", "function remove($key);", "function update_term_meta( $term_id, $meta_key, $meta_value, $prev_value = '' ) {\r\n\r\n if ( current_theme_supports( 'extended-taxonomies' ) ) {\r\n return update_post_meta( get_post_for_extended_term( $term_id )->ID, $meta_key, $meta_value, $prev_value );\r\n }\r\n\r\n return update_metadata( 'taxonomy', $term_id, $meta_key, $meta_value, $prev_value );\r\n }", "public function dontSeeTermInDatabase($criteria)\n {\n if (isset($criteria['description']) or isset($criteria['taxonomy'])) {\n // the matching will be attempted against the term_taxonomy table\n $termTaxonomyCriteria = array(\n 'taxonomy' => isset($criteria['taxonomy']) ? $criteria['taxonomy'] : false,\n 'description' => isset($criteria['description']) ? $criteria['description'] : false,\n 'term_id' => isset($criteria['term_id']) ? $criteria['term_id'] : false\n );\n $termTaxonomyCriteria = array_filter($termTaxonomyCriteria);\n $tableName = $this->grabPrefixedTableNameFor('term_taxonomy');\n $this->dontSeeInDatabase($tableName, $termTaxonomyCriteria);\n }\n // the matching will be attempted against the terms table\n $tableName = $this->grabPrefixedTableNameFor('terms');\n $this->dontSeeInDatabase($tableName, $criteria);\n }", "private function _invalidateCache($term) {\n\t\t// We could set its expiration to sometime in the past, but we'll just remove it outright.\n\t\t$this->db->delete('Cache', array('Term' => $term));\n\t}", "private static function purge_term( $term_id ) {\n\t\tpantheon_wp_clear_edge_keys( array( 'term-' . $term_id, 'rest-term-' . $term_id, 'post-term-' . $term_id ) );\n\t}", "public function without($key);", "function clean_object_term_cache($object_ids, $object_type)\n {\n }", "public function __unset($name)\n\t{\n\t\tif ($field = $this->field($name, TRUE))\n\t\t{\n\t\t\t// We don't want to unset the keys, because \n\t\t\t// they are assumed to exist. Just set them back to defaults\n\t\t\t$this->_original[$field] = $this->meta()->defaults[$field];\n\t\t\t\n\t\t\t// Ensure changed and retrieved data is cleared\n\t\t\t// This effectively clears the cache and any changes\n\t\t\tif (array_key_exists($name, $this->_changed))\n\t\t\t{\n\t\t\t\tunset($this->_changed[$name]);\n\t\t\t}\n\t\t\t\n\t\t\tif (array_key_exists($name, $this->_retrieved))\n\t\t\t{\n\t\t\t\tunset($this->_retrieved[$name]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// This doesn't matter\n\t\tif (array_key_exists($name, $this->_unmapped))\n\t\t{\n\t\t\tunset($this->_unmapped[$name]);\n\t\t}\n\t}", "public function remove(string $key);", "function clear_unknown_post_metas()\n {\n global $wpdb;\n\n $query = \"SELECT count(*) FROM {$wpdb->postmeta} WHERE ( meta_key LIKE 'prli%' OR meta_key LIKE 'pretty-link%' OR meta_key LIKE '_prli%' OR meta_key LIKE '_pretty-link%' ) AND post_id=0\";\n $count = $wpdb->get_var($query);\n\n if($count)\n {\n $query = \"DELETE FROM {$wpdb->postmeta} WHERE ( meta_key LIKE 'prli%' OR meta_key LIKE 'pretty-link%' OR meta_key LIKE '_prli%' OR meta_key LIKE '_pretty-link%' ) AND post_id=0\";\n $wpdb->query($query);\n }\n }", "final public static function remove($key) {\n if (is_string($key) && ! is_false(strpos($key, ','))) {\n $key = explode(',', $key);\n }\n\n\n if (is_array($key)) {\n $old = static::fetch_item('--cache-tags');\n\n foreach ((array) $old as $i => $val) {\n $diff = array_intersect($key, (array) $val);\n\n if (empty($diff)) {\n continue;\n }\n\n static::delete_item($i);\n\n unset($old[$i]);\n }\n return static::store_item('--cache-tags', $old, NEVER);\n }\n return static::delete_item($key);\n }", "function delete_usermeta($user_id, $meta_key, $meta_value = '')\n {\n }", "public function forgetMeta(string $key): void\n {\n $this->metas()->where('key', $key)->delete();\n }", "public function clearMetas(): void\n {\n $this->metas()->delete();\n }", "function delete_acf_content_on_delete_field($field) {\n // find all occurences of the field key in all tables and delete them\n // and the custom field associated with them\n global $wpdb;\n // remove any tables from this array that you don't want to check\n $tables = array('options', 'postmeta', 'termmeta', 'usermeta', 'commentmeta');\n foreach ($tables as $table) {\n $key_field = 'meta_key';\n $value_field = 'meta_value';\n if ($table == 'options') {\n $key_field = 'option_name';\n $value_field = 'option_value';\n }\n $table = $wpdb->{$table};\n // this query gets all key fields matching the acf key reference field\n $query = 'SELECT DISTINCT('.$key_field.')\n FROM '.$table.'\n WHERE '.$value_field.' = \"'.$field['key'].'\"';\n $results = $wpdb->get_col($query);\n if (!count($results)) {\n // no content found in this table\n continue;\n }\n // loop through keys and construct list of meta_key/option_names to delete\n $keys = array();\n foreach ($results as $key) {\n $keys[] = $key; // delete acf field key reference\n $keys[] = substr($key, 1); // delete acf field value\n }\n // do escping of all values.... just in case\n $keys = $wpdb->_escape($keys);\n // delete all of the content\n $query = 'DELETE FROM '.$table.'\n WHERE '.$key_field.' IN (\"'.implode('\",\"', $keys).'\")';\n $wpdb->query($query);\n } // end foreach table\n }", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function testQueryWithTermButTermsIsNotAssociatedWithAnyPost()\n {\n $user = User::create(array(\n 'first_name' => 'dianne',\n 'email' => 'dianne@gmail.com',\n 'password' => 'pass$dianne',\n 'permissions' => array(\n 'superuser' => 1\n )\n ));\n\n // logged in the user\n $this->application['auth']->loginUsingId($user->id);\n\n // create dummy\n $this->createDummyData($user);\n\n // begin\n $result = $this->commandDispatcher->dispatchFromArray(\n 'Darryldecode\\Backend\\Components\\ContentBuilder\\Commands\\QueryContentsCommand',\n array(\n 'type' => 'Blog',\n 'terms' => array(\n 'category' => 'technology'\n )\n )\n );\n\n // prove successful\n $this->assertTrue($result->isSuccessful());\n $this->assertEquals('Query contents successful.', $result->getMessage());\n $this->assertEquals(200, $result->getStatusCode(), 'Status code should be ok');\n $this->assertCount(0, $result->getData()->toArray()['data']);\n }", "function remove_keyword($domain,$keyword) {\n $parameters = array(\n 'method' => __FUNCTION__,\n 'domain' => $domain,\n 'keyword' => $keyword\n );\n $data = $this->get_data($parameters);\n return (array_key_exists('response', $data) && $data['response']==\"success\");\n }", "function magazine_remove_entry_meta() {\n\tif ( ! is_single() ) {\n\t\tremove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );\n\t\tremove_action( 'genesis_entry_footer', 'genesis_post_meta' );\n\t\tremove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );\n\t}\n\n}", "public function rem($key);", "public function remove($key) {}" ]
[ "0.66996115", "0.6635874", "0.65351737", "0.64605224", "0.6438688", "0.61814994", "0.590193", "0.572366", "0.5672847", "0.5549445", "0.5484713", "0.54545414", "0.5297534", "0.52857476", "0.52857476", "0.52857476", "0.5281976", "0.51888573", "0.50658005", "0.505576", "0.50456583", "0.504365", "0.5024594", "0.501872", "0.49886474", "0.49754182", "0.49465427", "0.48800242", "0.48787826", "0.48681515", "0.48333275", "0.4815215", "0.48051867", "0.4796751", "0.47803798", "0.4779762", "0.47647655", "0.47582573", "0.47191846", "0.4718694", "0.4690512", "0.46748713", "0.46743593", "0.46623027", "0.46302438", "0.46266606", "0.46244606", "0.46155223", "0.4613383", "0.4610902", "0.46098495", "0.4596167", "0.4588615", "0.4569591", "0.4568571", "0.45527023", "0.4548038", "0.45443735", "0.4537168", "0.4535957", "0.4531582", "0.4524367", "0.45151067", "0.45109573", "0.4502656", "0.4501308", "0.44949004", "0.4488058", "0.44879287", "0.44867492", "0.44811094", "0.4472511", "0.4472511", "0.44720757", "0.4469964", "0.44696915", "0.4468173", "0.44599178", "0.44570494", "0.44520113", "0.4448006", "0.44461733", "0.44321534", "0.4423403", "0.44229734", "0.4412172", "0.4411442", "0.43937147", "0.43937147", "0.43937147", "0.43937147", "0.43937147", "0.43937147", "0.43937147", "0.43937147", "0.43930805", "0.43916965", "0.43758437", "0.43740454", "0.43720108" ]
0.62007934
5
Retrieve post meta field for a post.
function get_term_meta($term_id, $taxonomy, $key = '', $single = false) { return get_metadata('post', $post_id, $key, $single); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_post_field($field, $post = \\null, $context = 'display')\n {\n }", "public function get_value($post){\n $post = get_post($post);\n return $post && !is_wp_error($post) && metadata_exists('post', $post->ID, $this->meta_id) ? get_post_meta( $post->ID, $this->meta_id, true ) : null;\n }", "function meta($key) {\n return get_post_meta($post->ID, $key, true);\n}", "public static function get_post_meta($post,$key){\n\t\t$post_id = false;\n\n\t\tif(!is_numeric($post)){\n\t\t\tif(isset($post->id)){\n\t\t\t\t$post_id = $post->id;\n\t\t\t}else{\n\t\t\t\t$post_id = $post->ID;\n\t\t\t}\n\t\t}else{\n\t\t\t$post_id = $post;\n\t\t}\n\n\t\tif(!$post_id) return [];\n\n\t\tstatic $cache = [];\n\n\t\tif(isset($cache[$post_id][$key])) return $cache[$post_id][$key];\n\n\t\t$meta = get_post_meta($post_id,$key,true);\n\n\t\tif($meta){\n\t\t\t$cache[$post_id][$key] = $meta;\n\t\t}\n\n\t\treturn $meta;\n\t}", "function get_post_meta($post_id, $key = '', $single = \\false)\n {\n }", "public function get_meta( $post_id, $field = FALSE )\n\t{\n\t\t$meta = get_post_meta( $post_id, $this->post_meta_key, TRUE );\n\n\t\t// if a field was specified and exists in the meta, return that\n\t\tif ( ! empty( $field ) )\n\t\t{\n\t\t\tif ( isset( $meta[ $field ] ) )\n\t\t\t{\n\t\t\t\treturn $meta[ $field ];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t} // END if\n\n\t\t// default to returning whatever came back from get_post_meta();\n\t\treturn $meta;\n\t}", "function get_field($key, $page_id = 0) { /// get_field é para somente pegar o valor do que quero\n $id = $page_id !== 0 ? $page_id : get_the_ID();\n return get_post_meta($id, $key, true);\n }", "function wpv_post_meta($post_id, $meta='', $single=false) {\n\t$real_id = wpv_get_the_ID();\n\n\tif ($real_id && $post_id != $real_id)\n\t\t$post_id = $real_id;\n\n\treturn get_post_meta( $post_id, $meta, $single );\n}", "public static function get_meta( string $key, $post_id = false ) {\n\t\t$user_id = get_current_user_id();\n\t\t$cache = wpcom_vip_cache_get( \"request_${user_id}\", self::CACHE_GROUP );\n\n\t\tif ( isset( $cache['meta'][ $key ] ) ) {\n\t\t\t$value = $cache['meta'][ $key ];\n\t\t} elseif ( $post_id ) {\n\t\t\t$value = get_post_meta( $post_id, $key, true );\n\t\t}\n\n\t\treturn $value;\n\t}", "private function get_acf_field( $field_name, $post ) {\n\t\t// Support for ACF >= 5.2.3.\n\t\tif ( function_exists( 'acf_maybe_get_field' ) ) {\n\t\t\t$info = acf_maybe_get_field( $field_name, $post->ID, false );\n\t\t} else {\n\t\t\t$info = get_field_object( $field_name, $post->ID );\n\t\t}\n\n\t\treturn ( $info ) ? $info : array();\n\t}", "function sc_get_post_meta( $id, $key ){\n\treturn (object)get_post_meta( $id, $key, true );\n}", "protected function get_fields() {\n\t\treturn rwmb_get_registry( 'field' )->get_by_object_type( 'post' );\n\t}", "function pms_get_post_meta( $post_id, $key = '', $single = false ) {\r\n\r\n if( empty( $key ) ) {\r\n $post_meta = get_post_meta( $post_id );\r\n\r\n foreach( $post_meta as $key => $value ) {\r\n $post_meta[$key] = $value[0];\r\n }\r\n\r\n return $post_meta;\r\n }\r\n\r\n return get_post_meta( $post_id, $key, $single );\r\n\r\n }", "public static function get_from_post( $post_id, $key, $single = false ) {\r\n\t\treturn get_post_meta( $post_id, '_'.LP_PLUGIN_NAME.'_'. $key, $single );\r\n\t}", "function acf_get_meta_field($key = 0, $post_id = 0)\n{\n}", "function acf_get_meta($post_id = 0)\n{\n}", "public function getPostMeta(int $postId, string $name)\n {\n return $this->app->getPostMeta($postId, $name);\n }", "public function metaField()\n {\n return $this->belongsTo(\n MetaField::class,\n self::COLUMN_META_FIELD_ID\n );\n }", "function enlight_get_api_post_meta($object, $field, $request)\n{\n return get_post_meta($object['id'], 'enlight_' . $field, true);\n}", "function wpcom_uncached_get_post_meta( $post_id, $key, $single = false ) {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n\n return get_post_meta( $post_id, $key, $single );\n}", "protected function cms_get_post_meta(\n $in_page_id, ///< The ID of the page/post\n $in_settings_id ///< The ID of the meta tag to fetch\n ) {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $ret = null;\n \n if (function_exists('get_post_meta')) {\n $ret = get_post_meta($in_page_id, $in_settings_id, true);\n } else {\n echo \"<!-- BMLTPlugin ERROR (cms_get_post_meta)! No get_post_meta()! -->\";\n }\n \n return $ret;\n }", "public static function get_all_meta( $post_id = false ) {\n\t\t$user_id = get_current_user_id();\n\t\t$cache = wpcom_vip_cache_get( \"request_${user_id}\", self::CACHE_GROUP );\n\n\t\tif ( isset( $cache['meta'] ) ) {\n\t\t\treturn $cache['meta'];\n\t\t} elseif ( $post_id ) {\n\t\t\t$value = get_post_meta( $post_id );\n\t\t}\n\n\t\treturn $value;\n\t}", "public function get_post_metadata($value, $post_id, $meta_key, $single)\n {\n }", "function acf_get_field_post($id = 0)\n{\n}", "function get_post_data() {\n\t\tif (empty($this->post)) :\n\t\t\t$this->post = get_post( $this->id );\n\t\tendif;\n\t\t\n\t\treturn $this->post;\n\t}", "public static function metaDate($post = null)\n {\n echo __METHOD__;\n $meta = get_post_meta($post->ID);\n echo '<pre>';\n print_r($meta);\n echo '</pre>';\n /*\n * repeat_start\n * repeat_end\n */\n print_r($post);\n }", "private function getPost($post)\n {\n if ($post instanceof WP_post) {\n return $post;\n } elseif (is_int($post) === true) {\n return $this->objectHandler->getPost($post);\n } elseif (isset($post->ID) === true) {\n return $this->objectHandler->getPost($post->ID);\n }\n\n return false;\n }", "private function get_meta( $key, $single = true ) {\n\t\treturn get_post_meta( $this->get_id(), $key, $single );\n\t}", "function bf_get_post_meta( $key = null, $post_id = null, $force_default = null ) {\n\n\t\tglobal $wp_query;\n\n\t\tif ( is_null( $post_id ) ) {\n\t\t\tglobal $post;\n\t\t\t$post_id = isset( $post->ID ) ? $post->ID : 0;\n\t\t}\n\n\t\t/**\n\t\t * Detecting the BuddyPress $post object resetting to prevent returning false as default value.\n\t\t *\n\t\t * @see bp_theme_compat_reset_post function for more info\n\t\t */\n\t\tstatic $bp_component_post_id;\n\n\t\tif ( empty( $post_id ) && $wp_query->is_main_query() ) {\n\n\t\t\tif ( ! isset( $bp_component_post_id ) ) {\n\t\t\t\t$bp_component_post_id = bf_bp_get_component_page_id();\n\t\t\t}\n\n\t\t\t$post_id = $bp_component_post_id;\n\t\t}\n\n\t\t$meta = get_post_meta( $post_id, $key, true );\n\n\t\tif ( $meta == '' && ! is_null( $force_default ) ) {\n\t\t\treturn $force_default;\n\t\t}\n\n\t\t// If Meta check for default value\n\t\tif ( $meta !== '' ) {\n\t\t\treturn $meta;\n\t\t}\n\n\t\t// initialize base BF metabox\n\t\tif ( ! class_exists( 'BF_Metabox_Core' ) ) {\n\t\t\tBetter_Framework()->post_meta();\n\t\t}\n\n\t\tforeach ( (array) BF_Metabox_Core::$metabox as $metabox_id => $metabox ) {\n\n\t\t\t// get style id for current metabox\n\t\t\tif ( isset( $metabox['panel-id'] ) ) {\n\t\t\t\t$std_id = Better_Framework()->options()->get_panel_std_id( $metabox['panel-id'] );\n\t\t\t} else {\n\t\t\t\t$std_id = 'std';\n\t\t\t}\n\n\t\t\t$metabox_std = BF_Metabox_Core::get_metabox_std( $metabox_id );\n\n\t\t\tif ( isset( $metabox_std[ $key ] ) ) {\n\t\t\t\tif ( isset( $metabox_std[ $key ][ $std_id ] ) ) {\n\t\t\t\t\treturn $metabox_std[ $key ][ $std_id ];\n\t\t\t\t} elseif ( isset( $metabox_std[ $key ]['std'] ) ) {\n\t\t\t\t\treturn $metabox_std[ $key ]['std'];\n\t\t\t\t} else {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn '';\n\t}", "function get_custom_field_data($key, $echo = false) {\n\tglobal $post;\n\t$value = get_post_meta($post->ID, $key, true);\n\tif($echo == false) {\n\t\treturn $value;\n\t} else {\n\t\techo $value;\n\t}\n}", "protected function get_post_custom( $pid ) {\n\t\t$post_meta = array();\n\n\t\t/**\n\t\t * Filters post meta data before it is fetched from the database.\n\t\t *\n\t\t * Timber loads all meta values into the post object on initialization. With this filter,\n\t\t * you can disable fetching the meta values through the default method, which uses\n\t\t * `get_post_meta()`, by returning `false` or an non-empty array.\n\t\t *\n\t\t * @example\n\t\t * ```php\n\t\t * // Disable fetching meta values.\n\t\t * add_filter( 'timber_post_get_meta_pre', '__return_false' );\n\t\t *\n\t\t * // Add your own meta data.\n\t\t * add_filter( 'timber_post_get_meta_pre', function( $post_meta, $post_id, $post ) {\n\t\t * $post_meta = array(\n\t\t * 'custom_data_1' => 73,\n\t\t * 'custom_data_2' => 274,\n\t\t * );\n\t\t *\n\t\t * return $post_meta;\n\t\t * }, 10, 3 );\n\t\t * ```\n\t\t *\n\t\t * @param array $post_meta An array of custom meta values. Passing false or a\n\t\t * non-empty array will skip fetching the values from the\n\t\t * database and will use the filtered values instead. Default\n\t\t * `array()`.\n\t\t * @param int $post_id The post ID.\n\t\t * @param \\Timber\\Post $post The post object.\n\t\t */\n\t\t$post_meta = apply_filters('timber_post_get_meta_pre', $post_meta, $pid, $this);\n\n\t\t// Load all meta data when it wasn’t filtered before.\n\t\tif ( false !== $post_meta && empty( $post_meta ) ) {\n\t\t\t$post_meta = get_post_meta( $pid );\n\t\t}\n\n\t\tif ( !is_array($post_meta) ) {\n\t\t\treturn array();\n\t\t}\n\n\t\tforeach ( $post_meta as $key => $value ) {\n\t\t\tif ( is_array($value) && count($value) == 1 && isset($value[0]) ) {\n\t\t\t\t$value = $value[0];\n\t\t\t}\n\t\t\t$post_meta[$key] = maybe_unserialize($value);\n\t\t}\n\t\t$post_meta = apply_filters('timber_post_get_meta', $post_meta, $pid, $this);\n\t\treturn $post_meta;\n\t}", "function get_custom_field($key, $echo = FALSE) {\r\n global $post;\r\n $custom_field = get_post_meta($post->ID, $key, true);\r\n if ($echo == FALSE) return $custom_field;\r\n echo $custom_field;\r\n }", "public function get_custom_fields($post_id)\n {\n }", "function get_post_term_meta( int $post_id, int $term_id, string $meta_key, bool $single = false ) {\n\t\treturn \\wpinc\\meta\\post_term_meta\\get_post_term_meta( $post_id, $term_id, $meta_key, $single );\n\t}", "public function get_meta() {\n\t\treturn $this->meta;\n\t}", "public function get_meta() {\n\t\treturn $this->meta;\n\t}", "protected\n function wp_post_field( $post_object, array $matches )\n {\n $field = $this->value($matches, 'field');\n $string = $this->value($matches, 'string');\n if ( $string ) {\n $field = $this->unquote($field);\n }\n $values = get_post_meta($post_object->ID, $field);\n $result = count($values) == 1\n ? $values[0]\n : (count($values) == 0\n ? null\n : $values);\n return $result;\n }", "public function getMeta(string $key = '', bool $single = false)\n {\n return get_post_meta($this->id, $key, $single);\n }", "protected function cms_get_post_meta(\n $in_page_id, ///< The ID of the page/post\n $in_settings_id ///< The ID of the meta tag to fetch\n ) {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $ret = null;\n \n return $ret;\n }", "static function get_post_metas($post){\n\t\t$post_id = false;\n\n\t\tif(!is_numeric($post)){\n\t\t\tif(isset($post->id)){\n\t\t\t\t$post_id = $post->id;\n\t\t\t}else{\n\t\t\t\t$post_id = $post->ID;\n\t\t\t}\n\t\t}else{\n\t\t\t$post_id = $post;\n\t\t}\n\n\t\tif(!$post_id) return [];\n\n\t\tstatic $cache;\n\t\tif(isset($cache[$post_id])) return $cache[$post_id];\n\n\t\t/**\n\t\t * Get and unserialize post meta\n\t\t *\n\t\t * @param $post_id\n\t\t *\n\t\t * @return array\n\t\t */\n\t\t$get_metas = function($post_id){\n\t\t\t$metas = array_map(function($value){\n\t\t\t\tif(is_array($value) && isset($value[0])){\n\t\t\t\t\treturn maybe_unserialize($value[0]);\n\t\t\t\t}else{\n\t\t\t\t\treturn $value;\n\t\t\t\t}\n\t\t\t},get_post_meta($post_id));\n\t\t\treturn $metas;\n\t\t};\n\n\t\t$metas = $get_metas($post_id);\n\n\t\t$cache[$post_id] = $metas;\n\n\t\treturn $metas;\n\t}", "public function getMeta()\n {\n return $this->getValue('meta');\n }", "public function getMeta()\n {\n return $this->getValue('meta');\n }", "function get_PostViews($post_ID){\n $count_key = 'post_views_count';\n //Returns values of the custom field with the specified key from the specified post.\n $count = get_post_meta($post_ID, $count_key, true);\n \n return $count;\n}", "public static function getAccessiblePostMeta($postId)\n {\n $meta = get_post_meta($postId);\n $newMeta = array();\n foreach ($meta as $key => $list) {\n if (count($list) == 1) {\n $newMeta[$key] = $list[0];\n } else {\n $newMeta[$key] = $list;\n }\n }\n\n return $newMeta;\n }", "function get_meta_value_by_post_id( $post_id = false, $meta_key = '' ) {\n \n if( ! absint( $post_id ) || empty( $meta_key ) ) {\n return false;\n }\n \n $user_id = _s_get_session_user_id();\n \n $args = array(\n 'p' => $post_id, // ID of a page, post, or custom type\n 'post_type' => 'any',\n 'meta_query' => array(\n array(\n 'key' => $meta_key,\n 'value' => $user_id,\n ),\n ),\n );\n \n $query = new WP_Query( $args );\n \n return $query->found_posts;\n}", "public function getPost()\n {\n return $this->hasOne(PostForm::className(), ['_id' => 'post_id']);\n }", "public function get_meta( $result, $post, $key, $default, $field ) {\n\n\t\t\t$relation = isset( $this->_active_relations[ $key ] ) ? $this->_active_relations[ $key ] : false;\n\n\t\t\tif ( ! $relation ) {\n\t\t\t\treturn $result;\n\t\t\t}\n\n\t\t\t$meta = get_post_meta( $post->ID, $key, false );\n\t\t\t$meta = array_filter( $meta );\n\t\t\t$meta = array_values( $meta );\n\n\t\t\tif ( ! isset( $field['multiple'] ) || ! $field['multiple'] ) {\n\t\t\t\t$meta = isset( $meta[0] ) ? $meta[0] : null;\n\t\t\t}\n\n\t\t\tif ( ! empty( $meta ) ) {\n\t\t\t\treturn $meta;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t}", "function get_post_meta_date( int $post_id, string $key, string $format = null ) {\n\t\treturn \\wpinc\\meta\\get_post_meta_date( $post_id, $key, $format );\n\t}", "public static function custom_field_value($post_id, $field_name){\n $field_value = get_post_meta( $post_id, $field_name, true );\n\n if( is_array($field_value) ) {\n return $field_value;\n }\n\n return ($field_value) ? esc_html($field_value) : null;\n }", "public function getPost()\n {\n return $this->post;\n }", "public function getFieldValueById($postFieldId)\n {\n\t $table = self::tablePrefix().'cms_post_field';\n\t $strSql = \"SELECT id, field_id, value \n\t\t\t\t\tFROM {$table}\n\t\t\t\t\tWHERE id = :pfid\n\t\t\t\t \";\n\t $cmd = self::getDb()->createCommand($strSql);\n\t $cmd->bindValue(\":pfid\",$postFieldId,\\PDO::PARAM_STR);\n\t return $cmd->queryOne();\n }", "public function get( $meta_name, $single = true ) {\r\n\t\t$meta_name = '_campaign_' . $meta_name;\r\n\t\treturn get_post_meta( $this->post->ID, $meta_name, $single );\r\n\t}", "public function get_post() {\n\n return $this->_post;\n }", "public function getMeta($key)\n {\n return $this->meta[$key] = get_post_meta($this->id, $key, true);\n }", "static function mega_get_field( $field_id ) {\n\t\tif ( is_post_type_archive() ) {\n\t\t\t// acf archive fields must have a prefix with single post name, i.e: product-content.\n\t\t\t$obj = get_queried_object();\n\t\t\t$name = $obj->name;\n\t\t\t$field = get_field( \"{$name}_{$field_id}\", 'option' );\n\t\t} elseif ( is_tax() || is_category() ) {\n\t\t\t$term = get_queried_object();\n\n\t\t\tif ( get_field( $field_id, $term ) ) {\n\t\t\t\t$field = get_field( $field_id, $term );\n\t\t\t} elseif ( $term->parent && get_field( $field_id, $term->taxonomy . '_' . $term->parent ) ) {\n\t\t\t\t$field = get_field( $field_id, $term->taxonomy . '_' . $term->parent );\n\t\t\t}\n\t\t} elseif ( get_field( $field_id ) ) {\n\t\t\t$field = get_field( $field_id );\n\t\t}\n\n\t\tif ( ! isset( $field ) && get_field( $field_id, 'option' ) ) {\n\t\t\t$field = get_field( $field_id, 'option' );\n\t\t}\n\n\t\tif ( isset( $field ) ) {\n\t\t\treturn $field;\n\t\t}\n\t}", "public function getField()\n {\n $value = $this->name;\n if (null != $this->field) {\n $value = $this->field;\n }\n return $value;\n }", "function brag_rest_meta_get_flamingo( $object, $field_name, $request ) {\n\n\t$meta = get_post_meta( $object[ 'id' ], '_meta' );\n\n\treturn $meta;\n}", "public function name() { return $this->post->post_name; }", "public function getField()\n {\n return $this->reflectionProperty;\n }", "public function getPost()\n {\n return $this->hasOne(Post::className(), ['id' => 'post_id']);\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 }", "public function getField()\n {\n return $this->field;\n }", "function acf_get_field_reference($field_name, $post_id)\n{\n}", "function get_meta_box_value($name) {\n\tglobal $wp_query, $post;\n\t$value = get_post_meta($post->ID, $name, true);\n\treturn $value;\n}", "public function getPost()\n {\n return $this->hasOne(Posts::className(), ['id' => 'post_id']);\n }", "public function getPost(): Post\n {\n return $this->post;\n }", "public static function getMetaData()\n {\n // _deprecated_function( __FUNCTION__, '1.4.1');\n\n global $post;\n\n $meta = new stdClass();\n\n $active = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_ACTIVE, true);\n $meta->active = filter_var($active, FILTER_VALIDATE_BOOLEAN);\n\n $meta->latitude = null;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_LATITUDE, true);\n if ($value != '') {\n $meta->latitude = (float)$value;\n }\n $meta->longitude = null;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_LONGITUDE, true);\n if ($value != '') {\n $meta->longitude = (float)$value;\n }\n\n $meta->mapType = self::MAP_TYPE_DEFAULT;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_MAP_TYPE, true);\n if ($value != '') {\n $meta->mapType = $value;\n }\n\n $meta->zoom = self::MAP_ZOOM_DEFAULT;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_ZOOM, true);\n if ($value != '') {\n $meta->zoom = (int)$value;\n }\n\n $meta->title = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_TITLE, true);\n\n $description = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_DESCRIPTION, true);\n if (!is_admin()) {\n $description = apply_filters('pronamic_google_maps_item_description', $description);\n }\n $meta->description = $description;\n\n $meta->address = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_ADDRESS, true);\n\n $meta = apply_filters('pronamic_google_maps_post_meta', $meta);\n\n return $meta;\n }", "public static function render_meta_box($post)\n {\n // Use nonce for verification\n wp_nonce_field(plugin_basename(__DIR__), 'dxw_content_review_nonce');\n\n $args = array();\n\n // Get settings data\n $args['dxw_review_email'] = get_post_meta($post->ID, '_dxw_review_email', true);\n $args['dxw_review_length'] = get_post_meta($post->ID, '_dxw_review_length', true);\n $args['dxw_review_action'] = get_post_meta($post->ID, '_dxw_review_action', true);\n\n // Include fields meta view\n dxw_get_view('content-review-meta', $args);\n }", "public function getPostField ( $name ) {\n\t\tif( !array_key_exists($name, $this->config['postFields']) ) {\n\t\t\tthrow new \\InvalidArgumentException(sprintf('The name \"%s\" does not exist.', $name));\n\t\t}\n\t\treturn $this->config['postFields'][$name];\n\t}", "function acf_get_post_id_info($post_id = 0)\n{\n}", "public function getField() {\n\t\treturn $this->field;\n\t}", "public function getField() {\n\t\treturn $this->field; \n\t}", "public function get_meta( $key = '', $single = false );", "public function video_meta_information( $post ) {\n wp_nonce_field( 'video_meta_save', 'video_meta_box' );\n\n $provider = get_post_meta($post->ID, 'provider', true);\n $videoid = get_post_meta($post->ID, 'videoid', true);\n $season = get_post_meta($post->ID, 'season', true);\n $episode = get_post_meta($post->ID, 'episode', true);\n\n require_once(PLUGIN_ROOT. 'includes/tpl/video-meta.tpl.php');\n }", "function pre_load_meta( $null, $post_id ) {\n\t\tif( isset($this->meta[ $post_id ]) ) {\n\t\t\treturn $this->meta[ $post_id ];\n\t\t}\n\t\treturn $null;\n\t}", "function add_custom_meta() {\n global $post;\n }", "function acf_get_value($post_id = 0, $field)\n{\n}", "public function getField($name) { return $this->fields[$name]; }", "function acf_get_metadata($post_id = 0, $name = '', $hidden = \\false)\n{\n}", "function sage_get_field( $key, $id=false, $format=true ) {\n\n global $post;\n\n $key = trim( filter_var( $key, FILTER_SANITIZE_STRING ) );\n $result = '';\n\n if ( function_exists( 'get_field' ) ) {\n if ( isset( $post->ID ) && !$id )\n $result = get_field( $key, $post->ID, $format);\n else\n $result = get_field( $key, $id, $format );\n }\n\n return $result;\n}", "public function getPost()\n {\n if (!$this->hasPost()) {\n $this->setPost(false);\n\n if ($post = $this->registry->registry('wordpress_post')) {\n if ($post->getPostType() === 'page') {\n $this->setPost($post);\n }\n } \n }\n\n return $this->_getData('post');\n }", "function get_field($id=false, $field=false) {\n\t\tif(!$id && !$field) return false;\n\t\tglobal $wpdb;\n\t\t$query = \"SELECT wposts.$field FROM $wpdb->posts wposts WHERE wposts.ID=$id\";\n\t\t$results = $this->query($query);\n\t\tif(isset($results[0])) return $results[0]->$field;\n\t}", "public function get_widget_post_meta( $post_id, $widget_id, $meta_key ) {\n\t\t$widget_post_meta = get_post_meta( $post_id, self::POST_META_KEY, true );\n\t\tif( empty( $widget_post_meta ) ) return '';\n\t\t$widget_post_meta_field = $widget_id . '_' . $meta_key;\n\t\tif( ! isset( $widget_post_meta[$widget_post_meta_field] ) ) return '';\n\t\treturn $widget_post_meta[$widget_post_meta_field];\n\t}", "function boom_post_meta() {\n\tif ( get_post_type() == 'post' ) {\n\t\techo sprintf(\n\t\t\t__( 'Posted %s in %s%s by %s. ', 'boom' ),\n\t\t\tget_the_time( get_option( 'date_format' ) ),\n\t\t\tget_the_category_list( ', ' ),\n\t\t\tget_the_tag_list( __( ', <b>Tags</b>: ', 'boom' ), ', ' ),\n\t\t\tget_the_author_link()\n\t\t);\n\t}\n\tedit_post_link( __( ' (edit)', 'boom' ), '<span class=\"edit-link\">', '</span>' );\n}", "public function get_post_data() {\n\t\treturn $this->post;\n\t}", "function get_value_metaext($the_ID, $name, $single = true) {\r\n\t\t$retVal = get_post_meta($the_ID, $name, $single);\r\n\t\tif (!$retVal || $retVal == '')\r\n\t\t\t$retVal = null;\r\n\t\treturn $retVal;\r\n\t}", "function metabox_media_colortitle($post_id, $post)\n\n {\n\n if (!wp_verify_nonce($_POST['eventmeta_noncename_colortitle'], plugin_basename(__FILE__))) {\n\n\n\n return $post->ID;\n\n }\n\n\n\n // Is the user allowed to edit the post or page?\n\n if (!current_user_can('edit_post', $post->ID))\n\n\n\n return $post->ID;\n\n\n\n $is_media_colortitle = sanitize_text_field($_POST['_is_media_colortitle']);\n\n update_post_meta($post->ID, '_is_media_colortitle', $is_media_colortitle);\n\n }", "public function viewPostById($post) {\n $db = $this->dbConnect();\n $req = $db->prepare('SELECT id, title, content, DATE_FORMAT(creation_date, \\'%d/%m/%Y à %Hh%imin%ss\\') AS creation_date_fr FROM posts WHERE id = ?');\n $req->execute(array($post->getId()));\n\n $postById = $req->fetch();\n\n return $postById;\n }", "public function getMetaData($post_id) {\n $query = \"SELECT * FROM wp_pwgb_postmeta\n WHERE post_id = :post_id;\";\n $stm = $this->db->prepare($query);\n $stm->bindValue(\":post_id\", $post_id, PDO::PARAM_INT);\n $stm->execute();\n\n $response = $stm->fetchAll(PDO::FETCH_ASSOC);\n return $response;\n }", "public function getField()\n {\n return $this->_field;\n }", "public function getField() {\n\t\treturn $this->_field;\n\t}", "function prfx_meta_callback( $post ) {\r\n wp_nonce_field( basename( __FILE__ ), 'prfx_nonce' );\r\n $prfx_stored_meta = get_post_meta( $post->ID );\r\n ?>\r\n \r\n <p>\r\n <label for=\"meta-text\" class=\"prfx-row-title\"><?php _e( 'Enter H1 Title Tag Here', 'prfx-textdomain' )?></label>\r\n <input type=\"text\" name=\"meta-text\" id=\"meta-text\" value=\"<?php if ( isset ( $prfx_stored_meta['meta-text'] ) ) echo $prfx_stored_meta['meta-text'][0]; ?>\" />\r\n </p>\r\n \r\n <?php\r\n}", "function df_meta_fields( $post, $mph_var ) {\n\t\t$date_field_object = $mph_var['args'];\n\t\t$date_field_object->df_create_fields();\n\t}", "public function get_post_get()\n {\n $this->get_post_get_action();\n $this->get_post_get_query();\n $this->get_post_get_andor();\n $this->get_post_get_uid();\n $this->get_post_get_mid();\n $this->get_post_get_start();\n $this->get_post_get_mids();\n $this->get_post_get_showcontext();\n $this->get_post_get_mark();\n $this->get_post_get_cid();\n $this->get_post_get_subcat();\n }", "public function getField($slug);", "function acf_get_metaref($post_id = 0, $type = 'fields', $name = '')\n{\n}", "public function get_author_meta( $post ){\n $author = get_the_author_meta( 'display_name', $post->post_author );\n return '<div><span class=\"wm-title\">Author:</span> ' . $author . '</div>';\n }", "function nb_get_post_views( $object, $field_name, $request ) {\n\n return (int) get_post_meta( $object['id'], $field_name, true );\n\n}" ]
[ "0.72402555", "0.7201801", "0.69531655", "0.6936257", "0.68448013", "0.68272704", "0.6794014", "0.6698509", "0.6664783", "0.665199", "0.65965384", "0.6586196", "0.6510911", "0.64955556", "0.6485975", "0.64787775", "0.6444478", "0.64061624", "0.63689816", "0.63678193", "0.6337405", "0.6292105", "0.6289332", "0.62880224", "0.6263698", "0.6260806", "0.6257863", "0.624552", "0.62324184", "0.6212348", "0.6210312", "0.61790174", "0.6167342", "0.6155756", "0.61435014", "0.61435014", "0.6136987", "0.612285", "0.61126614", "0.61061925", "0.6095276", "0.6095276", "0.6086687", "0.6070039", "0.60631686", "0.60464954", "0.60387135", "0.60325986", "0.5988555", "0.59845316", "0.5979663", "0.5966594", "0.59531385", "0.5946969", "0.59432685", "0.59180975", "0.59170264", "0.590235", "0.589565", "0.589446", "0.5887878", "0.5887878", "0.5887878", "0.5887878", "0.5882563", "0.58792907", "0.58780056", "0.5877376", "0.5866619", "0.58661705", "0.5858242", "0.5845714", "0.58444196", "0.58419865", "0.5838449", "0.5832068", "0.58235335", "0.5822925", "0.58197534", "0.5815207", "0.58147436", "0.5813999", "0.5813412", "0.58122754", "0.58118147", "0.5805839", "0.5800241", "0.5771374", "0.5770098", "0.57615596", "0.57547396", "0.57538736", "0.5751413", "0.5748049", "0.5734477", "0.5720849", "0.5718494", "0.57169694", "0.571266", "0.5712556" ]
0.59003603
58
Update term meta field based on term ID. Use the $prev_value parameter to differentiate between meta fields with the same key and term ID. If the meta field for the term does not exist, it will be added.
function update_term_meta($term_id, $taxonomy, $meta_key, $meta_value, $prev_value = '') { return update_metadata('post', $post_id, $meta_key, $meta_value, $prev_value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_term_meta( $term_id, $meta_key, $meta_value, $prev_value = '' ) {\n\treturn update_metadata( 'taxonomy', $term_id, $meta_key, $meta_value, $prev_value );\n}", "function update_term_meta( $term_id, $meta_key, $meta_value, $prev_value = '' ) {\r\n\r\n if ( current_theme_supports( 'extended-taxonomies' ) ) {\r\n return update_post_meta( get_post_for_extended_term( $term_id )->ID, $meta_key, $meta_value, $prev_value );\r\n }\r\n\r\n return update_metadata( 'taxonomy', $term_id, $meta_key, $meta_value, $prev_value );\r\n }", "function update_post_term_meta( int $post_id, int $term_id, string $meta_key, $meta_value, $prev_value = '' ) {\n\t\treturn \\wpinc\\meta\\post_term_meta\\update_post_term_meta( $post_id, $term_id, $meta_key, $meta_value, $prev_value );\n\t}", "function update_carton_term_meta( $term_id, $meta_key, $meta_value, $prev_value = '' ) {\n\treturn update_metadata( 'carton_term', $term_id, $meta_key, $meta_value, $prev_value );\n}", "function acf_update_term_meta($value, $post_id, $field) {\n $term_id = intval(filter_var($post_id, FILTER_SANITIZE_NUMBER_INT));\n if($term_id > 0)\n update_term_meta($term_id, $field['name'], $value);\n return $value;\n}", "public function updateTermMeta(int $termId, string $name, $value)\n {\n return $this->app->updateTermMeta($termId, $name, $value);\n }", "public function update_term( $term_id, $tt_id, $taxonomy ) {\n\t\t/* Create post array with only our values. */\n\t\t$new_meta_data = array();\n\t\tforeach ( WPSEO_Taxonomy_Meta::$defaults_per_term as $key => $default ) {\n\t\t\t$posted_value = filter_input( INPUT_POST, $key );\n\t\t\tif ( isset( $posted_value ) && $posted_value !== false ) {\n\t\t\t\t$new_meta_data[ $key ] = $posted_value;\n\t\t\t}\n\n\t\t\t// If analysis is disabled remove that analysis score value from the DB.\n\t\t\tif ( $this->is_meta_value_disabled( $key ) ) {\n\t\t\t\t$new_meta_data[ $key ] = '';\n\t\t\t}\n\t\t}\n\t\tunset( $key, $default );\n\n\t\t// Saving the values.\n\t\tWPSEO_Taxonomy_Meta::set_values( $term_id, $taxonomy, $new_meta_data );\n\t}", "public function update_meta( $key, $value, $prev_value = '' );", "public function save_taxonomy_custom_meta( $term_id ) {\n\n\t\t$setting_slug = $this->media->plugin->components['settings']->setting_slug();\n\t\t$args = array(\n\t\t\t$setting_slug => array(\n\t\t\t\t'filter' => FILTER_SANITIZE_STRING,\n\t\t\t\t'flags' => FILTER_REQUIRE_ARRAY,\n\t\t\t),\n\t\t);\n\t\t$input = filter_input_array( INPUT_POST, $args );\n\t\tforeach ( $this->fields as $field_slug => $field ) {\n\t\t\tif ( ! isset( $field['contextual'] ) || ! isset( $input[ $setting_slug ][ $field_slug ] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$value = $input[ $setting_slug ][ $field_slug ];\n\t\t\tif ( ! empty( $field['choices'] ) && ! isset( $field['choices'][ $value ] ) ) {\n\t\t\t\t$value = null; // Reset the value if not a choice.\n\t\t\t}\n\n\t\t\t// Update the metadata.\n\t\t\t$meta_key = self::META_ORDER_KEY . '_' . $field_slug;\n\t\t\tupdate_term_meta( $term_id, $meta_key, $value );\n\t\t}\n\t}", "function add_carton_term_meta( $term_id, $meta_key, $meta_value, $unique = false ){\n\treturn add_metadata( 'carton_term', $term_id, $meta_key, $meta_value, $unique );\n}", "function gcd_tax_edit_meta_field($term) {\r\n $t_id = $term->term_id;\r\n \r\n // retrieve the existing value(s) for this meta field. This returns an array\r\n $term_meta = get_option( \"taxonomy_$t_id\" ); ?>\r\n <tr class=\"form-field\">\r\n <th scope=\"row\" valign=\"top\"><label for=\"term_meta[featured]\"><?php _e( 'Featured ?', '' ); ?></label></th>\r\n <td>\r\n <input type=\"text\" name=\"term_meta[featured]\" id=\"term_meta[featured]\" value=\"<?php echo esc_attr( $term_meta['featured'] ) ? esc_attr( $term_meta['featured'] ) : ''; ?>\">\r\n <p class=\"description\"><?php _e( 'Type 1 if you want to list category as featured','' ); ?></p>\r\n </td>\r\n </tr>\r\n <tr class=\"form-field\">\r\n <th scope=\"row\" valign=\"top\"><label for=\"term_meta[subtitle]\"><?php _e( 'Subtitle', '' ); ?></label></th>\r\n <td>\r\n <input type=\"text\" name=\"term_meta[subtitle]\" id=\"term_meta[subtitle]\" value=\"<?php echo esc_attr( $term_meta['subtitle'] ) ? esc_attr( $term_meta['subtitle'] ) : ''; ?>\">\r\n <p class=\"description\"><?php _e( 'Subtitle for your project','' ); ?></p>\r\n </td>\r\n </tr>\r\n<?php\r\n}", "public function updateTermProfile($term_id,$metas){\n $currents = $this->getAllMetaRefTerm($term_id);\n $ret = array();\n foreach($metas as $meta){\n $ret[] = $meta['name'];\n }\n $to_del = array_diff($currents, $ret);\n // save to db\n if (!empty($to_del)) {\n $this->removeMetas($term_id,$to_del);\n }\n $model = new self;\n foreach($metas as $meta){\n $data = self::model()->findByAttributes(array('term_id'=>$term_id,'name'=>$meta['name']));\n // print_r($data->meta_value);\n if(empty($data)){\n $model->term_id = $term_id;\n $model->name = $meta['name'];\n $model->value = $meta['value'];\n $model->save(false);\n }else{\n if($data->value != $meta['value']){\n $data->value = $meta['value'];\n $data->save(false);\n }\n }\n }\n return true;\n\n }", "function add_term_meta( $term_id, $meta_key, $meta_value, $unique = false ) {\n\treturn add_metadata( 'taxonomy', $term_id, $meta_key, $meta_value, $unique );\n}", "function add_term_meta( $term_id, $meta_key, $meta_value, $unique = false ) {\r\n\r\n if ( current_theme_supports( 'extended-taxonomies' ) ) {\r\n return add_post_meta( get_post_for_extended_term( $term_id )->ID, $meta_key, $meta_value, $unique );\r\n }\r\n\r\n return add_metadata( 'taxonomy', $term_id, $meta_key, $meta_value, $unique );\r\n }", "function update_post_meta($post_id, $meta_key, $meta_value, $prev_value = '')\n {\n }", "function update_book_meta( $id, $key, $value, $prev_value = '' ) {\r\n\treturn update_post_meta($id, $key, $value, $prev_value);\r\n}", "public function updated_term_link( $term_id, $tt_id ){\n\t\t\tif( isset( $_POST['term_link'] ) && '' !== $_POST['term_link'] ){\n\t\t\t\t$link = $_POST['term_link'];\n\t\t\t\tupdate_term_meta( $term_id, 'term_link', $link );\n\t\t\t}\n\t\t\telse\n\t\t\t\tupdate_term_meta( $term_id, 'term_link', '' );\n\t\t}", "function save_extra_taxonomy_fields($term_id)\n\n {\n\n if (isset($_POST['term_meta'])) {\n\n $t_id = $term_id;\n\n $term_meta = get_option(\"taxonomy_$t_id\");\n\n $cat_keys = array_keys($_POST['term_meta']);\n\n foreach ($cat_keys as $key) {\n\n if (isset($_POST['term_meta'][$key])) {\n\n $term_meta[$key] = $_POST['term_meta'][$key];\n\n }\n\n }\n\n update_option(\"taxonomy_$t_id\", $term_meta);\n\n }\n\n }", "function add_post_term_meta( int $post_id, int $term_id, string $meta_key, $meta_value, bool $unique = false ) {\n\t\treturn \\wpinc\\meta\\post_term_meta\\add_post_term_meta( $post_id, $term_id, $meta_key, $meta_value, $unique );\n\t}", "public function saveFields( $term_id ) \n\t{\n\t\tif ( isset( $_POST[self::CUSTOM_FIELDS_PREFIX] ) ) {\t\t\t\t\n\t\t\t$meta_data = $_POST[self::CUSTOM_FIELDS_PREFIX];\n\t\t\t$term_meta = get_option( sprintf( '%s_%d', $this->taxomomyStr, $term_id ) );\t\t\t\t\n\t\t\t$field_names = array_keys( $meta_data );\n\t\t\t\t\n\t\t\tforeach ( $field_names as $name ) {\n\t\t\t\tif ( isset ( $meta_data[$name] ) ) {\t\t\t\t\t\t\n\t\t\t\t\t$data = $meta_data[$name];\n\t\t\t\t\t\t\n\t\t\t\t\tif( is_string( $var ) ) {\n\t\t\t\t\t\t$data = wp_unslash( $data );\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t$term_meta[$name] = $data;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t// save the option array.\n\t\t\tupdate_option( sprintf( '%s_%d', $this->taxomomyStr, $term_id ), $term_meta );\n\t\t}\n\t}", "public function save_meta( $term_id ) {\n\n\t\t\tif ( ! current_user_can( 'edit_posts' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tforeach ( $this->args['fields'] as $key => $field ) {\n\n\t\t\t\tif ( ! isset( $_POST[ $key ] ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( is_array( $_POST[ $key ] ) ) {\n\t\t\t\t\t$new_val = array_filter( $_POST[ $key ] );\n\t\t\t\t} else {\n\t\t\t\t\t$new_val = esc_attr( $_POST[ $key ] );\n\t\t\t\t}\n\n\t\t\t\tupdate_term_meta( $term_id, $key, $new_val );\n\n\t\t\t}\n\n\t\t\treturn true;\n\n\t\t}", "function rhd_save_tax_meta( $term_id ) {\n\tif ( isset( $_POST['term_meta'] ) ) {\n\t\t$term_meta = array();\n\n\t\t// Sanitize me, if necessary.\n\t\t$term_meta['excluded'] = isset ( $_POST['term_meta']['excluded'] ) ? intval( $_POST['term_meta']['excluded'] ) : '';\n\n\t\tupdate_option( \"taxonomy_$term_id\", $term_meta );\n\t}\n}", "public function updated_term_image( $term_id, $tt_id ){\n\t\t\tif( isset( $_POST['term_image_id'] ) && '' !== $_POST['term_image_id'] ){\n\t\t\t\t$image = $_POST['term_image_id'];\n\t\t\t\tupdate_term_meta( $term_id, 'term_image_id', $image );\n\t\t\t}\n\t\t\telse\n\t\t\t\tupdate_term_meta( $term_id, 'term_image_id', '' );\n\t\t}", "public function saveMetaFields($termId)\n\t{\n\t\t$intervalKey = 'slideshow-' . $termId . '-interval';\n\t\t$intervalValue = isset($_POST['interval']) ? $_POST['interval'] : 10000;\n\n\t\tupdate_option($intervalKey, $intervalValue);\n\n\t\t$animationKey = 'slideshow-' . $termId . '-animation';\n\t\t$animationValue = isset($_POST['animation']) ? $_POST['animation'] : 'slide';\n\n\t\tupdate_option($animationKey, $animationValue);\n\t}", "public function meta($term_ID, $key=null, $value = null)\n {\n if ( $key === null ) {\n if ( $this->getCategory() ) {\n $key = $term_ID;\n $term_ID = $this->getCategory()->term_id;\n }\n else return null;\n }\n if ( $value !== null ) {\n delete_term_meta( $term_ID, $key );\n add_term_meta( $term_ID, $key, $value, true );\n return null;\n }\n else {\n return get_term_meta($term_ID, $key, true);\n }\n }", "function delete_term_meta( $term_id, $meta_key, $meta_value = '' ) {\r\n\r\n if ( current_theme_supports( 'extended-taxonomies' ) ) {\r\n return delete_post_meta( get_post_for_extended_term( $term_id )->ID, $meta_key, $meta_value );\r\n }\r\n\r\n return delete_metadata( 'taxonomy', $term_id, $meta_key, $meta_value );\r\n }", "function tf_update_post_meta($post_id, $meta_key, $meta_value, $prev_value = '') {\r\n // make sure meta is added to the post, not a revision\r\n if ( $the_post = wp_is_post_revision($post_id) )\r\n $post_id = $the_post;\r\n\r\n $meta_type = 'post';\r\n $object_id = $post_id;\r\n\r\n if ( !$meta_type || !$meta_key )\r\n return false;\r\n\r\n if ( !$object_id = absint($object_id) )\r\n return false;\r\n\r\n if ( ! $table = _get_meta_table($meta_type) )\r\n return false;\r\n\r\n global $wpdb;\r\n\r\n $column = esc_sql($meta_type . '_id');\r\n $id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id';\r\n\r\n // expected_slashed ($meta_key)\r\n // $meta_key = stripslashes($meta_key); // this was the trouble !\r\n $passed_value = $meta_value;\r\n // $meta_value = stripslashes_deep($meta_value); // this was the trouble !\r\n $meta_value = sanitize_meta( $meta_key, $meta_value, $meta_type );\r\n\r\n $check = apply_filters( \"update_{$meta_type}_metadata\", null, $object_id, $meta_key, $meta_value, $prev_value );\r\n if ( null !== $check )\r\n return (bool) $check;\r\n\r\n // Compare existing value to new value if no prev value given and the key exists only once.\r\n if ( empty($prev_value) ) {\r\n $old_value = get_metadata($meta_type, $object_id, $meta_key);\r\n if ( count($old_value) == 1 ) {\r\n if ( $old_value[0] === $meta_value )\r\n return false;\r\n }\r\n }\r\n\r\n if ( ! $meta_id = $wpdb->get_var( $wpdb->prepare( \"SELECT $id_column FROM $table WHERE meta_key = %s AND $column = %d\", $meta_key, $object_id ) ) )\r\n return tf_add_post_meta($object_id, $meta_key, $passed_value);\r\n\r\n $_meta_value = $meta_value;\r\n $meta_value = maybe_serialize( $meta_value );\r\n\r\n $data = compact( 'meta_value' );\r\n $where = array( $column => $object_id, 'meta_key' => $meta_key );\r\n\r\n if ( !empty( $prev_value ) ) {\r\n $prev_value = maybe_serialize($prev_value);\r\n $where['meta_value'] = $prev_value;\r\n }\r\n\r\n do_action( \"update_{$meta_type}_meta\", $meta_id, $object_id, $meta_key, $_meta_value );\r\n\r\n if ( 'post' == $meta_type )\r\n do_action( 'update_postmeta', $meta_id, $object_id, $meta_key, $meta_value );\r\n\r\n $wpdb->update( $table, $data, $where );\r\n\r\n wp_cache_delete($object_id, $meta_type . '_meta');\r\n\r\n do_action( \"updated_{$meta_type}_meta\", $meta_id, $object_id, $meta_key, $_meta_value );\r\n\r\n if ( 'post' == $meta_type )\r\n do_action( 'updated_postmeta', $meta_id, $object_id, $meta_key, $meta_value );\r\n\r\n return true;\r\n }", "function ywig_save_location_social_meta($term_id) {\n\n if (!isset($_POST['location_social_nonce'])) return;\n if (!wp_verify_nonce($_POST['location_social_nonce'], basename(__FILE__))) return;\n\n $socials = ywig_list_of_socials();\n\n foreach ($socials as $social => $value) {\n echo $social;\n // var_dump($value);\n $term_key = sprintf('ywig_location_%s_metadata', $value['id']);\n\n if (isset($_POST[$term_key])) {\n\n update_term_meta(\n $term_id,\n esc_attr($term_key),\n sanitize_text_field($_POST[$term_key])\n );\n }\n }\n}", "function bdpp_save_taxonomy_custom_meta( $term_id, $tt_id = '', $taxonomy = '' ) {\n\n\t\t$allowed_taxonomy = bdpp_get_option( 'taxonomy', array() );\n\n\t\tif( isset( $allowed_taxonomy[ $taxonomy ] ) ) {\n\n\t\t\t$prefix\t\t\t= BDPP_META_PREFIX;\n\t\t\t$term_img_id\t= !empty( $_POST[$prefix.'term_img_id'] )\t? bdpp_clean_number( $_POST[$prefix.'term_img_id'] )\t\t\t: '';\n\t\t\t$term_link\t\t= !empty( $_POST[$prefix.'term_link'] )\t\t? bdpp_clean_url( $_POST[$prefix.'term_link'] )\t\t\t\t\t: '';\n\t\t\t$term_icon\t\t= !empty( $_POST[$prefix.'term_icon'] )\t\t? bdpp_sanitize_html_classes( $_POST[$prefix.'term_icon'] )\t\t: '';\n\t\t\t$term_bg_clr\t= !empty( $_POST[$prefix.'term_bg_clr'] )\t? sanitize_hex_color( trim( $_POST[$prefix.'term_bg_clr'] ) )\t: '';\n\n\t\t\tupdate_term_meta( $term_id, $prefix.'term_img_id', $term_img_id );\n\t\t\tupdate_term_meta( $term_id, $prefix.'term_link', $term_link );\n\t\t\tupdate_term_meta( $term_id, $prefix.'term_icon', $term_icon );\n\t\t\tupdate_term_meta( $term_id, $prefix.'term_bg_clr', $term_bg_clr );\n\t\t}\n\t}", "public function set_term_custom_fields($term_id, $fields)\n {\n }", "public static function set_meta( $object_id, $meta_key, $meta_value ) {\n\n\t\tupdate_term_meta( $object_id, $meta_key, $meta_value );\n\t}", "function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_value = '')\n {\n }", "function update_site_meta($site_id, $meta_key, $meta_value, $prev_value = '')\n {\n }", "function update_termmeta_cache($term_ids)\n {\n }", "public static function action_edited_term( $term_id ) {\n\t\tself::purge_term( $term_id );\n\t}", "function delete_term_meta( $term_id, $meta_key, $meta_value = '' ) {\n\treturn delete_metadata( 'taxonomy', $term_id, $meta_key, $meta_value );\n}", "public function edit_taxonomy_fields( $term ) {\n\t\t$template_file = $this->media->plugin->template_path . 'taxonomy-term-transformation-fields.php';\n\t\tif ( file_exists( $template_file ) ) {\n\t\t\tinclude $template_file; // phpcs:ignore\n\t\t}\n\t}", "function delete_term_meta($term_id, $meta_key, $meta_value = '')\n {\n }", "function add_post_meta($term_id, $taxonomy, $meta_key, $meta_value, $unique = false) {\n\n return add_metadata('post', $post_id, $meta_key, $meta_value, $unique);\n}", "public function renderTaxonomyEdit(\\WP_Term $term, string $fieldId, string $value = null): void\n {\n // wrapper begin\n echo '<tr class=\"form-field term-' . $fieldId . '-wrap\">';\n\n // header area (\"left side\")\n echo '<th scope=\"row\">';\n // label\n $this->renderLabel($fieldId);\n echo '</th>';\n\n // input area (\"right side\")\n echo '<td>';\n // the actual input field\n $this->renderField($term, $fieldId, $value);\n // optional description/usage hint\n $this->renderDescription($fieldId, 'description');\n // other… e.g. Javascript\n $this->renderAnythingAfterField($term, $fieldId, $value);\n echo '</td>';\n\n // wrapper end\n echo '</tr>';\n }", "function update_meta($meta_id, $meta_key, $meta_value)\n {\n }", "function classiera_save_location_fields( $term_id ) { \r\n\t\tif ( isset( $_POST['term_meta'] ) ) { \r\n\t\t\t$t_id = $term_id; \r\n\t\t\t$term_meta = get_option( \"taxonomy_term_$t_id\" ); \r\n\t\t\t$cat_keys = array_keys( $_POST['term_meta'] ); \r\n\t\t\t\tforeach ( $cat_keys as $key ){ \r\n\t\t\t\tif ( isset( $_POST['term_meta'][$key] ) ){ \r\n\t\t\t\t\t$term_meta[$key] = $_POST['term_meta'][$key]; \r\n\t\t\t\t} \r\n\t\t\t} \r\n\t\t\t//save the option array \r\n\t\t\tupdate_option( \"taxonomy_term_$t_id\", $term_meta ); \r\n\t\t} \r\n\t}", "function save_taxonomy_custom_meta( $term_id ) {\nif ( isset( $_POST['term_meta'] ) ) {\n $t_id = $term_id;\n $term_meta = get_option( \"taxonomy_$t_id\" );\n $cat_keys = array_keys( $_POST['term_meta'] );\n foreach ( $cat_keys as $key ) {\n if ( isset ( $_POST['term_meta'][$key] ) ) {\n $term_meta[$key] = $_POST['term_meta'][$key];\n }\n }\n // Save the option array.\n update_option( \"taxonomy_$t_id\", $term_meta );\n}\n}", "function update_student_meta( $student_id, $meta_key, $meta_value, $prev_value = '' ) {\n return update_metadata('student', $student_id, $meta_key, $meta_value, $prev_value );\n }", "function save_termmeta( $term_id ) { \r\n\t\t// Save term color if possible \r\n\t\tif( isset( $_POST['_category_color'] ) && ! empty( $_POST['_category_color'] ) ) { \r\n\t\t\tupdate_term_meta( $term_id, '_category_color', sanitize_hex_color_no_hash( $_POST['_category_color'] ) ); \r\n\t\t} else { \r\n\t\t\tdelete_term_meta( $term_id, '_category_color' ); \r\n\t\t}\r\n\t}", "function save_taxonomy_custom_meta( $term_id ) {\r\n if ( isset( $_POST['term_meta'] ) ) {\r\n $t_id = $term_id;\r\n $term_meta = get_option( \"taxonomy_$t_id\" );\r\n $cat_keys = array_keys( $_POST['term_meta'] );\r\n foreach ( $cat_keys as $key ) {\r\n if ( isset ( $_POST['term_meta'][$key] ) ) {\r\n $term_meta[$key] = $_POST['term_meta'][$key];\r\n }\r\n }\r\n // Save the option array.\r\n update_option( \"taxonomy_$t_id\", $term_meta );\r\n }\r\n}", "function save_extra_post_tag_fields( $term_id, $data ) {\n\n\tif(!isset($data)) { $data = $_POST['tag_meta']; }\n\n\tif ( isset($data) ) {\n\t\t$t_id = $term_id;\n\t\t$tag_meta = get_option( \"post_tag_$t_id\" );\n\t\t$tag_keys = array_keys($data);\n\t\t\tforeach ($tag_keys as $key){\n\t\t\tif (isset($data[$key])){\n\t\t\t\t$tag_meta[$key] = $data[$key];\n\t\t\t}\n\t\t}\n\t\t\n\t\t//return json_encode($tag_meta);\n\t\t\n\t\t//save the option array\n\t\treturn update_option( \"post_tag_$t_id\", $tag_meta );\n\t}\n}", "function nb_update_post_related_artist_id( $value, $object, $field_name ) {\n if ( ! $value || ! is_numeric( $value ) ) {\n echo (\"nb_update_post_related_artist_id failed\");\n return;\n }\n\n return update_post_meta( $object->ID, $field_name, (int) $value );\n}", "function save_taxonomy_custom_fields( $term_id ) {\n if ( isset( $_POST['term_meta'] ) ) {\n $t_id = $term_id;\n $term_meta = get_option( \"taxonomy_term_$t_id\" );\n $cat_keys = array_keys( $_POST['term_meta'] );\n foreach ( $cat_keys as $key ){\n if ( isset( $_POST['term_meta'][$key] ) ){\n $term_meta[$key] = $_POST['term_meta'][$key];\n }\n }\n //save the option array\n update_option( \"taxonomy_term_$t_id\", $term_meta );\n }\n}", "function glbs_edit_extra_tax_fields( $term ) { //check for existing featured ID\n\t$id = $term->term_id;\n\t\n\t$title = get_term_meta( $id, 'basic_seo_title', true );\n\t$key = get_term_meta( $id, 'basic_seo_keywords', true );\n\t$desc = get_term_meta( $id, 'basic_seo_description', true );\n\t?>\n\t<?php wp_nonce_field( '_glbs_nonce_tax', 'glbs_nonce_tax' ); ?>\n\t<table class=\"form-table\">\n\t\t<tr class=\"form-field\">\n\t\t\t<th scope=\"row\"><label for=\"basic_seo_title\"><?php _e( 'SEO Title', 'glbs' ); ?></label></th>\n\t\t\t<td>\n\t\t\t\t<input class=\"large-text\" type=\"text\" name=\"basic_seo_title\" id=\"basic_seo_title\" value=\"<?php echo $title ? $title : ''; ?>\"><br/>\n\t\t\t\t<span class=\"description\">Leave empty to use default title</span>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr class=\"form-field\">\n\t\t\t<th scope=\"row\"><label for=\"basic_seo_keywords\"><?php _e( 'SEO Keywords', 'glbs' ); ?></label></th>\n\t\t\t<td>\n\t\t\t\t<input class=\"large-text\" type=\"text\" name=\"basic_seo_keywords\" id=\"basic_seo_keywords\" value=\"<?php echo $key ? $key : ''; ?>\"><br/>\n\t\t\t\t<span class=\"description\">Enter the list of keywords separated by comma</span>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr class=\"form-field\">\n\t\t\t<th scope=\"row\"><label for=\"basic_seo_description\"><?php _e( 'SEO Description', 'glbs' ); ?></label></th>\n\t\t\t<td>\n\t\t\t\t<textarea class=\"large-text\" name=\"basic_seo_description\" id=\"basic_seo_description\" rows=\"5\"><?php echo $desc ? $desc : ''; ?></textarea><br/>\n\t\t\t\t<span class=\"description\">Enter meta description for this Term</span>\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n\t<?php\n}", "public function update_term_link( $term, $taxonomy ){\n\t\t\twp_enqueue_media(); // подключим стили медиа, если их нет\n\n\n\t\t\t$link_id = get_term_meta( $term -> term_id, 'term_link', true );\n\t\t\t?>\n\t\t\t<tr class=\"form-field term-group-wrap\">\n\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t<label for=\"term_link\"><?php _e( 'Link', 'hero-theme' ); ?></label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<input type=\"text\" id=\"term_link\" name=\"term_link\" value=\"<?php echo $link_id; ?>\">\n\t\t\t\t\t<div id=\"term__link__wrapper\">\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<?php\n\t\t}", "function save_listing_category_custom_meta( $term_id ) {\n\n\tif ( isset( $_POST['listing_cat_meta'] ) ) {\n\t\t$t_id = $term_id;\n\t\t$listing_cat_meta = get_option( \"taxonomy_listing_category_$t_id\" );\n\t\t$cat_keys = array_keys( $_POST['listing_cat_meta'] );\n\t\tforeach ( $cat_keys as $key ) {\n\t\t\tif ( isset ( $_POST['listing_cat_meta'][$key] ) ) {\n\t\t\t\t$listing_cat_meta[$key] = $_POST['listing_cat_meta'][$key];\n\t\t\t}\n\t\t}\n\t\t// Save the option array.\n\t\tupdate_option( \"taxonomy_listing_category_$t_id\", $listing_cat_meta );\n\t}\n}", "function delete_carton_term_meta( $term_id, $meta_key, $meta_value = '', $delete_all = false ) {\n\treturn delete_metadata( 'carton_term', $term_id, $meta_key, $meta_value, $delete_all );\n}", "function specialities_taxonomy_custom_fields($tag) {\n // Check for existing taxonomy meta for the term you're editing\n $t_id = $tag->term_id; // Get the ID of the term you're editing\n $term_meta = get_option( \"taxonomy_term_$t_id\" ); // Do the check\n\t?>\n\n\t<tr class=\"form-field\">\n\t\t<th scope=\"row\" valign=\"top\">\n\t\t\t<label for=\"s_keyword\"><?php _e('Search Keyword'); ?></label>\n\t\t</th>\n\t\t<td>\n\t\t\t<input type=\"text\" name=\"term_meta[s_keyword]\" id=\"term_meta[s_keyword]\" size=\"25\" style=\"width:60%;\" value=\"<?php echo $term_meta['s_keyword'] ? $term_meta['s_keyword'] : ''; ?>\" data-role=\"tagsinput\"><br />\n\t\t\t<span class=\"description\"><?php _e('Search Keyword description'); ?></span>\n\t\t</td>\n\t</tr>\n\n\t<?php\n}", "public function update_meta( $post_id , $meta )\n\t{\n\t\t// $meta is typically $_POST[ $this->id_base ], but\n\t\t// the following silly scenario must be valid through this method:\n\t\t// $this->update_meta( $post_id, $this->get_meta( $post_id ) );\n\n\t\t// $meta needs to be fully sanitized and validated in this method\n\t\t// assume people -- even employees -- will try to hack this\n\t\t// review WP's methods and best practices for this thoroughly\n\t\t// http://codex.wordpress.org/Data_Validation\n\t\t// http://codex.wordpress.org/Function_Reference/wp_filter_nohtml_kses\n\n\t\t// make sure we have a valid post_id\n\t\tif ( ! $post_id = $this->sanitize_post_id( $post_id ) )\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// what word are we talking about\n\t\t$sanitized_meta['word'] = wp_kses( $meta['word'], array() );\n\t\twp_set_object_terms( $post_id, $sanitized_meta['word'], $this->post_type_name . '_words', FALSE );\n\n\t\t// the pronunciation\n\t\t$sanitized_meta['pronunciation'] = wp_kses( $meta['pronunciation'], array() );\n\n\t\t// the part of speech\n\t\t$sanitized_meta['partofspeech'] = isset( $this->default_parts_of_speech[ $meta['partofspeech'] ] ) ? $meta['partofspeech'] : $meta_defaults['partofspeech'];\n\t\twp_set_object_terms( $post_id, $sanitized_meta['partofspeech'], $this->post_type_name . '_partsofspeech', FALSE );\n\n\t\t// save the meta\n\t\tupdate_post_meta( $post_id , $this->post_meta_key , $sanitized_meta );\n\n\t\t// updating the post title is a pain in the ass, just look at what happens when we try to save it\n\t\t$post = (object) array();\n\t\t$post->ID = $post_id;\n\n\t\t// update the title\n\t\t$post->post_title = $sanitized_meta['word'];\n\t\t$post->post_name = sanitize_title_with_dashes( $sanitized_meta['word'] . '-' . $sanitized_meta['partofspeech'] );\n\n\t\t// remove the save post action and revision support\n\t\tremove_post_type_support( $this->post_type_name , 'revisions' );\n\t\tremove_action( 'save_post', array( bdefinite(), 'save_post' ) ); // not using '$this' because it's ambiguous when this is called within a child class\n\n\t\t// update the post\n\t\twp_update_post( $post );\n\n\t\t// add back the save post action and revision support\n\t\tadd_action( 'save_post', array( bdefinite(), 'save_post' ) );\n\t\tadd_post_type_support( $this->post_type_name , 'revisions' );\n\n\t}", "function get_term_meta($term_id, $key = '', $single = \\false)\n {\n }", "public function save_term_link( $term_id, $tt_id ){\n\t\t\tif( isset( $_POST['term_link'] ) && '' !== $_POST['term_link'] ){\n\t\t\t\t$link = $_POST['term_link'];\n\t\t\t\tadd_term_meta( $term_id, 'term_link', $link, true );\n\t\t\t}\n\t\t}", "function delete_post_term_meta( int $post_id, int $term_id, string $meta_key, $meta_value = '' ): bool {\n\t\treturn \\wpinc\\meta\\post_term_meta\\delete_post_term_meta( $post_id, $term_id, $meta_key, $meta_value );\n\t}", "public function save_meta( $term_id, $taxonomy_term_id, $taxonomy ) {\n\t\ttry {\n\t\t\t$indexable = $this->get_indexable( $term_id, $taxonomy );\n\t\t} catch ( No_Indexable_Found $exception ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$formatter = $this->get_formatter( $term_id, $taxonomy );\n\t\t$indexable = $formatter->format( $indexable );\n\n\t\t$indexable->save();\n\t}", "public function update(Request $request, Term $term)\n {\n //\n }", "public function update(Request $request, Term $term)\n {\n //\n }", "function update_category_image ( $term, $taxonomy ) { ?>\n <tr class=\"form-field term-group-wrap\">\n <th scope=\"row\">\n <label for=\"category-image-id\"><?php _e( 'Image', 'hero-theme' ); ?></label>\n </th>\n <td>\n <?php $image_id = get_term_meta ( $term -> term_id, 'category-image-id', true ); ?>\n <input type=\"hidden\" id=\"category-image-id\" name=\"category-image-id\" value=\"<?php echo $image_id; ?>\">\n <div id=\"category-image-wrapper\">\n <?php if ( $image_id ) { ?>\n <?php echo wp_get_attachment_image ( $image_id, 'thumbnail' ); ?>\n <?php } ?>\n </div>\n <p>\n <input type=\"button\" class=\"button button-secondary ct_tax_media_button\" id=\"ct_tax_media_button\" name=\"ct_tax_media_button\" value=\"<?php _e( 'Add Image', 'hero-theme' ); ?>\" />\n <input type=\"button\" class=\"button button-secondary ct_tax_media_remove\" id=\"ct_tax_media_remove\" name=\"ct_tax_media_remove\" value=\"<?php _e( 'Remove Image', 'hero-theme' ); ?>\" />\n </p>\n </td>\n </tr>\n <?php\n }", "public function update_term_image( $term, $taxonomy ){\n\t\t\twp_enqueue_media(); // подключим стили медиа, если их нет\n\n\t\t\tadd_action('admin_print_footer_scripts', array( & $this, 'add_script' ), 99 );\n\n\t\t\t$image_id = get_term_meta( $term -> term_id, 'term_image_id', true );\n\t\t\t?>\n\t\t\t<tr class=\"form-field term-group-wrap\">\n\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t<label for=\"term_image_id\"><?php _e( 'Image', 'hero-theme' ); ?></label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<input type=\"hidden\" id=\"term_image_id\" name=\"term_image_id\" value=\"<?php echo $image_id; ?>\">\n\t\t\t\t\t<div id=\"term__image__wrapper\">\n\t\t\t\t\t <?php if( $image_id ){\n\t\t\t\t\t\t\techo wp_get_attachment_image( $image_id, 'preview-sm' );\n\t\t\t\t\t\t} ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<input type=\"button\" class=\"button button-secondary ct_tax_media_button\" id=\"ct_tax_media_button\" name=\"ct_tax_media_button\" value=\"<?php _e( 'Add Image', 'hero-theme' ); ?>\" />\n\t\t\t\t\t\t<input type=\"button\" class=\"button button-secondary ct_tax_media_remove\" id=\"ct_tax_media_remove\" name=\"ct_tax_media_remove\" value=\"<?php _e( 'Remove Image', 'hero-theme' ); ?>\" />\n\t\t\t\t\t</p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<?php\n\t\t}", "function wpbs_update_booking_meta($booking_id, $meta_key, $meta_value, $prev_value = '')\n{\n\n return wp_booking_system()->db['bookingmeta']->update($booking_id, $meta_key, $meta_value, $prev_value);\n\n}", "function update_custom_meta( $postID, $value, $field ) {\n if ( ! get_post_meta( $postID, $field ) ) {\n add_post_meta( $postID, $field, $value );\n } else {\n // or to update existing meta\n update_post_meta( $postID, $field, $value );\n }\n}", "public function editTerm($term_name, $term_id){\n\t\t\t$query = $this->connection()->prepare(\"UPDATE termz SET name='$term_name' WHERE id='$term_id'\");\n\t\t $query->execute();\n\t\t return true;\n\t\t}", "private function set_post_term( $post_id, $value, $taxonomy ) {\n\t\t$term = term_exists( $value, $taxonomy );\n\t\t// If the taxonomy doesn't exist, then we create it.\n\t\tif ( 0 === $term || null === $term ) {\n\t\t\t$term = wp_insert_term(\n\t\t\t\t$value,\n\t\t\t\t$taxonomy,\n\t\t\t\t[ 'slug' => strtolower( str_ireplace( ' ', '-', $value ) ) ]\n\t\t\t);\n\t\t}\n\t\t// Then we can set the post - term relationship.\n\t\twp_set_post_terms( $post_id, $term['term_id'], $taxonomy );\n\t}", "function get_carton_term_meta( $term_id, $key, $single = true ) {\n\treturn get_metadata( 'carton_term', $term_id, $key, $single );\n}", "function save_softsdev_mc_product_cat_custom_meta($term_id) {\n if (isset($_POST['softsdev_mc_group'])) {\n $t_id = $term_id;\n $softsdev_wc_mc_setting = get_softsdev_wc_mc_setting();\n $softsdev_mc_terms_groups = get_option('softsdev_mc_term_group');\n $softsdev_mc_terms_groups['term' . $softsdev_wc_mc_setting['list_mgroup_id'] . '_' . $t_id] = $_POST['softsdev_mc_group'];\n // Save the option array.\n update_option(softsdev_mc_term_group, $softsdev_mc_terms_groups);\n }\n }", "function save_tax_meta( $term_id ){\n \n if ( isset( $_POST['term_meta'] ) ) {\n \n $term_meta = array();\n \n $term_meta['tax_date'] = isset ( $_POST['term_meta']['tax_date'] ) ? esc_html( $_POST['term_meta']['tax_date'] ) : '';\n \n //formato da data\n if( preg_match( '/[0-9]{2}\\/[0-9]{2}\\/[0-9]{4}/', $term_meta['tax_date'] ) )\n $term_meta['tax_date'] = preg_replace( '/^([0-9]{2})\\/([0-9]{2})\\/([0-9]{4})$/', '$3-$2-$1', $term_meta['tax_date'] );\n\n // Save the option array.\n update_option( \"taxonomy_$term_id\", $term_meta );\n \n } // if isset( $_POST['term_meta'] )\n }", "function add_update_or_delete_post_meta($new_meta_value, $post_id, $key) {\n global $clientele_events;\n global $post_type;\n $args['post_id'] = $post_id;\n $args['key'] = $key;\n $old_meta_value = get_post_meta($post_id, $key, true);\n if ('' == $new_meta_value) { // If empty delete it\n delete_post_meta($post_id, $key, $old_meta_value);\n if ($post_type == 'clientele-client') {\n $clientele_events->do_event('change', 'delete_meta', 'Meta field \"' . $key . '\" deleted', $args);\n }\n } elseif (isset($new_meta_value) && '' == $old_meta_value) { // If new add it.\n add_post_meta($post_id, $key, $new_meta_value, true);\n if ($post_type == 'clientele-client') {\n $clientele_events->do_event('change', 'add_meta', 'Meta field \"' . $key . '\" added', $args);\n }\n } elseif (isset($new_meta_value) && $new_meta_value != $old_meta_value) { // If changed update it\n update_post_meta($post_id, $key, $new_meta_value);\n if ($post_type == 'clientele-client') {\n $clientele_events->do_event('change', 'update_meta', 'Meta field \"' . $key . '\" updated', $args);\n }\n }\n }", "function acf_upgrade_550_termmeta()\n{\n}", "function bdpp_edit_taxonomy_field($term){\n\t\tinclude_once( BDPP_DIR . '/includes/admin/taxonomy/edit-form.php' );\n\t}", "public function update( $field, $value ) {\n\t\tif ( isset($this->ID) ) {\n\t\t\tupdate_post_meta($this->ID, $field, $value);\n\t\t\t$this->$field = $value;\n\t\t}\n\t}", "function softsdev_mc_product_cat_edit_meta_field($term) {\n $softsdev_wc_mc_setting = get_softsdev_wc_mc_setting();\n if (!@$softsdev_wc_mc_setting['api'])\n return '';\n $groups = softsdev_get_mc_groups();\n // put the term ID into a variable\n $t_id = $term->term_id;\n // retrieve the existing value(s) for this meta field. This returns an array\n $softsdev_mc_terms_groups = get_option('softsdev_mc_term_group');\n ?>\n <tr class=\"form-field\">\n <th scope=\"row\" valign=\"top\"><label for=\"softsdev_mc_group\"><?php _e('Mailchimp Group', 'softsdev'); ?></label></th>\n <td>\n <?php\n echo @woocommerce_wp_select(\n array(\n 'value' => @$softsdev_mc_terms_groups['term' . $softsdev_wc_mc_setting['list_mgroup_id'] . '_' . $t_id],\n 'id' => 'softsdev_mc_group',\n 'options' => array('' => 'Select Group') + softsdev_mc_list_data($groups, 'name', 'name')\n )\n );\n ?>\n <p class=\"description\"><?php _e('Select mailchimp group.', 'softsdev'); ?></p>\n </td>\n </tr>\n <?php\n }", "function carton_update_order_item_meta( $item_id, $meta_key, $meta_value, $prev_value = '' ) {\n\treturn update_metadata( 'order_item', $item_id, $meta_key, $meta_value, $prev_value );\n}", "public function lazyload_term_meta($check, $term_id)\n {\n }", "function listing_category_edit_meta_field($term) {\n\t$t_id = $term->term_id;\n\t\n\t$map_countries = array(\n\t\t'Australia',\n\t\t'Brazil',\n\t\t'China',\n\t\t'Cyprus',\n\t\t'France',\n\t\t'India',\n\t\t'Indonesia',\n\t\t'Lithuania',\n\t\t'Malaysia',\n\t\t'New Zealand',\n\t\t'Panama',\n\t\t'Philippines',\n\t\t'Singapore',\n\t\t'Spain',\n\t\t'Thailand',\n\t\t'Turkey',\n\t\t'United Kingdom',\n\t\t'United States'\n\t);\n\t$map_zoom_levels = array(3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18);\n\t\n\t// retrieve the existing value(s) for this meta field. This returns an array\n\t$listing_cat_meta = get_option( \"taxonomy_listing_category_$t_id\" ); ?>\n\t<tr class=\"form-field\">\n\t\t<th scope=\"row\" valign=\"top\"><label for=\"listing_cat_meta[def_map_country]\"><?php _e( 'Manage Map Setting', 'listing_category' ); ?></label></th>\n\t\t<td>\n\t\t\t<div class=\"map_setting_wrap\">\n\t\t\t\t<select name=\"listing_cat_meta[def_map_country]\" id=\"listing_cat_meta[def_map_country]\" class=\"sel_map_country map_setting_input_bdr\">\n\t\t\t\t<option value=\"\">Select Country For Google Map Setting</option>\n\t\t\t\t<?php if(isset($listing_cat_meta['def_map_country']) && $listing_cat_meta['def_map_country'] != ''):?>\n\t\t\t\t\t<?php foreach($map_countries as $map_country):?>\n\t\t\t\t\t\t<?php if($listing_cat_meta['def_map_country'] == $map_country):?>\n\t\t\t\t\t\t<option value=\"<?php echo $map_country;?>\" selected=\"selected\"><?php echo $map_country;?></option>\n\t\t\t\t\t\t<?php else:?>\n\t\t\t\t\t\t<option value=\"<?php echo $map_country;?>\"><?php echo $map_country;?></option>\n\t\t\t\t\t\t<?php endif;?>\n\t\t\t\t\t<?php endforeach;?>\n\t\t\t\t<?php else:?>\n\t\t\t\t\t<?php foreach($map_countries as $map_country):?>\n\t\t\t\t\t\t<option value=\"<?php echo $map_country;?>\"><?php echo $map_country;?></option>\n\t\t\t\t\t<?php endforeach;?>\n\t\t\t\t<?php endif;?>\n\t\t\t\t</select>\n\t\t\t\t<span class=\"map_setting_divider\">\n\t\t\t\t\t<b>OR</b>\n\t\t\t\t</span>\n\t\t\t\t<div class=\"lat_long_wrap\">\n\t\t\t\t\t<label for=\"listing_cat_meta[latitude]\">Latitude</label>\n\t\t\t\t\t<input type=\"text\" name=\"listing_cat_meta[latitude]\" id=\"listing_cat_meta[latitude]\" class=\"map_setting_input_bdr\" value=\"<?php echo ($listing_cat_meta['latitude'] != '' ? $listing_cat_meta['latitude'] : '');?>\">\n\t\t\t\t\t<label for=\"listing_cat_meta[longitude]\">Longitude</label>\n\t\t\t\t\t<input type=\"text\" name=\"listing_cat_meta[longitude]\" id=\"listing_cat_meta[longitude]\" class=\"map_setting_input_bdr\" value=\"<?php echo ($listing_cat_meta['longitude'] != '' ? $listing_cat_meta['longitude'] : '');?>\">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</td>\n\t</tr>\n\t\n\t<tr class=\"form-field\">\n\t\t<th scope=\"row\" valign=\"top\"><label for=\"listing_cat_meta[zoom_level]\"><?php _e( 'Select Zoom Level For Map Setting', 'listing_category' ); ?></label></th>\n\t\t<td>\n\t\t\t<select name=\"listing_cat_meta[zoom_level]\" id=\"listing_cat_meta[zoom_level]\" class=\"sel_zoom_level\">\n\t\t\t<?php if(isset($listing_cat_meta['zoom_level']) && $listing_cat_meta['zoom_level'] != ''):?>\n\t\t\t\t<?php foreach($map_zoom_levels as $zoom_level):?>\n\t\t\t\t\t<?php if($listing_cat_meta['zoom_level'] == $zoom_level):?>\n\t\t\t\t\t<option value=\"<?php echo $zoom_level;?>\" selected=\"selected\"><?php echo $zoom_level;?></option>\n\t\t\t\t\t<?php else:?>\n\t\t\t\t\t<option value=\"<?php echo $zoom_level;?>\"><?php echo $zoom_level;?></option>\n\t\t\t\t\t<?php endif;?>\n\t\t\t\t<?php endforeach;?>\n\t\t\t<?php else:?>\n\t\t\t\t<?php foreach($map_zoom_levels as $zoom_level):?>\n\t\t\t\t\t<?php if($zoom_level == '11'):?>\n\t\t\t\t\t<option value=\"<?php echo $zoom_level;?>\" selected=\"selected\"><?php echo $zoom_level;?></option>\n\t\t\t\t\t<?php else:?>\n\t\t\t\t\t<option value=\"<?php echo $zoom_level;?>\"><?php echo $zoom_level;?></option>\n\t\t\t\t\t<?php endif;?>\n\t\t\t\t<?php endforeach;?>\n\t\t\t<?php endif;?>\n\t\t\t</select>\n\t\t</td>\n\t</tr>\n\t\n<?php }", "function am2_vanity_add_taxonomy_fields( $term ) { //check for existing featured ID\n $t_id = $term->term_id;\n $vanity_urls = get_option('am2_vanity_urls');\n\t$value = '';\n\tif(!empty($vanity_urls[$_REQUEST['taxonomy'].\"_\".$term->term_id]['url'])){\n\t\t$value = $vanity_urls[$_REQUEST['taxonomy'].\"_\".$term->term_id]['url'];\n\t}\n?>\n<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"_am2_vanity_url\"><?php _e('Vanity URL'); ?></label></th>\n\t<td>\n \t<?php echo site_url().'/'; ?>\n\t\t<input type=\"hidden\" name=\"_am2_vanity_term_name\" value=\"<?php echo $_REQUEST['taxonomy']; ?>\" />\n <input type=\"text\" name=\"_am2_vanity_url\" id=\"_am2_vanity_url\" placeholder=\"any-url\" size=\"3\" style=\"width:60%;\" value=\"<?php echo $value; ?>\"><br />\n <span class=\"description\"><?php _e('This URL will replace the dafault category URL with new one.'); ?></span>\n </td>\n</tr>\n<?php\n}", "public function do_save( $term_id ) {\n\t\tif ( ! class_exists( 'cmb_Meta_Box' ) )\n\t\t\treturn;\n\n\t\tif (\n\t\t\t// check nonce\n\t\t\t! isset( $_POST['term_opt_name'], $_POST['wp_meta_box_nonce'], $_POST['action'] )\n\t\t\t|| ! wp_verify_nonce( $_POST['wp_meta_box_nonce'], cmb_Meta_Box::nonce() )\n\t\t)\n\t\t\treturn;\n\n\t\t$this->do_override_filters( $term_id );\n\t\t// Save the metabox if it's been submitted\n\t\tcmb_save_metabox_fields( $this->fields(), $this->id() );\n\t}", "function get_term_meta( $term_id, $key, $single = false ) {\r\n\r\n if ( current_theme_supports( 'extended-taxonomies' ) ) {\r\n return get_post_meta( get_post_for_extended_term( $term_id )->ID, $key, $single );\r\n }\r\n\r\n return get_metadata( 'taxonomy', $term_id, $key, $single );\r\n }", "function update_term_cache($terms, $taxonomy = '')\n {\n }", "public function update_meta( $post_id, $meta_value, $meta_key ) {\n // To create new meta\n if ( ! get_post_meta( $post_id, $meta_key ) ) {\n add_post_meta( $post_id, $meta_key, $meta_value );\n } else {\n // or to update existing meta\n update_post_meta( $post_id, $meta_key, $meta_value );\n }\n }", "function update_user_meta($user_id, $meta_key, $meta_value, $prev_value = '')\n {\n }", "public function update(UpdateTerm $request, Term $term)\n {\n $this->authorize('update', $term);\n foreach ($term->fillable as $key => $value) {\n if($request->has($value)){\n $term->$value = $request->input($value);\n }\n if($request->hasFile($value)){\n $file = $request->file($value);\n $file_name = time().'.'.$file->extension();\n $file->move(public_path('upload'),$file_name);\n $term->$value = $file_name;\n }\n }\n //json orther\n $input = $request->except(array_merge(['_token','_method'],$term->fillable));\n $orther = [];\n foreach ($input as $key => $value) {\n if($request->has($key)){\n $orther[$key] = $request->input($key);\n }\n if($request->hasFile($key)){\n $file = $request->file($key);\n $file_name = time().'.'.$file->extension();\n $file->move(public_path('upload'),$file_name);\n $orther[$key] = $file_name;\n }\n }\n $term->orther = json_encode($orther);\n // alias\n $term->alias = str_slug($term->name,'-');\n // save\n $term->save();\n // notifi\n Session::flash('success','Sửa thành công :v');\n return redirect('terms/'.$term->id.'/edit');\n }", "function get_term_meta( $term_id, $key = '', $single = false ) {\n\treturn get_metadata( 'taxonomy', $term_id, $key, $single );\n}", "function ajan_update_user_meta( $user_id, $key, $value, $prev_value = '' ) {\n\treturn update_user_meta( $user_id, ajan_get_user_meta_key( $key ), $value, $prev_value );\n}", "public function term_metabox( $term ) {\n\t\t$tab = new WPSEO_Help_Center_Template_Variables_Tab();\n\t\t$tab->register_hooks();\n\n\t\t$metabox = new WPSEO_Taxonomy_Metabox( $this->taxonomy, $term );\n\t\t$metabox->display();\n\t}", "function glbs_save_extra_tax_fileds( $term_id ) {\n\tif ( ! isset( $_POST['glbs_nonce_tax'] ) || ! wp_verify_nonce( $_POST['glbs_nonce_tax'], '_glbs_nonce_tax' ) ) {\n\t\treturn;\n\t}\n\t\n\tif ( isset( $_POST['basic_seo_title'] ) ) {\n\t\tupdate_term_meta( $term_id, 'basic_seo_title', esc_attr( $_POST['basic_seo_title'] ) );\n\t}\n\tif ( isset( $_POST['basic_seo_keywords'] ) ) {\n\t\tupdate_term_meta( $term_id, 'basic_seo_keywords', esc_attr( $_POST['basic_seo_keywords'] ) );\n\t}\n\tif ( isset( $_POST['basic_seo_description'] ) ) {\n\t\tupdate_term_meta( $term_id, 'basic_seo_description', esc_attr( $_POST['basic_seo_description'] ) );\n\t}\n}", "function save_extra_category_fileds( $term_id ) {\n\tif ( isset( $_POST['term_meta'] ) ) {\n\t\t$tag_id\t\t= $term_id;\n\t\t$term_meta\t= get_option( \"category_$tag_id\" );\n\t\t$cat_keys\t= array_keys( $_POST['term_meta'] );\n\t\tforeach ( $cat_keys as $key ) {\n\t\t\tif ( isset( $_POST['term_meta'][$key] ) ) {\n\t\t\t\t$term_meta[$key] = $_POST['term_meta'][$key];\n\t\t\t}\n\t\t}\n\t\t//save the option array\n\t\tupdate_option( \"category_$tag_id\", $term_meta );\n\t}\n}", "function setTermStatus($term){\n $termClass = new DatabaseTable('terms');\n $termNew = [\n 'tid'=>$term['tid'],\n 'tmid'=>$term['tmid'],\n 'tname'=>$term['tname'],\n 'tsdate'=>$term['tsdate'],\n 'tedate'=>$term['tedate'],\n 'tstatus'=>checkDateStatus($term['tsdate'], $term['tedate'])\n ];\n $termClass->update($termNew, 'tid');\n $term = $termClass->find('tid', $term['tid']);\n $term = $term->fetch();\n return $term;\n }", "public static function filter__update_post_meta( $check, $object_id, $meta_key, $meta_value, $prev_value ) {\n\t\t\t\n\t\t\tif ( $meta_key != self::$_wpseo_canonical_meta_key ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\t$_value = $meta_value;\n\t\t\t\n\t\t\tif ( empty( $_value ) ) {\n\t\t\t\t\n\t\t\t\tif ( empty( $_POST[ self::$_wpseo_canonical_input_id ] ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$_value = $_POST[ self::$_wpseo_canonical_input_id ];\n\t\t\t\t\n\t\t\t}\n\n\t\t\tif ( ! WPGlobus_Core::has_translations( $_value ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\tglobal $wpdb;\n\t\t\t\n\t\t\t$result = false;\n\t\t\t$_meta_id = null;\n\t\t\t\n\t\t\t$_meta_id = $wpdb->get_var(\n\t\t\t\t$wpdb->prepare(\n\t\t\t\t\t\"SELECT meta_id FROM $wpdb->postmeta WHERE meta_key = %s AND post_id = %d LIMIT 1;\",\n\t\t\t\t\t$meta_key, $object_id\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t$query = false;\n\t\t\t\n\t\t\tif ( is_null($_meta_id)) {\n\t\t\t\n\t\t\t\tif ( ! empty($_value) ) {\n\t\t\t\t\t\n\t\t\t\t\t$query = $wpdb->prepare( \n\t\t\t\t\t\t\"\n\t\t\t\t\t\t\tINSERT INTO $wpdb->postmeta\n\t\t\t\t\t\t\t( post_id, meta_key, meta_value )\n\t\t\t\t\t\t\tVALUES ( %d, %s, %s )\n\t\t\t\t\t\t\", \n\t\t\t\t\t\t$object_id, \n\t\t\t\t\t\t$meta_key, \n\t\t\t\t\t\t$_value \n\t\t\t\t\t);\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\n\t\t\t\tif ( ! empty($_value) ) {\n\t\t\t\t\t\n\t\t\t\t\t$query = $wpdb->prepare( \n\t\t\t\t\t\t\"\n\t\t\t\t\t\t\tUPDATE $wpdb->postmeta \n\t\t\t\t\t\t\tSET meta_value = %s\n\t\t\t\t\t\t\tWHERE meta_id = %d\n\t\t\t\t\t\t\",\n\t\t\t\t\t\t$_value, $_meta_id\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif ( ! $query ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\t$result = $wpdb->query( $query );\n\t\t\t\n\t\t\tif ( $result ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t\t\n\t\t}", "public function update(TermRequest $request, $id)\n {\n Term::where('id',$id)->update($request->only('no_of_months'));\n return response()->json(['message'=>'Saved'],200);\n }", "public function updateMeta(string $meta_key, $meta_value, $prev_value = ''): self\n {\n update_post_meta($this->id, $meta_key, $meta_value, $prev_value);\n\n return $this;\n }", "function update_comment_meta($comment_id, $meta_key, $meta_value, $prev_value = '')\n {\n }", "public function set_primary_term( $new_primary_term ) {\n\t\tupdate_post_meta( $this->post_ID, WPSEO_Meta::$meta_prefix . 'primary_' . $this->taxonomy_name, $new_primary_term );\n\t}", "public function save_term_image( $term_id, $tt_id ){\n\t\t\tif( isset( $_POST['term_image_id'] ) && '' !== $_POST['term_image_id'] ){\n\t\t\t\t$image = $_POST['term_image_id'];\n\t\t\t\tadd_term_meta( $term_id, 'term_image_id', $image, true );\n\t\t\t}\n\t\t}", "public function get_term_custom_fields($term_id)\n {\n }", "public function retrieveCustomField( $term_id, $field = '' ) \n\t{\n\t\t$term_meta = get_option( sprintf( '%s_%d', $this->taxomomyStr, $term_id ) );\n\n\t\treturn ( is_array( $term_meta ) && isset( $term_meta[$field] ) ) ? $term_meta[$field] : '';\n\t}", "function add_related_term_select( int $post_id, string $key, string $label, string $taxonomy, string $field = 'slug' ): void {\n\t$val = get_post_meta( $post_id, $key, true );\n\t$terms = get_the_terms( $post_id, $taxonomy );\n\toutput_term_select_row( $label, $key, $terms, $val, $field );\n}" ]
[ "0.8276113", "0.8161409", "0.813169", "0.8048638", "0.73687947", "0.7023288", "0.6536044", "0.65350175", "0.6453492", "0.64461505", "0.64024687", "0.63926846", "0.6338034", "0.62576437", "0.62459403", "0.6175759", "0.6173477", "0.602359", "0.5984961", "0.5960638", "0.5889396", "0.5875106", "0.5822855", "0.5810634", "0.5790342", "0.5789254", "0.57202405", "0.5698623", "0.568578", "0.56800544", "0.56699246", "0.56652355", "0.5659174", "0.5657574", "0.56463283", "0.56112033", "0.55938494", "0.559172", "0.55795294", "0.5546437", "0.5544023", "0.55435234", "0.554193", "0.554123", "0.5540796", "0.5531983", "0.5527036", "0.5519018", "0.55085146", "0.550801", "0.5507693", "0.54868287", "0.54858685", "0.5484861", "0.5452898", "0.5452894", "0.5451946", "0.54467237", "0.54298985", "0.5421865", "0.5421865", "0.5396387", "0.5390328", "0.5361771", "0.53536034", "0.53253925", "0.5325098", "0.5317428", "0.5307386", "0.5304809", "0.5304517", "0.5289897", "0.52790874", "0.52729166", "0.5272214", "0.52707905", "0.52471066", "0.524665", "0.5240676", "0.52375245", "0.5220987", "0.52189595", "0.52148557", "0.5204413", "0.51868415", "0.518315", "0.5182398", "0.51804835", "0.51784337", "0.5170174", "0.51667386", "0.5160548", "0.5157868", "0.5126587", "0.51031524", "0.50817037", "0.5077172", "0.50756365", "0.50703335", "0.5066829" ]
0.80472076
4
Delete everything from term meta matching meta key.
function delete_term_meta_by_key($term_meta_key, $taxonomy) { return delete_metadata( 'post', null, $term_meta_key, '', true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete_term_meta($term_id, $meta_key, $meta_value = '')\n {\n }", "function delete_carton_term_meta( $term_id, $meta_key, $meta_value = '', $delete_all = false ) {\n\treturn delete_metadata( 'carton_term', $term_id, $meta_key, $meta_value, $delete_all );\n}", "public function delete_meta( $key, $value = '', $delete_all = false );", "function delete_term_meta( $term_id, $meta_key, $meta_value = '' ) {\n\treturn delete_metadata( 'taxonomy', $term_id, $meta_key, $meta_value );\n}", "function delete_post_meta($term_id, $taxonomy, $meta_key, $meta_value = '') {\n\n return delete_metadata('post', $post_id, $meta_key, $meta_value);\n}", "function delete_post_meta_by_key($post_meta_key)\n {\n }", "function delete_site_meta_by_key($meta_key)\n {\n }", "function delete_term_meta( $term_id, $meta_key, $meta_value = '' ) {\r\n\r\n if ( current_theme_supports( 'extended-taxonomies' ) ) {\r\n return delete_post_meta( get_post_for_extended_term( $term_id )->ID, $meta_key, $meta_value );\r\n }\r\n\r\n return delete_metadata( 'taxonomy', $term_id, $meta_key, $meta_value );\r\n }", "function unregister_term_meta($taxonomy, $meta_key)\n {\n }", "function delete_term_taxo_by_key_and_value( $key = '', $value = '' ) {\n\tglobal $wpdb;\n\n\t// expected_slashed ($key, $value)\n\t$key = stripslashes( $key );\n\t$value = stripslashes( $value );\n\n\t// Meta exist ?\n\tif ( empty( $value ) ) {\n\t\t$term_taxonomy_ids = $wpdb->get_col( $wpdb->prepare( \"SELECT DISTINCT term_id FROM $wpdb->termmeta WHERE meta_key = %s\", $key ) );\n\t} else {\n\t\t$term_taxonomy_ids = $wpdb->get_col( $wpdb->prepare( \"SELECT DISTINCT term_id FROM $wpdb->termmeta WHERE meta_key = %s AND meta_value = %s\", $key, $value ) );\n\t}\n\n\tif ( $term_taxonomy_ids ) {\n\t\t// Get term id to delete\n\t\tif ( empty( $value ) ) {\n\t\t\t$meta_ids = $wpdb->get_col( $wpdb->prepare( \"SELECT DISTINCT meta_id FROM $wpdb->termmeta WHERE meta_key = %s\", $key ) );\n\t\t} else {\n\t\t\t$meta_ids = $wpdb->get_col( $wpdb->prepare( \"SELECT DISTINCT meta_id FROM $wpdb->termmeta WHERE meta_key = %s AND meta_value = %s\", $key, $value ) );\n\t\t}\n\n\t\t$in = implode( ',', array_fill( 1, count( $meta_ids ), '%d' ) );\n\n\t\tdo_action( 'delete_termmeta', $meta_ids );\n\t\t$wpdb->query( $wpdb->prepare( \"DELETE FROM $wpdb->termmeta WHERE meta_id IN ($in)\", $meta_ids ) );\n\t\tdo_action( 'deleted_termmeta', $meta_ids );\n\n\t\t// Delete cache\n\t\tforeach ( $term_taxonomy_ids as $term_taxonomy_id ) {\n\t\t\twp_cache_delete( $term_taxonomy_id, 'term_meta' );\n\t\t}\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "function delete_post_term_meta( int $post_id, int $term_id, string $meta_key, $meta_value = '' ): bool {\n\t\treturn \\wpinc\\meta\\post_term_meta\\delete_post_term_meta( $post_id, $term_id, $meta_key, $meta_value );\n\t}", "public function clearMetas(): void\n {\n $this->metas()->delete();\n }", "function delete_meta($mid)\n {\n }", "protected function deleteMeta() {\n Meta::deleteAll([\n 'owner' => $this->tableName(),\n 'owner_id' => $this->{static::meta_id_field()}\n ]);\n }", "function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $delete_all = \\false)\n {\n }", "public static function delete_meta( $object_id, $meta_key, $meta_value = '' ) {\n\n\t\tdelete_term_meta( $object_id, $meta_key, $meta_value );\n\t}", "function delete_post_meta($post_id, $meta_key, $meta_value = '')\n {\n }", "function delete_site_meta($site_id, $meta_key, $meta_value = '')\n {\n }", "public function removeMeta(string $key)\n {\n if (isset($this->meta[$key])) {\n unset($this->meta[$key]);\n }\n }", "function delete_book_meta( $id, $key, $value = '' ) {\r\n\treturn delete_post_meta($id, $key, $value);\r\n}", "public function forgetMeta(string $key): void\n {\n $this->metas()->where('key', $key)->delete();\n }", "public function uninstall()\n {\n //$this->getDb()->createCommand()->dropTable($this->getTable())->execute();\n //delete the term itself\n $model = TaxonomyDef::findOne($this->id);\n $model->delete();\n }", "public function deletePostMeta() {\n delete_post_meta($this->id, $this->_post_meta_name);\n }", "protected function deleteMeta()\n {\n $sql = sprintf(\n 'DELETE FROM %sfaqattachment WHERE id = %d',\n PMF_Db::getTablePrefix(),\n $this->id\n );\n\n $this->db->query($sql);\n }", "public function delete_meta( &$object, $meta ) {\n\t\t}", "public function deleteMetaFields($termId)\n\t{\n\t\t$interval = 'slideshow-' . $termId . '-interval';\n\t\t$animation = 'slideshow-' . $termId . '-animation';\n\n\t\tdelete_option($interval);\n\t\tdelete_option($animation);\n\t}", "public function delete_meta( $term_id, $taxonomy_term_id, $taxonomy ) {\n\t\ttry {\n\t\t\t$indexable = $this->get_indexable( $term_id, $taxonomy, false );\n\t\t\t$indexable->delete_meta();\n\t\t\t$indexable->delete();\n\t\t} catch ( No_Indexable_Found $exception ) {\n\t\t\treturn;\n\t\t}\n\t}", "public function delMetadata() {}", "public function delMetadata() {}", "public function delMetadata() {}", "function clear_unknown_post_metas()\n {\n global $wpdb;\n\n $query = \"SELECT count(*) FROM {$wpdb->postmeta} WHERE ( meta_key LIKE 'prli%' OR meta_key LIKE 'pretty-link%' OR meta_key LIKE '_prli%' OR meta_key LIKE '_pretty-link%' ) AND post_id=0\";\n $count = $wpdb->get_var($query);\n\n if($count)\n {\n $query = \"DELETE FROM {$wpdb->postmeta} WHERE ( meta_key LIKE 'prli%' OR meta_key LIKE 'pretty-link%' OR meta_key LIKE '_prli%' OR meta_key LIKE '_pretty-link%' ) AND post_id=0\";\n $wpdb->query($query);\n }\n }", "function drush_behat_op_delete_term(\\stdClass $term) {\n $term = $term instanceof TermInterface ? $term : Term::load($term->tid);\n if ($term instanceof TermInterface) {\n $term->delete();\n }\n}", "function delete_metadata_by_mid($meta_type, $meta_id)\n {\n }", "function unregister_post_meta($post_type, $meta_key)\n {\n }", "function unregister_meta_key($object_type, $meta_key, $object_subtype = '')\n {\n }", "function delete_term_taxo_by_term_taxonomy_id( $term_taxonomy_id = 0 ) {\n\tglobal $wpdb;\n\tif ( $wpdb->query( $wpdb->prepare( \"DELETE FROM $wpdb->termmeta WHERE term_id = %s\", (int) $term_taxonomy_id ) ) ) {\n\t\twp_cache_delete( $term_taxonomy_id, 'term_meta' );\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "function wck_remove_meta(){\r\n\t\tcheck_ajax_referer( \"wck-delete-entry\" );\r\n\t\tif( !empty( $_POST['meta'] ) )\r\n\t\t\t$meta = sanitize_text_field( $_POST['meta'] );\r\n\t\telse \r\n\t\t\t$meta = '';\r\n\t\tif( !empty( $_POST['id'] ) )\r\n\t\t\t$id = absint( $_POST['id'] );\r\n\t\telse \r\n\t\t\t$id = '';\r\n\t\tif( isset( $_POST['element_id'] ) )\r\n\t\t\t$element_id = absint( $_POST['element_id'] );\r\n\t\telse \r\n\t\t\t$element_id = '';\r\n\r\n\t\t// Security checks\r\n\t\tif( true !== ( $error = self::wck_verify_user_capabilities( $this->args['context'], $meta, $id ) ) ) {\r\n\t\t\theader( 'Content-type: application/json' );\r\n\t\t\tdie( json_encode( $error ) );\r\n\t\t}\r\n\t\t\r\n\t\tif( $this->args['context'] == 'post_meta' )\r\n\t\t\t$results = get_post_meta($id, $meta, true);\r\n\t\telse if ( $this->args['context'] == 'option' )\r\n\t\t\t$results = get_option( apply_filters( 'wck_option_meta' , $meta, $element_id ) );\r\n\t\t\r\n\t\t$old_results = $results;\r\n\t\tunset($results[$element_id]);\r\n\t\t/* reset the keys for the array */\r\n\t\t$results = array_values($results);\r\n\r\n\t\t/* make sure this does not output anything so it won't break the json response below\r\n\t\twill keep it do_action for compatibility reasons\r\n\t\t */\r\n\t\tob_start();\r\n\t\t\tdo_action( 'wck_before_remove_meta', $meta, $id, $element_id );\r\n\t\t$wck_before_remove_meta = ob_get_clean(); //don't output it\r\n\t\t\r\n\t\tif( $this->args['context'] == 'post_meta' )\r\n\t\t\tupdate_post_meta($id, $meta, $results);\r\n\t\telse if ( $this->args['context'] == 'option' )\r\n\t\t\tupdate_option( apply_filters( 'wck_option_meta' , $meta, $results, $element_id ), wp_unslash( $results ) );\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t/* TODO: optimize so that it updates from the deleted element forward */\r\n\t\t/* if unserialize_fields is true delete the coresponding post metas */\r\n\t\tif( $this->args['unserialize_fields'] && $this->args['context'] == 'post_meta' ){\t\t\t\r\n\t\t\t\r\n\t\t\t$meta_suffix = 1;\t\t\t\r\n\r\n\t\t\tif( !empty( $results ) ){\r\n\t\t\t\tforeach( $results as $result ){\r\n\t\t\t\t\tforeach ( $result as $name => $value){\r\n\t\t\t\t\t\tupdate_post_meta($id, $meta.'_'.$name.'_'.$meta_suffix, $value);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$meta_suffix++;\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif( count( $results ) == 0 )\r\n\t\t\t\t$results = $old_results;\r\n\t\t\t\r\n\t\t\tif( !empty( $results ) ){\r\n\t\t\t\tforeach( $results as $result ){\t\t\t\t\r\n\t\t\t\t\tforeach ( $result as $name => $value){\r\n\t\t\t\t\t\tdelete_post_meta( $id, $meta.'_'.$name.'_'.$meta_suffix );\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$entry_list = $this->wck_refresh_list( $meta, $id );\r\n\t\t$add_form = $this->wck_add_form( $meta, $id );\r\n\r\n\t\theader( 'Content-type: application/json' );\r\n\t\tdie( json_encode( array( 'entry_list' => $entry_list, 'add_form' => $add_form ) ) );\r\n\t}", "public function deleteAll( $args = array() )\n\t{\n\t\t$terms = $this->retrieveAll( array( 'fields' => 'ids' ) );\n\n\t\tif( false !== $terms ) {\n\t\t\tforeach ( $terms as $termId ) {\n\t\t\t\twp_delete_term( $termId, $this->taxomomyStr, $args );\n\t\t\t}\n\t\t}\t\n\t}", "function tf_delete_post_meta($post_id, $meta_key, $meta_value = '') {\r\n // make sure meta is added to the post, not a revision\r\n if ( $the_post = wp_is_post_revision($post_id) )\r\n $post_id = $the_post;\r\n\r\n $meta_type = 'post';\r\n $object_id = $post_id;\r\n $delete_all = false;\r\n\r\n if ( !$meta_type || !$meta_key )\r\n return false;\r\n\r\n if ( (!$object_id = absint($object_id)) && !$delete_all )\r\n return false;\r\n\r\n if ( ! $table = _get_meta_table($meta_type) )\r\n return false;\r\n\r\n global $wpdb;\r\n\r\n $type_column = esc_sql($meta_type . '_id');\r\n $id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id';\r\n // expected_slashed ($meta_key)\r\n // $meta_key = stripslashes($meta_key); // this was the trouble !\r\n // $meta_value = stripslashes_deep($meta_value); // this was the trouble !\r\n\r\n $check = apply_filters( \"delete_{$meta_type}_metadata\", null, $object_id, $meta_key, $meta_value, $delete_all );\r\n if ( null !== $check )\r\n return (bool) $check;\r\n\r\n $_meta_value = $meta_value;\r\n $meta_value = maybe_serialize( $meta_value );\r\n\r\n $query = $wpdb->prepare( \"SELECT $id_column FROM $table WHERE meta_key = %s\", $meta_key );\r\n\r\n if ( !$delete_all )\r\n $query .= $wpdb->prepare(\" AND $type_column = %d\", $object_id );\r\n\r\n if ( $meta_value )\r\n $query .= $wpdb->prepare(\" AND meta_value = %s\", $meta_value );\r\n\r\n $meta_ids = $wpdb->get_col( $query );\r\n if ( !count( $meta_ids ) )\r\n return false;\r\n\r\n if ( $delete_all )\r\n $object_ids = $wpdb->get_col( $wpdb->prepare( \"SELECT $type_column FROM $table WHERE meta_key = %s\", $meta_key ) );\r\n\r\n do_action( \"delete_{$meta_type}_meta\", $meta_ids, $object_id, $meta_key, $_meta_value );\r\n\r\n // Old-style action.\r\n if ( 'post' == $meta_type )\r\n do_action( 'delete_postmeta', $meta_ids );\r\n\r\n $query = \"DELETE FROM $table WHERE $id_column IN( \" . implode( ',', $meta_ids ) . \" )\";\r\n\r\n $count = $wpdb->query($query);\r\n\r\n if ( !$count )\r\n return false;\r\n\r\n if ( $delete_all ) {\r\n foreach ( (array) $object_ids as $o_id ) {\r\n wp_cache_delete($o_id, $meta_type . '_meta');\r\n }\r\n } else {\r\n wp_cache_delete($object_id, $meta_type . '_meta');\r\n }\r\n\r\n do_action( \"deleted_{$meta_type}_meta\", $meta_ids, $object_id, $meta_key, $_meta_value );\r\n\r\n // Old-style action.\r\n if ( 'post' == $meta_type )\r\n do_action( 'deleted_postmeta', $meta_ids );\r\n\r\n return true;\r\n }", "public function deleteMeta($key, $value = null)\n {\n // dump($this->ID, $key, $value);\n return delete_user_meta($this->ID, $key, $value);\n }", "public function remove_meta( $key ) {\n\t\tunset( $this->data['meta'][ $key ] );\n\n\t\treturn $this;\n\t}", "function delete_student_meta( $student_id, $meta_key, $meta_value = '' ) {\n return delete_metadata( 'student', $student_id, $meta_key, $meta_value );\n }", "function wpbs_delete_booking_meta($booking_id, $meta_key, $meta_value = '', $delete_all = '')\n{\n\n return wp_booking_system()->db['bookingmeta']->delete($booking_id, $meta_key, $meta_value, $delete_all);\n\n}", "function delete_acf_content_on_delete_field($field) {\n // find all occurences of the field key in all tables and delete them\n // and the custom field associated with them\n global $wpdb;\n // remove any tables from this array that you don't want to check\n $tables = array('options', 'postmeta', 'termmeta', 'usermeta', 'commentmeta');\n foreach ($tables as $table) {\n $key_field = 'meta_key';\n $value_field = 'meta_value';\n if ($table == 'options') {\n $key_field = 'option_name';\n $value_field = 'option_value';\n }\n $table = $wpdb->{$table};\n // this query gets all key fields matching the acf key reference field\n $query = 'SELECT DISTINCT('.$key_field.')\n FROM '.$table.'\n WHERE '.$value_field.' = \"'.$field['key'].'\"';\n $results = $wpdb->get_col($query);\n if (!count($results)) {\n // no content found in this table\n continue;\n }\n // loop through keys and construct list of meta_key/option_names to delete\n $keys = array();\n foreach ($results as $key) {\n $keys[] = $key; // delete acf field key reference\n $keys[] = substr($key, 1); // delete acf field value\n }\n // do escping of all values.... just in case\n $keys = $wpdb->_escape($keys);\n // delete all of the content\n $query = 'DELETE FROM '.$table.'\n WHERE '.$key_field.' IN (\"'.implode('\",\"', $keys).'\")';\n $wpdb->query($query);\n } // end foreach table\n }", "public function __unset($key) {\n\t\tforeach (array('attributes', 'relationships') as $source) {\n\t\t\tunset($this->$source[$key]);\n\t\t}\n\t}", "function carton_delete_order_item_meta( $item_id, $meta_key, $meta_value = '', $delete_all = false ) {\n\treturn delete_metadata( 'order_item', $item_id, $meta_key, $meta_value, $delete_all );\n}", "function kulam_acf_delete_custom_taxonomy_terms( $taxonomy ) {\n\n\t// get taxonomy terms\n\t$terms = get_terms(array(\n\t\t'taxonomy'\t\t=> $taxonomy,\n\t\t'hide_empty'\t=> false,\n\t));\n\n\tif ( ! $terms ) {\n\t\treturn;\n\t}\n\n\tforeach ( $terms as $term ) {\n\n\t\twp_delete_term( $term->term_id, $taxonomy );\n\n\t}\n\n}", "private function delete_post_meta( $post_id, $meta_key ) {\n\t\t\n\t\tif ( '' !== get_post_meta( $post_id, $meta_key, true ) ) {\n\t\t\tdelete_post_meta( $post_id, $meta_key );\n\t\t}\n\t\t\n\t}", "private function removeOldResults($key){\n\t\tSearch::where('key', '=', $key)->delete();\n\t}", "private function sl_delete_metadata_by_mid($meta_id){\n\n\t\tif (!$result_delete = delete_metadata_by_mid( 'post', $meta_id )){\n\n \t\tsl_debbug('## Error. Deleting item with meta_id '.$meta_id, 'mediameta');\n\t\t\t\n\t\t}\n\n\t}", "public function deletemeta($meta) {\n\t\tif ($this->req ['auth_type'] == 'oauth') {\n\t\t\tif (( int ) $meta == 0) {\n\t\t\t\t$oRow = $this->oMetas->getById ( $meta );\n\t\t\t\tif (is_array ( $oRow )) {\n\t\t\t\t\t$meta = ( int ) $oRow ['idmeta'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (( int ) $meta > 0) {\n\t\t\t\t\n\t\t\t\t$oTableCompMetas = new Application_Model_Table ();\n\t\t\t\t$oTableCompMetas->setTable ( 'comp_metas' );\n\t\t\t\t$oTableCompMetas->setPrimary ( 'idcomp_meta' );\n\t\t\t\t$oSelect = $oTableCompMetas->fetchAll ( $oTableCompMetas->select ()->from ( $oTableCompMetas->getTable () )->where ( 'metas_idmeta=' . ( int ) $meta ) );\n\t\t\t\tif (isset ( $_GET ['force'] ) && $_GET ['force'] == 'yes') {\n\t\t\t\t\tif ($this->isExtendable ()) {\n\t\t\t\t\t\tif ($this->oMetas->deleteMeta ( $meta )) {\n\t\t\t\t\t\t\t$iGiveBudgetBack = $this->usr;\n\t\t\t\t\t\t\tif (isset ( $oRowToDelete->accounts_idaccount ) && ( int ) $oRowToDelete->accounts_idaccount > 0) {\n\t\t\t\t\t\t\t\t$iIdCreator = ( int ) $oRowToDelete->accounts_idaccount;\n\t\t\t\t\t\t\t\t$iGiveBudgetBack = ($iIdCreator > 0) ? $iIdCreator : $iGiveBudgetBack;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->setUsage ( $iGiveBudgetBack, array ('maxmetas' => - 1 ) );\n\t\t\t\t\t\t\t$this->addEntry ( 'response', array ('meta' => $meta, 'message' => 'META_WAS_DELETED', 'comps_affected' => ( int ) $oSelect->count () ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'MISSING_EXTEND_RIGHT' ) );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ($this->isDeleteable ()) {\n\t\t\t\t\t\tif ($oSelect->count () == 0) {\n\t\t\t\t\t\t\t$oRowToDelete = $this->oMetas->fetchRow ( $this->oMetas->select ()->where ( $this->oMetas->getPrimary () . '=' . $meta ) );\n\t\t\t\t\t\t\tif ($this->oMetas->deleteMeta ( $meta )) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$iGiveBudgetBack = $this->usr;\n\t\t\t\t\t\t\t\tif (isset ( $oRowToDelete->accounts_idaccount ) && ( int ) $oRowToDelete->accounts_idaccount > 0) {\n\t\t\t\t\t\t\t\t\t$iIdCreator = ( int ) $oRowToDelete->accounts_idaccount;\n\t\t\t\t\t\t\t\t\t$iGiveBudgetBack = ($iIdCreator > 0) ? $iIdCreator : $iGiveBudgetBack;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->setUsage ( $iGiveBudgetBack, array ('maxmetas' => - 1 ) );\n\t\t\t\t\t\t\t\t$this->addEntry ( 'response', array ('meta' => $meta, 'message' => 'META_WAS_DELETED' ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'META_IN_TOUCH_WITH_COMPOSITE' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'MISSING_DELETE_RIGHT' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'META_NOT_FOUND' ) );\n\t\t\t}\n\t\t} else {\n\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'OAUTH_ACCESS_ONLY' ) );\n\t\t}\n\t\treturn $this->getResponse ();\n\t}", "private function delKey($key)\n {\n $this->model::where('key', $key)->get()->map(function($row){ $row->delete(); });\n }", "public function handleDelete($key)\n {\n $val = $this->page->meta[$key];\n $this->page->deleteMeta($key);\n\n $this->presenter->flashMessage(\"Postavka je izbrisana\");\n //$this->invalidateControl('editpage_metalist');\n\n $this->invalidateControl();\n if (!$this->presenter->isAjax()) {\n $this->redirect('this#toc-meta');\n }\n }", "function deleteCategoryMeta($cat_id) {\n\t\t$course_meta = new CourseMeta($cat_id);\n\t\t$course_meta->delete();\n\t}", "public function delete_all_fields() {\n\t\tglobal $wpdb;\n\n\t\t$meta_key = $this->get_meta_key();\n\n\t\t$postmeta_records = $wpdb->get_results(\n\t\t\t$wpdb->prepare(\n\t\t\t\t\"SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s\",\n\t\t\t\t$meta_key\n\t\t\t)\n\t\t);\n\n\t\t// Delete one by one because we (probably) want all the WP hooks to fire.\n\t\tforeach ( $postmeta_records as $postmeta ) {\n\t\t\tdelete_post_meta( $postmeta->post_id, $meta_key );\n\t\t}\n\n\t\treturn true;\n\t}", "public function deleteKeyword($page_id, $word) {\n return $this->query(\"DELETE FROM Keywords WHERE page_id='$page_id' AND word='$word'\");\n }", "final public function purge($key) {\n\t\tunset($this->original[$key]);\n\n\t\tunset($this->attributes[$key]);\n\t}", "public function deleteAll() {\n if (isset($this::$has)) {\n foreach ($this::$has as $key => $value) {\n if(isset($this->$key)) {\n foreach ($this->$key as $item) {\n $item->deleteAll();\n }\n }\n }\n }\n $this->delete();\n }", "public function removeMeta($key): int\n {\n $keys = (array) $key;\n\n /** @var HasMetadataInterface $this */\n return Meta::metable(self::class, $this->id)\n ->whereIn('key', $keys)\n ->delete();\n }", "public function del($key);", "public function delete_all_cached_data() {\n\t\tglobal $wpdb;\n\n\t\t$table = is_multisite() ? $wpdb->base_prefix . 'sitemeta' : $wpdb->base_prefix . 'options';\n\t\t$column = is_multisite() ? 'meta_key' : 'option_name';\n\t\t$delete_string = 'DELETE FROM ' . $table . ' WHERE ' . $column . ' LIKE %s LIMIT 1000';\n\n\t\t$wpdb->query( $wpdb->prepare( $delete_string, [ '%ghu-%' ] ) ); // phpcs:ignore\n\n\t\treturn true;\n\t}", "function delete_usermeta($user_id, $meta_key, $meta_value = '')\n {\n }", "abstract public function delete_cached( $key );", "public function delete()\n {\n $textvalues = $this->gettextvalues();\n $this->deleteValues($textvalues);\n \n $componentvalues = $this->getcomponentvalues();\n $this->deleteValues($componentvalues);\n \n $filevalues = $this->getfilevalues();\n $this->deleteValues($filevalues);\n \n $contributorvalues = $this->getcontributorvalues();\n $this->deleteValues($contributorvalues);\n \n parent::delete();\n }", "function unregister_custom_taxonomies () {\n\tglobal $wpdb;\n\n\t$sql = \"UPDATE $wpdb->term_taxonomy SET count = 1 WHERE count = 0\";\n\t$wpdb->query( $sql);\n\n\tunregister_custom_taxonomy ( 'sil_semantic_domains' );\n\tunregister_custom_taxonomy ( 'sil_parts_of_speech' );\n\tunregister_custom_taxonomy ( 'sil_writing_systems' );\n\tunregister_custom_taxonomy ( 'sil_webstrings' );\n\n\t//delete all relationships\n\t$del = \"DELETE FROM $wpdb->term_relationships WHERE term_taxonomy_id = 1 \";\n\t$wpdb->query( $del);\n}", "private function delete_all_transients() {\n\t\t$this->transients->delete( 'googlesitekit_verification_meta_tags' );\n\t}", "private static function purge_term( $term_id ) {\n\t\tpantheon_wp_clear_edge_keys( array( 'term-' . $term_id, 'rest-term-' . $term_id, 'post-term-' . $term_id ) );\n\t}", "public static function remove($key){\n if(self::exists($key)){\n unset(self::$answers[strtolower($key)]);\n }\n }", "public function __unset($key) {\n unset($this->_fields[$key]);\n unset($this->_fieldBoosts[$key]);\n }", "function test_delete_post_meta_by_key() {\n\t\t$this->assertIsInt( add_post_meta( $this->post_id, 'unique_delete_by_key', 'value', true ) );\n\t\t$this->assertIsInt( add_post_meta( $this->post_id_2, 'unique_delete_by_key', 'value', true ) );\n\n\t\t//Check they exist\n\t\t$this->assertSame( 'value', get_post_meta( $this->post_id, 'unique_delete_by_key', true ) );\n\t\t$this->assertSame( 'value', get_post_meta( $this->post_id_2, 'unique_delete_by_key', true ) );\n\n\t\t//Delete one of them\n\t\t$this->assertTrue( delete_post_meta_by_key( 'unique_delete_by_key' ) );\n\n\t\t//Check the other still exists\n\t\t$this->assertSame( '', get_post_meta( $this->post_id_2, 'unique_delete_by_key', true ) );\n\t\t$this->assertSame( '', get_post_meta( $this->post_id_2, 'unique_delete_by_key', true ) );\n\t}", "function rm($key) {\n }", "function delete_user_meta($user_id, $meta_key, $meta_value = '')\n {\n }", "function clean_out_dictionary_data () {\n\n\t$delete_taxonomies = $_POST['delete_taxonomies'];\n\n\t//deletes the xhtml file, if still there because import didn't get completed\n\t$import = new sil_pathway_xhtml_Import();\n\t$file = $import->get_latest_xhtmlfile();\n\tif(isset($file->ID))\n\t{\n\t\twp_delete_attachment( $file->ID );\n\t}\n\n\t// Remove all the old dictionary entries.\n\tremove_entries();\n\n\t// Uninstall the custom table(s) and taxonomies.\n\tif ($delete_taxonomies == 1)\n\t\tunregister_custom_taxonomies();\n\tuninstall_custom_tables();\n\n\t// Reinstall custom table(s) and taxonomies.\n\tcreate_search_tables();\n\tif ($delete_taxonomies == 1) {\n\t\tregister_semantic_domains_taxonomy();\n\t\tregister_part_of_speech_taxonomy();\n\t\tregister_language_taxonomy();\n\t}\n }", "public function delete($key): void;", "public function afterDelete() {\n $this->deleteMeta();\n parent::afterDelete();\n }", "function delete_value($post_id, $meta_key, $field)\n {\n }", "function delete_comment_meta($comment_id, $meta_key, $meta_value = '')\n {\n }", "public function unregister_meta_boxes()\n {\n }", "public function DeleteMetas( $query, $args ) {\n\t\t// Back up columns, use COUNT as default column and generate sql.\n\t\t$cols = $query->getColumns();\n\t\t$query->clearColumns();\n\t\t$query->addColumn( 'id' );\n\t\t$sql = $this->GetSql( $query );\n\t\t// Restore columns.\n\t\t$query->setColumns( $cols );\n\n\t\t$_wpdb = $this->connection;\n\t\t$occ_ids = array();\n\t\t$sql = ( ! empty( $args ) ? $_wpdb->prepare( $sql, $args ) : $sql);\n\t\tforeach ( $_wpdb->get_results( $sql, ARRAY_A ) as $data ) {\n\t\t\t$occ_ids[] = $data['id'];\n\t\t}\n\t\t$meta = new WSAL_Adapters_MySQL_Meta( $this->connection );\n\t\t$meta->DeleteByOccurrenceIds( $occ_ids );\n\t}", "public function drop_fulltext(Table $table, Magic $command)\n {\n return $this->drop_key($table, $command);\n }", "function delete() {\n\t\t$query = '\n\t\tDELETE FROM '.system::getConfig()->getDatabase('mofilm_content').'.terms\n\t\tWHERE\n\t\t\tID = :ID\t\n\t\tLIMIT 1';\n\n\t\ttry {\n\t\t\t$oStmt = dbManager::getInstance()->prepare($query);\n\t\t\t$oStmt->bindValue(':ID', $this->_ID);\n\t\t\t\t\n\t\t\tif ( $oStmt->execute() ) {\n\t\t\t\t$oStmt->closeCursor();\n\t\t\t\t$this->reset();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch ( Exception $e ) {\n\t\t\tsystemLog::error($e->getMessage());\n\t\t\tthrow $e;\n\t\t}\n\t\treturn false;\n\t}", "function wp_delete_object_term_relationships($object_id, $taxonomies)\n {\n }", "public static function deleteAll(): bool\n {\n return delete_post_meta_by_key(self::REDIRECT_META_KEY);\n }", "public function remove_packlink_meta_data() {\n\t\t$query = \"DELETE FROM `{$this->db->postmeta}` WHERE `meta_key` LIKE \\\"%_packlink_%\\\"\";\n\n\t\t$this->db->query( $query );\n\t}", "function clear()\n {\n $this->meta_name = \"\";\n $this->vocab = \"\";\n $this->text = \"\";\n $this->lang = \"\";\n $this->attrs = array();\n }", "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 deleted(MetaTag $metaTag)\n {\n // Removing Entries from the Cache\n $this->clearCache($metaTag);\n }", "public function delete($key);", "public function delete($key);", "public function delete($key);", "function netrics_clear_month_data( $query_ids = null ) {\n if ( ! isset( $query_ids->posts ) ) {\n $query_ids = netrics_get_pubs_ids( 2000 );\n }\n\n $log = '';\n foreach ( $query_ids->posts as $post_id ) {\n $del_articles = delete_post_meta( $post_id, 'nn_articles_new' );\n $del_errors = delete_post_meta( $post_id, 'nn_error' );\n $del_flag = wp_remove_object_terms( $post_id, array( 6178, 6179 ), 'flag' ); //'0Feed' and '1PageSpeed'.\n\n $log .= \"$post_id $del_articles/$del_errors/$del_flag\";\n }\n\n return $log;\n}", "function magazine_remove_entry_meta() {\n\tif ( ! is_single() ) {\n\t\tremove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );\n\t\tremove_action( 'genesis_entry_footer', 'genesis_post_meta' );\n\t\tremove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );\n\t}\n\n}", "public function removeMetaTag($name)\n\t{\n\t\tif($this->metaTags->offsetExists($name))\n\t\t\t$this->metaTags->offsetUnset($name);\n\n\t\tif($this->pageInitialized)\n\t\t{\n\t\t\t$meta = $this->document->xpath('.//meta[@name=\"' . $name . '\" or @http-equiv=\"' . $name . '\" or @property=\"' . $name . '\"]');\n\n\t\t\tif($meta->length == 1)\n\t\t\t\t$meta->item(0)->remove();\n\t\t}\n\t}", "public function delete( $key );", "public function query_remove($key) {\n\t\t\t\\uri\\query::remove($this->object, $key);\n\t\t}", "public function remove_taxonomy_metabox() {\n\n\t\tforeach ( $this->remove_mb as $key => $mb ) {\n\t\t\tremove_meta_box( $mb . 'div', 'ticket', 'side' );\n\t\t}\n\n\t}", "public function deleteAllForKey()\n\t{\n\t\t$keys = $this->getAllKeys();\n return parent::deleteMulti($keys);\n\t}", "public function deleteMetaData($args){\n\t\treturn $this->db->delete(\n\t\t\t$this->metaDataTable,\n\t\t\t\t[\n\t\t\t\t\t\"AND\" => [\n\t\t\t\t\t\t$this->metaDataQueryBy => $args\n\t\t\t\t\t] \n\t\t\t\t]\n\t\t\t);\n\t}", "function clean_taxonomy_cache($taxonomy)\n {\n }", "function acf_delete_metadata($post_id = 0, $name = '', $hidden = \\false)\n{\n}" ]
[ "0.78010523", "0.76035565", "0.73961407", "0.73939276", "0.7322915", "0.72382957", "0.7230125", "0.7057978", "0.70179665", "0.6931987", "0.67334014", "0.67172503", "0.66218704", "0.65565264", "0.6526685", "0.6493556", "0.6411842", "0.6361658", "0.633371", "0.63043064", "0.62868786", "0.624428", "0.6214989", "0.6162456", "0.61373264", "0.6118475", "0.6099854", "0.6070907", "0.6070907", "0.6070907", "0.605946", "0.60155493", "0.5991278", "0.5979553", "0.5967088", "0.59599847", "0.590757", "0.5905864", "0.59017295", "0.5892324", "0.5885371", "0.58560705", "0.5848111", "0.5826922", "0.57882106", "0.5785467", "0.57847214", "0.57822317", "0.5750629", "0.57488835", "0.57180494", "0.57111454", "0.5683865", "0.56808645", "0.56745887", "0.5653338", "0.56515044", "0.5641953", "0.5640184", "0.5636154", "0.56323665", "0.55946666", "0.55920964", "0.5588005", "0.55744255", "0.5559374", "0.5557701", "0.5554335", "0.5531408", "0.5514141", "0.5507182", "0.5502362", "0.549792", "0.5484934", "0.5476665", "0.5464613", "0.5463374", "0.5455528", "0.54535174", "0.5438069", "0.5433116", "0.5424294", "0.5416922", "0.5408073", "0.53985065", "0.53948265", "0.53847957", "0.5382938", "0.5382938", "0.5382938", "0.53714335", "0.53695786", "0.5354277", "0.53478885", "0.53405774", "0.5332765", "0.53215456", "0.53156984", "0.5304587", "0.5299999" ]
0.79197097
0
outputs the content of the widget
public function widget($args, $instance) { extract($args); $html_open = '<ul class="contact-bar__list">'; $html_close ='</ul>'; $starter_text = apply_filters( 'widget_text', $instance['starter_text'] ); $starter_link = apply_filters( 'widget_text', $instance['starter_link'] ); echo $before_widget; echo $html_open; if ( ! empty( $starter_link ) && ! empty( $starter_text ) ) { echo '<li class="contact-bar__item"><a href="'.$starter_link.'" class="contact-bar__link"><div class="contact-bar__icons"></div><p>'.$starter_text.'</p></a></li>'; } echo $html_close; echo $after_widget; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function output() {\n\t\t\techo $this->before();\n\t\t\techo wponion_input_group_html( $this->data( 'prefix' ), $this->data( 'surfix' ), $this->element_html() );\n\t\t\techo $this->datalist();\n\t\t\techo $this->after();\n\t\t}", "public function displayComponent() {\n\t\t\n\t\t\t$this->outputLine($this->_content);\n\t\t\t\n\t\t}", "public function run()\n\t{\n\t\t$this->renderContent();\n\t\t$content=ob_get_clean();\n\t\tif($this->hideOnEmpty && trim($content)==='')\n\t\t\treturn;\n\t\techo $content;\n\t}", "function dumpContents()\r\n {\r\n\r\n $attributes = $this->_getCommonAttributes();\r\n\r\n //TODO [Perez][JLeon] Do we leave this method?\r\n // call the OnShow event if assigned so the Text property can be changed\r\n if ($this->_onshow != null)\r\n {\r\n $this->callEvent('onshow', array());\r\n }\r\n\r\n $avalue = $this->_text;\r\n $avalue=str_replace('\"','&quot;',$avalue);\r\n $type = \"progress\";\r\n if ($this->_type == pbsMeterBar)\r\n $type = \"meter\";\r\n echo \"<$type id=\\\"$this->_name\\\" value=\\\"$avalue\\\" $attributes>$this->_text</$type>\";\r\n\r\n }", "public function run()\n {\n $this->renderContent();\n echo ob_get_clean();\n }", "public function output(WidgetInterface $widget);", "public function run() {\r\n\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.core.widgets');\r\n\t\t$contents=ob_get_contents();\r\n\t\tob_end_clean();\r\n\t\tif($this->activeDataProvider === null) {\r\n\t\t\techo $contents;\r\n\t\t} else {\r\n\t\t\tif(($this->hideOnEmpty === true) && ($this->activeDataProvider->totalItemCount == 0)) {\r\n\t\t\t\techo $contents;\r\n\t\t\t} else {\r\n\t\t\t\t$this->render('TableWidget', array(\r\n\t\t\t\t\t'activeDataProvider' => $this->activeDataProvider,\r\n\t\t\t\t\t'fields' => $this->getFields(),\r\n\t\t\t\t\t'title' => $this->title,\r\n\t\t\t\t\t'pagination' => $this->enablePagination,\r\n\t\t\t\t\t'catalog' => $this->getCatalog(),\r\n\t\t\t\t\t'htmlOptions' => $this->htmlOptions,\r\n\t\t\t\t));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function output() {\n\t\treturn $this->before() . $this->option( 'content' ) . $this->after();\n\t}", "public function display() {\n\t\techo $this->data;\n\t\treturn;\n\t}", "public function render_content()\n\t\t{ ?>\n\t\t\t<label>\n <span class=\"customize-control-title\"><?php echo esc_html( $this->description ); ?></span>\n <p class=\"description\">\n <span class=\"typography-size-label\"><?php echo esc_html( $this->label ); ?></span>\n <span class=\"value\"><input name=\"<?php echo esc_attr( $this->id ); ?>\" type=\"text\" <?php $this->link(); ?> value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"slider-input\" />\n <span class=\"px\">px</span>\n </span>\n </p>\n </label>\n\t\t\t<div class=\"slider\"></div>\n\t\t<?php\n\t\t}", "public function showContents() {\n\t\techo $this -> getContents();\n\t\texit ;\n\t}", "public function output_markup()\n\t\t{\t\t\t\n\t\t\techo $this->markup;\n\t\t\t\n\t\t}", "public function render_content() {\n\t\t\t?>\n\t\t\t<label>\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<span class=\"description customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t</label>\n\t\t\t<div class=\"wds-customize-text-editor\">\n\t\t\t\t<?php\n\t\t\t\t// Setttings for the editor.\n\t\t\t\t$settings = array(\n\t\t\t\t\t'textarea_name' => $this->id,\n\t\t\t\t\t'textarea_rows' => 4,\n\t\t\t\t\t'media_buttons' => true,\n\t\t\t\t);\n\n\t\t\t\t// Add the editor.\n\t\t\t\twp_editor( $this->value(), $this->id, $settings );\n\n\t\t\t\t// Only enqueue scripts once.\n\t\t\t\tif ( 0 === self::$count ) {\n\t\t\t\t\t$this->enqueue_scripts();\n\t\t\t\t}\n\n\t\t\t\t// add the footer scripts.\n\t\t\t\t$this->add_footer_scripts();\n\n\t\t\t\t// Increment count.\n\t\t\t\t++self::$count;\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function show_contents() {\n $inputs_array = $this->container->get_inputs_array();\n \n foreach( $inputs_array as $input_name => $input_value ) {\n $contents .= $inputs_array[ $input_name ]->render();\n }\n\n return $contents;\n }", "public function render_content()\n\t\t{ ?>\n\t\t\t<label><p style=\"margin-bottom:0;\">\n <span class=\"customize-control-title\" style=\"margin:0;display:inline-block;\"><?php echo esc_html( $this->label ); ?>\n </span>\n <span class=\"value\">\n <input name=\"<?php echo esc_attr( $this->id ); ?>\" type=\"text\" <?php $this->link(); ?> value=\"<?php echo esc_attr( $this->value() );?>\" class=\"slider-input\" />\n <span class=\"px\">px</span>\n </span></p></label> <?php // WPCS: XSS ok. ?>\n\t\t\t<div class=\"slider\"></div>\n\t\t<?php\n\t\t}", "public function render_content() {\n?>\n\t\t\t<label>\n <p style=\"margin-bottom:0;\">\n <span class=\"customize-control-title\" style=\"margin:0;display:inline-block;\"><?php echo esc_html( $this->label ); ?></span>\n <span class=\"value\">\n <input name=\"<?php echo esc_attr( $this->id ); ?>\" type=\"text\" <?php $this->link(); ?> value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"slider-input\" />\n </span>\n </p>\n </label>\n\t\t\t<div class=\"slider\"></div>\n\t\t<?php\n\t\t}", "public function display() {\n echo $this->render();\n }", "public function display() {\n return $this->out(call_user_func_array([$this, 'render'], func_get_args()));\n }", "public function render_content() { ?>\n\t\t<label>\n\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t<div class=\"customize-control-content\">\n\t\t\t\t<textarea class=\"widefat\" cols=\"45\" rows=\"5\" <?php $this->link(); ?>><?php echo esc_textarea( $this->value() ); ?></textarea>\n\t\t\t</div>\n\t\t</label>\n\t<?php }", "public function output()\n {\n if (isset($this->label)) {\n $this->label->output();\n }\n parent::output(Element::OUTPUT_COMPONENT);\n }", "abstract protected function displayContent();", "public function render_content() { ?>\n\t\t\t<label>\n <p style=\"margin-bottom:0;\">\n <span class=\"customize-control-title\" style=\"margin:0;display:inline-block;\"><?php echo esc_html( $this->label ); ?></span>\n <span class=\"value\">\n <input name=\"<?php echo esc_attr( $this->id ); ?>\" type=\"text\" <?php $this->link(); ?> value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"slider-input\" />\n <span class=\"px\">&percnt;</span>\n </span>\n </p>\n </label>\n\t\t\t<div class=\"slider\"></div>\n\t\t<?php\n\t\t}", "public function printContent()\n {\n echo $this->content;\n }", "public function run() {\n\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.core.widgets');\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\tif(\\Yii::app()->user->isGuest === true) {\n\t\t\techo $content;\n\t\t} else {\n\t\t\t$this->render('header');\n\t\t}\n\t}", "function printContent()\t{\n\t\techo $this->content;\n\t}", "function printContent()\t{\n\t\techo $this->content;\n\t}", "public function renderContents()\n {\n if ($this->close) {\n echo '<button class=\"close\" data-dismiss=\"alert\">&times</button>';\n }\n echo $this->message;\n }", "public function run()\n {\n echo \"\\n\" . $this->renderBodyEnd();\n echo \"\\n\" . Html::endTag('div');\n\n }", "public function drawContent()\n\t\t{\n\t\t}", "public function emit()\n {\n echo <<<HTML\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>{$this->title}</title>\n <link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3\" crossorigin=\"anonymous\">\n </head>\n <body>\n\n HTML;\n\n if ($this->contain)\n {\n echo <<<HTML\n <main class=\"container\">\n\n HTML;\n }\n\n $this->emitted = true;\n }", "public function getOutput(){\n\t\t$aMenu = $this->mountBar();\n\t\t$aMenu->getOutput();\n\t}", "public function run()\n {\n return \\yii\\helpers\\Html::tag($this->container, $this->content, $this->getOptions());\n }", "public function render( ){\n\t\treturn $this->__childWidget->render();\n\t}", "function dumpContents()\r\n {\r\n $attributes = $this->_getCommonAttributes();\r\n\r\n $value = ($this->_text != \"\") ? \"value=\\\"\" . $this->_text . \"\\\"\" : \"\";\r\n\r\n echo \"<input type=\\\"$this->_type\\\" id=\\\"$this->_name\\\" name=\\\"$this->_name\\\" $value $attributes />\";\r\n }", "public function display()\n\t{\n\t\tob_start();\n\t\t\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $content;\n\t}", "function toScreen(){\n\t\t\tif($content = $this->process()){\n\t\t\t\techo \"<pre>\";\n\t\t\t\techo nl2br(htmlspecialchars($content));\n\t\t\t\techo \"</pre>\";\n\t\t\t\t\n\t\t\t\techo $content;\n\t\t\t}else{\n\t\t\t\ttrigger_error(\"An error occured during XML Data generation\",1);\n\t\t\t}\n\t\t}", "public function display() {\n\t\t$this->init();\n\t\treturn $this->output();\n\t}", "function widgetControlOutput( ) {\r\n\t\t\t$options = get_option( 'ILuvWalking.com Widget' );\r\n\t\t\tif( isset( $_POST[ \"iluvwalking-com-submit\" ] ) ) {\r\n\t\t\t\t$options[ 'title' ] = strip_tags( stripslashes( $_POST[ 'iluvwalking-com-title' ] ) );\r\n\t\t\t\t$options[ 'name' ] = strip_tags( stripslashes( $_POST[ 'iluvwalking-com-name' ] ) );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tupdate_option( 'ILuvWalking.com Widget', $options );\r\n\t\t\t\r\n\t\t\t$title = attribute_escape( $options[ 'title' ] );\r\n\t\t\t$name = attribute_escape( $options[ 'name' ] );\r\n\t\t\t\r\n\t\t\tinclude ( 'views/widget-control.php' );\r\n\t\t}", "final public function output(): void {\n\t\techo $this->html();\n\t}", "public function outputRaw(){\n\t\techo $this->getFormItBuilderOutput();\n\t\texit();\n\t}", "public function render_content() {\n\t\t?>\n\t\t\t<input\n\t\t\t\tid=\"_customize-input-gutenberg_widget_blocks\"\n\t\t\t\ttype=\"hidden\"\n\t\t\t\tvalue=\"<?php echo esc_attr( $this->value() ); ?>\"\n\t\t\t\t<?php $this->link(); ?>\n\t\t\t/>\n\t\t<?php\n\t\tthe_gutenberg_widgets( 'gutenberg_customizer' );\n\t}", "public function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"slider-custom-control\">\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span><input type=\"number\" id=\"<?php echo esc_attr( $this->id ); ?>\" name=\"<?php echo esc_attr( $this->id ); ?>\" value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"customize-control-slider-value\" <?php $this->link(); ?> />\n\t\t\t\t<div class=\"slider\" slider-min-value=\"<?php echo esc_attr( $this->input_attrs['min'] ); ?>\" slider-max-value=\"<?php echo esc_attr( $this->input_attrs['max'] ); ?>\" slider-step-value=\"<?php echo esc_attr( $this->input_attrs['step'] ); ?>\"></div><span class=\"slider-reset dashicons dashicons-image-rotate\" slider-reset-value=\"<?php echo esc_attr( $this->value() ); ?>\"></span>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function render() {\n echo $this->getHtml();\n }", "public function render() {\n echo \"<!DOCTYPE html>\\n\";\n echo \"<html>\\n\";\n $this->show_head();\n \n echo\"\\n<body>\\n\";\n echo $this->show_contents();\n\n echo \"\\n</body>\";\n echo \"\\n</html>\\n\\n\";\n }", "public function output() {\n\n\t\t$data = $this->get_alert_data();\n\n\t\tif ( empty( $data ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tprintf(\n\t\t\t'<div id=\"wpforms-builder-license-alert\">\n\t\t\t\t<img src=\"%1$s\" />\n\t\t\t\t<h3>%2$s</h3>\n\t\t\t\t<p>%3$s</p>\n\t\t\t\t<div>\n\t\t\t\t\t<a href=\"%4$s\" class=\"button button-primary\">%5$s</a>\n\t\t\t\t\t<a href=\"%6$s\" class=\"button button-secondary\">%7$s</a>\n\t\t\t\t\t<button class=\"close\"></button>\n\t\t\t\t</div>\n\t\t\t</div>',\n\t\t\t\\esc_url( WPFORMS_PLUGIN_URL . 'assets/images/sullie-builder-mobile.png' ),\n\t\t\t\\esc_html( $data['heading'] ),\n\t\t\t\\esc_html( $data['description'] ),\n\t\t\t\\esc_url( $data['button-primary-url'] ),\n\t\t\t\\esc_html( $data['button-primary'] ),\n\t\t\t\\esc_url( $data['button-secondary-url'] ),\n\t\t\t\\esc_html( $data['button-secondary'] )\n\t\t);\n\n\t\t\\add_filter( 'wpforms_builder_output', '__return_false' );\n\t}", "public function run()\n {\n $this->renderContentEnd();\n echo CHtml::closeTag('div') . \"\\n\";\n\n $this->useViewTemplate(\"box\")->selfRender();\n }", "public function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"tinymce-control\">\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<textarea id=\"<?php echo esc_attr( $this->id ); ?>\" class=\"customize-control-tinymce-editor\" <?php $this->link(); ?>><?php echo esc_attr( $this->value() ); ?></textarea>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public static function renderContent() {}", "public function render()\n\t{\n\t\techo $this->export();\n\t}", "public function display() {\r\n\t\t$this->script();\r\n\t\t$this->html();\r\n\t\t\r\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 render_content() {\n\t\t\t?>\n\t\t\t<div class=\"toggle-switch-control\">\n\t\t\t\t<div class=\"toggle-switch\">\n\t\t\t\t\t<input type=\"checkbox\" id=\"<?php echo esc_attr( $this->id ); ?>\" name=\"<?php echo esc_attr( $this->id ); ?>\" class=\"toggle-switch-checkbox\" value=\"<?php echo esc_attr( $this->value() ); ?>\"\n\t\t\t\t\t<?php\n\t\t\t\t\t$this->link();\n\t\t\t\t\tchecked( $this->value() );\n\t\t\t\t\t?>\n\t\t\t\t\t>\n\t\t\t\t\t<label class=\"toggle-switch-label\" for=\"<?php echo esc_attr( $this->id ); ?>\">\n\t\t\t\t\t\t<span class=\"toggle-switch-inner\"></span>\n\t\t\t\t\t\t<span class=\"toggle-switch-switch\"></span>\n\t\t\t\t\t</label>\n\t\t\t\t</div>\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function run()\n\t{\n\t\techo vsprintf($this->template,$this->_contents);\n\t}", "public function display()\n {\n $this->output = '';\n $output = $this->load($this->_layout);\n $this->output = $this->output.$output;\n\n return $this->output;\n }", "public function render_widget() {\n\t\t$this->get_db_values();\n\t\tif ( wponion_is_callable( $this->option( 'callback' ) ) ) {\n\t\t\techo wponion_callback( $this->option( 'callback' ), array( $this->get_db_values(), $this ) );\n\t\t}\n\t}", "public function run()\n\t{\n\t\techo \"</ul>\";\n\t}", "protected function output() {\n\t\t\techo $this->before();\n\t\t\tif ( wponion_is_array( $this->data( 'options' ) ) ) {\n\t\t\t\tforeach ( $this->data( 'options' ) as $slug => $option ) {\n\t\t\t\t\t$field_args = $this->handle_args( 'title', $option, array(\n\t\t\t\t\t\t'settings' => $this->data( 'settings' ),\n\t\t\t\t\t), array(\n\t\t\t\t\t\t'id' => $slug,\n\t\t\t\t\t\t'type' => 'color_picker',\n\t\t\t\t\t\t'wrap_class' => 'wpo-col-xs-12 wpo-col-md-3',\n\t\t\t\t\t) );\n\n\t\t\t\t\tif ( isset( $field_args['label'] ) ) {\n\t\t\t\t\t\t$title = $field_args['label'];\n\t\t\t\t\t\t$field_args['title'] = $title;\n\t\t\t\t\t\tunset( $field_args['label'] );\n\t\t\t\t\t}\n\t\t\t\t\techo $this->sub_field( $field_args, $this->value( $slug ), $this->name() );\n\t\t\t\t}\n\t\t\t}\n\t\t\techo $this->after();\n\t\t}", "public function output() {\n\t\treturn $this->content;\n\t}", "function printContent()\t{\n\n\t\t$this->content .= $this->doc->endPage();\n\t\techo $this->content;\n\t}", "function _mostrar(){\n $html = $this->Cabecera();\n $html .= $this->contenido();\n $html .= $this->Pata();\n echo $html;\n }", "public function render_content() {\n\n\t\tif ( empty( $this->choices ) ) {\n\t\t\treturn;\n\t\t} ?>\n\n\t\t<?php if ( ! empty( $this->label ) ) : ?>\n\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t<?php endif; ?>\n\n\t\t<?php if ( ! empty( $this->description ) ) : ?>\n\t\t\t<span class=\"description customize-control-description\"><?php echo $this->description; ?></span>\n\t\t<?php endif; ?>\n\n\t\t<?php $multi_values = ! is_array( $this->value() ) ? explode( ',', $this->value() ) : $this->value(); ?>\n\n\t\t<ul>\n\t\t\t<?php foreach ( $this->choices as $value => $label ) : ?>\n\n\t\t\t\t<li>\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<input type=\"checkbox\"\n\t\t\t\t\t\t value=\"<?php echo esc_attr( $value ); ?>\" <?php checked( in_array( $value, $multi_values ) ); ?> />\n\t\t\t\t\t\t<?php echo esc_html( $label ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t</li>\n\n\t\t\t<?php endforeach; ?>\n\t\t</ul>\n\n\t\t<input type=\"hidden\" <?php $this->link(); ?> value=\"<?php echo esc_attr( implode( ',', $multi_values ) ); ?>\"/>\n\t<?php }", "public function display ()\n {\n echo $this->as_text ();\n }", "public function render_content()\n {\n ?>\n <label>\n\t\t\t<select <?php $this->link(); ?>>\n\t\t\t\t<?php\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'none', selected($this->value(), 'none', false), 'none');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'capitalize', selected($this->value(), 'capitalize', false), 'capitalize');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'uppercase', selected($this->value(), 'uppercase', false), 'uppercase');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'lowercase', selected($this->value(), 'lowercase', false), 'lowercase');\n\t\t\t\t?>\n </select>\n\t\t\t<p class=\"description\"><?php echo esc_html( $this->label ); ?></p>\n </label>\n <?php\n }", "public function output()\n {\n echo \"<{$this->container} class='{$this->class}'>\";\n echo $this->menuHtml;\n echo \"</{$this->container}>\";\n }", "public function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"wpcolorpicker_alpha_color_control\">\n\t\t\t\t<?php if ( ! empty( $this->label ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<input type=\"text\" class=\"color-picker\" id=\"<?php echo esc_attr( $this->id ); ?>\" name=\"<?php echo esc_attr( $this->id ); ?>\" value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"customize-control-colorpicker-alpha-color\" <?php echo esc_attr( $this->attributes ); ?> <?php $this->link(); ?> />\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function render_content() {\n\t\t\t$allowed_html = array(\n\t\t\t\t'a' => array(\n\t\t\t\t\t'href' => array(),\n\t\t\t\t\t'title' => array(),\n\t\t\t\t\t'class' => array(),\n\t\t\t\t\t'target' => array(),\n\t\t\t\t),\n\t\t\t\t'br' => array(),\n\t\t\t\t'em' => array(),\n\t\t\t\t'strong' => array(),\n\t\t\t\t'i' => array(\n\t\t\t\t\t'class' => array(),\n\t\t\t\t),\n\t\t\t);\n\t\t\t?>\n\t\t\t<div class=\"single-accordion-custom-control\">\n\t\t\t\t<div class=\"single-accordion-toggle\"><?php echo esc_html( $this->label ); ?><span class=\"accordion-icon-toggle dashicons dashicons-plus\"></span></div>\n\t\t\t\t<div class=\"single-accordion customize-control-description\">\n\t\t\t\t\t<?php\n\t\t\t\t\tif ( is_array( $this->description ) ) {\n\t\t\t\t\t\techo '<ul class=\"single-accordion-description\">';\n\t\t\t\t\t\tforeach ( $this->description as $key => $value ) {\n\t\t\t\t\t\t\techo '<li>' . esc_attr( $key ) . wp_kses( $value, $allowed_html ) . '</li>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo '</ul>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo wp_kses( $this->description, $allowed_html );\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "function dumpContents()\r\n {\r\n\r\n if($this->_include != \"\")\r\n {\r\n include($this->_include);\r\n }\r\n else\r\n {\r\n\r\n $class = ($this->Style != \"\")? \"class=\\\"$this->StyleClass\\\"\": \"\";\r\n $hint = $this->HintAttribute();\r\n $draggable = ($this->_draggable) ? \"draggable=\\\"true\\\"\" : \"\";\r\n $events = $this->readJsEvents();\r\n \r\n echo \"<div id=\\\"$this->_name\\\" $hint $class $draggable $events >\\n\";\r\n echo $this->dumpLayoutContents();\r\n echo \"</div>\\n\";\r\n }\r\n\r\n }", "protected function output() {\n\t\treturn \"<hr class=\\\"hr-text\\\" data-content=\\\"{$this->option( 'text', '' )}\\\"/>\";\n\t}", "public function output_widget_control_templates()\n {\n }", "public function printContent() {\r\n $this->content .= $this->doc->endPage();\r\n echo $this->content;\r\n }", "public function render_content()\n {\n CustomizerAddon::view( 'controls.switch', ['control' => &$this] );\n }", "function showOutput() {\n $output = json_encode($this->data);\n echo $output;\n }", "function printContent()\t{\n\n\t\t$this->content.=$this->doc->endPage();\n\t\techo $this->content;\n\t}", "function printContent()\t{\n\n\t\t$this->content.=$this->doc->endPage();\n\t\techo $this->content;\n\t}", "function printContent()\t{\n\n\t\t$this->content.=$this->doc->endPage();\n\t\techo $this->content;\n\t}", "protected function OnOutput()\n\t{\n\t\t$vars = array('title' => $this->title, 'content' => $this->content,'user' => $this->user,'scripts' => $this->scripts,'categories' => $this->categories);\n\t\t$page = $this->Template('view/tpl_main.php', $vars);\n\t\techo $page;\n\t}", "private function renderWithDocument() \n\t{\n\t\t$this->controller->go(RootPanel::get());\n\t\t$output\t= Document::get()->assemble();\n\t\tprintf('%s', $output);\n\t}", "protected function output() {\n\t\t$content = $this->option( 'content' );\n\t\t$content_path = $this->option( 'content_path' );\n\t\t$mmarkdown = $this->option( 'markdown' );\n\n\t\tif ( ! empty( $content_path ) && file_exists( $content_path ) ) {\n\t\t\twponion_catch_output();\n\t\t\tinclude $content_path;\n\t\t\t$content = wponion_catch_output( false );\n\t\t} elseif ( ! empty( $content ) && wponion_is_callable( $content ) ) {\n\t\t\twponion_catch_output();\n\t\t\techo wponion_callback( $content );\n\t\t\t$content = wponion_catch_output( false );\n\t\t}\n\n\t\tif ( true === $mmarkdown && ! empty( $content ) ) {\n\t\t\t$content = '<div class=\"wponion-markdown-output\">' . wponion_markdown( $content ) . '</div>';\n\t\t}\n\t\treturn $this->before() . do_shortcode( $content ) . $this->after();\n\t}", "public function renderWidget()\n {\n $id = $this->attr['id'];\n $name = $this->attr['name'];\n $contents = '';\n $values = $this->getValue();\n foreach ( $this->params['choices'] as $key => $label )\n {\n $options = $this->params;\n $options['attr'] = $this->attr;\n $options['attr']['id'] = $id . \"_$key\";\n $options['attr']['name'] = $name . \"[$key]\";\n $options['attr']['value'] = $key;\n if ( isset( $values[$key] ) && $values[$key] )\n {\n $options['attr']['checked'] = 'checked';\n }\n $widget = new InputCheckboxWidget( $options );\n $contents .= HtmlToolkit::buildTag( 'label', array(), false, $widget->render() . ' ' . $label );\n }\n\n return $contents;\n }", "public function renderContent() {}", "function printContent()\t{\n\t\t$this->content.= $this->doc->endPage();\n\t\techo $this->content;\n\t}", "function printContent()\t{\n\n\t\t\t\t\t$this->content.=$this->doc->endPage();\n\t\t\t\t\techo $this->content;\n\t\t\t\t}", "function printContent()\t{\n\t\t$this->content.=$this->doc->endPage();\n\t\techo $this->content;\n\t}", "public function render_content() {\n\n\t\t\t// Process the palette\n\t\t\tif ( is_array( $this->palette ) ) {\n\t\t\t\t$palette = implode( '|', $this->palette );\n\t\t\t} else {\n\t\t\t\t// Default to true.\n\t\t\t\t$palette = ( false === $this->palette || 'false' === $this->palette ) ? 'false' : 'true';\n\t\t\t}\n\n\t\t\t// Support passing show_opacity as string or boolean. Default to true.\n\t\t\t$show_opacity = ( false === $this->show_opacity || 'false' === $this->show_opacity ) ? 'false' : 'true';\n\n\t\t\t?>\n\t\t\t\t<label>\n\t\t\t\t\t<?php\n\t\t\t\t\t// Output the label and description if they were passed in.\n\t\t\t\t\tif ( isset( $this->label ) && '' !== $this->label ) {\n\t\t\t\t\t\techo '<span class=\"customize-control-title\">' . esc_html( sanitize_text_field( $this->label ) ) . '</span>';\n\t\t\t\t\t}\n\t\t\t\t\tif ( isset( $this->description ) && '' !== $this->description ) {\n\t\t\t\t\t\techo '<span class=\"description customize-control-description\">' . esc_html( sanitize_text_field( $this->description ) ) . '</span>';\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</label>\n\t\t\t\t<input class=\"alpha-color-control\" type=\"text\" data-show-opacity=\"<?php echo esc_attr( $show_opacity ); ?>\" data-palette=\"<?php echo esc_attr( $palette ); ?>\" data-default-color=\"<?php echo esc_attr( $this->settings['default']->default ); ?>\" <?php $this->link(); ?> />\n\t\t\t<?php\n\t\t}", "public function output() {\n $form_div = new div();\n $form_div->setId('form_' . $this->_fname);\n $form_div->setClass('form_elements');\n\n $form_div->add(implode(\"\\n\",$this->_output));\n\n if (!empty($this->_output_submit)) {\n $submitWrapper = new div();\n $submitWrapper->setId('form_submit_' .$this->_fname);\n $submitWrapper->setClass('form_submit_elements');\n $form_div->add($submitWrapper->add(implode(\"\\n\",$this->_output_submit)));\n }\n\n return $form_div->html();\n }", "public function run() {\n\t\tlist($name, $id) = $this->resolveNameID();\n\t\tif (isset($this->htmlOptions['id']))\n\t\t\t$id = $this->htmlOptions['id'];\n\t\telse\n\t\t\t$this->htmlOptions['id'] = $id;\n\t\tif (isset($this->htmlOptions['name']))\n\t\t\t$name = $this->htmlOptions['name'];\n\n\t\t$this->registerClientScript();\n\t\tif ($this->hasModel())\n\t\t\techo CHtml::activeTextArea($this->model, $this->attribute, $this->htmlOptions);\n\t\telse\n\t\t\techo CHtml::textArea($name, $this->value, $this->htmlOptions);\n\t}", "public function Display()\n\t\t{\n\t\t\techo \"<html>\\n<head>\\n\";\n\t\t\t$this -> DisplayTitle();\n\t\t\t$this -> DisplayKeywords();\n\t\t\t$this -> DisplayStyles();\n\t\t\techo \"</head>\\n<body>\\n\";\n\t\t\t$this -> DisplayHeader();\n\t\t\t$this -> DisplayMenu($this->buttons);\n\t\t\techo $this->content;\n\t\t\t$this -> DisplayFooter();\n\t\t\techo \"</body>\\n</html>\\n\";\n\t\t}" ]
[ "0.73546016", "0.718772", "0.71313274", "0.70252377", "0.69536865", "0.69119745", "0.6908941", "0.6880235", "0.6834984", "0.6826785", "0.68184483", "0.68177927", "0.68170154", "0.67431366", "0.67376524", "0.6724866", "0.6712972", "0.66808975", "0.66754866", "0.667024", "0.6658362", "0.6657131", "0.66473305", "0.66382205", "0.6636647", "0.6636647", "0.6629811", "0.6621511", "0.6600537", "0.6580168", "0.656864", "0.656287", "0.65598506", "0.6545604", "0.65440726", "0.6541912", "0.653616", "0.6533674", "0.6526531", "0.652444", "0.6520009", "0.65174043", "0.6516904", "0.6489341", "0.6479849", "0.6473668", "0.6473449", "0.64721036", "0.64515007", "0.6447771", "0.6439369", "0.643798", "0.6424109", "0.64174634", "0.64168364", "0.6413317", "0.64071757", "0.6401273", "0.6397061", "0.6393392", "0.63817155", "0.63811773", "0.6374126", "0.6370056", "0.63621444", "0.63621306", "0.63467985", "0.63467985", "0.63467985", "0.63467985", "0.63467985", "0.63467985", "0.63467985", "0.63467985", "0.63467985", "0.63467985", "0.63467985", "0.63467985", "0.63467985", "0.63467985", "0.63466465", "0.63398045", "0.63395536", "0.63242155", "0.63209134", "0.6315564", "0.6308983", "0.6308983", "0.6308983", "0.6307236", "0.6304747", "0.63036805", "0.63034034", "0.6295119", "0.62899476", "0.6289925", "0.62824976", "0.62819844", "0.6278725", "0.62695897", "0.6268048" ]
0.0
-1
outputs the options form in the admin
public function form($instance) { if ( isset( $instance[ 'starter_text' ] ) ) { $starter_text = $instance[ 'starter_text' ]; } else { $starter_text = __( 'Generic Text', 'starter_theme_generic_widget_domain' ); } ?> <p> <label for="<?php echo $this->get_field_name( 'starter_text' ); ?>"><?php _e( 'Starter info:' ); ?></label> <input class="widefat" id="<?php echo $this->get_field_id( 'starter_text' ); ?>" name="<?php echo $this->get_field_name( 'starter_text' ); ?>" type="text" value="<?php echo esc_attr( $starter_text ); ?>" /> </p> <?php if ( isset( $instance[ 'starter_link' ] ) ) { $starter_link = $instance[ 'starter_link' ]; } else { $starter_link = __( 'generic text', 'starter_theme_generic_widget_domain' ); } ?> <p> <label for="<?php echo $this->get_field_name( 'starter_link' ); ?>"><?php _e( 'Starter Link:' ); ?></label> <input class="widefat" id="<?php echo $this->get_field_id( 'starter_link' ); ?>" name="<?php echo $this->get_field_name( 'starter_link' ); ?>" type="text" value="<?php echo esc_attr( $starter_link ); ?>" /> </p> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function admin_options() {\r\n echo '<h3>' . __('Mondido', 'mondido') . '</h3>';\r\n echo '<p>' . __('Mondido, Simple payments, smart functions', 'mondido') . '</p>';\r\n echo '<table class=\"form-table\">';\r\n // Generate the HTML For the settings form.\r\n $this->generate_settings_html();\r\n echo '</table>';\r\n }", "function adminOptions() {\r\n\t\t\tTrackTheBookView::render('admin-options');\r\n\t\t}", "public function admin_options() {\n\n\t\t\t?>\n\t\t\t<h3>ATOS</h3>\n\t\t\t<p><?php _e('Acceptez les paiements par carte bleue grâce à Atos.', 'woothemes'); ?></p>\n\t\t\t<p><?php _e('Plugin créé par David Fiaty', 'woothemes'); ?> - <a href=\"http://www.cmsbox.fr\">http://www.cmsbox.fr</a></p>\n\t\t\t<table class=\"form-table\">\n\t\t\t<?php\n\t\t\t\t// Generate the HTML For the settings form.\n\t\t\t\t$this->generate_settings_html();\n\t\t\t?>\n\t\t\t</table><!--/.form-table-->\n\t\t\t<?php\n\t\t}", "public function admin_options() { ?>\n <h3><?php _e( $this->pluginTitle(), 'midtrans-woocommerce' ); ?></h3>\n <p><?php _e($this->getSettingsDescription(), 'midtrans-woocommerce' ); ?></p>\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "public function admin_options(){\r\n echo '<h3>'.__('Netgíró Payment Gateway', 'netgiro').'</h3>';\r\n echo '<p>'.__('Verslaðu á netinu með Netgíró á einfaldan hátt.').'</p>';\r\n echo '<table class=\"form-table\">';\r\n $this -> generate_settings_html();\r\n echo '</table>';\r\n }", "public function admin_options() {\n\t\t\t?>\n\t\t\t<img style=\"float:right\" src=\"<?php echo plugin_dir_url(__FILE__); ?>coinsimple.png\" />\n\t\t\t<h3><?php _e('CoinSimple', 'woocommerce');?></h3>\n\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<?php $this->generate_settings_html(); ?>\n\t\t\t</table><!--/.form-table-->\n\t\t\t<?php\n\t\t}", "function admin_options() {\r\n ?>\r\n <h3><?php _e('Bitcoin Payment','Bitcoin_Payment'); ?></h3>\r\n <table class=\"form-table\">\r\n <?php $this->generate_settings_html(); ?>\r\n </table> <?php\r\n }", "public function form( $instance ) {\n \t// outputs the options form on admin\n }", "public function admin_options() {\n\n echo '<h3>'.__('MTN Mobile Money Settings', 'woocommerce').'</h3>';\n echo '<table class=\"form-table\">';\n\n $this->generate_settings_html();\n echo '</table>';\n }", "public static function _options_page(){\n\t\tif( isset($_POST['urls']) ){\n\t\t\tself::updateUrls($_POST['urls']);\n\t\t}\n\t\t\n\t\t$vars = (object) array();\n\t\t$vars->messages = implode( \"\\n\", self::$messages );\n\t\t$vars->path = self::$path;\n\t\t$vars->urls = self::getUrls();\n\t\tself::render( 'admin', $vars );\n\t}", "public function admin_options() { ?>\n <h3><?php _e( $this->pluginTitle(), 'midtrans-woocommerce' ); ?></h3>\n <p><?php _e('Allows payments using Midtrans.', 'midtrans-woocommerce' ); ?></p>\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form. generated from `init_form_fields`\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "public function admin_options() { ?>\n <h3><?php _e( 'Veritrans', 'woocommerce' ); ?></h3>\n <p><?php _e('Allows payments using Veritrans.', 'woocommerce' ); ?></p>\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "public function admin_options() {\n\n ?>\n <h3>交通银行支付平台</h3>\n \n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "public function admin_options() {\n\t\t\t?>\n\t\t\t\t<h3><?php esc_html_e('Cointopay Checkout', 'Cointopay'); ?></h3>\n\n\t\t\t\t<div id=\"wc_get_started\">\n\t\t\t\t<span class=\"main\"><?php esc_html_e('Provides a secure way to accept crypto currencies.', 'Cointopay'); ?></span>\n\t\t\t\t<p><a href=\"https://app.cointopay.com/index.jsp?#Register\" target=\"_blank\" class=\"button button-primary\"><?php esc_html_e('Join free', 'Cointopay'); ?></a> <a href=\"https://cointopay.com\" target=\"_blank\" class=\"button\"><?php esc_html_e('Learn more about WooCommerce and Cointopay', 'Cointopay'); ?></a></p>\n\t\t\t\t</div>\n\n\t\t\t\t<table class=\"form-table\">\n\t\t\t <?php $this->generate_settings_html(); ?>\n\t\t\t\t</table>\n\t\t\t\t<?php\n\n\t\t}", "public function admin_options() {\n\n\t\tparent::admin_options();\n\n\t\tob_start();\n\t\t?>\n\t\t// Hide service labels if admin opts to show carrier service levels\n\t\t$( '.hide_service_labels_if_checked' ).change( function() {\n\n\t\t\t\tif ( $( this ).is( ':checked' ) ) {\n\t\t\t\t\t$( this ).closest( 'tr' ).nextUntil( 'p' ).hide();\n\t\t\t\t} else {\n\t\t\t\t\t$( this ).closest( 'tr' ).nextUntil( 'p' ).show();\n\t\t\t\t}\n\t\t} ).change();\n\t\t// Hide additional handling fee field if there's no base handling fee entered\n\t\t$( 'input[name=\"woocommerce_shipwire_handling_fee\"]' ).change( function() {\n\t\t\tif ( '' === $( this ).val() ) {\n\t\t\t\t$( 'input[name=\"woocommerce_shipwire_additional_handling_fee\"]' ).closest( 'tr' ).hide();\n\t\t\t} else {\n\t\t\t\t$( 'input[name=\"woocommerce_shipwire_additional_handling_fee\"]' ).closest( 'tr' ).show();\n\t\t\t}\n\t\t} ).change();\n\n\t\t<?php\n\t\twc_enqueue_js( ob_get_clean() );\n\t}", "public function form( $instance ) {\n\t\t// outputs the options form on admin\n\t\t\n\t\n\t}", "public function form( $instance ) {\n\t\t// outputs the options form on admin\n\t}", "public function form( $instance ) {\n\t\t// outputs the options form on admin\n\t}", "public function form( $instance ) {\n\t\t// outputs the options form on admin\n\t}", "public function admin_options() {\n\n\t\t?>\n\t\t<h3><?php _e( 'PayU standard', 'woocommerce' ); ?></h3>\n\t\t<p><?php _e( 'PayU standard works by sending the user to PayU to enter their payment information.', 'woocommerce' ); ?></p>\n\n \t<?php if ( $this->is_valid_for_use() ) : ?>\n\n\t\t\t<table class=\"form-table\">\n\t\t\t<?php $this->generate_settings_html(); ?>\n\t\t\t</table><!--/.form-table-->\n\n\t\t<?php else : ?>\n <div class=\"inline error\"><p><strong><?php _e( 'Gateway Disabled', 'woocommerce' ); ?></strong>: <?php _e( 'PayU does not support your store currency.', 'woocommerce' ); ?></p></div>\n\t\t<?php\n\t\t\tendif;\n\t}", "public function display_options_page() {\n\t\t?>\n\t\t<div class=\"wrap ee-breakouts-admin\">\n\t\t\t<div id=\"icon-options-general\" class=\"icon32\"></div>\n\t\t\t<h2><?php _e('EE Breakouts Settings', 'event_espresso'); ?></h2>\n\t\t\t<div id=\"poststuff\">\n\t\t\t\t<div id=\"post-body-content\">\n\t\t\t\t\t<div class=\"form-wrap\">\n\t\t\t\t\t\t<form action=\"options.php\" method=\"post\">\n\t\t\t\t\t\t\t<?php settings_fields('ee_breakout_options'); ?>\n\t\t\t\t\t\t\t<?php do_settings_sections('ee_breakouts_admin'); ?>\n\t\t\t\t\t\t\t<span class=\"submit\">\n\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"button primary-button\" name=\"update_ee_breakout_options\" value=\"Save Options\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</div> <!-- end .form-wrap -->\n\t\t\t\t</div> <!-- end #post-body-content -->\n\t\t\t</div> <!-- end #poststuff -->\n\t\t</div> <!-- end .wrap -->\n\t\t<?php\n\t}", "public function adminPluginOptionsPage()\n {\n echo $this->_loadView('admin-settings-page');\n }", "public function admin_options() {\n\t\t\t?>\n\t \t<h3><?php _e('Payment Express', 'woothemes'); ?></h3>\n\t \t<p><?php _e('Allows credit card payments by Payment Express PX-Pay method', 'woothemes'); ?></p>\n\t \t<table class=\"form-table\">\n\t \t<?php\n\t\t\t\t// Generate the HTML For the settings form.\n\t\t\t\t$this->generate_settings_html();\n\t\t\t?>\n\t\t\t</table><!--/.form-table-->\n\t \t<?php\n\t\t}", "public function display_options_page() {\n if (! current_user_can('manage_options')) {\n wp_die(__('You do not have sufficient permissions to access this page.'));\n }\n?>\n<div class=\"wrap\">\n <h2><?php esc_attr_e($this->title); ?> Options</h2>\n <form action=\"options.php\" method=\"post\">\n <?php if (function_exists('settings_errors')): settings_errors(); endif; ?>\n <?php settings_fields($this->group); ?>\n <?php foreach ($this->sections as $section): do_settings_sections($section); endforeach; ?>\n <p class=\"submit\">\n <input type=\"submit\" name=\"Submit\" value=\"<?php esc_attr_e('Save Changes'); ?>\" class=\"button-primary\" />\n </p>\n </form>\n</div>\n<?php\n }", "public function menu_html()\r\n\t{\r\n\t echo '<h1>'.get_admin_page_title().'</h1>';\r\n\t ?>\r\n\t <form method=\"post\" action=\"options.php\">\r\n\t \t<?php settings_fields('bookingSearch_settings') ?>\r\n\t \t<?php do_settings_sections('bookingSearch_settings') ?> <br>\r\n\t\t\t<?php submit_button(__('Save changes','Booking-search')); ?>\r\n\t </form>\r\n\t <?php\r\n\r\n\t}", "function optionPage() {\r\n\t\t$out = $uninstall = '';\r\n\r\n\t\t// Check write permissions\r\n\t\t$this->_checkDir();\r\n\r\n\t\t// Settings update or delete\r\n\t\tif(isset($_POST['options_update'])) { // options update\r\n\t\t\t// strip slashes array\r\n\t\t\t$_POST = $this->stripArray($_POST);\r\n\r\n\t\t\t$this->options['user_lvl'] = $_POST['vp_userlevel'];\r\n\t\t\t$this->options['show_option'] = $_POST['vp_show'];\r\n\t\t\t$this->options['class_name'] = $_POST['vp_classname'];\r\n\t\t\t$this->options['class_name_with_type'] = $_POST['vp_classwithtype'];\r\n\t\t\t$this->options['ins_shortcode'] = (isset($_POST['vp_shortcode']) && $_POST['vp_shortcode']=='1' ? '1' : '0');\r\n\t\t\t$this->updateOptions();\r\n\r\n\t\t\t$_POST = '';\r\n\t\t\t$this->note .= __('<strong>Done!</strong>', $this->textdomain_name);\r\n\r\n\t\t} elseif(isset($_POST['uninst'])) { // uninstall\r\n\t\t\t$this->deleteOptions();\r\n\t\t\tif (file_exists($this->data_dir))\r\n\t\t\t\t$this->_removeDir($this->data_dir);\r\n\t\t\t$this->note .= __('All files and folders have (probably) been deleted. Now click <strong>Plugins</strong> in the admin panel above and <b>Deactivate</b> the VideoPop plugin.', $this->textdomain_name);\r\n\t\t\t$this->note .= \"<br />\" . $this->data_dir;\r\n\t\t\t$this->error++;\r\n\t\t\t$this->initOptions();\r\n\t\t\terror_reporting(0);\r\n\t\t}\r\n\r\n\t\t// Add Options\r\n\t\t$out .= \"<div class=\\\"wrap\\\">\\n\";\r\n\t\t$out .= \"<h2>\".__('VideoPop+ Options', $this->textdomain_name).\"</h2><br />\\n\";\r\n\t\t$out .= \"<form method=\\\"post\\\" id=\\\"update_options\\\" action=\\\"\".$this->admin_action.\"\\\">\\n\";\r\n\t\t$out .= \"<table class=\\\"optiontable form-table\\\" style=\\\"margin-top:0;\\\"><tbody>\\n\";\r\n\r\n\t\t// Add User Level\r\n\t\t// Permission -- Subscriber = 0, Contributor = 1, Author = 2, Editor = 7, Administrator = 9\r\n\t\t$out .= \"<tr>\\n\";\r\n\t\t$out .= \"<td><strong>\".__('User Level', $this->textdomain_name).\"</strong></td>\";\r\n\t\t$out .= \"<td><select name=\\\"vp_userlevel\\\">\";\r\n\t\t$out .= \"<option value=\\\"0\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'0').\">\".__('subscriber', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"1\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'1').\">\".__('contributor', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"2\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'2').\">\".__('author', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"7\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'7').\">\".__('editor', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"9\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'9').\">\".__('administrator', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"</select>&nbsp;</td>\";\r\n\t\t$out .= \"<td>\".__('Set the user level the user needs to have (at least) to manage/upload/delete videos', $this->textdomain_name).\"</td>\\n\";\r\n\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t// Add Method of display\r\n\t\t$out .= \"<tr>\\n\";\r\n\t\t$out .= \"<td><strong>\".__('Method of display', $this->textdomain_name).\"</strong></td>\";\r\n\t\t$out .= \"<td><select name=\\\"vp_show\\\">\";\r\n\t\t$out .= \"<option value=\\\"popup\\\"\" .$this->_setOptionSelected($this->options['show_option'],'popup').\">\". __('Pop up', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"lightpop\\\"\".$this->_setOptionSelected($this->options['show_option'],'lightpop').\">\".__('LightPop', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"inline\\\"\" .$this->_setOptionSelected($this->options['show_option'],'inline').\">\". __('In line', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"none\\\"\" .$this->_setOptionSelected($this->options['show_option'],'none').\">\". __('The effect none', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"</select>&nbsp;</td>\";\r\n\t\t$out .= \"<td>\".__('Please select it from &quot;Pop up&quot;, &quot;LightPop&quot;, &quot;In line&quot;, and &quot;The effect none&quot;.', $this->textdomain_name);\r\n\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t// Add Class Name Setting\r\n\t\t$out .= \"<tr style=\\\"border-style:none;\\\">\\n\";\r\n\t\t$out .= \"<td style=\\\"border-style:none;\\\"><strong>\".__('Class name of the link tag', $this->textdomain_name).\"</strong></td>\";\r\n\t\t$out .= \"<td style=\\\"border-style:none;\\\"><input type=\\\"text\\\" name=\\\"vp_classname\\\" value=\\\"\".$this->options['class_name'].\"\\\"/>&nbsp;</td>\";\r\n\t\t$out .= \"<td style=\\\"border-style:none;\\\">\".__('Please set the class name of the link tag.', $this->textdomain_name).\"</td>\\n\";\r\n\t\t$out .= \"</tr>\\n\";\r\n\t\t$out .= \"<tr>\\n\";\r\n\t\t$out .= \"<td></td>\";\r\n\t\t$out .= \"<td colspan=\\\"2\\\"><select name=\\\"vp_classwithtype\\\">\";\r\n\t\t$out .= \"<option value=\\\"0\\\"\".$this->_setOptionSelected($this->options['class_name_with_type'],'0').\">\".__('Without File Type', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"1\\\"\".$this->_setOptionSelected($this->options['class_name_with_type'],'1').\">\".__('With File Type', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"</select>&nbsp;</td>\";\r\n\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t// Insert Editor Option (Shortcode or HTML Tag?)\r\n\t\t$out .= \"<tr>\\n\";\r\n\t\t$out .= \"<td><strong>\".__('Insert Editor Option', $this->textdomain_name).\"</strong></td>\";\r\n\t\t$out .= \"<td colspan=\\\"2\\\"><input type=\\\"checkbox\\\" name=\\\"vp_shortcode\\\" value=\\\"1\\\" style=\\\"margin-right:0.5em;\\\" \".($this->options['ins_shortcode']=='1' ? \" checked\" : \"\").\" />\".__('Shortcode is inserted in the editor.', $this->textdomain_name).\"</td>\";\r\n\t\t$out .= \"</tr>\\n\";\r\n\t\t$out .= \"<tr>\\n\";\r\n\r\n\t\t$out .= \"</tbody></table>\\n\";\r\n\r\n\t\t// Add Update Button\r\n\t\t$out .= \"<div style=\\\"text-align:right;margin-top:1em;\\\">\";\r\n\t\t$out .= \"<input type=\\\"submit\\\" name=\\\"options_update\\\" value=\\\"\".__('Update Options', $this->textdomain_name).\"\\\" class=\\\"button\\\" />\";\r\n\t\t$out .= \"</div>\";\r\n\t\t$out .= \"</form></div>\\n\";\r\n\r\n\t\t// Add uninstall\r\n\t\t$out .= \"<div class=\\\"wrap\\\" style=\\\"margin-top:2em;\\\">\\n\";\r\n\t\t$out .= \"<h2>\".__('Uninstall', $this->textdomain_name).\"</h2><br />\\n\";\r\n\t\t$out .= \"<p>\".__('If you want to keep your videos and the popup functionality of your links but want to get rid of the additional menus in the control panel, just deactivate the plugin.<br />For a complete uninstall including all uploaded videos use the uninstall button.', $this->textdomain_name).\"</p>\\n\";\r\n\t\t$out .= \"<div style=\\\"text-align:right;\\\">\";\r\n\t\t$out .= \"<form method=\\\"post\\\" id=\\\"uninstall\\\" action=\\\"\".$this->admin_action.\"\\\">\\n\";\r\n\t\t$out .= \"<input type=\\\"submit\\\" name=\\\"uninst\\\" value=\\\"\".__('Uninstall VideoPop+', $this->textdomain_name).\"\\\" onclick=\\\"javascript:check=confirm('\".__('You are about to delete all your settings and Videos! The links you created with VideoPop will not work after uninstall! Proceed with uninstall?', $this->textdomain_name).\"');if(check==false) return false;\\\" class=\\\"button\\\" />\\n\";\r\n\t\t$out .= \"</form>\\n\";\r\n\t\t$out .= \"</div>\\n\";\r\n\t\t$out .= \"</div>\\n\";\r\n\r\n\t\t// Output\r\n\t\techo (!empty($this->note) ? \"<div id=\\\"message\\\" class=\\\"updated fade\\\"><p>{$this->note}</p></div>\\n\" : '' ).\"\\n\";\r\n\t\techo ($this->error > 0 ? '' : $out).\"\\n\";\r\n\t}", "public function options_page() {\n\t\t$this->render_settings();\n\t}", "function category_browsing_options_form()\r\n\t//admin options for category_browsing_options module\r\n\t{\r\n\t\t$this->body .= \"<tr><td class=\\\"col_hdr\\\" colspan=\\\"2\\\" style=\\\"width: 100%; font-weight: bold; text-align: center;\\\">Options selected below will be applied to the Category Browsing Options Module</td></tr>\";\r\n\t\t$show_options = array (\r\n\t\t\t'cat_browse_opts_as_ddl' => $this->db->get_site_setting('cat_browse_opts_as_ddl'),\r\n\t\t\t'cat_browse_all_listings' => $this->db->get_site_setting('cat_browse_all_listings'),\r\n\t\t\t'cat_browse_end_today' => $this->db->get_site_setting('cat_browse_end_today'),\r\n\t\t\t'cat_browse_has_pics' => $this->db->get_site_setting('cat_browse_has_pics'),\r\n\t\t\t'cat_browse_has_pics' => $this->db->get_site_setting('cat_browse_has_pics'),\r\n\t\t\t'cat_browse_class_only' => $this->db->get_site_setting('cat_browse_class_only'),\r\n\t\t\t'cat_browse_auc_only' => $this->db->get_site_setting('cat_browse_auc_only'),\r\n\t\t\t'cat_browse_buy_now' => $this->db->get_site_setting('cat_browse_buy_now'),\r\n\t\t\t'cat_browse_buy_now_only' => $this->db->get_site_setting('cat_browse_buy_now_only'),\r\n\t\t\t'cat_browse_auc_bids' => $this->db->get_site_setting('cat_browse_auc_bids'),\r\n\t\t\t'cat_browse_auc_no_bids' => $this->db->get_site_setting('cat_browse_auc_no_bids')\r\n\t\t\t\r\n\t\t);\r\n\t\t$ddlTooltip = geoHTML::showTooltip('Show as Dropdown', 'Choose yes to display the module\\'s options in a dropdown list, or no to show them as a text-based, delimeter-separated list.');\r\n\t\t$this->input_radio_yes_no($show_options,\"cat_browse_opts_as_ddl\",\"Show as Dropdown $ddlTooltip\");\r\n\t\t$this->input_radio_yes_no($show_options,\"cat_browse_all_listings\",\"All listings\");\r\n\t\t$this->input_radio_yes_no($show_options,\"cat_browse_end_today\",\"Listings Ending within 24 hours\");\r\n\t\t$this->input_radio_yes_no($show_options,\"cat_browse_has_pics\",\"Listings with Photos\");\r\n\t\t\r\n\t\tif(geoMaster::is('classifieds') && geoMaster::is('auctions'))\r\n\t\t{\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_class_only\",\"Classifieds only\");\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_auc_only\",\"Auctions only\");\r\n\t\t}\r\n\t\tif(geoMaster::is('auctions'))\r\n\t\t{\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_buy_now\",\"Auctions using Buy Now\");\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_buy_now_only\",\"Auctions using Buy Now Only\");\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_auc_bids\",\"Auctions with Bids\");\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_auc_no_bids\",\"Auctions without Bids\");\r\n\t\t}\r\n\t\t\r\n\t}", "public function render_options_page()\n\t{\n\t\treturn include 'src/views/form.php';\n\t}", "public function options_page_html() {\n // check user capabilities\n if ( ! current_user_can( 'manage_options' ) ) {\n return;\n }\n\n // add error/update messages\n\n // check if the user have submitted the settings\n // wordpress will add the \"settings-updated\" $_GET parameter to the url\n if ( isset( $_GET['settings-updated'] ) ) {\n // add settings saved message with the class of \"updated\"\n add_settings_error( 'settcalc_messages', 'settcalc_message', __( 'Settings Saved', 'settcalc' ), 'updated' );\n }\n\n // show error/update messages\n settings_errors( 'settcalc_messages' );\n ?>\n <div class=\"wrap\">\n <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n <form action=\"options.php\" method=\"post\">\n <?php\n // output security fields for the registered setting \"wporg\"\n settings_fields( 'settcalc' );\n // output setting sections and their fields\n // (sections are registered for \"wporg\", each field is registered to a specific section)\n do_settings_sections( 'settcalc' );\n // output save settings button\n submit_button( 'Save Settings' );\n ?>\n </form>\n </div>\n <?php\n }", "public function admin_options() {\n \t\t?>\n \t\t<thead><tr><th scope=\"col\" width=\"200px\"><?php echo apply_filters( 'tgm_jigoshop_custom_gateway_title', 'Client Payments' ); ?></th><th scope=\"col\" class=\"desc\"><?php echo apply_filters( 'tgm_jigoshop_custom_gateway_description', 'This payment gateway is setup specifically for client billing accounts. Orders will be processed and billed directly to existing client accounts.' ); ?></th></tr></thead>\n \t\t<tr>\n\t \t<td class=\"titledesc\"><?php echo apply_filters( 'tgm_jigoshop_enable_custom_gateway_title', 'Enable Client Payments?' ) ?>:</td>\n\t \t\t<td class=\"forminp\">\n\t\t \t\t<select name=\"jigoshop_tgm_custom_gateway_enabled\" id=\"jigoshop_tgm_custom_gateway_enabled\" style=\"min-width:100px;\">\n\t\t \t\t<option value=\"yes\" <?php if ( get_option( 'jigoshop_tgm_custom_gateway_enabled' ) == 'yes' ) echo 'selected=\"selected\"'; ?>><?php _e( 'Yes', 'jigoshop' ); ?></option>\n\t\t \t\t<option value=\"no\" <?php if ( get_option( 'jigoshop_tgm_custom_gateway_enabled' ) == 'no' ) echo 'selected=\"selected\"'; ?>><?php _e( 'No', 'jigoshop' ); ?></option>\n\t\t \t\t</select>\n\t \t\t</td>\n\t \t</tr>\n\t \t<tr>\n\t \t<td class=\"titledesc\"><a href=\"#\" tip=\"<?php echo apply_filters( 'tgm_jigoshop_method_tooltip_description', 'This controls the title which the user sees during checkout.' ); ?>\" class=\"tips\" tabindex=\"99\"></a><?php echo apply_filters( 'tgm_jigoshop_method_tooltip_title', 'Method Title' ) ?>:</td>\n\t \t\t<td class=\"forminp\">\n\t\t \t\t<input class=\"input-text\" type=\"text\" name=\"jigoshop_tgm_custom_gateway_title\" id=\"jigoshop_tgm_custom_gateway_title\" value=\"<?php if ( $value = get_option( 'jigoshop_tgm_custom_gateway_title' ) ) echo $value; else echo 'Client Payments'; ?>\" />\n\t \t\t</td>\n\t \t</tr>\n\t \t<tr>\n\t \t<td class=\"titledesc\"><a href=\"#\" tip=\"<?php echo apply_filters( 'tgm_jigoshop_message_tooltip_description', 'This message lets the customer know that the order and total will be processed to their billing account.' ); ?>\" class=\"tips\" tabindex=\"99\"></a><?php echo apply_filters( 'tgm_jigoshop_message_tooltip_title', 'Customer Message' ) ?>:</td>\n\t \t\t<td class=\"forminp\">\n\t\t \t\t<input class=\"input-text wide-input\" type=\"text\" name=\"jigoshop_tgm_custom_gateway_description\" id=\"jigoshop_tgm_custom_gateway_description\" value=\"<?php if ( $value = get_option( 'jigoshop_tgm_custom_gateway_description' ) ) echo $value; ?>\" />\n\t \t\t</td>\n\t \t</tr>\n\n \t\t<?php\n \t}", "public function admin_options() {\n?>\n\t\t<h3><?php _e('Authorize SIM', WC_Authorize_SIM::TEXT_DOMAIN); ?></h3>\n \t<p><?php _e('Authorize SIM works by sending the user to Authorize to enter their payment information.', WC_Authorize_SIM::TEXT_DOMAIN); ?></p>\n \t<div class=\"updated\"><p>\n \t\t<strong><?php _e('Authorize.Net config:', WC_Authorize_SIM::TEXT_DOMAIN) ?></strong>\n \t\t<?php _e( 'Please login to Authorize and go to Account >> Settings >> Response/Receipt URLs' ); ?>\n \t\t<ol>\n\t \t\t<li><?php _e( 'Click \"Add URL\", and set this value for URL textbox: ') ?><strong><?php echo $this->notify_url ?></strong></li>\n\t \t\t<li><?php _e( 'Click \"Submit\" to complete', WC_Authorize_SIM::TEXT_DOMAIN ) ?></li>\n \t\t</ol>\n \t</p></div>\n \t<table class=\"form-table\">\n \t\t<?php $this->generate_settings_html(); ?>\n\t\t</table><!--/.form-table--> \t\n<?php\n }", "public function optionsAction()\n\t{\n\t\treturn '';\n\t}", "function options_page_html()\n\t\t{\n\t\t\tif (!current_user_can('manage_options')) {\n\t\t\t\twp_die(__('You do not have sufficient permissions to access this page.'));\n\t\t\t}\n\t\t\t\n\t\t\techo '<div class=\"wrap\">';\n\t\t\techo '<h2>';\n\t\t\techo 'Verify Meta Tags Plugin Options';\n\t\t\techo '</h2>';\n\t\t\techo '<form method=\"post\" action=\"options.php\">';\n\t\t\tsettings_fields('vmt-options-page');\n\t\t\tdo_settings_sections('vmt-options-page');\n\t\t\techo '<p class=submit>';\n\t\t\techo '<input type=\"submit\" class=\"button-primary\" value=\"' . __('Save Changes') . '\" />';\n\t\t\techo '</p>';\n\t\t\techo '</form>';\n\t\t\techo '</div>';\n\t\t}", "public function optionsPage()\r\n {\r\n $this->updateOptions();\r\n include_once($this->path . '/views/options.php');\r\n }", "function zdtw_menu_options_callback() {\n echo '<form id=\"'.$this->prefix.'-form\" class=\"zd-settings-form\" method=\"POST\" action=\"options.php\">'.\"\\n\";\n\n// print_r( $this->options );\n// echo $this->settings_page_id;\n\n // settings_fields( $option_group )\n settings_fields( $this->settings_page_id );\n// settings_fields( $this->prefix . '-general-section' );\n\n do_settings_fields( $this->settings_page_id, $this->prefix .'-general-section' );\n\n submit_button();\n\n echo '</form>'.\"\\n\";\n }", "public function admin_options()\n {\n ?>\n <h3><?php _e('PAYSTO', 'woocommerce'); ?></h3>\n <p><?php _e('Settings payment recieve from PAYSTO system.', 'woocommerce'); ?></p>\n\n <?php if ($this->is_valid_for_use()): ?>\n\n <table class=\"form-table\">\n\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n\n <?php else: ?>\n <div class=\"inline error\"><p>\n <strong><?php _e('Gate swich off', 'woocommerce'); ?></strong>:\n <?php _e('PAYSTO not support currency used in your store.', 'woocommerce'); ?>\n </p></div>\n <?php\n endif;\n\n }", "function wpbs_echo_option()\n {\n include wpbs_advs_plugin_dir . 'admin/view/adminLayout.php';\n }", "public function render_options_page() {\r\n\r\n\t\tinclude( Views::load_view( TBSC_OPTIONS_PLUGIN_DIR . 'src/views/options-page/options-page.php' ) );\r\n\r\n\t}", "public function adminPage () {\n\t\t\t// global $themename, $shortname, $options;\n\t\t\t$up_dir = wp_upload_dir();\n\t\t\tif ( ! empty( $_REQUEST['saved'] ) ) {\n\t\t\t\techo '<div id=\"message\" class=\"updated fade\"><p><strong>' . sprintf( __( '%s settings saved!', $this->domain ), $this->themename ) . '</strong></p></div>';\n\t\t\t}\n\n\t\t\tif ( ! empty( $_REQUEST['reset'] ) ) {\n\t\t\t\techo '<div id=\"message\" class=\"updated fade\"><p><strong>' . sprintf( __( '%s settings reset.', $this->domain ), $this->themename ) . '</strong></p></div>';\n\t\t\t}\n\t\t\t?>\n\n\t\t<div id=\"ttf-options\" class=\"wrap\">\n\t\t\t<div id=\"icon-themes\" class=\"icon32\"><br></div>\n\t\t\t<h2><?php _e( 'Theme Options', $this->domain ); ?></h2>\n\t\t\t<div id=\"ttf-options-body\">\n\t\t\t\t<form method=\"post\" action=\"\">\n\t\t\t\t\t<?php wp_nonce_field( 'save-theme-options', 'save-theme-options-nonce' );\n\t\t\t\t\tfor ($i = 0; $i < count($this->options); $i++) :\n\t\t\t\t\t\tswitch ($this->options[$i][\"type\"]) :\n\t\t\t\t\t\t\tcase \"subhead\":\n\t\t\t\t\t\t\t\tif ($i != 0) :\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<div class=\"ttf-save-button submit\">\n\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"save\" />\n\t\t\t\t\t\t\t\t\t\t<input class=\"button-primary\" type=\"submit\" value=\"<?php esc_attr_e( 'Save changes', $this->domain ); ?>\" name=\"save\"/>\n\t\t\t\t\t\t\t\t\t</div><!--end ttf-save-button-->\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div><!-- ttf-option -->\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<div class=\"ttf-option\">\n\t\t\t\t\t\t\t\t\t<h3><?php echo $this->options[$i][\"name\"]; ?> <a href=\"#\"><?php _e( 'Edit', $this->domain ); ?></a></h3>\n\t\t\t\t\t\t\t\t\t<div class=\"ttf-option-body clear\">\n\t\t\t\t\t\t\t\t\t\t<?php if ( isset( $this->options[$i][\"notice\"] ) ) : ?>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"notice\"><?php echo $this->options[$i][\"notice\"]; ?></p>\n\t\t\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase \"checkbox\":\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<div class=\"ttf-field check clear\">\n\t\t\t\t\t\t\t\t\t<div class=\"ttf-field-d\"><?php echo $this->options[$i][\"desc\"]; ?></div>\n\t\t\t\t\t\t\t\t\t<input id=\"<?php echo $this->options[$i][\"id\"]; ?>\" type=\"checkbox\" name=\"<?php echo $this->options[$i][\"id\"]; ?>\" value=\"true\"<?php echo (get_option($this->options[$i]['id'])) ? ' checked=\"checked\"' : ''; ?> />\n\t\t\t\t\t\t\t\t\t<label for=\"<?php echo $this->options[$i][\"id\"]; ?>\"><?php echo $this->options[$i][\"name\"]; ?></label>\n\t\t\t\t\t\t\t\t</div><!--end ttf-field check-->\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase \"radio\":\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<div class=\"ttf-field radio clear\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"ttf-field-d\"><?php echo $this->options[$i][\"desc\"]; ?></div>\n\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t$radio_setting = get_option($this->options[$i]['id']);\n\t\t\t\t\t\t\t\t\t\t\t$checked = \"\";\n\t\t\t\t\t\t\t\t\t\t\tforeach ($this->options[$i]['options'] as $key => $val) :\n\t\t\t\t\t\t\t\t\t\t\t\tif ($radio_setting != '' &&\t$key == get_option($this->options[$i]['id']) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\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\tif ($key == $this->options[$i]['std']){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$checked = 'checked=\"checked\"';\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"<?php echo esc_attr( $this->options[$i]['id'] ); ?>\" value=\"<?php echo esc_attr( $key ); ?>\"<?php echo $checked; ?> /><?php echo $val; ?><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t\t\t\t\t\t<label for=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>\"><?php echo $this->options[$i][\"name\"]; ?></label>\n\t\t\t\t\t\t\t\t\t</div><!--end ttf-field radio-->\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase \"upload\":\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<div class=\"ttf-field logo-upload clear\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"ttf-field-d\"><?php echo $this->options[$i][\"desc\"]; ?></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"ttf-field-c\">\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>\"><?php echo $this->options[$i][\"name\"]; ?></label>\n\t\t\t\t\t\t\t\t\t\t\t<input id=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>\" type=\"text\" name=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>\" class=\"<?php echo esc_attr( $this->options[$i][\"class\"] ); ?>\" value=\"<?php\n\t\t\t\t\t\t\t\t\t\t\t\t$id = get_option( $this->options[$i][\"id\"] );\n\t\t\t\t\t\t\t\t\t\t\t\techo esc_attr( '' != $id ? $id : $this->options[$i][\"std\"] ); ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t<input id=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>_upload_button\" type=\"button\" value=\"Upload Logo\" data-type=\"image\" data-field-id=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>\" class=\"button\" />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div><!--end ttf-field text-->\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase \"text\":\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<div class=\"ttf-field text clear\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"ttf-field-d\"><?php echo $this->options[$i][\"desc\"]; ?></div>\n\t\t\t\t\t\t\t\t\t\t<label for=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>\"><?php echo $this->options[$i][\"name\"]; ?></label>\n\t\t\t\t\t\t\t\t\t\t<input id=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>\" type=\"text\" name=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>\" value=\"<?php\n\t\t\t\t\t\t\t\t\t\t\t$id = get_option( $this->options[$i][\"id\"] );\n\t\t\t\t\t\t\t\t\t\t\techo esc_attr( stripslashes( '' != $id ? $id : $this->options[$i][\"std\"] ) ); ?>\" />\n\t\t\t\t\t\t\t\t\t</div><!--end ttf-field text-->\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase \"colorpicker\":\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<div class=\"ttf-field colorpicker clear\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"ttf-field-d\"><?php echo $this->options[$i][\"desc\"]; ?> </div>\n\t\t\t\t\t\t\t\t\t\t<label for=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>\"><?php echo $this->options[$i][\"name\"]; ?> <a href=\"#<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>_colorpicker\" onclick=\"toggleColorpicker (this, '<?php echo esc_js( $this->options[$i][\"id\"] ); ?>', 'open', '<?php _e( 'show color picker', $this->domain ); ?>', '<?php _e( 'hide color picker', $this->domain ); ?>')\"><?php _e( 'show color picker', $this->domain ); ?></a></label>\n\t\t\t\t\t\t\t\t\t\t<div id=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>_colorpicker\" class=\"colorpicker_container\"></div>\n\t\t\t\t\t\t\t\t\t\t<input id=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>\" type=\"text\" name=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>\" value=\"<?php\n\t\t\t\t\t\t\t\t\t\t\t$id = get_option($this->options[$i][\"id\"]);\n\t\t\t\t\t\t\t\t\t\t\techo esc_attr( $id ? $id : $this->options[$i][\"std\"] ); ?>\" />\n\t\t\t\t\t\t\t\t\t</div><!--end ttf-field colorpicker-->\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase \"select\":\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<div class=\"ttf-field select clear\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"ttf-field-d\"><?php echo $this->options[$i][\"desc\"]?></div>\n\t\t\t\t\t\t\t\t\t\t<label for=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>\"><?php echo $this->options[$i][\"name\"]; ?></label>\n\t\t\t\t\t\t\t\t\t\t<select id=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>\" name=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>\">\n\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\tforeach ( (array) $this->options[$i][\"options\"] as $key => $val) :\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( '' == get_option($this->options[$i][\"id\"]) || is_null( get_option($this->options[$i][\"id\"] ) ) ) : ?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"<?php echo $key; ?>\"<?php echo ($key == $this->options[$i]['std']) ? ' selected=\"selected\"' : ''; ?>><?php echo $val; ?></option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php else : ?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"<?php echo $key; ?>\"<?php echo get_option($this->options[$i][\"id\"]) == $key ? ' selected=\"selected\"' : ''; ?>><?php echo $val; ?></option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php endif;\n\t\t\t\t\t\t\t\t\t\t\t\tendforeach;\n\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t</div><!--end ttf-field select-->\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase \"textarea\":\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<div class=\"ttf-field textarea clear\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"ttf-field-d\"><?php echo $this->options[$i][\"desc\"]?></div>\n\t\t\t\t\t\t\t\t\t\t<label for=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>\"><?php echo $this->options[$i][\"name\"]?></label>\n\t\t\t\t\t\t\t\t\t\t<textarea id=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>\" name=\"<?php echo esc_attr( $this->options[$i][\"id\"] ); ?>\" <?php\n\t\t\t\t\t\t\t\t\t\t\techo ( $this->options[$i][\"options\"] ? ' rows=\"' . $this->options[$i][\"options\"][\"rows\"] . '\" cols=\"' . $this->options[$i][\"options\"][\"cols\"] . '\"' : '' );\n\t\t\t\t\t\t\t\t\t\t?>><?php\n\t\t\t\t\t\t\t\t\t\t\techo htmlspecialchars(\n\t\t\t\t\t\t\t\t\t\t\t\t'' != get_option($this->options[$i]['id']) ? get_option($this->options[$i]['id']) : $this->options[$i]['std'],\n\t\t\t\t\t\t\t\t\t\t\t\tENT_QUOTES\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t?></textarea>\n\t\t\t\t\t\t\t\t\t</div><!--end ttf-options-ttf-field textarea-->\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tendswitch;\n\t\t\t\t\t\tendfor;\n\t\t\t\t\t\t?>\n\t\t\t\t\t<div class=\"ttf-save-button submit\">\n\t\t\t\t\t\t<input class=\"button-primary\" type=\"submit\" value=\"<?php esc_attr_e( 'Save changes', $this->domain ); ?>\" name=\"save\"/>\n\t\t\t\t\t</div><!--end ttf-save-button-->\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"ttf-saveall-button submit\">\n\t\t\t\t<input class=\"button-primary\" type=\"submit\" value=\"<?php esc_attr_e( 'Save all changes', $this->domain ); ?>\" name=\"save\" />\n\t\t\t</div>\n\t\t</form>\n\n\t\t<div class=\"ttf-reset-button submit\">\n\t\t\t<form method=\"post\" action=\"\">\n\t\t\t\t<?php wp_nonce_field( 'reset-theme-options', 'reset-theme-options-nonce' ); ?>\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"reset\" />\n\t\t\t\t<input class=\"ttf-reset\" type=\"submit\" value=\"<?php esc_attr_e( 'Reset all options', $this->domain ); ?>\" name=\"reset\" />\n\t\t\t</form>\n\t\t</div>\n\n\t\t<script type=\"text/javascript\">\n\t\t\t<?php\n\t\t\tfor ($i = 0; $i < count($this->options); $i++) :\n\t\t\t\tif ($this->options[$i]['type'] == 'colorpicker') :\n\t\t\t\t\t?>\n\t\t\t\t\tjQuery(\"#<?php echo esc_js( $this->options[$i][\"id\"] ); ?>_colorpicker\").farbtastic(\"#<?php echo esc_js( $this->options[$i][\"id\"] ); ?>\");\n\t\t\t\t\t<?php\n\t\t\t\tendif;\n\t\t\tendfor;\n\t\t\t?>\n\t\t\tjQuery( '.colorpicker_container' ).hide();\n\t\t</script>\n\t</div><!--end ttf-options-body-->\n</div><!--end wrap-->\n<?php\n\t\t}", "function wpdc_divi_child_options_page(){\r\n\t\t\r\n\t\t$options = get_option('wpdc_options');\r\n\t\t\r\n echo '<div class=\"wrap\">';\r\n\t\techo '<h2>'.WPDC_THEME_NAME.' Options <span style=\"font-size:10px;\">Ver '.WPDC_VER.'</span></h2>';\r\n\t\techo '<form method=\"post\" action=\"options.php\">';\r\n\t\tsettings_fields('wpdc_plugin_options_group');\r\n\t\tsettings_errors();\r\n\t\trequire_once('views.php');\t\t// load table settings\r\n\t\techo '<div style=\"clear:both;\"></div>';\r\n\t\techo '</div>';\r\n\t\techo '<div style=\"clear:both;\"></div>';\r\n echo '</form>';\r\n }", "public function form( $instance ) {\n\t\t// outputs the options form on admin\n $this->getForm($instance);\n\t}", "function em_ms_admin_options_page() {\n\tglobal $wpdb,$EM_Notices;\n\t//Check for uninstall/reset request\n\tif( !empty($_REQUEST['action']) && $_REQUEST['action'] == 'uninstall' ){\n\t\tem_admin_options_uninstall_page();\n\t\treturn;\n\t}\t\n\tif( !empty($_REQUEST['action']) && $_REQUEST['action'] == 'reset' ){\n\t\tem_admin_options_reset_page();\n\t\treturn;\n\t}\t\n\t//TODO place all options into an array\n\t$events_placeholders = '<a href=\"'.EM_ADMIN_URL .'&amp;events-manager-help#event-placeholders\">'. __('Event Related Placeholders','events-manager') .'</a>';\n\t$locations_placeholders = '<a href=\"'.EM_ADMIN_URL .'&amp;events-manager-help#location-placeholders\">'. __('Location Related Placeholders','events-manager') .'</a>';\n\t$bookings_placeholders = '<a href=\"'.EM_ADMIN_URL .'&amp;events-manager-help#booking-placeholders\">'. __('Booking Related Placeholders','events-manager') .'</a>';\n\t$categories_placeholders = '<a href=\"'.EM_ADMIN_URL .'&amp;events-manager-help#category-placeholders\">'. __('Category Related Placeholders','events-manager') .'</a>';\n\t$events_placeholder_tip = \" \". sprintf(__('This accepts %s and %s placeholders.','events-manager'),$events_placeholders, $locations_placeholders);\n\t$locations_placeholder_tip = \" \". sprintf(__('This accepts %s placeholders.','events-manager'), $locations_placeholders);\n\t$categories_placeholder_tip = \" \". sprintf(__('This accepts %s placeholders.','events-manager'), $categories_placeholders);\n\t$bookings_placeholder_tip = \" \". sprintf(__('This accepts %s, %s and %s placeholders.','events-manager'), $bookings_placeholders, $events_placeholders, $locations_placeholders);\n\t\n\tglobal $save_button;\n\t$save_button = '<tr><th>&nbsp;</th><td><p class=\"submit\" style=\"margin:0px; padding:0px; text-align:right;\"><input type=\"submit\" class=\"button-primary\" name=\"Submit\" value=\"'. __( 'Save Changes', 'events-manager') .' ('. __('All','events-manager') .')\" /></p></td></tr>';\n\t//Do some multisite checking here for reuse\n\t?>\t\n\t<script type=\"text/javascript\" charset=\"utf-8\"><?php include(EM_DIR.'/includes/js/admin-settings.js'); ?></script>\n\t<script type=\"text/javascript\" charset=\"utf-8\">\n\t\tjQuery(document).ready(function($){\n\t\t\t//events\n\t\t\t$('input[name=\"dbem_ms_global_events\"]').change(function(){\n\t\t\t\tif( $('input:radio[name=\"dbem_ms_global_events\"]:checked').val() == 1 ){\n\t\t\t\t\t$(\"tr#dbem_ms_global_events_links_row\").show();\n\t\t\t\t\t$('input:radio[name=\"dbem_ms_global_events_links\"]:checked').trigger('change');\n\t\t\t\t}else{\n\t\t\t\t\t$(\"tr#dbem_ms_global_events_links_row, tr#dbem_ms_events_slug_row\").hide();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}).first().trigger('change');\n\t\t\t$('input[name=\"dbem_ms_global_events_links\"]').change(function(){\n\t\t\t\tif( $('input:radio[name=\"dbem_ms_global_events_links\"]:checked').val() == 1 ){\n\t\t\t\t\t$(\"tr#dbem_ms_events_slug_row\").hide();\t\n\t\t\t\t}else{\t\t\t\t\n\t\t\t\t\t$(\"tr#dbem_ms_events_slug_row\").show();\n\t\t\t\t}\n\t\t\t}).first().trigger('change');\n\t\t\t//locations\n\t\t\t$('input[name=\"dbem_ms_mainblog_locations\"]').change(function(){\n\t\t\t\tif( $('input:radio[name=\"dbem_ms_mainblog_locations\"]:checked').val() == 1 ){\n\t\t\t\t\t$(\"tbody.em-global-locations\").hide();\n\t\t\t\t}else{\n\t\t\t\t\t$(\"tbody.em-global-locations\").show();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}).first().trigger('change');\n\t\t\t$('input[name=\"dbem_ms_global_locations\"]').change(function(){\n\t\t\t\tif( $('input:radio[name=\"dbem_ms_global_locations\"]:checked').val() == 1 ){\n\t\t\t\t\t$(\"tr#dbem_ms_global_locations_links_row\").show();\n\t\t\t\t\t$('input:radio[name=\"dbem_ms_global_locations_links\"]:checked').trigger('change');\n\t\t\t\t}else{\n\t\t\t\t\t$(\"tr#dbem_ms_global_locations_links_row, tr#dbem_ms_locations_slug_row\").hide();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}).first().trigger('change');\n\t\t\t$('input[name=\"dbem_ms_global_locations_links\"]').change(function(){\n\t\t\t\tif( $('input:radio[name=\"dbem_ms_global_locations_links\"]:checked').val() == 1 ){\n\t\t\t\t\t$(\"tr#dbem_ms_locations_slug_row\").hide();\t\n\t\t\t\t}else{\n\t\t\t\t\t$(\"tr#dbem_ms_locations_slug_row\").show();\t\t\t\t\n\t\t\t\t}\n\t\t\t});\t\t\n\t\t\t//MS Mode selection hiders \n\t\t\t$('input[name=\"dbem_ms_global_table\"]').change(function(){ //global\n\t\t\t\tif( $('input:radio[name=\"dbem_ms_global_table\"]:checked').val() == 1 ){\n\t\t\t\t\t$(\"tbody.em-global-options\").show();\n\t\t\t\t\t$('input:radio[name=\"dbem_ms_mainblog_locations\"]:checked').trigger('change');\n\t\t\t\t}else{\n\t\t\t\t\t$(\"tbody.em-global-options\").hide();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}).first().trigger('change');\t\n\t\t});\n\t</script>\n\t<style type=\"text/css\">.postbox h3 { cursor:pointer; }</style>\n\t<div class=\"wrap <?php if(empty($tabs_enabled)) echo 'tabs-active' ?>\">\n\t\t<div id='icon-options-general' class='icon32'><br /></div>\n\t\t<h1 id=\"em-options-title\"><?php _e ( 'Event Manager Options', 'events-manager'); ?></h1>\n\t\t<h2 class=\"nav-tab-wrapper\">\n\t\t\t<?php\n\t\t\t$tabs_enabled = defined('EM_SETTINGS_TABS') && EM_SETTINGS_TABS;\n\t\t\tif( $tabs_enabled ){\n\t\t\t\t$general_tab_link = esc_url(add_query_arg( array('em_tab'=>'general')));\n\t\t\t}else{\n\t\t\t\t$general_tab_link = '';\n\t\t\t}\n\t\t\t?>\n\t\t\t<a href=\"<?php echo $general_tab_link ?>#general\" id=\"em-menu-general\" class=\"nav-tab nav-tab-active\"><?php esc_html_e('General','events-manager'); ?></a>\n\t\t\t<?php\n\t\t\t$custom_tabs = apply_filters('em_ms_options_page_tabs', array());\n\t\t\tforeach( $custom_tabs as $tab_key => $tab_name ){\n\t\t\t\t$tab_link = !empty($tabs_enabled) ? esc_url(add_query_arg( array('em_tab'=>$tab_key))) : '';\n\t\t\t\t$active_class = !empty($tabs_enabled) && !empty($_GET['em_tab']) && $_GET['em_tab'] == $tab_key ? 'nav-tab-active':'';\n\t\t\t\techo \"<a href='$tab_link#$tab_key' id='em-menu-$tab_key' class='nav-tab $active_class'>$tab_name</a>\";\n\t\t\t}\n\t\t\t?>\n\t\t</h2>\n\t\t<?php echo $EM_Notices; ?>\n\t\t<form id=\"em-options-form\" method=\"post\" action=\"\">\n\t\t\t<div class=\"metabox-holder\"> \n\t\t\t<!-- // TODO Move style in css -->\n\t\t\t<div class='postbox-container' style='width: 99.5%'>\n\t\t\t<div id=\"\">\n\t\t\t<?php if( !$tabs_enabled || ($tabs_enabled && (empty($_REQUEST['em_tab']) || $_REQUEST['em_tab'] == 'general')) ): //make less changes for now, since we don't have any core tabs to add yet ?>\n\t\t \t<div class=\"em-menu-general em-menu-group\">\n\t\t\t\t<div class=\"postbox \" id=\"em-opt-ms-options\" >\n\t\t\t\t\t<div class=\"handlediv\" title=\"<?php __('Click to toggle', 'events-manager'); ?>\"><br /></div><h3><span><?php _e ( 'Multi Site Options', 'events-manager'); ?></span></h3>\n\t\t\t\t\t<div class=\"inside\">\n\t\t\t <table class=\"form-table\">\n\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\tem_options_radio_binary ( __( 'Enable global tables mode?', 'events-manager'), 'dbem_ms_global_table', __( 'Setting this to yes will make all events save in the main site event tables (EM must also be activated). This allows you to share events across different blogs, such as showing events in your network whilst allowing users to display and manage their events within their own blog. Bear in mind that activating this will mean old events created on the sub-blogs will not be accessible anymore, and if you switch back they will be but new events created during global events mode will only remain on the main site.','events-manager') );\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<tbody class=\"em-global-options\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tglobal $current_site;\n\t\t\t\t\t\t\t$global_slug_tip = __('%s belonging to other sub-sites will have an extra slug prepended to it so that your main site can differentiate between its own %s and those belonging to other sites in your network.','events-manager');\n\t\t\t\t\t\t\t$global_link_tip = __( 'When displaying global %s on the main site you have the option of users viewing the %s details on the main site or being directed to the sub-site.','events-manager');\n\t\t\t\t\t\t\t$global_post_tip = __( 'Displays %s from all sites on the network by default. You can still restrict %s by blog using shortcodes and template tags coupled with the <code>blog</code> attribute. Requires global tables to be turned on.','events-manager');\n\t\t\t\t\t\t\t$global_link_tip2 = __('You <strong>must</strong> have assigned a %s page in your <a href=\"%s\">main blog settings</a> for this to work.','events-manager');\n\t\t\t\t\t\t\t$options_page_link = get_admin_url($current_site->blog_id, 'edit.php?post_type='.EM_POST_TYPE_EVENT.'&page=events-manager-options#pages');\n\t\t\t\t\t\t\t?><tr class=\"em-header\"><td><h4><?php echo sprintf(__('%s Options','events-manager'),__('Event','events-manager')); ?></h4></td></tr><?php\n\t\t\t\t\t\t\tem_options_radio_binary ( sprintf(__( 'Display global events on main blog?', 'events-manager'), __('events','events-manager')), 'dbem_ms_global_events', sprintf($global_post_tip, __('events','events-manager'), __('events','events-manager')) );\n\t\t\t\t\t\t\tem_options_radio_binary ( sprintf(__( 'Link sub-site %s directly to sub-site?', 'events-manager'), __('events','events-manager')), 'dbem_ms_global_events_links', sprintf($global_link_tip, __('events','events-manager'), __('event','events-manager')).sprintf($global_link_tip2, __('event','events-manager'), $options_page_link) );\n\t\t\t\t\t\t\tem_options_input_text ( sprintf(__( 'Global %s slug', 'events-manager'),__('event','events-manager')), 'dbem_ms_events_slug', sprintf($global_slug_tip, __('Events','events-manager'), __('events','events-manager')).__('Example:','events-manager').'<code>http://yoursite.com/events/<strong>event</strong>/subsite-event-slug/', EM_EVENT_SLUG );\n\t\t\t\t\t\t\t?><tr class=\"em-header\"><td><h4><?php echo sprintf(__('%s Options','events-manager'),__('Location','events-manager')); ?></h4></td></tr><?php\n\t\t\t\t\t\t\tem_options_radio_binary ( sprintf(__( 'Locations on main blog?', 'events-manager'), __('locations','events-manager')), 'dbem_ms_mainblog_locations', __('If you would prefer all your locations to belong to your main blog, users in sub-sites will still be able to create locations, but the actual locations are created and reside in the main blog.','events-manager') );\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t<tbody class=\"em-global-options em-global-locations\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tem_options_radio_binary ( sprintf(__( 'Display global %s on main blog?', 'events-manager'), __('locations','events-manager')), 'dbem_ms_global_locations', sprintf($global_post_tip, __('locations','events-manager'), __('locations','events-manager')) );\n\t\t\t\t\t\t\tem_options_radio_binary ( sprintf(__( 'Link sub-site %s directly to sub-site?', 'events-manager'), __('locations','events-manager')), 'dbem_ms_global_locations_links', sprintf($global_link_tip, __('locations','events-manager'), __('location','events-manager')).sprintf($global_link_tip2, __('location','events-manager'), $options_page_link) );\n\t\t\t\t\t\t\tem_options_input_text ( sprintf(__( 'Global %s slug', 'events-manager'),__('location','events-manager')), 'dbem_ms_locations_slug', sprintf($global_slug_tip, __('Locations','events-manager'), __('locations','events-manager')).__('Example:','events-manager').'<code>http://yoursite.com/locations/<strong>location</strong>/subsite-location-slug/', EM_LOCATION_SLUG );\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t<?php echo $save_button; ?>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t \n\t\t\t\t\t</div> <!-- . inside --> \n\t\t\t\t</div> <!-- .postbox --> \n\t\t\t\t\n\t\t\t\t<?php \n\t\t\t\t//including shared MS/non-MS boxes\n\t\t\t\tem_admin_option_box_caps();\n\t\t\t\tem_admin_option_box_image_sizes();\n\t\t\t\tem_admin_option_box_email();\n\t\t\t\tem_admin_option_box_uninstall();\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t<?php do_action('em_ms_options_page_footer'); ?>\n\t\t\t</div> <!-- .em-menu-general -->\n\t\t\t<?php endif; ?>\n\t\t\t<?php\n\t\t\t//other tabs\n\t\t\tif( $tabs_enabled ){\n\t\t\t\tif( array_key_exists($_REQUEST['em_tab'], $custom_tabs) ){\n\t\t\t\t\t?>\n\t\t\t\t\t<div class=\"em-menu-bookings em-menu-group\">\n\t\t\t\t\t\t<?php do_action('em_ms_options_page_tab_'. $_REQUEST['em_tab']); ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tforeach( $custom_tabs as $tab_key => $tab_name ){\n\t\t\t\t\t?>\n\t\t\t\t\t<div class=\"em-menu-<?php echo esc_attr($tab_key) ?> em-menu-group\" style=\"display:none;\">\n\t\t\t\t\t\t<?php do_action('em_ms_options_page_tab_'. $tab_key); ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}\n\t\t\t?>\n\n\t\t\t<p class=\"submit\">\n\t\t\t\t<input type=\"submit\" class=\"button-primary\" name=\"Submit\" value=\"<?php esc_attr_e( 'Save Changes', 'events-manager'); ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"em-submitted\" value=\"1\" />\n\t\t\t\t<input type=\"hidden\" name=\"_wpnonce\" value=\"<?php echo wp_create_nonce('events-manager-options'); ?>\" />\n\t\t\t</p> \n\t\t\t\n\t\t\t</div> <!-- .metabox-sortables -->\n\t\t\t</div> <!-- .postbox-container -->\n\t\t\t\n\t\t\t</div> <!-- .metabox-holder -->\t\n\t\t</form>\n\t</div>\n\t<?php\n}", "public function create_options_page() {\n print '<div class=\"wrap\">';\n screen_icon();\n printf( '<h2>%s</h2>', __( 'Instagram Settings', 'bii-instagram' ) );\n print '<form method=\"post\" action=\"options.php\">';\n settings_fields( 'bii_instagram' );\n do_settings_sections( 'bii-instagram' );\n submit_button();\n print '</form>';\n print '</div>';\n }", "public function form()\n\t{\n\t?>\n\t<table class=\"form-table\">\n\t\t<tbody>\n\t\t<?php foreach( (array) $this->InstanceRegistred as $id => $args ) : ?>\n\t\t\t<tr>\n\t\t\t\t<th><?php echo $args['title'];?></th>\n\t\t\t\t<td>\n\t\t\t\t<?php \n\t\t\t\t\twp_dropdown_pages(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'name' \t\t\t\t=> $args['name'],\n\t\t\t\t\t\t\t'post_type' \t\t=> $args['post_type'],\n\t\t\t\t\t\t\t'selected' \t\t\t=> $args['selected'],\n\t\t\t\t\t\t\t'sort_column' \t\t=> $args['listorder'],\n\t\t\t\t\t\t\t'show_option_none' \t=> $args['show_option_none']\t\t\t\t\t\t\t\n\t\t\t\t\t\t)\n\t\t\t\t\t);\t\t\t\t\n\t\t\t\t?>\t\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php endforeach;?>\n\t\t</tbody>\n\t</table>\n\t<?php\t\t\n\t}", "function handle_options()\r\n {\r\n $options = $this->get_options();\r\n \r\n if (isset($_POST['submitted'])) {\r\n \t\t\r\n \t\t//check security\r\n \t\tcheck_admin_referer('snazzy-nonce');\r\n \t\t\r\n $options = array();\r\n \r\n $options['years'] = htmlspecialchars($_POST['years']);\r\n $options['mini'] = $_POST['mini'];\r\n $options['posts'] = $_POST['posts'];\r\n $options['pages'] = $_POST['pages'];\r\n \r\n update_option($this->db_option, $options);\r\n \r\n echo '<div class=\"updated fade\"><p>Plugin settings saved.</p></div>';\r\n }\r\n \r\n $layout = $options['layout'];\r\n $years = stripslashes($options['years']);\r\n $mini = $options['mini'] == 'on' ? 'checked' : '';\r\n $posts = $options['posts'] == 'on' ? 'checked' : '';\r\n $pages = $options['pages'] == 'on' ? 'checked' : '';\r\n \r\n // URL for form submit, equals our current page\r\n $action_url = $_SERVER['REQUEST_URI'];\r\n \r\n include('snazzy-archives-options.php');\r\n }", "public function view_option_page() {\n\t\tinclude_once plugin_dir_path( __FILE__ ) . 'options.php';\n\t}", "public function admin_page_display() {\n ?>\n <div class=\"wrap cmb_options_page <?php echo $this->key; ?>\">\n <h2><?php echo esc_html( get_admin_page_title() ); ?></h2>\n <?php cmb_metabox_form( self::option_fields(), $this->key ); ?>\n </div>\n <?php\n }", "public static function es_admin_option() {\n\t}", "public function add_options_html() {\n\n $has_nav = ( count( $this->pre_tabs ) > 1 ) ? true : false;\n $show_all = ( ! $has_nav ) ? ' csf-show-all' : '';\n $ajax_class = ( $this->args['ajax_save'] ) ? ' csf-save-ajax' : '';\n $sticky_class = ( $this->args['sticky_header'] ) ? ' csf-sticky-header' : '';\n $wrapper_class = ( $this->args['framework_class'] ) ? ' '. $this->args['framework_class'] : '';\n\n echo '<div class=\"csf csf-theme-'. $this->args['theme'] .' csf-options'. $wrapper_class .'\" data-slug=\"'. $this->args['menu_slug'] .'\" data-unique=\"'. $this->unique .'\">';\n\n $notice_class = ( ! empty( $this->notice ) ) ? ' csf-form-show' : '';\n $notice_text = ( ! empty( $this->notice ) ) ? $this->notice : '';\n\n echo '<div class=\"csf-form-result csf-form-success'. $notice_class .'\">'. $notice_text .'</div>';\n\n $error_class = ( ! empty( $this->errors ) ) ? ' csf-form-show' : '';\n\n echo '<div class=\"csf-form-result csf-form-error'. $error_class .'\">';\n if( ! empty( $this->errors ) ) {\n foreach ( $this->errors as $error ) {\n echo '<i class=\"csf-label-error\">!</i> '. $error .'<br />';\n }\n }\n echo '</div>';\n\n echo '<div class=\"csf-container\">';\n\n echo '<form method=\"post\" action=\"\" enctype=\"multipart/form-data\" id=\"csf-form\">';\n\n echo '<input type=\"hidden\" class=\"csf-section-id\" name=\"csf_transient[section]\" value=\"1\">';\n wp_nonce_field( 'csf_options_nonce', 'csf_options_nonce' );\n\n echo '<div class=\"csf-header'. esc_attr( $sticky_class ) .'\">';\n echo '<div class=\"csf-header-inner\">';\n\n echo '<div class=\"csf-header-left\">';\n echo '<h1>'. $this->args['framework_title'] .'</h1>';\n echo '</div>';\n\n echo '<div class=\"csf-header-right\">';\n\n echo ( $has_nav && $this->args['show_all_options'] ) ? '<div class=\"csf-expand-all\" title=\"'. esc_html__( 'show all options', 'csf' ) .'\"><i class=\"fa fa-outdent\"></i></div>' : '';\n\n echo ( $this->args['show_search'] ) ? '<div class=\"csf-search\"><input type=\"text\" placeholder=\"'. esc_html__( 'Search option(s)', 'csf' ) .'\" /></div>' : '';\n\n echo '<div class=\"csf-buttons\">';\n echo '<input type=\"submit\" name=\"'. $this->unique .'[_nonce][save]\" class=\"button button-primary csf-save'. $ajax_class .'\" value=\"'. esc_html__( 'Save', 'csf' ) .'\" data-save=\"'. esc_html__( 'Saving...', 'csf' ) .'\">';\n echo ( $this->args['show_reset_section'] ) ? '<input type=\"submit\" name=\"csf_transient[reset_section]\" class=\"button button-secondary csf-reset-section csf-confirm\" value=\"'. esc_html__( 'Reset Section', 'csf' ) .'\" data-confirm=\"'. esc_html__( 'Are you sure to reset this section options?', 'csf' ) .'\">' : '';\n echo ( $this->args['show_reset_all'] ) ? '<input type=\"submit\" name=\"csf_transient[reset]\" class=\"button button-secondary csf-warning-primary csf-reset-all csf-confirm\" value=\"'. esc_html__( 'Reset All', 'csf' ) .'\" data-confirm=\"'. esc_html__( 'Are you sure to reset all options?', 'csf' ) .'\">' : '';\n echo '</div>';\n\n echo '</div>';\n\n echo '<div class=\"clear\"></div>';\n echo '</div>';\n echo '</div>';\n\n echo '<div class=\"csf-wrapper'. $show_all .'\">';\n\n if( $has_nav ) {\n echo '<div class=\"csf-nav csf-nav-options\">';\n\n echo '<ul>';\n\n $tab_key = 1;\n\n foreach( $this->pre_tabs as $tab ) {\n\n $tab_error = $this->error_check( $tab );\n $tab_icon = ( ! empty( $tab['icon'] ) ) ? '<i class=\"'. $tab['icon'] .'\"></i>' : '';\n\n if( ! empty( $tab['subs'] ) ) {\n\n echo '<li class=\"csf-tab-depth-0\">';\n\n echo '<a href=\"#tab='. $tab_key .'\" class=\"csf-arrow\">'. $tab_icon . $tab['title'] . $tab_error .'</a>';\n\n echo '<ul>';\n\n foreach ( $tab['subs'] as $sub ) {\n\n $sub_error = $this->error_check( $sub );\n $sub_icon = ( ! empty( $sub['icon'] ) ) ? '<i class=\"'. $sub['icon'] .'\"></i>' : '';\n\n echo '<li class=\"csf-tab-depth-1\"><a id=\"csf-tab-link-'. $tab_key .'\" href=\"#tab='. $tab_key .'\">'. $sub_icon . $sub['title'] . $sub_error .'</a></li>';\n\n $tab_key++;\n }\n\n echo '</ul>';\n\n echo '</li>';\n\n } else {\n\n echo '<li class=\"csf-tab-depth-0\"><a id=\"csf-tab-link-'. $tab_key .'\" href=\"#tab='. $tab_key .'\">'. $tab_icon . $tab['title'] . $tab_error .'</a></li>';\n\n $tab_key++;\n }\n\n }\n\n echo '</ul>';\n\n echo '</div>';\n\n }\n\n echo '<div class=\"csf-content\">';\n\n echo '<div class=\"csf-sections\">';\n\n $section_key = 1;\n\n foreach( $this->pre_sections as $section ) {\n\n $onload = ( ! $has_nav ) ? ' csf-onload' : '';\n $section_icon = ( ! empty( $section['icon'] ) ) ? '<i class=\"csf-icon '. $section['icon'] .'\"></i>' : '';\n\n echo '<div id=\"csf-section-'. $section_key .'\" class=\"csf-section'. $onload .'\">';\n echo ( $has_nav ) ? '<div class=\"csf-section-title\"><h3>'. $section_icon . $section['title'] .'</h3></div>' : '';\n echo ( ! empty( $section['description'] ) ) ? '<div class=\"csf-field csf-section-description\">'. $section['description'] .'</div>' : '';\n\n if( ! empty( $section['fields'] ) ) {\n\n foreach( $section['fields'] as $field ) {\n\n $is_field_error = $this->error_check( $field );\n\n if( ! empty( $is_field_error ) ) {\n $field['_error'] = $is_field_error;\n }\n\n $value = ( ! empty( $field['id'] ) && isset( $this->options[$field['id']] ) ) ? $this->options[$field['id']] : '';\n\n CSF::field( $field, $value, $this->unique, 'options' );\n\n }\n\n } else {\n\n echo '<div class=\"csf-no-option csf-text-muted\">'. esc_html__( 'No option provided by developer.', 'csf' ) .'</div>';\n\n }\n\n echo '</div>';\n\n $section_key++;\n }\n\n echo '</div>';\n\n echo '<div class=\"clear\"></div>';\n\n echo '</div>';\n\n echo '<div class=\"csf-nav-background\"></div>';\n\n echo '</div>';\n\n if( ! empty( $this->args['show_footer'] ) ) {\n\n echo '<div class=\"csf-footer\">';\n\n echo '<div class=\"csf-buttons\">';\n echo '<input type=\"submit\" name=\"csf_transient[save]\" class=\"button button-primary csf-save'. $ajax_class .'\" value=\"'. esc_html__( 'Save', 'csf' ) .'\" data-save=\"'. esc_html__( 'Saving...', 'csf' ) .'\">';\n echo ( $this->args['show_reset_section'] ) ? '<input type=\"submit\" name=\"csf_transient[reset_section]\" class=\"button button-secondary csf-reset-section csf-confirm\" value=\"'. esc_html__( 'Reset Section', 'csf' ) .'\" data-confirm=\"'. esc_html__( 'Are you sure to reset this section options?', 'csf' ) .'\">' : '';\n echo ( $this->args['show_reset_all'] ) ? '<input type=\"submit\" name=\"csf_transient[reset]\" class=\"button button-secondary csf-warning-primary csf-reset-all csf-confirm\" value=\"'. esc_html__( 'Reset All', 'csf' ) .'\" data-confirm=\"'. esc_html__( 'Are you sure to reset all options?', 'csf' ) .'\">' : '';\n echo '</div>';\n\n echo ( ! empty( $this->args['footer_text'] ) ) ? '<div class=\"csf-copyright\">'. $this->args['footer_text'] .'</div>' : '';\n\n echo '<div class=\"clear\"></div>';\n echo '</div>';\n\n }\n\n echo '</form>';\n\n echo '</div>';\n\n echo '<div class=\"clear\"></div>';\n\n echo ( ! empty( $this->args['footer_after'] ) ) ? $this->args['footer_after'] : '';\n\n echo '</div>';\n\n }", "public function admin_page_display() {\n ?>\n <div class=\"wrap cmb_options_page <?php echo self::$key; ?>\">\n <h2><?php echo esc_html( get_admin_page_title() ); ?></h2>\n <?php cmb_metabox_form( self::option_fields(), self::$key ); ?>\n </div>\n <?php\n }", "public function optionsdemo_settings_content() { ?>\n\t\t\t<div class=\"wrap\">\t\t\t\t\n\t\t\t\t<form method=\"POST\" action=\"options.php\">\n\t\t\t\t\t<?php\n\t\t\t\t\tsettings_fields( 'optionsdemo' );\n\t\t\t\t\tdo_settings_sections( 'optionsdemo' );\n\t\t\t\t\tsubmit_button();\n\t\t\t\t\t?>\n\t\t\t\t</form>\n\t\t\t</div> <?php\n\t\t}", "public function display_analytics_options_page() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h2>WSU Analytics Settings</h2>\n\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t<?php\n\t\twp_nonce_field( 'wsuwp-analytics-options' );\n\t\tdo_settings_sections( $this->settings_page );\n\n\t\tsubmit_button();\n\t\t?>\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"update\" />\n\t\t\t\t<input type=\"hidden\" name=\"option_page\" value=\"wsuwp-analytics\" />\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "final public function print_editor_options() {\r\n\t\tob_start(); ?>\r\n\t\t<div class=\"field-settings-wrapper\" v-if=\"field.type == '<?php echo esc_attr( $this->props['type'] ) ?>'\">\r\n\t\t\t<?php $this->get_editor_options(); ?>\r\n\t\t\t<?php $this->get_visibility_settings() ?>\r\n\t\t</div>\r\n\t\t<?php return ob_get_clean();\r\n\t}", "function options_form() {\n return array(\n );\n }", "function save_admin_options()\n {\n return update_option($this->options_name, $this->options);\n }", "public function display() {\r\n\r\n\t\t$this->echoOptionHeader();\r\n\r\n\t\tif ( ! empty( $this->options ) ) {\r\n\t\t\tforeach ( $this->options as $option ) {\r\n\r\n\t\t\t\t// Display the name of the option.\r\n\t\t\t\t$name = $option->getName();\r\n\t\t\t\tif ( ! empty( $name ) && ! $option->getHidden() ) {\r\n\t\t\t\t\techo '<span class=\"tf-group-name\">' . esc_html( $name ) . '</span> ';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Disable wrapper printing.\r\n\t\t\t\t$option->echo_wrapper = false;\r\n\r\n\t\t\t\t// Display the option field.\r\n\t\t\t\techo '<span class=\"tf-group-option\">';\r\n\t\t\t\t$option->display();\r\n\t\t\t\techo '</span>';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->echoOptionFooter();\r\n\t}", "public function mm_options_page() { \n $tmp = $this->plugin_dir . '/inc/views/options-page.php';\n \n ob_start();\n include( $tmp );\n $output = ob_get_contents();\n ob_end_clean();\n echo $output;\n }", "function wcfm_options_page_html() {\n\t\tglobal $WCFM;\n\t\t// check user capabilities\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t return;\n\t\t}\n\t\t\n\t\t// add error/update messages\n\t\t\n\t\tif ( isset( $_GET['settings-updated'] ) ) {\n\t\t // add settings saved message with the class of \"updated\"\n\t\t add_settings_error( 'wcfm_messages', 'wcfm_message', __( 'Settings Saved', $WCFM->text_domain ), 'updated' );\n\t\t}\n\t\t\n\t\t// show error/update messages\n\t\tsettings_errors( 'wcfm_messages' );\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t\t<form action=\"options.php\" method=\"post\">\n\t\t\t<div style=\"float: left; display: inline-block; width: 60%;\">\n\t\t\t\t <?php \n\t\t\t\t\t settings_fields( 'wcfm' );\n\t\t\t\t\t do_settings_sections( 'wcfm' );\n\t\t\t\t\t submit_button( 'Save Settings' );\n\t\t\t\t ?>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"wcfm_admin_message_wrapper\">\n\t\t\t\t<div class=\"wcfm_admin_message wcfm_admin_help_docs\">\n\t\t\t\t\t<h2>How can we help you?</h2>\n\t\t\t\t\t<ul style=\"list-style: outside; margin-left: 50px;\">\n\t\t\t\t\t <li><a target=\"_blank\" href=\"https://wclovers.com/blog/woocommerce-multivendor-marketplace-wcfm-marketplace/\">WCFM - Marketplace</a></li>\n\t\t\t\t\t <li><a target=\"_blank\" href=\"http://wclovers.com/knowledgebase/\">WCFM - Documentation</a></li>\n\t\t\t\t\t <li><a target=\"_blank\" href=\"https://wclovers.com/wcfm-tutorials/\">WCFM - Video Tutorial</a></li>\n\t\t\t\t\t\t<li><a target=\"_blank\" href=\"https://wclovers.com/blog/woocommerce-frontend-manager/\">WCFM - what will do for you?</a></li>\n\t\t\t\t\t\t<li><a target=\"_blank\" href=\"https://wclovers.com/blog/wcfm-dashboard-as-site-template/\">Customize WCFM Dashboard</a></li>\n\t\t\t\t\t\t<li><a target=\"_blank\" href=\"https://wclovers.com/blog/choose-best-woocommerce-multi-vendor-marketplace-plugin/\">Choose your Marketplace plugin</a></li>\n\t\t\t\t\t\t<li><a target=\"_blank\" href=\"https://wclovers.com/blog/location-products-wcfm/\">WCFM -> GEO my WP</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<?php if(!WCFM_Dependencies::wcfmvm_plugin_active_check()) { ?>\n\t\t\t\t\t<div class=\"wcfm_admin_message\">\n\t\t\t\t\t\t<h2>Setup vendor subscription in 5 minutes -</h2>\n\t\t\t\t\t\t<a class=\"primary membership_btn\" href=\"https://wordpress.org/plugins/wc-multivendor-membership/\" target=\"_blank\">WCFM - Membership</a>\n\t\t\t\t\t</div>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php if(!WCFM_Dependencies::wcfmu_plugin_active_check()) { ?>\n\t\t\t\t\t<div class=\"wcfm_admin_message\">\n\t\t\t\t\t\t<h2>Are you looking for something like this?</h2>\n\t\t\t\t\t\t<ul style=\"list-style: outside; margin-left: 50px;\">\n\t\t\t\t\t\t <li>Live Chat Module</li>\n\t\t\t\t\t\t\t<li>Support Ticket System</li>\n\t\t\t\t\t\t\t<li>Vendor Followers</li>\n\t\t\t\t\t\t\t<li>Store Invoice</li>\n\t\t\t\t\t\t\t<li>Product Importer</li>\n\t\t\t\t\t\t\t<li>Shipping Tracking</li>\n\t\t\t\t\t\t\t<li>Advanced Custom Fields</li>\n\t\t\t\t\t\t\t<li>GEO Map integration</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<a class=\"primary\" href=\"https://wclovers.com/product/woocommerce-frontend-manager-ultimate/\" target=\"_blank\">Click here to get all this...</a>\n\t\t\t\t\t</div>\n\t\t\t\t<?php } elseif(!WCFM_Dependencies::wcfma_plugin_active_check()) { ?>\n\t\t\t\t\t<div class=\"wcfm_admin_message\">\n\t\t\t\t\t\t<h2>How a store can even without Analytics?</h2>\n\t\t\t\t\t\t<ul style=\"list-style: outside; margin-left: 50px;\">\n\t\t\t\t\t\t\t<li>Analytics by Region</li>\n\t\t\t\t\t\t\t<li>Analytics by Store</li>\n\t\t\t\t\t\t\t<li>Analytics by Product</li>\n\t\t\t\t\t\t\t<li>Analytics by Category</li>\n\t\t\t\t\t\t\t<li>Analytics Comparison</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<a class=\"primary\" href=\"https://wclovers.com/product/woocommerce-frontend-manager-analytics/\" target=\"_blank\">Click here to get all this...</a>\n\t\t\t\t\t</div>\n\t\t\t\t<?php } ?>\n\t\t\t\t<div class=\"wcfm_admin_message wcfm_admin_support_docs\">\n\t\t\t\t\t<h2>All we want is Love!!</h2>\n\t\t\t\t\t<ul style=\"list-style: outside; margin-left: 50px;\">\n\t\t\t\t\t\t<li><a href=\"https://twitter.com/wcfmlovers\" target=\"_blank\">Get in touch</a></li>\n\t\t\t\t\t\t<li><a href=\"https://wordpress.org/support/plugin/wc-frontend-manager/reviews/\" target=\"_blank\">Be with US</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</form>\n\t\t</div>\n\t\t<?php\n }", "public function print_default_options_page() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t\t\t<p>WPCampus settings require the Advanced Custom Fields PRO plugin. <a href=\"<?php echo admin_url( 'plugins.php' ); ?>\">Manage plugins</a></p>\n\t\t</div>\n\t\t<?php\n\t}", "public function process_admin_options() {\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_enabled'] ) ) update_option( 'jigoshop_tgm_custom_gateway_enabled', jigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_enabled'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_enabled' );\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_title'] ) ) update_option( 'jigoshop_tgm_custom_gateway_title', jigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_title'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_title' );\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_description'] ) ) update_option( 'jigoshop_tgm_custom_gateway_description', \tjigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_description'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_description' );\n \t}", "public function actionMyOptions()\n {\n echo \"option1 - $this->option1\\n\\roption2 - $this->option2\\n\\rcolor - $this->color\\n\\r\";\n }", "function cbstdsys_render_form() {\n\t?>\n\t<div class=\"wrap\">\n\n\t\t<!-- Display Plugin Icon, Header, and Description -->\n\t\t<div class=\"icon32\" id=\"icon-options-general\"><br></div>\n\t\t<h2><span style=\"font-family:Consolas,Monaco,Courier,monospace\">cb-std-sys</span>-<?php _e('Settings'); ?>, Version <?php echo CB_STD_SYS_VERSION; ?></h2>\n\n\t\t<!-- Beginning of the Plugin Options Form -->\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields('cbstdsys_plugin_options'); ?>\n\n<!--\n <fieldset>\n <legend><?php _e('Content','cb-std-sys'); ?></legend>\n\n \t\t\t<table class=\"form-table\">\n-->\n<?php render_form_fields( get_cbstdsys_options(), 'cbstdsys', 'cbstdsys_options' ); ?>\n<!--\n </table>\n\n </fieldset>\n-->\n\t\t\t<p class=\"submit\">\n\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\n\t\t\t</p>\n\n\t\t</form>\n\n\t</div>\n\t<?php\n}", "public function render_admin_page() {\n $option_name = $this->name; \n include_once( dirname( __FILE__ ) . '/views/admin-page.php' );\n }", "public function optionsdemo_settings_content() { ?>\n <div class=\"wrap\">\n <div id=\"icon-themes\" class=\"icon32\"><br/></div>\n <h1>Options Demo</h1>\n <form action=\"options.php\" method=\"POST\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\tsettings_fields( \"optionsdemo_general\" );\n\t\t\t\t\t\tdo_settings_sections( \"optionsdemo_general\" );\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tsubmit_button( esc_html__( 'Save Setting', 'optionsdemo' ) )\n\t\t\t\t\t?>\n </form>\n </div>\n\t\t<?php }", "public function admin_render()\n {\n $output = $this->admin_form_before();\n $output .= $this->admin_form_start();\n $output .= $this->default_fields();\n $widget_saved_values = $this->get_settings();\n\n $output .= $this->admin_language_tab(); //have to start language tab from here on\n $output .= $this->admin_language_tab_start();\n\n $all_languages = LanguageHelper::all_languages();\n foreach ($all_languages as $key => $lang) {\n $output .= $this->admin_language_tab_content_start([\n 'class' => $key == 0 ? 'tab-pane fade show active' : 'tab-pane fade',\n 'id' => \"nav-home-\" . $lang->slug\n ]);\n $output .= Text::get([\n 'name' => 'title_'.$lang->slug,\n 'label' => __('Title'),\n 'value' => $widget_saved_values['title_' . $lang->slug] ?? null,\n ]);\n $output .= $this->admin_language_tab_content_end();\n }\n\n $output .= $this->admin_language_tab_end(); //have to end language tab\n\n $output .= Text::get([\n 'name' => 'location',\n 'label' => __('Location'),\n 'value' => $widget_saved_values['location'] ?? null,\n ]);\n $output .= Select::get([\n 'name' => 'custom_form_id',\n 'label' => __('Custom Form'),\n 'placeholder' => __('Select form'),\n 'options' => FormBuilder::all()->pluck('title','id')->toArray(),\n 'value' => $widget_saved_values['custom_form_id'] ?? []\n ]);\n $output .= Slider::get([\n 'name' => 'padding_top',\n 'label' => __('Padding Top'),\n 'value' => $widget_saved_values['padding_top'] ?? 50,\n 'max' => 200,\n ]);\n $output .= Slider::get([\n 'name' => 'padding_bottom',\n 'label' => __('Padding Bottom'),\n 'value' => $widget_saved_values['padding_bottom'] ?? 50,\n 'max' => 200,\n ]);\n $output .= $this->admin_form_submit_button();\n $output .= $this->admin_form_end();\n $output .= $this->admin_form_after();\n\n return $output;\n }", "public function settings_admin_page()\n {\n add_action('wp_cspa_before_closing_header', [$this, 'back_to_optin_overview']);\n add_action('wp_cspa_before_post_body_content', array($this, 'optin_theme_sub_header'), 10, 2);\n add_filter('wp_cspa_main_content_area', [$this, 'optin_form_list']);\n\n $instance = Custom_Settings_Page_Api::instance();\n $instance->page_header(__('Add New Optin', 'mailoptin'));\n $this->register_core_settings($instance, true);\n $instance->build(true);\n }", "public function admin_page_display()\n {\n?>\n <div class=\"wrap cmb2-options-page <?php echo $this->key; ?>\">\n <h2><?php echo esc_html(get_admin_page_title()); ?></h2>\n <?php cmb2_metabox_form($this->metabox_id, $this->key); ?>\n </div>\n<?php\n }", "public function index() {\n return $this->view->render(\n 'admin/main.html.twig', [\n 'options' => $this->manager->all()\n ]\n );\n }", "public function form( $instance ) {\n\t\t// outputs the options form on admin\n\t\t\n $title = ! empty( $instance['title'] ) ? $instance['title'] : '';\n $usernames = ! empty( $instance['usernames'] ) ? $instance['usernames'] : '';\n $output = '';\n \n if(isset($instance['error'])){\n $output .= '<p>'.$instance['error'].'</p>';\n }\n \n $output .= '<p><label for=\"'.$this->get_field_id('title').'\">Title:</label><br>';\n $output .= '<input type=\"text\" id=\"'.$this->get_field_id('title').'\" name=\"'.$this->get_field_name('title').'\" value=\"'.esc_attr($title).'\" /></p>';\n \n $output .= '<p><label for=\"'.$this->get_field_id('usernames').'\">Twitter Usernames:</label><br>';\n $output .= '<input type=\"text\" id=\"'.$this->get_field_id('usernames').'\" name=\"'.$this->get_field_name('usernames').'\" value=\"'.esc_attr($usernames).'\" />';\n $output .= '<br><small>Enter a comma-separated list of own accounts.</small></p>';\n \n\t\techo $output;\n\t\t\n\t}", "function cmh_add_options_page() {\r\n\tadd_options_page('Correct My Headings Options Page', 'Correct My Headings', 'manage_options', __FILE__, 'cmh_render_form');\r\n}", "public function print_settings_page() {\n\t\t?>\n <div class=\"wrap\">\n <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n <form method=\"post\" action=\"options.php\" novalidate=\"novalidate\">\n\t\t\t\t<?php\n\n\t\t\t\t// Setup fields.\n\t\t\t\tsettings_fields( 'conf_schedule' );\n\n\t\t\t\t?>\n <div id=\"poststuff\">\n <div id=\"post-body\" class=\"metabox-holder columns-2\">\n <div id=\"postbox-container-1\" class=\"postbox-container\">\n <div id=\"side-sortables\" class=\"meta-box-sortables\">\n\t\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t\t// Print side boxes.\n\t\t\t\t\t\t\t\tdo_meta_boxes( $this->settings_page_id, 'side', [] );\n\n\t\t\t\t\t\t\t\t// Print save button.\n\t\t\t\t\t\t\t\tsubmit_button( __( 'Save Changes', 'conf-schedule' ), 'primary', 'conf_schedule_save_changes_side', false );\n\n\t\t\t\t\t\t\t\t?>\n </div>\n </div>\n <div id=\"postbox-container-2\" class=\"postbox-container\">\n <div id=\"normal-sortables\" class=\"meta-box-sortables\">\n\t\t\t\t\t\t\t\t<?php do_meta_boxes( $this->settings_page_id, 'normal', [] ); ?>\n </div>\n <div id=\"advanced-sortables\" class=\"meta-box-sortables\">\n\t\t\t\t\t\t\t\t<?php do_meta_boxes( $this->settings_page_id, 'advanced', [] ); ?>\n </div>\n\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t// Print save button.\n\t\t\t\t\t\t\tsubmit_button( __( 'Save Changes', 'conf-schedule' ), 'primary', 'conf_schedule_save_changes_bottom', false );\n\n\t\t\t\t\t\t\t?>\n </div>\n </div>\n <br class=\"clear\"/>\n </div>\n </form>\n </div>\n\t\t<?php\n\n\t}", "public function admin_page_display() {\n\t\t?>\n\t\t<div class=\"wrap cmb2-options-page <?php echo $this->key; ?>\">\n\t\t\t<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>\n\t\t\t<?php cmb2_metabox_form( $this->metabox_id, $this->key ); ?>\n\t\t\t\n\t\t</div>\n\t\t<?php\n\t}", "public function admin() {\n\t\tglobal $wpdb, $current_user;\n\n\t\tget_currentuserinfo();\n\n\t\t// Save current user ID\n\t\t$user_id = $current_user->ID;\n\n\t\t// Get the Form Order type settings, if any\n\t\t$user_form_order_type = get_user_meta( $user_id, 'vfb-form-order-type', true );\n\n\t\t$form_nav_selected_id = ( isset( $_REQUEST['form'] ) ) ? $_REQUEST['form'] : '0';\n\t?>\n\t<div class=\"wrap\">\n\t\t<h2>\n\t\t\t<?php _e( 'Visual Form Builder Pro', 'visual-form-builder-pro' ); ?>\n<?php\n\t\t\t// Add New link\n\t\t\techo sprintf( ' <a href=\"%1$s\" class=\"add-new-h2\">%2$s</a>', esc_url( admin_url( 'admin.php?page=vfb-add-new' ) ), esc_html( __( 'Add New', 'visual-form-builder-pro' ) ) );\n\n\t\t\t// If searched, output the query\n\t\t\tif ( isset( $_REQUEST['s'] ) && !empty( $_REQUEST['s'] ) )\n\t\t\t\techo '<span class=\"subtitle\">' . sprintf( __( 'Search results for \"%s\"' , 'visual-form-builder-pro'), $_REQUEST['s'] );\n?>\n\t\t</h2>\n<?php\n\t\t\t// Display form editor or the form list\n\t\t\tif ( isset( $_GET['form'] ) && 'edit' == $_GET['action'] ) :\n\t\t\t\tinclude_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/admin-form-creator.php' );\n\t\t\telse :\n?>\n\t\t\t<div id=\"vfb-form-list\">\n\t\t\t\t<div id=\"vfb-main\" class=\"vfb-order-type-<?php echo ( in_array( $user_form_order_type, array( 'order', '' ) ) ) ? 'order' : 'list'; ?>\">\n\t\t\t\t<?php $this->all_forms(); ?>\n\t\t\t\t</div> <!-- #vfb-main -->\n\t\t\t</div> <!-- #vfb-form-list -->\n<?php\n\t\t\tendif;\n?>\n\t</div>\n\t<?php\n\t}", "function mmf_admin_actions() {\n\t\tadd_options_page(\"MapMyFitness\", \"MapMyFitness\", 1, \"mmf\", \"mmf_admin\");\n\t}", "public function print_settings_page() {\n\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t\t\t<form method=\"post\" action=\"options.php\" novalidate=\"novalidate\">\n\t\t\t\t<?php\n\n\t\t\t\t// Setup fields.\n\t\t\t\tsettings_fields( 'conf_schedule' );\n\n\t\t\t\t?>\n\t\t\t\t<div id=\"poststuff\">\n\t\t\t\t\t<div id=\"post-body\" class=\"metabox-holder columns-2\">\n\n\t\t\t\t\t\t<div id=\"postbox-container-1\" class=\"postbox-container\">\n\t\t\t\t\t\t\t<div id=\"side-sortables\" class=\"meta-box-sortables\">\n\t\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t\t// Print side boxes.\n\t\t\t\t\t\t\t\tdo_meta_boxes( $this->settings_page_id, 'side', array() );\n\n\t\t\t\t\t\t\t\t// Print save button.\n\t\t\t\t\t\t\t\tsubmit_button( __( 'Save Changes', 'conf-schedule' ), 'primary', 'conf_schedule_save_changes_side', false );\n\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div id=\"postbox-container-2\" class=\"postbox-container\">\n\n\t\t\t\t\t\t\t<div id=\"normal-sortables\" class=\"meta-box-sortables\">\n\t\t\t\t\t\t\t\t<?php do_meta_boxes( $this->settings_page_id, 'normal', array() ); ?>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div id=\"advanced-sortables\" class=\"meta-box-sortables\">\n\t\t\t\t\t\t\t\t<?php do_meta_boxes( $this->settings_page_id, 'advanced', array() ); ?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t// Print save button.\n\t\t\t\t\t\t\tsubmit_button( __( 'Save Changes', 'conf-schedule' ), 'primary', 'conf_schedule_save_changes_bottom', false );\n\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t</div>\n\t\t\t\t\t<br class=\"clear\" />\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\n\t}", "public function admin_page_display() {\r\n\t\t?>\r\n\t\t<div class=\"wrap cmb2-options-page <?php echo $this->key; ?>\">\r\n\t\t\t<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>\r\n\t\t\t<?php cmb2_metabox_form( $this->metabox_id, $this->key ); ?>\r\n\t\t</div>\r\n\t\t<?php\r\n\t}", "function htpmpro_options_page_html() {\r\n\t // check user capabilities\r\n\t if ( ! current_user_can( 'manage_options' ) ) {\r\n\t \treturn;\r\n\t }\r\n\r\n\t // show message when updated\r\n\t if ( isset( $_GET['settings-updated'] ) ) {\r\n\t \tadd_settings_error( 'htpmpro_messages', 'htpmpro_message', esc_html__( 'Settings Saved', 'htpmpro' ), 'updated' );\r\n\t }\r\n\t \r\n\t // show error/update messages\r\n\t settings_errors( 'htpmpro_messages' );\r\n\t ?>\r\n\t\t<div class=\"wrap\">\r\n\t\t\t<h1><?php echo esc_html( 'WP Plugin Manager' ); ?> <?php echo esc_html( get_admin_page_title() ); ?></h1>\r\n\t\t\t<form action=\"options.php\" method=\"post\">\r\n\t\t\t\t<?php\r\n\t\t\t\t\t// output general section and their fields\r\n\t\t\t\t\tdo_settings_sections( 'options_group_general' );\r\n\r\n\t\t\t\t\t// general option fields\r\n\t\t\t\t\tsettings_fields( 'options_group_general' );\r\n\r\n\t\t\t\t\t// output save settings button\r\n\t\t\t\t\tsubmit_button( 'Save Settings' );\r\n\t\t\t\t?>\r\n\t\t\t</form>\r\n\t\t</div>\r\n\t<?php\r\n}", "public function add_options_page()\n {\n }", "protected function output() {\n\t\t\techo $this->before();\n\t\t\tif ( wponion_is_array( $this->data( 'options' ) ) ) {\n\t\t\t\tforeach ( $this->data( 'options' ) as $slug => $option ) {\n\t\t\t\t\t$field_args = $this->handle_args( 'title', $option, array(\n\t\t\t\t\t\t'settings' => $this->data( 'settings' ),\n\t\t\t\t\t), array(\n\t\t\t\t\t\t'id' => $slug,\n\t\t\t\t\t\t'type' => 'color_picker',\n\t\t\t\t\t\t'wrap_class' => 'wpo-col-xs-12 wpo-col-md-3',\n\t\t\t\t\t) );\n\n\t\t\t\t\tif ( isset( $field_args['label'] ) ) {\n\t\t\t\t\t\t$title = $field_args['label'];\n\t\t\t\t\t\t$field_args['title'] = $title;\n\t\t\t\t\t\tunset( $field_args['label'] );\n\t\t\t\t\t}\n\t\t\t\t\techo $this->sub_field( $field_args, $this->value( $slug ), $this->name() );\n\t\t\t\t}\n\t\t\t}\n\t\t\techo $this->after();\n\t\t}", "function cil_plugin_optionMenu_list()\n{\n\t//show admin options view, this view exists in cil_adminOptionsView.php\n\tdo_action('show_cil_admin_manage_lists');\n}", "function print_admin() {\r\n\t\t\t\t\t$options = $this->get_options();\t\t\t\t\r\n\t\t\t\t\tif (isset($_POST['update_dropcaps'])) { \r\n\t\t\t\t\t\t$options['plugin_css'] = (isset($_POST['dropcaps_css']))?true:false;\r\n\t\t\t\t\t\t$options['the_content'] = (isset($_POST['dropcaps_content']))?true:false;\r\n\t\t\t\t\t\t$options['the_excerpt'] = (isset($_POST['dropcaps_excerpt']))?true:false;\r\n\t\t\t\t\t\t$options['the_comment'] = (isset($_POST['dropcaps_comment']))?true:false;\r\n\t\t\t\t\t\t$options['home'] = (isset($_POST['dropcaps_home']))?true:false;\r\n\t\t\t\t\t\t$options['single'] = (isset($_POST['dropcaps_single']))?true:false;\r\n\t\t\t\t\t\t$options['page'] = (isset($_POST['dropcaps_page']))?true:false;\r\n\t\t\t\t\t\t$options['archive'] = (isset($_POST['dropcaps_archive']))?true:false;\r\n\t\t\t\t\t\t$options['search'] = (isset($_POST['dropcaps_search']))?true:false;\r\n\t\t\t\t\t\t$options['feed'] = (isset($_POST['dropcaps_feed']))?true:false;\r\n\t\t\t\t\t\t$options['attachment'] = (isset($_POST['dropcaps_attachment']))?true:false;\r\n\t\t\t\t\t\t$options['tag'] = (isset($_POST['dropcaps_tag']))?true:false;\r\n\t\t\t\t\t\t$options['category'] = (isset($_POST['dropcaps_category']))?true:false;\r\n\t\t\t\t\t\t$options['date'] = (isset($_POST['dropcaps_date']))?true:false;\r\n\t\t\t\t\t\t$options['author'] = (isset($_POST['dropcaps_author']))?true:false;\r\n\t\t\t\t\t\t$options['excluded_ids']=(isset($_POST['dropcaps_excluded_ids']))? explode(',',$_POST['dropcaps_excluded_ids']):array();\r\n\t\t\t\t\t\t$options['excluded_cats']=(isset($_POST['dropcaps_excluded_cats']))? explode(',',$_POST['dropcaps_excluded_cats']):array();\r\n\t\t\t\t\t\tupdate_option($this->options_name, $options);\r\n\t\t\t\t\t\t?>\r\n<div class=\"updated\"><p><strong><?php _e(\"Settings Updated.\", \"dropcaps\");?></strong></p></div>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t} ?>\r\n<div class=\"wrap\">\r\n<form method=\"post\" action=\"<?php echo $_SERVER[\"REQUEST_URI\"]; ?>\">\r\n<h2>Drop Caps Plugin</h2>\r\n<h3>Options</h3>\r\n<p>Select the options which suit your blog. You can choose whether drop caps will appear in the content, the excerpt or in comments. You can also choose which pages drop caps will appear on.</p>\r\n<p>The plugin comes with a default stylesheet which is applied to the drop caps. This can be disabled if you wish to use your own styling.</p>\r\n<table class=\"form-table\"><tbody>\r\n\t<tr valign=\"top\">\r\n\t\t<th scope=\"row\">Enable drop caps in</th>\r\n\t\t<td>\r\n\t\t<label for=\"dropcaps_content\"><input type=\"checkbox\" id=\"dropcaps_content\" name=\"dropcaps_content\" <?php if ($options['the_content'])echo 'checked=\"checked\"';?> /> <code>the_content()</code></label><br />\r\n\t\t<label for=\"dropcaps_excerpt\"><input type=\"checkbox\" id=\"dropcaps_excerpt\" name=\"dropcaps_excerpt\" <?php if ($options['the_excerpt'])echo 'checked=\"checked\"';?> /> <code>the_excerpt()</code></label><br />\r\n\t\t<label for=\"dropcaps_comment\"><input type=\"checkbox\" id=\"dropcaps_comment\" name=\"dropcaps_comment\" <?php if ($options['the_comment'])echo 'checked=\"checked\"';?> /> <code>comment_text()</code></label>\r\n\t\t</td>\r\n\t</tr>\r\n\t<tr valign=\"top\">\r\n\t\t<th scope=\"row\">Enable drop caps on</th>\r\n\t\t<td>\r\n\t\t<label for=\"dropcaps_home\"><input type=\"checkbox\" id=\"dropcaps_home\" name=\"dropcaps_home\" <?php if ($options['home'])echo 'checked=\"checked\"';?> /> the main blog page</label><br />\r\n\t\t<label for=\"dropcaps_single\"><input type=\"checkbox\" id=\"dropcaps_single\" name=\"dropcaps_single\" <?php if ($options['single'])echo 'checked=\"checked\"';?> /> single post pages</label><br />\r\n\t\t<label for=\"dropcaps_page\"><input type=\"checkbox\" id=\"dropcaps_page\" name=\"dropcaps_page\" <?php if ($options['page'])echo 'checked=\"checked\"';?> /> PAGE pages</label><br />\r\n\t\t<label for=\"dropcaps_search\"><input type=\"checkbox\" id=\"dropcaps_search\" name=\"dropcaps_search\" <?php if ($options['search'])echo 'checked=\"checked\"';?> /> search results</label><br />\r\n\t\t<label for=\"dropcaps_feed\"><input type=\"checkbox\" id=\"dropcaps_feed\" name=\"dropcaps_feed\" <?php if ($options['feed'])echo 'checked=\"checked\"';?> /> feeds</label><br />\r\n\t\t<label for=\"dropcaps_attachment\"><input type=\"checkbox\" id=\"dropcaps_attachment\" name=\"dropcaps_attachment\" <?php if ($options['attachment'])echo 'checked=\"checked\"';?> /> attachments</label><br />\r\n\t\t<label for=\"dropcaps_archive\"><input type=\"checkbox\" id=\"dropcaps_archive\" name=\"dropcaps_archive\" <?php if ($options['archive'])echo 'checked=\"checked\"';?> onchange=\"if(this.checked){document.getElementById('dropcaps_tag').checked = true;document.getElementById('dropcaps_category').checked = true;document.getElementById('dropcaps_date').checked = true;document.getElementById('dropcaps_author').checked = true;}\" /> all archives</label><br />\r\n\t\t<div style=\"margin-left:2em;\"><label for=\"dropcaps_tag\"><input type=\"checkbox\" id=\"dropcaps_tag\" name=\"dropcaps_tag\" <?php if ($options['tag'])echo 'checked=\"checked\"';?> onchange=\"if(!this.checked){document.getElementById('dropcaps_archive').checked = false}\" /> tag archives</label><br />\r\n\t\t<label for=\"dropcaps_category\"><input type=\"checkbox\" id=\"dropcaps_category\" name=\"dropcaps_category\" <?php if ($options['category'])echo 'checked=\"checked\"';?> onchange=\"if(!this.checked){document.getElementById('dropcaps_archive').checked = false}\" /> category archives</label><br />\r\n\t\t<label for=\"dropcaps_date\"><input type=\"checkbox\" id=\"dropcaps_date\" name=\"dropcaps_date\" <?php if ($options['date'])echo 'checked=\"checked\"';?> onchange=\"if(!this.checked){document.getElementById('dropcaps_archive').checked = false}\" /> date archives</label><br />\r\n\t\t<label for=\"dropcaps_author\"><input type=\"checkbox\" id=\"dropcaps_author\" name=\"dropcaps_author\" <?php if ($options['author'])echo 'checked=\"checked\"';?> onchange=\"if(!this.checked){document.getElementById('dropcaps_archive').checked = false}\" /> author archives</label></div>\r\n\t\t</td>\r\n\t</tr>\r\n\t<tr valign=\"top\">\r\n\t\t<th scope=\"row\">CSS Styling</th>\r\n\t\t<td><label for=\"dropcaps_css\"><input type=\"checkbox\" id=\"dropcaps_css\" name=\"dropcaps_css\" <?php if ($options['plugin_css'])echo 'checked=\"checked\"';?>/> Style the drop caps using the plugin styling. (Leave unchecked to write your own CSS in your stylesheet)</label></td>\r\n\t</tr>\r\n</tbody></table>\r\n\t\t<h3>Exclude</h3>\r\n<p>Type the comma seperated names, slugs or IDs of the categories or posts that you want to exclude from having drop caps.</p>\r\n<p>If you have drop caps enabled on comments, these will show up wether or not the post is excluded.</p>\r\n<table class=\"form-table\"><tbody>\r\n\t<tr>\r\n\t\t<th>Excluded posts</th>\r\n\t\t<td><input type=\"text\" id=\"dropcaps_excluded_ids\" name=\"dropcaps_excluded_ids\" value=\"<?php if ($options['excluded_ids'])echo implode(',',$options['excluded_ids']);?>\" style=\"width:98%\" /></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<th>Excluded categorys</th>\r\n\t\t<td><input type=\"text\" id=\"dropcaps_excluded_cats\" name=\"dropcaps_excluded_cats\" value=\"<?php if ($options['excluded_cats'])echo implode(',',$options['excluded_cats']);?>\" style=\"width:98%\" /></td>\r\n\t</tr>\r\n</tbody></table>\r\n<div class=\"submit\">\r\n<input type=\"submit\" name=\"update_dropcaps\" value=\"<?php _e('Update Settings', 'dropcaps') ?>\" /></div>\r\n</form>\r\n </div>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t}", "public function admin_page_display() {\n\t\t?>\n\t\t<div class=\"wrap cmb2-options-page <?php echo $this->key; ?>\">\n\t\t\t<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>\n\t\t\t<?php cmb2_metabox_form( $this->metabox_id, $this->key ); ?>\n\t\t</div>\n\t\t<?php\n\t}", "function bg_AddPluginMenuHtml() {\n global $bg_opts_apiKey, $bg_optionGroup, $bg_page;\n\n\tif ( !current_user_can( 'manage_options' ) ) {\n\t\twp_die( __( 'You do not have sufficient permissions to access this page.' ) );\n\t}\n\techo '<div class=\"wrap\">';\n\techo('<h2>BeyondGrammar Settings</h2>');\n\t\t\n\techo('\t<form action=\"options.php\" method=\"post\">');\n\tsettings_fields($bg_optionGroup);\n\tdo_settings_sections($bg_page);\n\techo(\"<input name='Submit' type='submit' class='button-primary' value='Save Changes' />\");\n\techo('</form>');\n\techo '</div>';\n}", "public function renderOptions() {\n $tab \t\t= sienna_mikado_get_admin_tab();\n $active_page \t= sienna_mikado_framework()->mkdOptions->getAdminPageFromSlug($tab);\n $current_theme \t= wp_get_theme();\n\n if ($active_page == null) return;\n ?>\n <div class=\"mkdf-options-page mkdf-page\">\n\n <?php $this->getHeader($current_theme->get('Name'), $current_theme->get('Version')); ?>\n\n <div class=\"mkdf-page-content-wrapper\">\n <div class=\"mkdf-page-content\">\n <div class=\"mkdf-page-navigation mkdf-tabs-wrapper vertical left clearfix\">\n\n <?php $this->getPageNav($tab); ?>\n <?php $this->getPageContent($active_page, $tab); ?>\n\n\n </div> <!-- close div.mkdf-page-navigation -->\n\n </div> <!-- close div.mkdf-page-content -->\n\n </div> <!-- close div.mkdf-page-content-wrapper -->\n\n </div> <!-- close div.mkd-options-page -->\n\n <a id='back_to_top' href='#'>\n <span class=\"fa-stack\">\n <span class=\"fa fa-angle-up\"></span>\n </span>\n </a>\n <?php }", "private function showOptions() : void\n {\n $selectedOption = $this->console->choice(__('Please cheoose your option:'), $this->getAllOptions() );\n $this->setSelectedOption($selectedOption);\n $this->handleOption();\n }", "function options() {\n\t\tif ( ! current_user_can( 'manage_options' ) )\t{\n\t\t\twp_die( __( 'You do not have sufficient permissions to access this page.' ) );\n\t\t}\n\t\tinclude WP_PLUGIN_DIR . '/qoorate/admin_options_page.php';\n\t}", "function cjpopups_admin_form($options){\n\trequire_once(sprintf('%s/admin_form.php', cjpopups_item_path('includes_dir')));\n}", "public static function options_page()\n\t\t\t{\n\t\t\t\tif (!current_user_can('manage_options'))\n\t\t\t\t{\n\t\t\t\t\twp_die( __('You do not have sufficient permissions to access this page.') );\n\t\t\t\t}\n\t\n\t\t\t\t$plugin_id = HE_PLUGINOPTIONS_ID;\n\t\t\t\t// display options page\n\t\t\t\tinclude(self::file_path('options.php'));\n\t\t\t}", "function options_form(&$form, &$form_state) {\n parent::options_form($form, $form_state);\n $handlers = $this->display->handler->get_handlers('field');\n if (empty($handlers)) {\n $form['error_markup'] = array(\n '#value' => t('You need at least one field before you can configure your table settings'),\n '#prefix' => '<div class=\"error form-item description\">',\n '#suffix' => '</div>',\n );\n return;\n }\n\n // Create an array of allowed columns from the data we know:\n foreach ($handlers as $field => $handler) {\n if ($label = $handler->label()) {\n $field_names[$field] = $label;\n }\n else {\n $field_names[$field] = $handler->ui_name();\n }\n }\n $field_names[''] = '<none>';\n $field_names['--static--'] = '<static value>';\n\n $form['shop']['name'] = array(\n '#type' => 'textfield',\n '#default_value' => $this->options['shop']['name'],\n '#title' => t('Shop name'),\n );\n $form['shop']['company'] = array(\n '#type' => 'textfield',\n '#default_value' => $this->options['shop']['company'],\n '#title' => t('Shop company'),\n );\n $form['shop']['url'] = array(\n '#type' => 'textfield',\n '#default_value' => $this->options['shop']['url'],\n '#title' => t('Shop url'),\n );\n $form['currencies'] = array(\n '#type' => 'textarea',\n '#title' => t('Currencies'),\n '#default_value' => $this->options['currencies'],\n '#description' => t(\"List of currencies used in the shop. One currency - one selement. 'id' element is code of currency, 'rate' is currency rate. 'rate' also can be CBRF, NBU, NBK or CB.\"),\n );\n //only taxonomy vocabularies can now be used as categories\n $vocabularies = array('' => '<none>');\n foreach (taxonomy_get_vocabularies() as $v) {\n $vocabularies[$v->vid] = $v->name;\n }\n $form['vocabulary'] = array(\n '#type' => 'select',\n '#title' => t('Vocabulary'),\n '#default_value' => $this->options['vocabulary'],\n '#options' => $vocabularies,\n '#description' => t('What vocabulary to use for categories tag.'),\n );\n\n foreach (yandexmarket_fields() as $tag => $value) {\n $safe = str_replace(array('][', '_', ' '), '-', $tag);\n // the $id of the column for dependency checking.\n $id = 'edit-style-options-yacolumns-' . $safe . '-field';\n $types = yandexmarket_types($tag);\n $form['yacolumns'][$tag] = array(\n '#type' => 'fieldset',\n '#title' => $tag . ' (' . implode(', ', $types) . ')',\n '#collapsible' => TRUE,\n '#tree' => TRUE,\n '#collapsed' => ($this->options['yacolumns'][$tag]['field'] == ''\n || !isset($this->options['yacolumns'][$tag]['field']))?TRUE:FALSE,\n );\n $form['yacolumns'][$tag]['field'] = array(\n '#type' => 'select',\n '#options' => $field_names,\n '#default_value' => $this->options['yacolumns'][$tag]['field'],\n );\n $form['yacolumns'][$tag]['static'] = array(\n '#type' => 'textfield',\n '#title' => t('Static value'),\n '#size' => 40,\n '#default_value' => $this->options['yacolumns'][$tag]['static'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array($id => array('--static--')),\n );\n $form['yacolumns'][$tag]['description'] = array(\n '#value' => '<div>' . $value['description'] . '</div>',\n );\n }\n return $form;\n\n }", "public function render_admin() {\n\t\t$route_id = !empty( $_GET[ 'route' ] ) ? sanitize_text_field( $_GET[ 'route' ] ) : false;\n\t\t?>\n\t\t\t<main class=\"wrap\">\n\t\t\t\t<h1><?= $this->title; ?></h1>\n\t\t\t\t<hr>\n\t\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\tif ( $route_id ) {\n\t\t\t\t\t\t\tinclude 'views/route.php';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinclude 'views/dashboard.php';\n\t\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</form>\n\t\t\t</main>\n\t\t<?php\n\t}", "public function lp_rating_settings_html() {\n // check user capabilities\n if (!current_user_can('manage_options')) {\n return;\n }\n \n ?>\n <div class=\"wrap\">\n <h1><?php echo esc_html(get_admin_page_title()); ?></h1>\n <form action=\"options.php\" method=\"post\">\n <?php\n // output security fields for the registered setting \"lp_rating_settings\"\n settings_fields('lp_rating_settings');\n \n // output setting sections and their fields\n do_settings_sections('lp_rating_settings');\n \n // output save settings button\n submit_button('Save Settings');\n ?>\n </form>\n </div>\n <?php\n }", "public function form()\n {\n $this->switch('footer_remove', Support::trans('main.footer_remove'))\n ->default(admin_setting('footer_remove'));\n $defaultColors = [\n 'default' => '墨蓝',\n 'blue' => '蓝',\n 'blue-light' => '亮蓝',\n 'green' => '墨绿',\n ];\n foreach (explode(\",\", ServiceProvider::setting('additional_theme_colors')) as $value) {\n if (!empty($value)) {\n [$k, $v] = explode(\":\", $value);\n $defaultColors[$k] = $v;\n }\n }\n\n $this->radio('theme_color', Support::trans('main.theme_color'))\n ->options($defaultColors)\n ->default(admin_setting('theme_color'));\n $this->radio('sidebar_style', Support::trans('main.sidebar_style'))\n ->options([\n 'default' => '默认',\n 'sidebar-separate' => '菜单分离',\n 'horizontal_menu' => '水平菜单'\n ])\n ->default(admin_setting('sidebar_style'));\n $this->switch('grid_row_actions_right', Support::trans('main.grid_row_actions_right'))\n ->help('启用后表格行操作按钮将永远贴着最右侧。')\n ->default(admin_setting('grid_row_actions_right'));\n }", "function admin_config(){\n \n if(!acf_current_user_can_admin())\n return;\n \n global $plugin_page;\n \n if(!$plugin_page)\n return;\n \n $page = acf_get_options_page($plugin_page);\n \n if(!acf_maybe_get($page, 'menu_slug'))\n return;\n \n // Get Dynamic Options Page\n $acfe_dop_options_page = get_posts(array(\n 'post_type' => $this->post_type,\n 'posts_per_page' => 1,\n 'name' => $page['menu_slug']\n ));\n \n if(empty($acfe_dop_options_page))\n return;\n \n $acfe_dop_options_page = $acfe_dop_options_page[0];\n \n ?>\n <script type=\"text/html\" id=\"tmpl-acfe-dop-title-config\">\n <a href=\"<?php echo admin_url('post.php?post=' . $acfe_dop_options_page->ID . '&action=edit'); ?>\" class=\"page-title-action acfe-dop-admin-config\"><span class=\"dashicons dashicons-admin-generic\"></span></a>\n </script>\n\n <script type=\"text/javascript\">\n (function($){\n\n // Add button\n $('.wrap h1').append($('#tmpl-acfe-dop-title-config').html());\n\n })(jQuery);\n </script>\n <?php\n \n }", "function cbp_display_options_page() {\n\t?>\n\t<div>\n\t<h2>Chibipaint Integration Settings</h2>\n\tAll fields are required.\n\t<form action=\"options.php\" method=\"post\">\n\t<?php settings_fields('cbp_option_group');\n\tdo_settings_sections('options_cbp');\n\tsubmit_button();\n\t?>\n\t</form></div>\n\n\t<?php\n}", "function initlab_options_page_html() {\n // check user capabilities\n if (!current_user_can('manage_options')) {\n return;\n }\n\n // add error/update messages\n\n // check if the user have submitted the settings\n // WordPress will add the \"settings-updated\" $_GET parameter to the url\n if (isset($_GET['settings-updated'])) {\n // add settings saved message with the class of \"updated\"\n add_settings_error('initlab_messages', 'initlab_message', __('Settings saved.', 'initlab-addons'), 'updated');\n }\n\n // show error/update messages\n settings_errors('initlab_messages');\n ?>\n <div class=\"wrap\">\n <h1><?php echo esc_html(get_admin_page_title()); ?></h1>\n <form action=\"options.php\" method=\"post\">\n <?php\n // output security fields for the registered setting \"initlab\"\n settings_fields('initlab');\n // output setting sections and their fields\n // (sections are registered for \"initlab\", each field is registered to a specific section)\n do_settings_sections('initlab');\n // output save settings button\n submit_button();\n ?>\n </form>\n </div>\n <?php\n}", "function showPostIconOptions(){\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h2><?php echo get_admin_page_title() ?></h2>\n\t\t\t<form action=\"options.php\" method=\"POST\">\n\t\t\t<?php\n\t\t\t\tsettings_fields( 'post_icon_options_main' );\n\t\t\t\tdo_settings_sections( 'post_icon_options_page' );\n\t\t\t\t$all_posts = $this -> getAllPostsData();\n\t\t\t?>\n\t\t\t\t\n\t\t\t<div class =\"pi_icons\"></div>\n\t\t\t<?php\n\t\t\t\tsubmit_button( 'Save', 'primary', 'pi_save_button' );\n\t\t\t?>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "public function generate_html_forms()\n\t{\n\t\t$return_str = '<div class=\"bwp-wrap bwp-option-page-wrapper\" style=\"padding-bottom: 20px;\">' . \"\\n\";\n\t\tif (sizeof($this->form_tabs) >= 2)\n\t\t\t$return_str .= apply_filters('bwp_admin_form_icon', '<div class=\"icon32\" id=\"icon-options-general\"><br></div>' . \"\\n\");\n\t\telse\n\t\t\t$return_str .= '<div class=\"icon32\" id=\"icon-options-general\"><br></div>';\t\t\t\n\t\t\n\t\tif (sizeof($this->form_tabs) >= 2)\n\t\t{\n\t\t\t$count = 0;\n\t\t\t$return_str .= '<h2 class=\"bwp-option-page-tabs\">' . \"\\n\";\n\t\t\t$return_str .= apply_filters('bwp_admin_plugin_version', '') . \"\\n\";\n\t\t\tforeach ($this->form_tabs as $title => $link)\n\t\t\t{\n\t\t\t\t$count++;\n\t\t\t\t$active = ($count == $this->current_tab) ? ' nav-tab-active' : '';\n\t\t\t\t$return_str .= '<a class=\"nav-tab' . $active . '\" href=\"' . $link . '\">' . $title . '</a>' . \"\\n\";\n\t\t\t}\n\t\t\t$return_str .= '</h2>' . \"\\n\";\n\t\t}\n\t\telse if (!isset($this->form_tabs[0]))\n\t\t{\n\t\t\t$title = array_keys($this->form_tabs);\n\t\t\t$return_str .= '<h2>' . $title[0] . '</h2>' . \"\\n\";\n\t\t}\n\t\telse\n\t\t\t$return_str .= '<h2>' . $this->form_tabs[0] . '</h2>' . \"\\n\";\n\n\t\t$return_str .= '<div class=\"bwp-option-box clear\">' . \"\\n\";\n\n\t\t// Begin generating each form\n\t\tforeach ($this->forms as $form)\n\t\t{\n\t\t\t// If this form has 'divider' items, we need to split HTML fields appropriately\n\t\t\t$dividers = (isset($form->form['divider']) && is_array($form->form['divider'])) ? array_keys($form->form['divider']) : array();\n\t\t\t$form_style = (!empty($form->style)) ? ' style=\"' . $form->style . '\" ' : '';\n\t\t\t$multi_form_style = (!empty($form->style) && 0 < sizeof($dividers)) ? ' style=\"' . $form->style . '\" ' : '';\n\n\t\t\tif (0 == sizeof($dividers))\n\t\t\t{\n\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\"' . $form_style . '>' . \"\\n\";\n\t\t\t\t$return_str .= apply_filters('bwp_opf_before_form_' . $form->form_name, '');\n\t\t\t\techo $return_str;\n\t\t\t\tdo_action('bwp_opa_before_form_' . $form->form_name, $form->form_name);\n\t\t\t}\n\t\t\telse\n\t\t\t\techo $return_str;\n\n\t\t\t$enctype = (!empty($form->form_enctype)) ? ' enctype=\"' . $form->form_enctype . '\" ' : '';\n\t\t\t$return_str = '<form class=\"bwp-option-page\" name=\"' . $form->form_name . '\" method=\"post\" action=\"\"' . $enctype . $multi_form_style . '>' . \"\\n\";\n\n\t\t\t// Nonce\n\t\t\t$return_str .= wp_nonce_field($form->form_name, \"_wpnonce\", false, false) . \"\\n\";\n\t\t\t$return_str .= apply_filters('bwp_opf_referrer_field_' . $form->form_name, wp_referer_field(false)) . \"\\n\";\n\n\t\t\t$return_str .= '<ul>' . \"\\n\";\n\n\t\t\tif (isset($form->form_items) && is_array($form->form_items))\n\t\t\t{\n\t\t\t\t// If this form needs to be divided, so be it\n\t\t\t\tif (0 < sizeof($dividers))\n\t\t\t\t{\n\t\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\">' . \"\\n\";\n\t\t\t\t\t$return_str .= apply_filters('bwp_opf_before_form_' . $form->form_name, '');\n\t\t\t\t\techo $return_str;\n\t\t\t\t\tdo_action('bwp_opa_before_form_' . $form->form_name, $form->form_name);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\techo $return_str;\n\t\t\t\t// Reset the result\n\t\t\t\t$return_str = '';\n\t\t\t\t// Generate individual items\n\t\t\t\t$form_count = 0;\n\t\t\t\tforeach ($form->form_items as $key => $type)\n\t\t\t\t{\n\t\t\t\t\tif (!empty($form->form_item_names[$key]) && isset($form->form_item_labels[$key]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extra_classes = ('heading' == $type) ? ' bwp-li-heading' : ' bwp-li-item';\n\t\t\t\t\t\t// Before the field\n\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\tdo_action('bwp_opa_before_field_' . $form->form_name . '_' . $form->form_item_names[$key], $form->form_name);\n\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\t// The field\n\t\t\t\t\t\t$return_str .= ('hidden' != $form->form_items[$key]) ? '<li class=\"clear' . $extra_classes . '\">' . $form->generate_html_fields($type, $form->form_item_names[$key]) . '</li>' : $form->generate_html_fields($type, $form->form_item_names[$key]) . \"\\n\";\n\t\t\t\t\t\t// After the field\n\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\tdo_action('bwp_opa_after_field_' . $form->form_name . '_' . $form->form_item_names[$key], $form->form_name);\n\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\tif (in_array($form->form_item_names[$key], $dividers))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$form_count++;\n\t\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\t\tdo_action('bwp_opa_after_divided_form_' . $form->form_name . '_' . $form_count, $form->form_name);\n\t\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\t\t$return_str .= apply_filters('bwp_opf_multi_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save All Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>', $form_count) . \"\\n\";\n\t\t\t\t\t\t\t$return_str .= '</div>' . \"\\n\";\n\t\t\t\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\">' . \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If this form needs to be divided, add the final Save all changes button\n\t\t\t\tif (0 < sizeof($dividers))\n\t\t\t\t\t$return_str .= apply_filters('bwp_opf_multi_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save All Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>', 'last') . \"\\n\";\n\t\t\t}\n\n\t\t\t$return_str .= '</ul>' . \"\\n\";\t\t\n\t\t\t$return_str .= apply_filters('bwp_opf_before_submit_button_' . $form->form_name, '');\n\t\t\techo $return_str;\n\t\t\tdo_action('bwp_opa_before_submit_button_' . $form->form_name, $form->form_name);\n\n\t\t\t$submit = apply_filters('bwp_opf_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>') . \"\\n\";\n\t\t\t$return_str = apply_filters('bwp_op_submit_button', $submit) . \"\\n\";\n\t\t\t$return_str .= '</form>' . \"\\n\";\n\n\t\t\tif (0 == sizeof($dividers))\n\t\t\t\t$return_str .= '</div>' . \"\\n\";\n\t\t}\n\n\t\t$return_str .= '<div class=\"clear\"><!-- --></div>' . \"\\n\";\n\t\t$return_str .= '</div>' . \"\\n\";\n\t\t$return_str .= '</div>' . \"\\n\";\n\n\t\techo $return_str;\n\t}", "public function displayAddFormOption() {\n $L = $this->getLangStrings();\n\n $LANG = Core::$L;\n $root_url = Core::getRootUrl();\n\n $select = mb_strtoupper($LANG[\"word_select\"]);\n\n echo <<< END\n <table width=\"100%\">\n <tr>\n <td width=\"49%\" valign=\"top\">\n <div class=\"grey_box add_form_select\">\n <span style=\"float:right\">\n <input type=\"button\" name=\"form_builder\" class=\"blue bold\" value=\"$select\"\n onclick=\"window.location='$root_url/modules/form_builder/admin/add_form.php'\" />\n </span>\n <div class=\"bold\">{$L[\"module_name\"]}</div>\n <div class=\"medium_grey\">{$L[\"text_form_builder_add_form_section\"]}</div>\n </div>\n </td>\n <td width=\"2%\"> </td>\n <td width=\"49%\"></td>\n </tr>\n </table>\nEND;\n }", "function adminMenu() {\r\n\t\t\tadd_options_page('Track The Book Settings', 'Track The Book', 8, 'trackthebook.php', array($this,'adminOptions'));\r\n\t\t}", "function wpct_options_page() { \n\t\tob_start();\n\t\tinclude( plugin_dir_path(__FILE__).\"/templates/tpl-admin-menu.php\" );\n\t\techo ob_get_clean();\n\t}" ]
[ "0.83773917", "0.8275272", "0.8177535", "0.79074216", "0.7848807", "0.78093666", "0.77692044", "0.775667", "0.77481157", "0.76686513", "0.76585025", "0.7620533", "0.7590297", "0.7572669", "0.7572585", "0.75387585", "0.74784654", "0.74784654", "0.74784654", "0.74779993", "0.7396397", "0.73771805", "0.73654836", "0.735126", "0.735124", "0.733706", "0.7326853", "0.7253138", "0.7249352", "0.7215962", "0.7212624", "0.7207916", "0.72033405", "0.7193375", "0.7178931", "0.7175602", "0.7160331", "0.70442784", "0.70267224", "0.70201224", "0.7019726", "0.7019406", "0.70045453", "0.6994836", "0.69830686", "0.6969462", "0.6957299", "0.69549936", "0.6946744", "0.69381654", "0.6932158", "0.69268936", "0.69057935", "0.6901052", "0.6882658", "0.6866689", "0.6854101", "0.685014", "0.68198824", "0.68156767", "0.68116874", "0.6811588", "0.6809916", "0.6786432", "0.6762601", "0.6755876", "0.67530537", "0.67515016", "0.6748182", "0.671435", "0.6704809", "0.67000353", "0.6697732", "0.6696187", "0.66910666", "0.66857946", "0.66826123", "0.66811264", "0.6674044", "0.6673805", "0.666393", "0.6663456", "0.66530305", "0.6652163", "0.6652038", "0.66494465", "0.6644509", "0.66357243", "0.663506", "0.6634794", "0.6632775", "0.6631584", "0.6631094", "0.6629581", "0.66287416", "0.66125524", "0.661016", "0.66057426", "0.6594975", "0.6594835", "0.65876293" ]
0.0
-1
processes widget options to be saved
public function update($new_instance, $old_instance) { $instance = array(); $instance['starter_text'] = ( !empty( $new_instance['starter_text'] ) ) ? strip_tags( $new_instance['starter_text'] ) : ''; $instance['starter_link'] = ( !empty( $new_instance['starter_link'] ) ) ? strip_tags( $new_instance['starter_link'] ) : ''; return $instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handle_options()\r\n {\r\n $options = $this->get_options();\r\n \r\n if (isset($_POST['submitted'])) {\r\n \t\t\r\n \t\t//check security\r\n \t\tcheck_admin_referer('snazzy-nonce');\r\n \t\t\r\n $options = array();\r\n \r\n $options['years'] = htmlspecialchars($_POST['years']);\r\n $options['mini'] = $_POST['mini'];\r\n $options['posts'] = $_POST['posts'];\r\n $options['pages'] = $_POST['pages'];\r\n \r\n update_option($this->db_option, $options);\r\n \r\n echo '<div class=\"updated fade\"><p>Plugin settings saved.</p></div>';\r\n }\r\n \r\n $layout = $options['layout'];\r\n $years = stripslashes($options['years']);\r\n $mini = $options['mini'] == 'on' ? 'checked' : '';\r\n $posts = $options['posts'] == 'on' ? 'checked' : '';\r\n $pages = $options['pages'] == 'on' ? 'checked' : '';\r\n \r\n // URL for form submit, equals our current page\r\n $action_url = $_SERVER['REQUEST_URI'];\r\n \r\n include('snazzy-archives-options.php');\r\n }", "function save_options(){\n\t\t\n\t\t$nonsavable_types=array('open', 'close','subtitle','title','documentation','block','blockclose');\n\t\n\t\t//insert the default values if the fields are empty\n\t\tforeach ($this->options as $value) {\n\t\t\tif(isset($value['id']) && get_option($value['id'])===false && isset($value['std']) && !in_array($value['type'], $nonsavable_types)){\n\t\t\t\tupdate_option( $value['id'], $value['std']);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//save the field's values if the Save action is present\n\t\tif ( $_GET['page'] == HANA_OPTIONS_PAGE ) {\n\t\t\tif ( isset($_REQUEST['action']) && 'save' == $_REQUEST['action'] ) {\n\t\t\t\t//verify the nonce\n\t\t\t\tif ( empty($_POST) || !wp_verify_nonce($_POST['hana-theme-options'],'hana-theme-update-options') )\n\t\t\t\t{\n\t\t\t\t\tprint 'Sorry, your nonce did not verify.';\n\t\t\t\t\texit;\n\t\t\t\t}else{\n\t\t\t\t\tif(!get_option(HANA_SHORTNAME.'_first_save')){\n\t\t\t\t\t\tupdate_option(HANA_SHORTNAME.'_first_save','true');\n\t\t\t\t\t}\n\t\t\t\t\tforeach ($this->options as $value) {\n\t\t\t\t\t\tif(isset($value['id']) ) if( isset( $_REQUEST[ $value['id'] ] ) && !in_array($value['type'], $nonsavable_types)) {\n\t\t\t\t\t\t\tupdate_option( $value['id'], $_REQUEST[ $value['id'] ] );\n\t\t\t\t\t\t} elseif(!in_array($value['type'], $nonsavable_types)){\n\t\t\t\t\t\t\tdelete_option( $value['id'] );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t/* Update the values for the custom options that contain unlimited suboptions - for example when having\n\t\t\t\t\t\t * a slider with fields \"title\" and \"imageurl\", for all the entities the titles will be saved in one field,\n\t\t\t\t\t\t * separated by a separator. In this case, if the field name is slider_title and it contains some data like\n\t\t\t\t\t\t * title 1|*|title2|*|title3 (|*| is the separator), then all this data will be saved into a custom field\n\t\t\t\t\t\t * with id slider_titles.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif($value['type']=='custom'){\n\t\t\t\t\t\t\tforeach($value['fields'] as $field){\n\t\t\t\t\t\t\t\tupdate_option( $field['id'].'s', $_REQUEST[ $field['id'].'s' ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\theader(\"Location: admin.php?page=\".HANA_OPTIONS_PAGE.\"&saved=true\");\n\t\t\t\t\tdie;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}", "function save_options() {\r\n\t\t$this->version = BF_VERSION;\r\n\t\t\r\n\t\t$this->feed_url = (string)$_POST['bf-rss-feed-url'];\r\n\t\t$this->comments_feed_url = (string)$_POST['bf-rss-comments-url'];\r\n\t\t$this->footer_message = (string)($_POST['bf-footer-message']);\r\n\t\t\r\n\t\t$this->featured_cat = (int)$_POST['bf-cat-featured'];\r\n\t\t$this->news_cat = (int)$_POST['bf-cat-news'];\r\n\t\t$this->asides_cat = (int)$_POST['bf-cat-asides'];\r\n\t\t\r\n\t\t$this->home_link = (string)$_POST['bf-nav-home'];\r\n\t\t$this->blog_link = (string)$_POST['bf-nav-blog'];\r\n\t\t$this->single_parent = (string)$_POST['bf-nav-singleparent'];\r\n\t\t$this->topnav_linkcat = (int)$_POST['bf-nav-linkcat'];\r\n\t\t\r\n\t\t$this->display_author = (boolean)$_POST['bf-layout-display-author'];\r\n\r\n\t\t$this->hooks = array();\r\n\t\t$hook_classes = $_POST['bf-hook-cond'];\r\n\t\t$hook_filters = $_POST['bf-hook-filter'];\r\n\t\t$hook_positions = $_POST['bf-hook-position'];\r\n\t\t$hook_codes = $_POST['bf-hook-html'];\r\n\t\t\r\n\t\tfor ( $i = 0; $i < count($hook_positions); $i++ ) {\r\n\t\t\t$this->hooks[] = array(\r\n\t\t\t\t'ID'\t\t=>\t(string)stripslashes($hook_classes[$i]),\r\n\t\t\t\t'filter'\t=>\t$hook_filters[$i],\r\n\t\t\t\t'position'\t=>\t(string)stripslashes($hook_positions[$i]),\r\n\t\t\t\t'code'\t\t=>\t$hook_codes[$i]\r\n\t\t\t);\r\n\t\t}\r\n\t}", "function widget_opml_browser_init() {\r\n\t\r\n\t// Check for the required API functions\r\n\tif ( !function_exists('register_sidebar_widget') || !function_exists('register_widget_control') )\r\n\t\treturn;\r\n\r\n\t// This saves options and prints the widget's config form.\r\n\tfunction widget_opml_browser_control($number) {\r\n\r\n $options = $newoptions = get_option('widget_opml_browser');\r\n if ( $_POST[\"opml-browser-submit-$number\"] ) {\r\n $newoptions[$number]['title'] = strip_tags(stripslashes($_POST[\"opml-browser-title-$number\"]));\r\n $newoptions[$number]['opmlurl'] = $_POST[\"opml-browser-opmlurl-$number\"];\r\n $newoptions[$number]['opmlpath'] = $_POST[\"opml-browser-opmlpath-$number\"];\r\n $newoptions[$number]['opmltitle'] = $_POST[\"opml-browser-opmltitle-$number\"];\r\n\t $newoptions[$number]['imageurl'] = $_POST[\"opml-browser-imageurl-$number\"];\r\n $newoptions[$number]['monda'] = $_POST[\"opml-browser-monda-$number\"];\r\n $newoptions[$number]['reqhtml'] = $_POST[\"opml-browser-reqhtml-$number\"];\r\n $newoptions[$number]['reqfeed'] = $_POST[\"opml-browser-reqfeed-$number\"];\r\n $newoptions[$number]['noself'] = $_POST[\"opml-browser-noself-$number\"];\r\n $newoptions[$number]['opmllink'] = $_POST[\"opml-browser-opmllink-$number\"];\r\n $newoptions[$number]['showfolders'] = $_POST[\"opml-browser-showfolders-$number\"];\r\n $newoptions[$number]['closeall'] = $_POST[\"opml-browser-closeall-$number\"];\r\n\t $newoptions[$number]['sortitems'] = $_POST[\"opml-browser-sortitems-$number\"];\r\n\t $newoptions[$number]['flatten'] = $_POST[\"opml-browser-flatten-$number\"];\r\n\t $newoptions[$number]['tooltips'] = $_POST[\"opml-browser-tooltips-$number\"];\r\n $newoptions[$number]['indent'] = $_POST[\"opml-browser-indent-$number\"];\r\n\t $newoptions[$number]['credit'] = $_POST[\"opml-browser-credit-$number\"];\r\n wp_cache_delete(\"opml-browser-content-$number\");\r\n }\r\n if ( $options != $newoptions ) {\r\n $options = $newoptions;\r\n update_option('widget_opml_browser', $options);\r\n }\r\n $browser = new OpmlBrowser();\r\n ?>\r\n\t<div style=\"text-align:right\">\r\n\t <label for=\"opml-browser-title-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Widget title: <input type=\"text\" id=\"opml-browser-title-<?php echo $number; ?>\" name=\"opml-browser-title-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo htmlspecialchars($options[$number]['title'], ENT_COMPAT, \"UTF-8\", false); ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-opmlurl-<?php echo $number; ?>\" style=\"display:block\">\r\n\t OPML URL: <input type=\"text\" id=\"opml-browser-opmlurl-<?php echo $number; ?>\" name=\"opml-browser-opmlurl-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['opmlurl']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-opmlpath-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Local path: <input type=\"text\" id=\"opml-browser-opmlpath-<?php echo $number; ?>\" name=\"opml-browser-opmlpath-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['opmlpath']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-opmltitle-<?php echo $number; ?>\" style=\"display:block\">\r\n\t OPML title override: <input type=\"text\" id=\"opml-browser-opmltitle-<?php echo $number; ?>\" name=\"opml-browser-opmltitle-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['opmltitle']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-imageurl-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Image URL: <input type=\"text\" id=\"opml-browser-imageurl-<?php echo $number; ?>\" name=\"opml-browser-imageurl-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['imageurl']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-monda-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Use rss.png from wp-includes/images (Monda option)? <input type=\"checkbox\" id=\"opml-browser-monda-<?php echo $number; ?>\" name=\"opml-browser-monda-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['monda'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-reqhtml-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Exclude if no HTML link? <input type=\"checkbox\" id=\"opml-browser-reqhtml-<?php echo $number; ?>\" name=\"opml-browser-reqhtml-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['reqhtml'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-reqfeed-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Exclude if no feed link? <input type=\"checkbox\" id=\"opml-browser-reqfeed-<?php echo $number; ?>\" name=\"opml-browser-reqfeed-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['reqfeed'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-noself-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Exclude <?php echo $browser->host;?>? <input type=\"checkbox\" id=\"opml-browser-noself-<?php echo $number; ?>\" name=\"opml-browser-noself-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['noself'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-opmllink-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Link to OPML? <input type=\"checkbox\" id=\"opml-browser-opmllink-<?php echo $number; ?>\" name=\"opml-browser-opmllink-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['opmllink'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-showfolders-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Show clickable folders for categories? <input type=\"checkbox\" id=\"opml-browser-showfolders-<?php echo $number; ?>\" name=\"opml-browser-showfolders-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['showfolders'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-closeall-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Start with folders closed? <input type=\"checkbox\" id=\"opml-browser-closeall-<?php echo $number; ?>\" name=\"opml-browser-closeall-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['closeall'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-sortitems-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Sort items? <input type=\"checkbox\" id=\"opml-browser-sortitems-<?php echo $number; ?>\" name=\"opml-browser-sortitems-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['sortitems'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n\t <label for=\"opml-browser-flatten-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Flatten hierarchy? <input type=\"checkbox\" id=\"opml-browser-flatten-<?php echo $number; ?>\" name=\"opml-browser-flatten-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['flatten'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n\t <label for=\"opml-browser-tooltips-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Include OPML descriptions as tooltips? <input type=\"checkbox\" id=\"opml-browser-tooltips-<?php echo $number; ?>\" name=\"opml-browser-tooltips-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['tooltips'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-indent-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Left indent (CSS margin) <input type=\"text\", id=\"opml-browser-indent-<?php echo $number; ?>\" name=\"opml-browser-indent-<?php echo $number; ?>\" size=\"10\" value=\"<?php echo $options[$number]['indent']; ?>\" />\r\n\t </label>\r\n\t <label for=\"opml-browser-credit-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Include &quot;Get this widget&quot; link (please)? <input type=\"checkbox\" id=\"opml-browser-credit-<?php echo $number; ?>\" name=\"opml-browser-credit-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['credit'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n\t <input type=\"hidden\" name=\"opml-browser-submit-<?php echo $number; ?>\" id=\"opml-browser-submit-<?php echo $number; ?>\" value=\"1\" />\r\n\t</div>\r\n\t <?php\r\n\t}\r\n \r\n\r\n\t// This prints the widget\r\n\tfunction widget_opml_browser($args, $number = 1) {\r\n \r\n \t extract($args);\r\n\t $defaults = array('title' => 'Blogroll');\r\n\t $options = (array) get_option('widget_opml_browser');\r\n\t\r\n\t foreach ( $defaults as $key => $value )\r\n\t\tif ( !isset($options[$number][$key]) )\r\n\t\t\t$options[$number][$key] = $defaults[$key];\r\n\t\r\n\t echo $before_widget;\r\n\t echo $before_title . $options[$number]['title'] . $after_title;\r\n\t ?>\r\n\r\n <div id=\"opml-browser-box-<?php echo $number; ?>\">\r\n <?php\r\n if ($widget_content = wp_cache_get(\"opml-browser-content-$number\")) {\r\n echo $widget_content; // Found it in the cache\r\n }\r\n else\r\n {\r\n if (isset($options[$number]['opmlpath']) && ($options[$number]['opmlpath'] != ''))\r\n $filename = $options[$number]['opmlpath'];\r\n else\r\n $filename = $options[$number]['opmlurl'];\r\n if (isset($filename) && ($filename != '')) {\r\n $browser = new OpmlBrowser();\r\n $browser->filename = $filename;\r\n if ($options[$number]['opmllink'] == '1')\r\n {\r\n $browser->opmlurl = $options[$number]['opmlurl'];\r\n $browser->opmltitle = $options[$number]['opmltitle'];\r\n }\r\n\t\t\t$imageurl = $options[$number]['imageurl'];\r\n\t\t\tif (isset($imageurl) && ($imageurl != ''))\r\n\t\t\t{\r\n\t\t\t if (substr_compare($imageurl, '/', -1) != 0)\r\n\t\t\t {\r\n\t\t\t $imageurl .= '/';\r\n\t\t\t }\r\n\t\t\t $browser->image_url = $imageurl;\r\n\t\t\t}\r\n\t\t\t$browser->monda = ($options[$number]['monda'] == '1');\r\n $browser->require_html = ($options[$number]['reqhtml'] == '1');\r\n $browser->require_feed = ($options[$number]['reqfeed'] == '1');\r\n $browser->exclude_self = ($options[$number]['noself'] == '1');\r\n\t\t\t$browser->show_folders = ($options[$number]['showfolders'] == '1');\r\n $browser->closeall = ($options[$number]['closeall'] == '1');\r\n $browser->sort_items = ($options[$number]['sortitems'] == '1');\r\n\t\t\t$browser->flatten = ($options[$number]['flatten'] == '1');\r\n\t\t\t$browser->tooltips = ($options[$number]['tooltips'] == '1');\r\n $browser->margin = $options[$number]['indent'];\r\n\t\t\t$browser->credit = ($options[$number]['credit'] == '1');\r\n $browser->name = \"-widget-$number-\";\r\n $widget_content = $browser->render();\r\n\t\t\tif ($browser->credit)\r\n\t\t\t{\r\n\t\t\t $widget_content.= '<div id=\"opml-browser-link-' . $number . '\" class=\"opml-browser-link\"><a href=\"http://chipstips.com/?tag=phpopmlbrowse\">Get this widget</a></div>';\r\n\t\t\t}\r\n echo $widget_content;\r\n wp_cache_add(\"opml-browser-content-$number\", $widget_content);\r\n }\r\n else\r\n {\r\n echo \"<p>OPML URL or file not specified</p>\";\r\n }\r\n }\r\n ?>\r\n </div>\r\n\t <?php\r\n\t\techo $after_widget;\r\n\t}\r\n\r\n function widget_opml_browser_register()\r\n {\r\n // Check for version upgrade\r\n $options = get_option('widget_opml_browser');\r\n $need_update = false;\r\n if (isset($options['version'])) {\r\n $curver = $options['version'];\r\n if ($curver < 1.2) {\r\n $curver = 1.2;\r\n $options['version'] = $curver;\r\n $options[1]['title'] = $options['title'];\r\n $options[1]['opmlurl'] = $options['opmlurl'];\r\n $options[1]['opmlpath'] = $options['opmlpath'];\r\n $options[1]['reqhtml'] = $options['reqhtml'];\r\n $options[1]['reqfeed'] = $options['reqfeed'];\r\n $options[1]['noself'] = $options['noself'];\r\n $options[1]['opmllink'] = $options['opmllink'];\r\n $options[1]['closeall'] = $options['closeall'];\r\n $options[1]['indent'] = $options['indent'];\r\n $options['number'] = 1;\r\n $need_update = true;\r\n }\r\n /* No changes to options between 1.2 and 2.2 */\r\n\t if ($curver < 2.2) {\r\n\t $curver = 2.2;\r\n $options['version'] = $curver;\r\n\t\tfor ($i = 1; $i <= $options['number']; $i++)\r\n\t\t{\r\n\t\t $options[$i]['imageurl'] = get_settings('siteurl') . '/wp-content/plugins/opml-browser/images/';\r\n\t\t $options[$i]['tooltips'] = '1';\r\n\t\t $options[$i]['credit'] = '1';\r\n\t\t}\r\n\t\t$need_update = true;\r\n\t }\r\n\t if ($curver < 2.3) {\r\n\t $curver = 2.3;\r\n\t\t$options['version'] = $curver;\r\n\t\tfor ($i = 1; $i <= $options['number']; $i++)\r\n\t\t{\r\n\t\t $options[$i]['showfolders'] = '1';\r\n\t\t}\r\n\t\t$need_update = true;\r\n\t }\r\n\t if ($curver < 2.4) {\r\n\t $curver = 2.4;\r\n\t\t$options['version'] = $curver;\r\n\t\t$need_update = true;\r\n\t }\r\n }\r\n else {\r\n $curver = 2.4;\r\n $options['version'] = $curver;\r\n\t $options[1]['imageurl'] = get_settings('siteurl') . '/wp-content/plugins/opml-browser/images/';\r\n\t $options[1]['tooltips'] = '1';\r\n $options[1]['indent'] = \"5px\";\r\n\t $options[1]['credit'] = '1';\r\n $need_update = true;\r\n }\r\n\r\n $number = $options['number'];\r\n if ( $number < 1 ) {\r\n $number = 1;\r\n $options['number'] = 1;\r\n $need_update = true;\r\n }\r\n else if ( $number > 9 ) {\r\n $number = 9;\r\n $options['number'] = 9;\r\n $need_update = true;\r\n }\r\n\r\n // Apply any upgrades here by testing $curver and setting $need_update to true\r\n\r\n if ($need_update)\r\n update_option('widget_opml_browser', $options);\r\n\r\n for ($i = 1; $i <= 9; $i++) {\r\n $name = array('opml-browser %s', null, $i);\r\n register_sidebar_widget($name, $i <= $number ? 'widget_opml_browser' : /* unregister */ '', $i);\r\n register_widget_control($name, $i <= $number ? 'widget_opml_browser_control' : /* unregister */ '', 550, 500, $i);\r\n }\r\n add_action('sidebar_admin_setup', 'widget_opml_browser_setup');\r\n add_action('sidebar_admin_page', 'widget_opml_browser_page');\r\n\r\n // add the Link to the OPML file For Autodiscovery\r\n add_action('wp_head', 'opml_browser_head');\t\r\n\r\n // Add a filter for embedded browsers in content\r\n add_filter('the_content', 'opml_browser_content_filter');\r\n }\r\n\r\n function widget_opml_browser_setup() {\r\n $options = $newoptions = get_option('widget_opml_browser');\r\n if ( isset($_POST['opml-browser-number-submit']) ) {\r\n $number = (int) $_POST['opml-browser-number'];\r\n if ( $number > 9 ) $number = 9;\r\n else if ( $number < 1 ) $number = 1;\r\n $newoptions['number'] = $number;\r\n }\r\n if ( $options != $newoptions ) {\r\n $options = $newoptions;\r\n update_option('widget_opml_browser', $options);\r\n widget_opml_browser_register();\r\n }\r\n }\r\n\r\n function widget_opml_browser_page() {\r\n $options = $newoptions = get_option('widget_opml_browser');\r\n?>\r\n\t<div class=\"wrap\">\r\n\t\t<form method=\"POST\">\r\n\t\t\t<h2>OPML Browser Widgets</h2>\r\n\t\t\t<p><?php _e('How many opml-browser widgets would you like?'); ?>\r\n\t\t\t<select id=\"opml-browser-number\" name=\"opml-browser-number\" value=\"<?php echo $options['number']; ?>\">\r\n<?php for ( $i = 1; $i < 10; ++$i ) echo \"<option value='$i' \".($options['number']==$i ? \"selected='selected'\" : '').\">$i</option>\"; ?>\r\n\t\t\t</select>\r\n\t\t\t<span class=\"submit\"><input type=\"submit\" name=\"opml-browser-number-submit\" id=\"opml-browser-number-submit\" value=\"<?php _e('Save'); ?>\" /></span></p>\r\n\t\t</form>\r\n\t</div>\r\n<?php\r\n }\r\n\r\n function opml_browser_head(){\r\n $options = (array) get_option('widget_opml_browser');\r\n $number = $options['number'];\r\n for ($i = 1; $i <= 9; $i++) {\r\n $opmlurl = $options[$i]['opmlurl'];\r\n if (isset($opmlurl) && $opmlurl != '')\r\n echo ' <link rel=\"outline\" type=\"text/x-opml\" title=\"OPML\" href=\"'.$opmlurl.'\" />';\r\n }\r\n\t$filepath = get_settings('siteurl') . '/wp-content/plugins/opml-browser/';\r\n\t$filebase = $filepath . 'opml-browser.';\r\n // Link our JavaScript\r\n\techo '<script language=\"javascript\" type=\"text/javascript\" src=\"' . $filebase . 'js\"></script>';\r\n\t// and our stylesheet\r\n\techo '<link rel=\"StyleSheet\" type=\"text/css\" href=\"' . $filebase . 'css\"/>';\r\n\t// Set the image URL for JavaScript\r\n\techo '<script language=\"javascript\" type=\"text/javascript\">opml_browser.image_url = \\'' .\r\n\t\t$filepath . 'images\\';</script>';\r\n }\r\n\r\n function opml_browser_content_filter($text) {\r\n $textarray = preg_split(\"/(\\[opml-browser.*\\])/sU\", $text, -1, PREG_SPLIT_DELIM_CAPTURE);\r\n $limit = count($textarray);\r\n $output = '';\r\n for ($i = 0; $i < $limit; $i++) {\r\n $content = $textarray[$i];\r\n if (preg_match(\"/\\[opml-browser(.*)\\]/sU\", $content, $bcode)) {\r\n $bcode = $bcode[1];\r\n $bcode = preg_replace(array('/\\&#8221;/','/\\&#8243;/'), '\"', $bcode, -1);\r\n $browser = new OpmlBrowser();\r\n $browser->opmlurl = parse_attribute_value($bcode, \"opmlurl\");\r\n $browser->filename = parse_attribute_value($bcode, \"filename\");\r\n if (is_null($browser->filename) || $browser->filename == '') {\r\n $browser->filename = $browser->opmlurl;\r\n }\r\n if (parse_attribute_value($bcode, \"link_opml\") != \"1\") {\r\n $browser->opmlurl = null;\r\n }\r\n $browser->opmltitle = parse_attribute_value($bcode, 'opmltitle');\r\n\t\t$imageurl = parse_attribute_value($bcode, 'imageurl');\r\n\t\tif (isset($imageurl) && ($imageurl != ''))\r\n\t\t{\r\n\t\t if (substr_compare($imageurl, '/', -1) != 0)\r\n\t\t {\r\n\t\t $imageurl .= '/';\r\n\t\t }\r\n\t\t $browser->image_url = $imageurl;\r\n\t\t}\r\n\t\t$browser->monda = (parse_attribute_value($bcode, 'monda') == '1');\r\n $browser->require_html = (parse_attribute_value($bcode, 'require_html') == '1');\r\n $browser->require_feed = (parse_attribute_value($bcode, 'require_feed') == '1');\r\n $browser->exclude_self = (parse_attribute_value($bcode, 'exclude_self') == '1');\r\n $browser->show_folders = (parse_attribute_value($bcode, 'show_folders') != '0');\r\n $browser->closeall = (parse_attribute_value($bcode, 'closeall') == '1');\r\n\t\t$browser->sort_items = (parse_attribute_value($bcode, 'sort') == '1');\r\n\t\t$browser->flatten = (parse_attribute_value($bcode, 'flatten') == '1');\r\n\t\t$browser->tooltips = (parse_attribute_value($bcode, 'tooltips') != '0');\r\n $browser->margin = parse_attribute_value($bcode, 'margin');\r\n\t\t$browser->credit = (parse_attribute_value($bcode, 'credit') != '0');\r\n $browser->name = parse_attribute_value($bcode, 'name');\r\n $output .= $browser->render();\r\n }\r\n else\r\n $output .= $content;\r\n }\r\n return $output;\r\n }\r\n\r\n widget_opml_browser_register();\r\n}", "function emb_save_options() {\n\t}", "function widget_opml_browser_control($number) {\r\n\r\n $options = $newoptions = get_option('widget_opml_browser');\r\n if ( $_POST[\"opml-browser-submit-$number\"] ) {\r\n $newoptions[$number]['title'] = strip_tags(stripslashes($_POST[\"opml-browser-title-$number\"]));\r\n $newoptions[$number]['opmlurl'] = $_POST[\"opml-browser-opmlurl-$number\"];\r\n $newoptions[$number]['opmlpath'] = $_POST[\"opml-browser-opmlpath-$number\"];\r\n $newoptions[$number]['opmltitle'] = $_POST[\"opml-browser-opmltitle-$number\"];\r\n\t $newoptions[$number]['imageurl'] = $_POST[\"opml-browser-imageurl-$number\"];\r\n $newoptions[$number]['monda'] = $_POST[\"opml-browser-monda-$number\"];\r\n $newoptions[$number]['reqhtml'] = $_POST[\"opml-browser-reqhtml-$number\"];\r\n $newoptions[$number]['reqfeed'] = $_POST[\"opml-browser-reqfeed-$number\"];\r\n $newoptions[$number]['noself'] = $_POST[\"opml-browser-noself-$number\"];\r\n $newoptions[$number]['opmllink'] = $_POST[\"opml-browser-opmllink-$number\"];\r\n $newoptions[$number]['showfolders'] = $_POST[\"opml-browser-showfolders-$number\"];\r\n $newoptions[$number]['closeall'] = $_POST[\"opml-browser-closeall-$number\"];\r\n\t $newoptions[$number]['sortitems'] = $_POST[\"opml-browser-sortitems-$number\"];\r\n\t $newoptions[$number]['flatten'] = $_POST[\"opml-browser-flatten-$number\"];\r\n\t $newoptions[$number]['tooltips'] = $_POST[\"opml-browser-tooltips-$number\"];\r\n $newoptions[$number]['indent'] = $_POST[\"opml-browser-indent-$number\"];\r\n\t $newoptions[$number]['credit'] = $_POST[\"opml-browser-credit-$number\"];\r\n wp_cache_delete(\"opml-browser-content-$number\");\r\n }\r\n if ( $options != $newoptions ) {\r\n $options = $newoptions;\r\n update_option('widget_opml_browser', $options);\r\n }\r\n $browser = new OpmlBrowser();\r\n ?>\r\n\t<div style=\"text-align:right\">\r\n\t <label for=\"opml-browser-title-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Widget title: <input type=\"text\" id=\"opml-browser-title-<?php echo $number; ?>\" name=\"opml-browser-title-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo htmlspecialchars($options[$number]['title'], ENT_COMPAT, \"UTF-8\", false); ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-opmlurl-<?php echo $number; ?>\" style=\"display:block\">\r\n\t OPML URL: <input type=\"text\" id=\"opml-browser-opmlurl-<?php echo $number; ?>\" name=\"opml-browser-opmlurl-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['opmlurl']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-opmlpath-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Local path: <input type=\"text\" id=\"opml-browser-opmlpath-<?php echo $number; ?>\" name=\"opml-browser-opmlpath-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['opmlpath']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-opmltitle-<?php echo $number; ?>\" style=\"display:block\">\r\n\t OPML title override: <input type=\"text\" id=\"opml-browser-opmltitle-<?php echo $number; ?>\" name=\"opml-browser-opmltitle-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['opmltitle']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-imageurl-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Image URL: <input type=\"text\" id=\"opml-browser-imageurl-<?php echo $number; ?>\" name=\"opml-browser-imageurl-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['imageurl']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-monda-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Use rss.png from wp-includes/images (Monda option)? <input type=\"checkbox\" id=\"opml-browser-monda-<?php echo $number; ?>\" name=\"opml-browser-monda-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['monda'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-reqhtml-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Exclude if no HTML link? <input type=\"checkbox\" id=\"opml-browser-reqhtml-<?php echo $number; ?>\" name=\"opml-browser-reqhtml-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['reqhtml'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-reqfeed-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Exclude if no feed link? <input type=\"checkbox\" id=\"opml-browser-reqfeed-<?php echo $number; ?>\" name=\"opml-browser-reqfeed-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['reqfeed'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-noself-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Exclude <?php echo $browser->host;?>? <input type=\"checkbox\" id=\"opml-browser-noself-<?php echo $number; ?>\" name=\"opml-browser-noself-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['noself'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-opmllink-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Link to OPML? <input type=\"checkbox\" id=\"opml-browser-opmllink-<?php echo $number; ?>\" name=\"opml-browser-opmllink-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['opmllink'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-showfolders-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Show clickable folders for categories? <input type=\"checkbox\" id=\"opml-browser-showfolders-<?php echo $number; ?>\" name=\"opml-browser-showfolders-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['showfolders'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-closeall-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Start with folders closed? <input type=\"checkbox\" id=\"opml-browser-closeall-<?php echo $number; ?>\" name=\"opml-browser-closeall-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['closeall'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-sortitems-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Sort items? <input type=\"checkbox\" id=\"opml-browser-sortitems-<?php echo $number; ?>\" name=\"opml-browser-sortitems-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['sortitems'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n\t <label for=\"opml-browser-flatten-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Flatten hierarchy? <input type=\"checkbox\" id=\"opml-browser-flatten-<?php echo $number; ?>\" name=\"opml-browser-flatten-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['flatten'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n\t <label for=\"opml-browser-tooltips-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Include OPML descriptions as tooltips? <input type=\"checkbox\" id=\"opml-browser-tooltips-<?php echo $number; ?>\" name=\"opml-browser-tooltips-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['tooltips'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-indent-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Left indent (CSS margin) <input type=\"text\", id=\"opml-browser-indent-<?php echo $number; ?>\" name=\"opml-browser-indent-<?php echo $number; ?>\" size=\"10\" value=\"<?php echo $options[$number]['indent']; ?>\" />\r\n\t </label>\r\n\t <label for=\"opml-browser-credit-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Include &quot;Get this widget&quot; link (please)? <input type=\"checkbox\" id=\"opml-browser-credit-<?php echo $number; ?>\" name=\"opml-browser-credit-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['credit'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n\t <input type=\"hidden\" name=\"opml-browser-submit-<?php echo $number; ?>\" id=\"opml-browser-submit-<?php echo $number; ?>\" value=\"1\" />\r\n\t</div>\r\n\t <?php\r\n\t}", "public function save_widget_state() {\n\n\t\tcheck_ajax_referer( 'mi-admin-nonce', 'nonce' );\n\n\t\t$default = self::$default_options;\n\t\t$current_options = $this->get_options();\n\n\t\t$reports = $default['reports'];\n\t\tif ( isset( $_POST['reports'] ) ) {\n\t\t\t$reports = json_decode( sanitize_text_field( wp_unslash( $_POST['reports'] ) ), true );\n\t\t\tforeach ( $reports as $report => $reports_sections ) {\n\t\t\t\t$reports[ $report ] = array_map( 'boolval', $reports_sections );\n\t\t\t}\n\t\t}\n\n\t\t$options = array(\n\t\t\t'width' => ! empty( $_POST['width'] ) ? sanitize_text_field( wp_unslash( $_POST['width'] ) ) : $default['width'],\n\t\t\t'interval' => ! empty( $_POST['interval'] ) ? absint( wp_unslash( $_POST['interval'] ) ) : $default['interval'],\n\t\t\t'compact' => ! empty( $_POST['compact'] ) ? 'true' === sanitize_text_field( wp_unslash( $_POST['compact'] ) ) : $default['compact'],\n\t\t\t'reports' => $reports,\n\t\t\t'notice30day' => $current_options['notice30day'],\n\t\t);\n\n\t\tarray_walk( $options, 'sanitize_text_field' );\n\t\tupdate_user_meta( get_current_user_id(), 'monsterinsights_user_preferences', $options );\n\n\t\twp_send_json_success();\n\n\t}", "function widgetControlOutput( ) {\r\n\t\t\t$options = get_option( 'ILuvWalking.com Widget' );\r\n\t\t\tif( isset( $_POST[ \"iluvwalking-com-submit\" ] ) ) {\r\n\t\t\t\t$options[ 'title' ] = strip_tags( stripslashes( $_POST[ 'iluvwalking-com-title' ] ) );\r\n\t\t\t\t$options[ 'name' ] = strip_tags( stripslashes( $_POST[ 'iluvwalking-com-name' ] ) );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tupdate_option( 'ILuvWalking.com Widget', $options );\r\n\t\t\t\r\n\t\t\t$title = attribute_escape( $options[ 'title' ] );\r\n\t\t\t$name = attribute_escape( $options[ 'name' ] );\r\n\t\t\t\r\n\t\t\tinclude ( 'views/widget-control.php' );\r\n\t\t}", "public function save_widget() {\n\t\t$this->get_cache();\n\t\t$this->get_db_values();\n\t\tif ( 'POST' === $_SERVER['REQUEST_METHOD'] && isset( $_POST[ $this->unique() ] ) ) {\n\t\t\t$this->get_db_values();\n\t\t\t$this->get_cache();\n\t\t\t$instance = new Save_Handler( array(\n\t\t\t\t'module' => &$this,\n\t\t\t\t'unique' => $this->unique(),\n\t\t\t\t'fields' => $this->fields(),\n\t\t\t\t'db_values' => $this->get_db_values(),\n\t\t\t) );\n\t\t\t$instance->run();\n\n\t\t\t$this->options_cache['field_errors'] = $instance->get_errors();\n\t\t\t$this->set_db_cache( $this->options_cache );\n\t\t\t$this->set_db_values( $instance->get_values() );\n\t\t\tif ( ! empty( $instance->get_errors() ) ) {\n\t\t\t\twp_redirect( add_query_arg( 'wponion-save', 'error' ) );\n\t\t\t\texit;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->init_theme()->render();\n\t\t}\n\t}", "function beaver_extender_custom_options_save() {\n\t\n\tcheck_ajax_referer( 'custom-options', 'security' );\n\t\n\tif ( ! empty( $_POST['extender']['css_builder_popup_active'] ) || beaver_extender_get_custom_css( 'css_builder_popup_active' ) )\n\t\t$custom_css = beaver_extender_preserve_backslashes( beaver_extender_get_custom_css( 'custom_css' ) );\n\telse\n\t\t$custom_css = $_POST['extender']['custom_css'];\n\n\t$css_update = array(\n\t\t'custom_css' => $custom_css,\n\t\t'css_builder_popup_active' => ! empty( $_POST['extender']['css_builder_popup_active'] ) ? 1 : 0\n\t);\n\t$css_update_merged = array_merge( beaver_extender_custom_css_options_defaults(), $css_update );\n\tupdate_option( 'beaver_extender_custom_css', $css_update_merged );\n\t\n\t$functions_default = '<?php\n/* Do not remove this line. Add your functions below. */\n';\n\t\n\tif ( ! empty( $_POST['custom_functions'] ) ) {\n\t\t\n\t\t$functions_update = array(\n\t\t\t'custom_functions_effect_admin' => ! empty( $_POST['custom_functions']['custom_functions_effect_admin'] ) ? 1 : 0,\n\t\t\t'custom_functions' => ( $_POST['custom_functions']['custom_functions'] != '' ) ? $_POST['custom_functions']['custom_functions'] : $functions_default\n\t\t);\n\t\t$functions_update_merged = array_merge( beaver_extender_custom_functions_options_defaults(), $functions_update );\n\t\tupdate_option( 'beaver_extender_custom_functions', $functions_update_merged );\n\t\t\n\t}\n\n\tif ( ! empty( $_POST['custom_js'] ) ) {\n\t\t\n\t\t$js_update = array(\n\t\t\t'custom_js_in_head' => ! empty( $_POST['custom_js']['custom_js_in_head'] ) ? 1 : 0,\n\t\t\t'custom_js' => $_POST['custom_js']['custom_js']\n\t\t);\n\t\t$js_update_merged = array_merge( beaver_extender_custom_js_options_defaults(), $js_update );\n\t\tupdate_option( 'beaver_extender_custom_js', $js_update_merged );\n\t\t\n\t}\n\n\tif ( ! empty( $_POST['custom_template_ids'] ) ) {\n\t\t\n\t\t$template_ids_empty = true;\n\t\tforeach( $_POST['custom_template_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( ! empty( $key ) )\n\t\t\t\t$template_ids_empty = false;\n\n\t\t}\n\t\tforeach( $_POST['custom_template_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( empty( $key ) && !$template_ids_empty ) {\n\t\t\t\t\n\t\t\t\techo 'Please fill in ALL \"File Name\" fields';\n\t\t\t\texit();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbeaver_extender_update_templates( $_POST['custom_template_ids'], $_POST['custom_template_names'], $_POST['custom_template_types'], $_POST['custom_template_post_types'], $_POST['custom_template_textarea'] );\n\t\t\n\t}\n\n\tif ( ! empty( $_POST['custom_label_names'] ) ) {\n\t\t\n\t\t$label_names_empty = true;\n\t\tforeach( $_POST['custom_label_names'] as $key ) {\n\t\t\t\n\t\t\tif ( ! empty( $key ) ) {\n\t\t\t\t\n\t\t\t\t$label_names_empty = false;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tforeach( $_POST['custom_label_names'] as $key ) {\n\t\t\t\n\t\t\tif ( empty( $key ) && !$label_names_empty ) {\n\t\t\t\t\n\t\t\t\techo 'Please fill in ALL \"Name\" fields';\n\t\t\t\texit();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbeaver_extender_update_labels( $_POST['custom_label_names'] );\n\n\t\tif ( ! empty( $_POST['custom_label_create_conditionals'] ) ) {\n\t\t\t\n\t\t\t$custom_conditional_ids = array();\n\t\t\t$custom_conditional_tags = array();\n\t\t\tforeach( $_POST['custom_label_create_conditionals'] as $key => $value ) {\n\t\t\t\t\n\t\t\t\t$custom_conditional_ids[] = 'has_label_' . str_replace( '-', '_', beaver_extender_sanitize_string( $_POST['custom_label_names'][$key] ) );\n\t\t\t\t$custom_conditional_tags[] = 'beaver_extender_has_label(\\'' . beaver_extender_sanitize_string( $_POST['custom_label_names'][$key] ) . '\\')';\n\t\t\t\t\n\t\t\t}\n\t\t\tbeaver_extender_update_conditionals( $custom_conditional_ids, $custom_conditional_tags );\n\t\t\t\n\t\t}\n\t\t\n\t}\n\t\n\tif ( ! empty( $_POST['custom_widget_conditionals_list'] ) )\n\t\t$custom_widget_conditionals_list = $_POST['custom_widget_conditionals_list'];\n\telse\n\t\t$custom_widget_conditionals_list = array();\n\t\n\tif ( ! empty( $_POST['custom_hook_conditionals_list'] ) )\n\t\t$custom_hook_conditionals_list = $_POST['custom_hook_conditionals_list'];\n\telse\n\t\t$custom_hook_conditionals_list = array();\n\t\n\tif ( ! empty( $_POST['custom_conditional_ids'] ) ) {\n\t\t\n\t\t$conditional_ids_empty = true;\n\t\tforeach( $_POST['custom_conditional_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( ! empty( $key ) )\n\t\t\t\t$conditional_ids_empty = false;\n\t\t\t\t\n\t\t}\n\t\tforeach( $_POST['custom_conditional_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( empty( $key ) && !$conditional_ids_empty ) {\n\t\t\t\t\n\t\t\t\techo 'Please fill in ALL \"Name\" fields';\n\t\t\t\texit();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbeaver_extender_update_conditionals( $_POST['custom_conditional_ids'], $_POST['custom_conditional_tags'] );\n\t\t\n\t}\n\tif ( ! empty( $_POST['custom_widget_ids'] ) ) {\n\t\t\n\t\t$widget_ids_empty = true;\n\t\tforeach( $_POST['custom_widget_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( ! empty( $key ) )\n\t\t\t\t$widget_ids_empty = false;\n\t\t\t\t\n\t\t}\n\t\tforeach( $_POST['custom_widget_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( empty( $key ) && !$widget_ids_empty ) {\n\t\t\t\t\n\t\t\t\techo 'Please fill in ALL \"Name\" fields';\n\t\t\t\texit();\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tbeaver_extender_update_widgets( $_POST['custom_widget_ids'], $custom_widget_conditionals_list, $_POST['custom_widget_hook'], $_POST['custom_widget_class'], $_POST['custom_widget_description'], $_POST['custom_widget_status'], $_POST['custom_widget_priority'] );\n\t\n\t}\n\tif ( ! empty( $_POST['custom_hook_ids'] ) ) {\n\t\t\n\t\t$hook_ids_empty = true;\n\t\tforeach( $_POST['custom_hook_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( ! empty( $key ) )\n\t\t\t\t$hook_ids_empty = false;\n\n\t\t}\n\t\tforeach( $_POST['custom_hook_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( empty( $key ) && !$hook_ids_empty ) {\n\t\t\t\t\n\t\t\t\techo 'Please fill in ALL \"Name\" fields';\n\t\t\t\texit();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbeaver_extender_update_hooks( $_POST['custom_hook_ids'], $custom_hook_conditionals_list, $_POST['custom_hook_hook'], $_POST['custom_hook_status'], $_POST['custom_hook_priority'], $_POST['custom_hook_textarea'] );\n\t\n\t}\n\t\n\tbeaver_extender_write_files( $css = true );\n\t\n\techo 'Custom Options Updated';\n\texit();\n\t\n}", "function beaver_extender_custom_options() {\n\t\n\t$custom_functions = get_option( 'beaver_extender_custom_functions' );\n\t$custom_js = get_option( 'beaver_extender_custom_js' );\n\t$custom_templates = beaver_extender_get_templates();\n\t$custom_labels = beaver_extender_get_labels();\n\t$custom_conditionals = beaver_extender_get_conditionals();\n\t$custom_widgets = beaver_extender_get_widgets();\n\t$custom_hooks = beaver_extender_get_hooks();\n?>\n\t<div class=\"wrap\">\n\t\t\n\t\t<div id=\"beaver-extender-custom-saved\" class=\"beaver-extender-update-box\"></div>\n\n\t\t<?php\n\t\tif ( ! empty( $_POST['action'] ) && $_POST['action'] == 'reset' ) {\n\t\t\t\n\t\t\tbeaver_extender_reset_delete_template();\n\t\t\tupdate_option( 'beaver_extender_custom_css', beaver_extender_custom_css_options_defaults() );\n\t\t\tupdate_option( 'beaver_extender_custom_functions', beaver_extender_custom_functions_options_defaults() );\n\t\t\tupdate_option( 'beaver_extender_custom_js', beaver_extender_custom_js_options_defaults() );\n\t\t\tupdate_option( 'beaver_extender_custom_templates', array() );\n\t\t\tupdate_option( 'beaver_extender_custom_labels', array() );\n\t\t\tupdate_option( 'beaver_extender_custom_conditionals', array() );\n\t\t\tupdate_option( 'beaver_extender_custom_widget_areas', array() );\n\t\t\tupdate_option( 'beaver_extender_custom_hook_boxes', array() );\n\n\t\t\tbeaver_extender_get_custom_css( null, $args = array( 'cached' => false, 'array' => false ) );\n\t\t\t$custom_functions = get_option( 'beaver_extender_custom_functions' );\n\t\t\t$custom_js = get_option( 'beaver_extender_custom_js' );\n\t\t\t$custom_templates = beaver_extender_get_templates();\n\t\t\t$custom_labels = beaver_extender_get_labels();\n\t\t\t$custom_conditionals = beaver_extender_get_conditionals();\n\t\t\t$custom_widgets = beaver_extender_get_widgets();\n\t\t\t$custom_hooks = beaver_extender_get_hooks();\n\n\t\t\tbeaver_extender_write_files( $css = true );\n\t\t?>\n\t\t\t<script type=\"text/javascript\">jQuery(document).ready(function($){ $('#beaver-extender-custom-saved').html('Custom Options Reset').css(\"position\", \"fixed\").fadeIn('slow');window.setTimeout(function(){$('#beaver-extender-custom-saved').fadeOut( 'slow' );}, 2222); });</script>\n\t\t<?php\n\t\t}\n\n\t\tif ( ! empty( $_GET['activetab'] ) ) { ?>\n\t\t\t<script type=\"text/javascript\">jQuery(document).ready(function($) { $('#<?php echo $_GET['activetab']; ?>').click(); });</script>\t\n\t\t<?php\n\t\t} ?>\n\t\t\n\t\t<div id=\"icon-options-general\" class=\"icon32\"></div>\n\t\t\n\t\t<h2 id=\"beaver-extender-admin-heading\"><?php _e( 'Extender - Custom Options', 'extender' ); ?></h2>\n\t\t\n\t\t<div class=\"beaver-extender-css-builder-button-wrap\">\n\t\t\t<span id=\"show-hide-custom-css-builder\" class=\"button\"><?php _e( 'CSS Builder', 'extender' ); ?></span>\n\t\t</div>\n\n\t\t<div class=\"beaver-extender-php-builder-button-wrap\">\n\t\t\t<span id=\"show-hide-custom-php-builder\" class=\"button\"><?php _e( 'PHP Builder', 'extender' ); ?></span>\n\t\t</div>\n\t\t\n\t\t<div id=\"beaver-extender-admin-wrap\">\n\t\t\n\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-css-builder.php' ); ?>\n\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-php-builder.php' ); ?>\n\t\t\t\n\t\t\t<form action=\"/\" id=\"custom-options-form\" name=\"custom-options-form\">\n\t\t\t\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"beaver_extender_custom_options_save\" />\n\t\t\t\t<input type=\"hidden\" name=\"security\" value=\"<?php echo wp_create_nonce( 'custom-options' ); ?>\" />\n\t\t\t\n\t\t\t\t<div id=\"beaver-extender-floating-save\">\n\t\t\t\t\t<input type=\"submit\" value=\"<?php _e( 'Save Changes', 'extender' ); ?>\" name=\"Submit\" alt=\"Save Changes\" class=\"beaver-extender-save-button button button-primary\"/>\n\t\t\t\t\t<img class=\"beaver-extender-ajax-save-spinner\" src=\"<?php echo site_url() . '/wp-admin/images/spinner-2x.gif'; ?>\" />\n\t\t\t\t\t<span class=\"beaver-extender-saved\"></span>\n\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t<div id=\"beaver-extender-custom-options-nav\" class=\"beaver-extender-admin-nav\">\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li id=\"beaver-extender-custom-options-nav-css\" class=\"beaver-extender-options-nav-all beaver-extender-options-nav-active\"><a href=\"#\">CSS</a></li><li id=\"beaver-extender-custom-options-nav-functions\" class=\"beaver-extender-options-nav-all\"><a href=\"#\">Functions</a></li><li id=\"beaver-extender-custom-options-nav-js\" class=\"beaver-extender-options-nav-all\"><a href=\"#\">JS</a></li><li id=\"beaver-extender-custom-options-nav-templates\" class=\"beaver-extender-options-nav-all\"><a href=\"#\">Templates</a></li><li id=\"beaver-extender-custom-options-nav-labels\" class=\"beaver-extender-options-nav-all\"><a href=\"#\">Labels</a></li><li id=\"beaver-extender-custom-options-nav-conditionals\" class=\"beaver-extender-options-nav-all\"><a href=\"#\">Conditionals</a></li><li id=\"beaver-extender-custom-options-nav-widget-areas\" class=\"beaver-extender-options-nav-all\"><a href=\"#\">Widget Areas</a></li><li id=\"beaver-extender-custom-options-nav-hook-boxes\" class=\"beaver-extender-options-nav-all\"><a class=\"beaver-extender-options-nav-last\" href=\"#\">Hook Boxes</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div class=\"beaver-extender-custom-options-wrap\">\n\t\t\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-css.php' ); ?>\n\t\t\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-functions.php' ); ?>\n\t\t\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-js.php' ); ?>\n\t\t\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-templates.php' ); ?>\n\t\t\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-labels.php' ); ?>\n\t\t\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-conditionals.php' ); ?>\n\t\t\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-widget-areas.php' ); ?>\n\t\t\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-hook-boxes.php' ); ?>\n\t\t\t\t</div>\n\t\t\t\n\t\t\t</form>\n\n\t\t\t<div id=\"beaver-extender-admin-footer\">\n\t\t\t\t<p>\n\t\t\t\t\t<a href=\"https://cobaltapps.com\" target=\"_blank\">CobaltApps.com</a> | <a href=\"http://extenderdocs.cobaltapps.com/\" target=\"_blank\">Docs</a> | <a href=\"https://cobaltapps.com/my-account/\" target=\"_blank\">My Account</a> | <a href=\"https://cobaltapps.com/forum/\" target=\"_blank\">Community Forum</a> | <a href=\"https://cobaltapps.com/affiliates/\" target=\"_blank\">Affiliates</a> &middot;\n\t\t\t\t\t<a><span id=\"show-options-reset\" class=\"beaver-extender-options-reset-button button\" style=\"margin:0; float:none !important;\"><?php _e( 'Custom Options Reset', 'extender' ); ?></span></a><a href=\"http://extenderdocs.cobaltapps.com/article/156-custom-options-reset\" class=\"tooltip-mark\" target=\"_blank\">[?]</a>\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style=\"display:none; width:160px; border:none; background:none; margin:0 auto; padding:0; float:none; position:inherit;\" id=\"show-options-reset-box\" class=\"beaver-extender-custom-fonts-box\">\n\t\t\t\t<form style=\"float:left;\" id=\"beaver-extender-reset-custom-options\" method=\"post\">\n\t\t\t\t\t<input style=\"background:#D54E21; width:160px !important; color:#FFFFFF !important; -webkit-box-shadow:none; box-shadow:none;\" type=\"submit\" value=\"<?php _e( 'Reset Custom Options', 'extender' ); ?>\" class=\"beaver-extender-reset button\" name=\"Submit\" onClick='return confirm(\"<?php _e( 'Are you sure your want to reset your Beaver Extender Custom Options?', 'extender' ); ?>\")'/><input type=\"hidden\" name=\"action\" value=\"reset\" />\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t</div>\n\t</div> <!-- Close Wrap -->\n<?php\n}", "public function mm_options_save() {\n $options = $this->options;\n\n //'include_css','show_captions','file_link','itemtag','icontag','captiontag','columns','size'\n if(wp_verify_nonce($_REQUEST['_wp_mm_bg_nonce'],'mm_bg')) {\n if ( isset($_POST['submit']) ) {\n ( function_exists('current_user_can') && !current_user_can('manage_options') ) ? die(__('Cheatin&#8217; uh?', 'mm_custom')) : null;\n \n $options['include_css'] = ( isset($_POST['mm-include_css']) ? 'true' : 'false' );\n $options['show_captions'] = ( isset($_POST['mm-show_captions']) ? 'true' : 'false' );\n $options['file_link'] = ( isset($_POST['mm-file_link']) ? 'true' : 'false' );\n $options['itemtag'] = ( isset($_POST['mm-itemtag']) ? stripslashes ( strip_tags($_POST['mm-itemtag'] ) ) : '' );\n $options['icontag'] = ( isset($_POST['mm-icontag']) ? stripslashes ( strip_tags($_POST['mm-icontag'] ) ) : '' );\n $options['captiontag'] = ( isset($_POST['mm-captiontag']) ? stripslashes ( strip_tags($_POST['mm-captiontag'] ) ) : '' );\n $options['columns'] = ( isset($_POST['mm-columns']) ? stripslashes ( strip_tags($_POST['mm-columns'] ) ) : '' );\n $options['size'] = ( isset($_POST['mm-size']) ? stripslashes ( strip_tags($_POST['mm-size'] ) ) : '' );\n $css = ( isset($_POST['mm-css']) ? stripslashes ( strip_tags($_POST['mm-css'] ) ) : 'false' );\n \n if($css != 'false') {\n $this->mm_update_css($css);\n update_option('mm_gallery_css', $css);\n }\n update_option('mm_gallery_options', $options);\n }\n }\n }", "public static function wpabstats_admin_html_save()\n {\n if( isset( $_POST['wpabstats_setting_post'] ) )\n {\n /**\n * GLOBAL ACTIVATION\n */\n delete_option('_wpabstats_active');\n\n $isActive = \"off\";\n\n if( isset( $_POST['wpabstats_active'] ) ) $isActive = $_POST['wpabstats_active'];\n\n if( $isActive === \"on\" ) add_option( '_wpabstats_active', 'on' );\n\n /**\n * WIDGET CHART PAGE VIEW ON DASHBOARD\n */\n delete_option('_wpabstats_chart_page_widget');\n\n $isActive = \"off\";\n\n if( isset( $_POST['wpabstats_chart_page_widget'] ) ) $isActive = $_POST['wpabstats_chart_page_widget'];\n\n if( $isActive === \"on\" ) add_option( '_wpabstats_chart_page_widget', 'on' );\n\n\n /**\n * WIDGET VISITOR VIEW ON DASHBOARD\n */\n delete_option('_wpabstats_visitor_container_widget');\n\n $isActive = \"off\";\n\n if( isset( $_POST['wpabstats_visitor_container_widget'] ) ) $isActive = $_POST['wpabstats_visitor_container_widget'];\n\n if( $isActive === \"on\" ) add_option( '_wpabstats_visitor_container_widget', 'on' );\n\n /**\n * WIDGET CHART ARTICLE VIEW ON DASHBOARD\n */\n delete_option('_wpabstats_chart_article_widget');\n\n $isActive = \"off\";\n\n if( isset( $_POST['wpabstats_chart_article_widget'] ) ) $isActive = $_POST['wpabstats_chart_article_widget'];\n\n if( $isActive === \"on\" ) add_option( '_wpabstats_chart_article_widget', 'on' );\n\n\n /**\n * WIDGET BROWSER VIEW ON DASHBOARD\n */\n delete_option('_wpabstats_browser_widget');\n\n $isActive = \"off\";\n\n if( isset( $_POST['wpabstats_browser_widget'] ) ) $isActive = $_POST['wpabstats_browser_widget'];\n\n if( $isActive === \"on\" ) add_option( '_wpabstats_browser_widget', 'on' );\n }\n }", "function wdm_add_widget_menu_callback() {\n\n\n\t\t$saved = false;\n\t\tif ( isset( $_POST[ 'uploadcare_hidden' ] ) && $_POST[ 'uploadcare_hidden' ] == 'Y' ) {\n\t\t\tif ( isset( $_POST[ 'uploadcare_public' ] ) ) {\n\t\t\t\t$uploadcare_public = $_POST[ 'uploadcare_public' ];\n\t\t\t\tupdate_option( 'uploadcare_public', $uploadcare_public );\n\t\t\t} else {\n\t\t\t\t$uploadcare_public = \"\";\n\t\t\t}\n\t\t\t$uploadcare_secret = $_POST[ 'uploadcare_secret' ];\n\t\t\tupdate_option( 'uploadcare_secret', $uploadcare_secret );\n\n\t\t\t$uploadcare_locale = $_POST[ 'uploadcare_locale' ];\n\t\t\tupdate_option( 'uploadcare_locale', $uploadcare_locale );\n\n\t\t\t$uploadcare_js = stripslashes( $_POST[ 'uploadcare_js' ] );\n\t\t\t//$uploadcare_js= array('wdm_js'=>$uploadcare_js);\n\t\t\tupdate_option( 'uploadcare_js', $uploadcare_js );\n\n\t\t\t$saved = true;\n\t\t} else {\n\t\t\t$uploadcare_public\t = get_option( 'uploadcare_public' );\n\t\t\t$uploadcare_secret\t = get_option( 'uploadcare_secret' );\n\t\t\t$uploadcare_locale\t = get_option( 'uploadcare_locale' );\n\t\t\t$uploadcare_js\t\t = stripslashes( get_option( 'uploadcare_js', true ) );\n\n\t\t}\n\t\t?>\n\n\t\t<?php if ( $saved ): ?>\n\t\t\t<div class=\"updated\"><p><strong><?php _e( 'Options saved.' ); ?></strong></p></div>\n\t\t<?php endif; ?>\n\n\n\n\t\t<div class=\"wrap\">\n\t\t\t<div id=\"icon-options-general\" class=\"icon32\"><br></div>\n\t\t<?php echo \"<h2>\" . __( 'Uploadcare', 'uploadcare_settings' ) . \"</h2>\"; ?>\n\t\t\t<form name=\"oscimp_form\" method=\"post\" action=\"<?php echo str_replace( '%7E', '~', $_SERVER[ 'REQUEST_URI' ] ); ?>\">\n\t\t\t\t<input type=\"hidden\" name=\"uploadcare_hidden\" value=\"Y\">\n\t\t\t\t<h3>API Keys <a href=\"https://uploadcare.com/documentation/keys/\">[?]</a></h3>\n\t\t\t\t<p>\n\t\t<?php _e( 'Public key: ' ); ?>\n\t\t\t\t\t<input type=\"text\" name=\"uploadcare_public\" value=\"<?php echo $uploadcare_public; ?>\" size=\"20\">\n\t\t<?php _e( 'ex: demopublickey' ); ?>\n\t\t\t\t</p>\n\t\t\t\t<p>\n\t\t<?php _e( \"Secret key: \" ); ?>\n\t\t\t\t\t<input type=\"text\" name=\"uploadcare_secret\" value=\"<?php echo $uploadcare_secret; ?>\" size=\"20\">\n\t\t<?php _e( 'ex: demoprivatekey' ); ?>\n\t\t\t\t</p>\n\t\t\t\t<p>\n\t\t<?php _e( \"Uploadcare Locale: \" ); ?>\n\t\t\t\t\t<input type=\"text\" name=\"uploadcare_locale\" value=\"<?php echo $uploadcare_locale; ?>\" size=\"20\">\n\t\t\t\t\tYou can get your Locale name <a href=\"http://www.lingoes.net/en/translator/langcode.htm\">here</a>\n\t\t\t\t</p>\n\n\t\t\t\t<h3>Enter your JS code </h3>\n\t\t\t\t<textarea rows=\"5\" cols=\"50\" name=\"uploadcare_js\"><?php echo $uploadcare_js; ?></textarea>\n\n\t\t\t\t<p class=\"submit\">\n\t\t\t\t\t<?php submit_button(); ?>\n\t\t\t\t</p>\n\t\t\t</form>\n\t\t\t<div>\n\t\t\t\t<ul>\n\t\t\t\t\t<li>Files uploaded to demo account (demopublickey) are deleted after some time.</li>\n\t\t\t\t\t<li>You can get your own account <a href=\"https://uploadcare.com/pricing/\">here</a>.</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "function lgmac_save_options() {\n\n//var_dump($_POST); die();\n\tif(!current_user_can('publish_pages')) {\n\t\twp_die('Vous n\\'êtes pas autorisé à effectuer cette opération');\n\t}\n\n\tcheck_admin_referer('lgmac_options_verify');\n\n\t$opts = get_option('lgmac_opts');\n\n\t//sauvegarde légende\n\t$opts['legend_01'] = sanitize_text_field($_POST['lgmac_legend_01']);\n\n\t//sauvegarde image\n\t$opts['image_01_url'] = sanitize_text_field($_POST['lgmac_image_url_01']);\n\n\t//valeur de legende dans la bdd\n\tupdate_option('lgmac_opts', $opts);\n\n\t// redirection vers la page des options avec l'url de la page\n\twp_redirect(admin_url('admin.php?page=lgmac_theme_opts&status=1'));\n\texit;\n\n}", "public function process_admin_options() {\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_enabled'] ) ) update_option( 'jigoshop_tgm_custom_gateway_enabled', jigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_enabled'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_enabled' );\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_title'] ) ) update_option( 'jigoshop_tgm_custom_gateway_title', jigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_title'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_title' );\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_description'] ) ) update_option( 'jigoshop_tgm_custom_gateway_description', \tjigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_description'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_description' );\n \t}", "function rp_widget_Admin() {\r\n $rp_settings = get_option(\"rp_widget_option\");\r\n\t// check if options have been updated\r\n\tif (isset($_POST['update_rp_widget'])) {\r\n\t\t$rp_settings['rp_widget_title']= strip_tags(stripslashes($_POST['rp_widget_title']));\r\n $rp_settings['rp_number'] = strip_tags(stripslashes($_POST['rp_number']));\r\n //Rev 0.0.2 - Adding Random Feature\r\n $rp_settings['rp_randomize'] = strip_tags(stripslashes($_POST['rp_randomize']));\r\n $rp_settings['rp_browse_link'] = strip_tags(stripslashes($_POST['rp_browse_link']));\r\n $rp_settings['rp_thickbox'] = strip_tags(stripslashes($_POST['rp_thickbox']));\r\n $rp_settings['rp_thickbox_path'] = strip_tags(stripslashes($_POST['rp_thickbox_path']));\r\n $rp_settings['rp_custom_css'] = strip_tags(stripslashes($_POST['rp_custom_css']));\r\n $rp_settings['rp_css'] = strip_tags(stripslashes($_POST['rp_css']));\r\n\t\tupdate_option(\"rp_widget_option\",$rp_settings);\r\n\t}\r\n\techo '<p>\r\n\t <label for=\"rp_widget_title\"><strong>Title:</strong>\r\n <input id=\"rp_widget_title\" tabindex=\"1\" name=\"rp_widget_title\" type=\"text\" size=\"15\" value=\"'.$rp_settings['rp_widget_title'].'\" />\r\n </label><br />\r\n <label for=\"rp_number\"><strong>Number of Photos:</strong>\r\n <input id=\"rp_number\" name=\"rp_number\" type=\"text\" tabindex=\"2\" size=\"3\" value=\"'.$rp_settings['rp_number'].'\" />\r\n </label><br />\r\n <label for=\"rp_randomize\"><strong>Randomize:</strong>\r\n <input type=\"checkbox\" tabindex=\"3\" name=\"rp_randomize\" ';\r\n if ($rp_settings['rp_randomize'] == 'on') echo 'checked'; \r\n echo ' />\r\n </label><br />\r\n <label for=\"rp_browse_link\"><strong>Browse Photo Link:</strong><br />\r\n <input id=\"rp_browse_link\" name=\"rp_browse_link\" type=\"text\" tabindex=\"42\" class=\"widefat\" value=\"'.$rp_settings['rp_browse_link'].'\" />\r\n </label><br />\r\n <label for=\"rp_thickbox\"><strong>Use Thickbox:</strong>\r\n <input type=\"checkbox\" tabindex=\"5\" name=\"rp_thickbox\" ';\r\n if ($rp_settings['rp_thickbox'] == 'on') echo 'checked'; \r\n echo ' />\r\n </label><br />\r\n <label for=\"rp_thickbox_path\"><strong>Wordpress Path:</strong>\r\n <input id=\"rp_thickbox_path\" name=\"rp_thickbox_path\" type=\"text\" tabindex=\"6\" size=\"15\" value=\"'.$rp_settings['rp_thickbox_path'].'\" />\r\n <br />\r\n See <a target=\"_blank\" href=\"';\r\n echo WP_PLUGIN_URL;\r\n echo '/recent-photos/readme.txt\">Readme.txt</a> for Details.\r\n <br />\r\n </label><br />\r\n <label for=\"rp_custom_css\"><strong>Use Custom CSS:</strong>\r\n <input tabindex=\"7\" type=\"checkbox\" name=\"rp_custom_css\" ';\r\n if ($rp_settings['rp_custom_css'] == 'on') echo 'checked'; \r\n echo ' />\r\n </label><br />\r\n <label for=\"rp_css\"><strong>Custom CSS:</strong><br />\r\n <textarea name=\"rp_css\" rows=\"5\" cols=\"30\" tabindex=\"8\" >';\r\necho $rp_settings['rp_css'];\r\necho '</textarea>\r\n <br />\r\n See <a target=\"_blank\" href=\"';\r\n echo WP_PLUGIN_URL;\r\n echo '/recent-photos/readme.txt\">Readme.txt</a> for Details.\r\n <br />\r\n </label><br />\r\n </p>';\r\n\techo '<input type=\"hidden\" id=\"update_rp_widget\" name=\"update_rp_widget\" value=\"1\" />';\r\n}", "public function form(){\n \t \tif($this->layoutWidgetInfo){\n \t\t$setting = json_decode($this->layoutWidgetInfo->setting, true);\n \t}\n\n \t//default option(type[text], cols[3-9], rows[1], label[$key], name[$key], value[$setting[$k]])\n \t//add option(class, id, stype, styleRow, required, placeholder, attr, [options, code])\n \t$settingForm = array(\n \t\t'layout_widget_id' \t=> array('type' => 'hidden', 'value' => $this->layoutWidgetInfo->layoutWidgetId),\n \t\t'widget_controller' => array('type' => 'hidden', 'value' => $this->widgetController),\n \t\t'header' \t=> array('type' => 'custom', 'value' => \"<h4 class='widget_header col-md-12'>{$this->widgetController}</h4>\", 'label' => ''),\n\n \t\t'title' => array(),\n \t\t'class'\t=> array(),\n 'bg_color'\t=> array('label' => 'Màu nền', 'class' => 'ColorPickerSliders',\n 'addElement' => '<a href=\"index.php?r=admin/help/view&helpId=4\" target=\"_blank\">Xem thêm</a>'),\n \t\t'category_id'\t=> array('type' => 'select_category', 'label' => 'Category', 'required' => true,\n \t\t\t\t'options' => CategoryExt::getCategoryList()),\n \t\t'style'\t=> array('type' => 'select', 'options' => $this->settingDefault['style']),\n \t\t'order_by' => array('type' => 'select', 'options' => $this->settingDefault['order_by']),\n \t\t'order_direction' => array('type' => 'select', 'options' => $this->settingDefault['order_direction']),\n \t);\n\n \t$settingAll = array(\n \t\t'cols' => '3-9'\n \t);\n\n \t//render setting from\n \tTemplateHelper::renderForm($settingForm, $setting, $settingAll);\n TemplateHelper::getTemplate('layout/_extra/add_setting.php', $setting);\n TemplateHelper::getTemplate('layout/_extra/color_picker.php');\n \t}", "function wp_convert_widget_settings($base_name, $option_name, $settings)\n {\n }", "function widget_supporters_control() {\r\n\t\tglobal $wpdb;\r\n\t\t$options = $newoptions = get_option('widget_supporters');\r\n\t\tif ( $_POST['supporters-submit'] ) {\r\n\t\t\t$newoptions['supporters-title'] = $_POST['supporters-title'];\r\n\t\t\t$newoptions['supporters-display'] = $_POST['supporters-display'];\r\n\t\t\t$newoptions['supporters-blog-name-characters'] = $_POST['supporters-blog-name-characters'];\r\n\t\t\t$newoptions['supporters-order'] = $_POST['supporters-order'];\r\n\t\t\t$newoptions['supporters-number'] = $_POST['supporters-number'];\r\n\t\t\t$newoptions['supporters-avatar-size'] = $_POST['supporters-avatar-size'];\r\n\t\t}\r\n\t\tif ( $options != $newoptions ) {\r\n\t\t\t$options = $newoptions;\r\n\t\t\tupdate_option('widget_supporters', $options);\r\n\t\t}\r\n\t?>\r\n\t\t\t\t<div style=\"text-align:left\">\r\n \r\n\t\t\t\t<label for=\"supporters-title\" style=\"line-height:35px;display:block;\"><?php _e('Title', 'widgets'); ?>:<br />\r\n <input class=\"widefat\" id=\"supporters-title\" name=\"supporters-title\" value=\"<?php echo $options['supporters-title']; ?>\" type=\"text\" style=\"width:95%;\">\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-display\" style=\"line-height:35px;display:block;\"><?php _e('Display', 'widgets'); ?>:\r\n <select name=\"supporters-display\" id=\"supporters-display\" style=\"width:95%;\">\r\n <option value=\"avatar_blog_name\" <?php if ($options['supporters-display'] == 'avatar_blog_name'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Avatar + Blog Name'); ?></option>\r\n <option value=\"avatar\" <?php if ($options['supporters-display'] == 'avatar'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Avatar Only'); ?></option>\r\n <option value=\"blog_name\" <?php if ($options['supporters-display'] == 'blog_name'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Blog Name Only'); ?></option>\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-blog-name-characters\" style=\"line-height:35px;display:block;\"><?php _e('Blog Name Characters', 'widgets'); ?>:<br />\r\n <select name=\"supporters-blog-name-characters\" id=\"supporters-blog-name-characters\" style=\"width:95%;\">\r\n <?php\r\n\t\t\t\t\tif ( empty($options['supporters-blog-name-characters']) ) {\r\n\t\t\t\t\t\t$options['supporters-blog-name-characters'] = 30;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$counter = 0;\r\n\t\t\t\t\tfor ( $counter = 1; $counter <= 500; $counter += 1) {\r\n\t\t\t\t\t\t?>\r\n <option value=\"<?php echo $counter; ?>\" <?php if ($options['supporters-blog-name-characters'] == $counter){ echo 'selected=\"selected\"'; } ?> ><?php echo $counter; ?></option>\r\n <?php\r\n\t\t\t\t\t}\r\n ?>\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-order\" style=\"line-height:35px;display:block;\"><?php _e('Order', 'widgets'); ?>:\r\n <select name=\"supporters-order\" id=\"supporters-order\" style=\"width:95%;\">\r\n <option value=\"most_recent\" <?php if ($options['supporters-order'] == 'most_recent'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Most Recent'); ?></option>\r\n <option value=\"random\" <?php if ($options['supporters-order'] == 'random'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Random'); ?></option>\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-number\" style=\"line-height:35px;display:block;\"><?php _e('Number', 'widgets'); ?>:<br />\r\n <select name=\"supporters-number\" id=\"supporters-number\" style=\"width:95%;\">\r\n <?php\r\n\t\t\t\t\tif ( empty($options['supporters-number']) ) {\r\n\t\t\t\t\t\t$options['supporters-number'] = 10;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$counter = 0;\r\n\t\t\t\t\tfor ( $counter = 1; $counter <= 25; $counter += 1) {\r\n\t\t\t\t\t\t?>\r\n <option value=\"<?php echo $counter; ?>\" <?php if ($options['supporters-number'] == $counter){ echo 'selected=\"selected\"'; } ?> ><?php echo $counter; ?></option>\r\n <?php\r\n\t\t\t\t\t}\r\n ?>\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-avatar-size\" style=\"line-height:35px;display:block;\"><?php _e('Avatar Size', 'widgets'); ?>:<br />\r\n <select name=\"supporters-avatar-size\" id=\"supporters-avatar-size\" style=\"width:95%;\">\r\n <option value=\"16\" <?php if ($options['supporters-avatar-size'] == '16'){ echo 'selected=\"selected\"'; } ?> ><?php _e('16px'); ?></option>\r\n <option value=\"32\" <?php if ($options['supporters-avatar-size'] == '32'){ echo 'selected=\"selected\"'; } ?> ><?php _e('32px'); ?></option>\r\n <option value=\"48\" <?php if ($options['supporters-avatar-size'] == '48'){ echo 'selected=\"selected\"'; } ?> ><?php _e('48px'); ?></option>\r\n <option value=\"96\" <?php if ($options['supporters-avatar-size'] == '96'){ echo 'selected=\"selected\"'; } ?> ><?php _e('96px'); ?></option>\r\n <option value=\"128\" <?php if ($options['supporters-avatar-size'] == '128'){ echo 'selected=\"selected\"'; } ?> ><?php _e('128px'); ?></option>\r\n </select>\r\n </label>\r\n\t\t\t\t<input type=\"hidden\" name=\"supporters-submit\" id=\"supporters-submit\" value=\"1\" />\r\n\t\t\t\t</div>\r\n\t<?php\r\n\t}", "function widget_init() {\r\n if ( !function_exists('wp_register_sidebar_widget') || !function_exists('register_widget_control') ) return;\r\n function widget($args) {\r\n extract($args);\r\n $wpca_settings = get_option('wpcareers');\r\n echo $before_widget;\r\n echo $before_title . $wpca_settings['widget_title'] . $after_title;\r\n\r\n $fieldsPre=\"wpc_\";\r\n $before_tag=stripslashes(get_option($fieldsPre.'before_Tag'));\r\n $after_tag=stripslashes(get_option($fieldsPre.'after_Tag'));\r\n echo '<p><ul>' . widget_display($wpca_settings['widget_format']) . '</ul></p>'; \r\n }\r\n\r\n function widget_control() {\r\n $wpca_settings = $newoptions = get_option('wpcareers');\r\n if ( $_POST[\"wpCareers-submit\"] ) {\r\n $newoptions['widget_title'] = strip_tags(stripslashes($_POST['widget_title']));\r\n $newoptions['widget_format'] = $_POST['widget_format'];\r\n if ( empty($newoptions['widget_title']) ) $newoptions['widget_title'] = 'Last Classifieds Ads';\r\n }\r\n if ( $wpca_settings != $newoptions ) {\r\n $wpca_settings = $newoptions;\r\n update_option('wpcareers', $wpca_settings);\r\n }\r\n $title = htmlspecialchars($wpca_settings['widget_title'], ENT_QUOTES);\r\n if ( empty($newoptions['widget_title']) ) $newoptions['widget_title'] = 'Last Careers Posts';\r\n if ( empty($newoptions['widget_format']) ) $newoptions['widget_format'] = 'y';\r\n ?>\r\n <label for=\"wpCareers-widget_title\"><?php _e('Title:'); ?><input style=\"width: 200px;\" id=\"widget_title\" name=\"widget_title\" type=\"text\" value=\"<?php echo htmlspecialchars($wpca_settings['widget_title']); ?>\" /></label></p>\r\n <br />\r\n <label for=\"wpCareers-widget_format\">\r\n <input class=\"checkbox\" id=\"widget_format\" name=\"widget_format\" type=\"checkbox\" value=\"y\"<?php echo ($wpca_settings['widget_format']=='y')?\" checked\":\"\";?>>Small Format Output</label><br />\r\n <input type=\"hidden\" id=\"wpCareers-submit\" name=\"wpCareers-submit\" value=\"1\" />\r\n <?php\r\n }\r\n \r\n function widget_display() {\r\n $wpca_settings = get_option('wpcareers');\r\n //$out = wpcaLastPosts($wpca_settings['widget_format']);\r\n return $out;\r\n }\r\n \r\n wp_register_sidebar_widget('wpCareers', 'widget', null, 'wpCareers');\r\n register_widget_control('wpCareers', 'widget_control');\r\n }", "function theme_save_settings()\n\t{\n\t\tglobal $pagenow;\n\t\t\n\t\tif ( $pagenow == 'themes.php' && $_GET['page'] == 'theme-options' )\n\t\t{\n\t\t\tif ( isset ( $_GET['tab'] ) )\n\t\t\t{\n\t\t\t\t$tab = $_GET['tab'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$tab = 'general';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tswitch ( $tab )\n\t\t\t{\n\t\t\t\tcase 'general' :\n\t\t\t\t\n\t\t\t\t\tupdate_option( 'logo_image', $_POST['logo_image'] );\n\t\t\t\t\tupdate_option( 'header_background_image', $_POST['header_background_image'] );\n\t\t\t\t\tupdate_option( 'select_text_logo', $_POST['select_text_logo'] );\n\t\t\t\t\tupdate_option( 'theme_site_title', $_POST['theme_site_title'] );\n\t\t\t\t\tupdate_option( 'select_tagline', $_POST['select_tagline'] );\n\t\t\t\t\tupdate_option( 'theme_tagline', $_POST['theme_tagline'] );\n\t\t\t\t\tupdate_option( 'logo_login', $_POST['logo_login'] );\n\t\t\t\t\tupdate_option( 'logo_login_hide', $_POST['logo_login_hide'] );\n\t\t\t\t\tupdate_option( 'favicon', $_POST['favicon'] );\n\t\t\t\t\tupdate_option( 'apple_touch_icon', $_POST['apple_touch_icon'] );\n\t\t\t\t\tupdate_option( 'google_map_api_key', $_POST['google_map_api_key'] );\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'style' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'char_set_latin', $_POST['char_set_latin'] );\n\t\t\t\t\tupdate_option( 'char_set_latin_ext', $_POST['char_set_latin_ext'] );\n\t\t\t\t\tupdate_option( 'char_set_cyrillic', $_POST['char_set_cyrillic'] );\n\t\t\t\t\tupdate_option( 'char_set_cyrillic_ext', $_POST['char_set_cyrillic_ext'] );\n\t\t\t\t\tupdate_option( 'char_set_greek', $_POST['char_set_greek'] );\n\t\t\t\t\tupdate_option( 'char_set_greek_ext', $_POST['char_set_greek_ext'] );\n\t\t\t\t\tupdate_option( 'char_set_vietnamese', $_POST['char_set_vietnamese'] );\n\t\t\t\t\tupdate_option( 'extra_font_styles', $_POST['extra_font_styles'] );\n\t\t\t\t\tupdate_option( 'classic_navigation_menu', $_POST['classic_navigation_menu'] );\n\t\t\t\t\tupdate_option( 'mobile_zoom', $_POST['mobile_zoom'] );\n\t\t\t\t\tupdate_option( 'custom_css', $_POST['custom_css'] );\n\t\t\t\t\tupdate_option( 'external_css', $_POST['external_css'] );\n\t\t\t\t\tupdate_option( 'external_js', $_POST['external_js'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'animation' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'classic_layout', $_POST['classic_layout'] );\n\t\t\t\t\tupdate_option( 'mobile_only_classic_layout', $_POST['mobile_only_classic_layout'] );\n\t\t\t\t\tupdate_option( 'pf_details_page_in_animation', $_POST['pf_details_page_in_animation'] );\n\t\t\t\t\tupdate_option( 'pf_details_page_out_animation', $_POST['pf_details_page_out_animation'] );\n\t\t\t\t\tupdate_option( 'pixelwars__ajax', $_POST['pixelwars__ajax'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'blog' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'theme_excerpt', $_POST['theme_excerpt'] );\n\t\t\t\t\tupdate_option( 'pagination', $_POST['pagination'] );\n\t\t\t\t\tupdate_option( 'about_the_author_module', $_POST['about_the_author_module'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'seo' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'theme_og_protocol', $_POST['theme_og_protocol'] );\n\t\t\t\t\tupdate_option( 'theme_seo_fields', $_POST['theme_seo_fields'] );\n\t\t\t\t\tupdate_option( 'site_description', $_POST['site_description'] );\n\t\t\t\t\tupdate_option( 'site_keywords', $_POST['site_keywords'] );\n\t\t\t\t\tupdate_option( 'tracking_code_head', $_POST['tracking_code_head'] );\n\t\t\t\t\tupdate_option( 'tracking_code_body', $_POST['tracking_code_body'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "function store(){\n update_option( $this->option_name, $this->settings );\n }", "public function saveConfigOptions() {}", "function add_widget_specific_settings() {\n\t\treturn false;\n\t}", "function WidgetMeteoControl() {\n\t\t\n\t\t\t$options = get_option('widget_trebimeteo');\n\t\t\tif ( !is_array($options) )\t{ $options = array('title' => 'Previsioni Meteo', 'trebiregione' => '1', 'trebilocalita' => '6', 'trebicuno' => 'ffffff','trebicdue' => 'ffffff', 'trebictre' => 'ffffff', 'trebibuno' => '93c1db', 'trebibdue' => '3a8ebd', 'trebibtre' => 'ffffff', 'trebilarghezza' => '190', 'trebialtezza' => '240', 'trebitipo' => 'xssmall'); }\n\n\t\t\tif ( $_POST['trebimeteo-submit'] )\n\t\t\t{\n\t\t\t\t// Remember to sanitize and format use input appropriately.\n\t\t\t\t$options['trebimeteotitle'] = strip_tags(stripslashes($_POST['trebimeteotitle']));\n\t\t\t\t$options['trebiregione'] = strip_tags(stripslashes($_POST['trebiregione']));\n\t\t\t\t$options['trebilocalita'] = strip_tags(stripslashes($_POST['trebilocalita']));\n\t\t\t\t$options['trebicuno'] = strip_tags(stripslashes($_POST['trebicuno']));\n\t\t\t\t$options['trebicdue'] = strip_tags(stripslashes($_POST['trebicdue']));\n\t\t\t\t$options['trebictre'] = strip_tags(stripslashes($_POST['trebictre']));\n\t\t\t\t$options['trebibuno'] = strip_tags(stripslashes($_POST['trebibuno']));\n\t\t\t\t$options['trebibdue'] = strip_tags(stripslashes($_POST['trebibdue']));\n\t\t\t\t$options['trebibtre'] = strip_tags(stripslashes($_POST['trebibtre']));\n\t\t\t\t$options['trebialtezza'] = strip_tags(stripslashes($_POST['trebialtezza']));\n\t\t\t\t$options['trebilarghezza'] = strip_tags(stripslashes($_POST['trebilarghezza']));\n\t\t\t\t$options['trebitipo'] = strip_tags(stripslashes($_POST['trebitipo']));\n\n\t\t\t\tupdate_option('widget_trebimeteo', $options);\n\t\t\t}\n\n\t\t\t$trebimeteotitle = htmlspecialchars($options['trebimeteotitle'], ENT_QUOTES);\n\t\t\t$trebiregione = htmlspecialchars($options['trebiregione'], ENT_QUOTES);\n\t\t\t$trebilocalita = htmlspecialchars($options['trebilocalita'], ENT_QUOTES);\n\t\t\t$trebicuno = htmlspecialchars($options['trebicuno'], ENT_QUOTES);\n\t\t\t$trebicdue = htmlspecialchars($options['trebicdue'], ENT_QUOTES);\n\t\t\t$trebictre = htmlspecialchars($options['trebictre'], ENT_QUOTES);\n\t\t\t$trebibuno = htmlspecialchars($options['trebibuno'], ENT_QUOTES);\n\t\t\t$trebibdue = htmlspecialchars($options['trebibdue'], ENT_QUOTES);\n\t\t\t$trebibtre = htmlspecialchars($options['trebibtre'], ENT_QUOTES);\n\t\t\t$trebialtezza = htmlspecialchars($options['trebialtezza'], ENT_QUOTES);\n\t\t\t$trebilarghezza = htmlspecialchars($options['trebilarghezza'], ENT_QUOTES);\n\t\t\t$trebitipo = htmlspecialchars($options['trebitipo'], ENT_QUOTES);\n\n\t\t\t$xpath = WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),\"\",plugin_basename(__FILE__));\n\t\t\t\n\t\t\t?>\n \n\t<p style=\"text-align:right;\"><label for=\"trebimeteo-title\">Titolo <input id=\"trebimeteotitle\" name=\"trebimeteotitle\" type=\"text\" value=\"<?php echo $trebimeteotitle;?>\" /></label></p>\n <p style=\"text-align:right;\"><label for=\"trebiregione\">ID Regione (<a target=\"_blank\" href=\"<?php echo home_url().'/wp-admin/options-general.php?page=3bmeteo.php'; ?>\">?</a>) <input id=\"trebiregione\" name=\"trebiregione\" type=\"text\" value=\"<?php echo $trebiregione;?>\"/></label></p>\n\t<p style=\"text-align:right;\"><label for=\"trebilocalita\">ID Localit&agrave; (<a target=\"_blank\" href=\"<?php echo home_url().'/wp-admin/options-general.php?page=3bmeteo.php';?>\">?</a>) <input id=\"trebilocalita\" name=\"trebilocalita\" type=\"text\" value=\"<?php echo $trebilocalita;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebialtezza\">Altezza <input id=\"trebialtezza\" name=\"trebialtezza\" type=\"text\" value=\"<?php echo $trebialtezza;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebilarghezza\">Larghezza <input id=\"trebilarghezza\" name=\"trebilarghezza\" type=\"text\" value=\"<?php echo $trebilarghezza;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebibuno\">B1 <input id=\"trebibuno\" name=\"trebibuno\" type=\"text\" value=\"<?php echo $trebibuno;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebibdue\">B2 <input id=\"trebibdue\" name=\"trebibdue\" type=\"text\" value=\"<?php echo $trebibdue;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebibtre\">B3 <input id=\"trebibtre\" name=\"trebibtre\" type=\"text\" value=\"<?php echo $trebibtre;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebicuno\">C1 <input id=\"trebicuno\" name=\"trebicuno\" type=\"text\" value=\"<?php echo $trebicuno;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebicdue\">C2 <input id=\"trebicdue\" name=\"trebicdue\" type=\"text\" value=\"<?php echo $trebicdue;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebictre\">C3 <input id=\"trebictre\" name=\"trebictre\" type=\"text\" value=\"<?php echo $trebictre;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebitipo\">Tipo\n <select id=\"trebitipo\" name=\"trebitipo\"> \n\t\t<option label=\"Localit&agrave; Compatti 1 giorno\" value=\"xssmall\"<?php if ($trebitipo=='xssmall') echo ' selected=\"selected\"';?>>Localit&agrave; Compatti 1 giorno</option> \n\t\t<option label=\"Localit&agrave; Compatti 6 giorni\" value=\"lsmall\"<?php if ($trebitipo=='lsmall') echo ' selected=\"selected\"';?>>Localit&agrave; Compatti 6 giorni</option> \n\t\t<option label=\"Localit&agrave; Compatti 7 giorni\" value=\"lbigor\"<?php if ($trebitipo=='lbigor') echo ' selected=\"selected\"';?>>Localit&agrave; Compatti 7 giorni</option> \n\t\t<option label=\"Localit&agrave; Dati in Diretta\" value=\"treale\"<?php if ($trebitipo=='treale') echo ' selected=\"selected\"';?>>Localit&agrave; Dati in Diretta</option> \n\t\t<option label=\"Tutte le Localit&agrave;\" value=\"ssmall\"<?php if ($trebitipo=='ssmall') echo ' selected=\"selected\"';?>>Tutte le Localit&agrave;</option> \n\t\t<option label=\"Localit&agrave; estese 7 giorni\" value=\"lbig\"<?php if ($trebitipo=='lbig') echo ' selected=\"selected\"';?>>Localit&agrave; estese 7 giorni</option> \n\t\t<option label=\"Localit&agrave; estese orario\" value=\"oraxora\"<?php if ($trebitipo=='oraxora') echo ' selected=\"selected\"';?>>Localit&agrave; estese orario</option> \n\t\t<option label=\"Regionali compatto\" value=\"msmall\"<?php if ($trebitipo=='msmall') echo ' selected=\"selected\"';?>>Regionali compatto</option> \n\t\t<option label=\"Regionali 7 giorni\" value=\"msmacro\"<?php if ($trebitipo=='msmacro') echo ' selected=\"selected\"';?>>Regionali 7 giorni</option> \n\t\t<option label=\"Localit&agrave; Marine 1 giorno\" value=\"lsmari\"<?php if ($trebitipo=='lsmari') echo ' selected=\"selected\"';?>>Localit&agrave; Marine 1 giorno</option> \n\t\t<option label=\"Localit&agrave; Marine 7 giorno\" value=\"lmari\"<?php if ($trebitipo=='lmari') echo ' selected=\"selected\"';?>>Localit&agrave; Marine 7 giorno</option> \n\t\t<option label=\"Regionali Marine 7 giorni\" value=\"mmari\"<?php if ($trebitipo=='mmari') echo ' selected=\"selected\"';?>>Regionali Marine 7 giorni</option> \n\t\t<option label=\"Neve 1 giorno\" value=\"lsneve\"<?php if ($trebitipo=='lsneve') echo ' selected=\"selected\"';?>>Neve 1 giorno</option> \n\t\t<option label=\"Neve 7 giorni\" value=\"lneve\"<?php if ($trebitipo=='lneve') echo ' selected=\"selected\"';?>>Neve 7 giorni</option>\n\t</select>\n </label>\n\t</p>\n <!--<p style=\"text-align:right;\">\n <select id=\"trebimeteoregione\" name=\"trebimeteoregione\"> \n\t\t<option label=\"Abruzzo (idreg=1)\" value=\"1\">Abruzzo (idreg=1)</option> \n\t\t<option label=\"Basilicata (idreg=2)\" value=\"2\">Basilicata (idreg=2)</option> \n\t\t<option label=\"Calabria (idreg=3)\" value=\"3\">Calabria (idreg=3)</option> \n\t\t<option label=\"Campania (idreg=4)\" value=\"4\">Campania (idreg=4)</option> \n\t\t<option label=\"Emilia (idreg=5)\" value=\"5\">Emilia (idreg=5)</option> \n\t\t<option label=\"Friuli (idreg=6)\" value=\"6\">Friuli (idreg=6)</option> \n\t\t<option label=\"Lazio (idreg=7)\" value=\"7\">Lazio (idreg=7)</option> \n\t\t<option label=\"Liguria (idreg=8)\" value=\"8\">Liguria (idreg=8)</option> \n\t\t<option label=\"Lombardia (idreg=9)\" value=\"9\">Lombardia (idreg=9)</option> \n\t\t<option label=\"Marche (idreg=10)\" value=\"10\">Marche (idreg=10)</option> \n\t\t<option label=\"Molise (idreg=11)\" value=\"11\">Molise (idreg=11)</option> \n\t\t<option label=\"Piemonte (idreg=12)\" value=\"12\">Piemonte (idreg=12)</option> \n\t\t<option label=\"Puglia (idreg=13)\" value=\"13\">Puglia (idreg=13)</option> \n\t\t<option label=\"Sardegna (idreg=14)\" value=\"14\">Sardegna (idreg=14)</option> \n\t\t<option label=\"Sicilia (idreg=15)\" value=\"15\">Sicilia (idreg=15)</option> \n\t\t<option label=\"Toscana (idreg=16)\" value=\"16\">Toscana (idreg=16)</option> \n\t\t<option label=\"Trentino (idreg=17)\" value=\"17\">Trentino (idreg=17)</option> \n\t\t<option label=\"Umbria (idreg=18)\" value=\"18\">Umbria (idreg=18)</option> \n\t\t<option label=\"Valle aosta (idreg=19)\" value=\"19\">Valle d'aosta (idreg=19)</option> \n\t\t<option label=\"Veneto (idreg=20)\" value=\"20\">Veneto (idreg=20)</option> \n\t</select> \n\t</p>-->\n <!-- <p style=\"text-align:right;\"> \n\t<select name=\"trebimeteolocalita\" id=\"trebimeteolocalita\"> \n\t\t<option label=\"Seleziona Localit&agrave;\" value=\"01\">Seleziona Localit&agrave;</option> \n\t</select> \n <p style=\"text-align:right;\"><label for=\"trebiloc\">Localit&agrave; <input style=\"width: 200px;\" id=\"trebiloc\" name=\"trebiloc\" type=\"text\" value=\"<?php //echo $loc;?>\" /></label></p>-->\n <p><input type=\"hidden\" id=\"trebimeteo-submit\" name=\"trebimeteo-submit\" value=\"1\" /></p> \n<?php\n\t\t}", "public function save_option() {\n\t\tupdate_option( self::OPTION_NAME, $this->ryte_option );\n\t}", "function theme_save_settings()\n\t{\n\t\tglobal $pagenow;\n\t\t\n\t\tif ( $pagenow == 'themes.php' && $_GET['page'] == 'theme-options' )\n\t\t{\n\t\t\tif ( isset ( $_GET['tab'] ) )\n\t\t\t{\n\t\t\t\t$tab = $_GET['tab'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$tab = 'general';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tswitch ( $tab )\n\t\t\t{\n\t\t\t\tcase 'general' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'logo_type', $_POST['logo_type'] );\n\t\t\t\t\tupdate_option( 'select_text_logo', $_POST['select_text_logo'] );\n\t\t\t\t\tupdate_option( 'theme_site_title', $_POST['theme_site_title'] );\n\t\t\t\t\tupdate_option( 'logo_image', $_POST['logo_image'] );\n\t\t\t\t\tupdate_option( 'select_tagline', $_POST['select_tagline'] );\n\t\t\t\t\tupdate_option( 'theme_tagline', $_POST['theme_tagline'] );\n\t\t\t\t\tupdate_option( 'logo_login', $_POST['logo_login'] );\n\t\t\t\t\tupdate_option( 'logo_login_hide', $_POST['logo_login_hide'] );\n\t\t\t\t\tupdate_option( 'favicon', $_POST['favicon'] );\n\t\t\t\t\tupdate_option( 'apple_touch_icon', $_POST['apple_touch_icon'] );\n\t\t\t\t\tupdate_option( 'copyright_text', $_POST['copyright_text'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'style' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'char_set_latin', $_POST['char_set_latin'] );\n\t\t\t\t\tupdate_option( 'char_set_latin_ext', $_POST['char_set_latin_ext'] );\n\t\t\t\t\tupdate_option( 'char_set_cyrillic', $_POST['char_set_cyrillic'] );\n\t\t\t\t\tupdate_option( 'char_set_cyrillic_ext', $_POST['char_set_cyrillic_ext'] );\n\t\t\t\t\tupdate_option( 'char_set_greek', $_POST['char_set_greek'] );\n\t\t\t\t\tupdate_option( 'char_set_greek_ext', $_POST['char_set_greek_ext'] );\n\t\t\t\t\tupdate_option( 'char_set_vietnamese', $_POST['char_set_vietnamese'] );\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'nav_menu_search', $_POST['nav_menu_search'] );\n\t\t\t\t\tupdate_option( 'extra_font_styles', $_POST['extra_font_styles'] );\n\t\t\t\t\tupdate_option( 'footer_widget_locations', $_POST['footer_widget_locations'] );\n\t\t\t\t\tupdate_option( 'footer_widget_columns', $_POST['footer_widget_columns'] );\n\t\t\t\t\tupdate_option( 'mobile_zoom', $_POST['mobile_zoom'] );\n\t\t\t\t\tupdate_option( 'custom_css', $_POST['custom_css'] );\n\t\t\t\t\tupdate_option( 'external_css', $_POST['external_css'] );\n\t\t\t\t\tupdate_option( 'external_js', $_POST['external_js'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'blog' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'blog_type', $_POST['blog_type'] );\n\t\t\t\t\tupdate_option( 'post_sidebar', $_POST['post_sidebar'] );\n\t\t\t\t\tupdate_option( 'theme_excerpt', $_POST['theme_excerpt'] );\n\t\t\t\t\tupdate_option( 'pagination', $_POST['pagination'] );\n\t\t\t\t\tupdate_option( 'all_formats_homepage', $_POST['all_formats_homepage'] );\n\t\t\t\t\tupdate_option( 'about_the_author_module', $_POST['about_the_author_module'] );\n\t\t\t\t\tupdate_option( 'post_share_links_single', $_POST['post_share_links_single'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'portfolio' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'pf_ajax', $_POST['pf_ajax'] );\n\t\t\t\t\tupdate_option( 'pf_item_per_page', $_POST['pf_item_per_page'] );\n\t\t\t\t\tupdate_option( 'pf_content_editor', $_POST['pf_content_editor'] );\n\t\t\t\t\tupdate_option( 'pf_share_links_single', $_POST['pf_share_links_single'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'gallery' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'gl_ajax', $_POST['gl_ajax'] );\n\t\t\t\t\tupdate_option( 'gl_item_per_page', $_POST['gl_item_per_page'] );\n\t\t\t\t\tupdate_option( 'gl_ajax_single', $_POST['gl_ajax_single'] );\n\t\t\t\t\tupdate_option( 'gl_item_per_page_single', $_POST['gl_item_per_page_single'] );\n\t\t\t\t\tupdate_option( 'gl_slideshow_interval_single', $_POST['gl_slideshow_interval_single'] );\n\t\t\t\t\tupdate_option( 'gl_circular_single', $_POST['gl_circular_single'] );\n\t\t\t\t\tupdate_option( 'gl_next_on_click_image_single', $_POST['gl_next_on_click_image_single'] );\n\t\t\t\t\tupdate_option( 'gl_content_editor', $_POST['gl_content_editor'] );\n\t\t\t\t\tupdate_option( 'gl_share_links_single', $_POST['gl_share_links_single'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'sidebar' :\n\t\t\t\t\n\t\t\t\t\tupdate_option( 'no_sidebar_name', esc_attr( $_POST['new_sidebar_name'] ) );\n\t\t\t\t\t\n\t\t\t\t\tif ( esc_attr( $_POST['new_sidebar_name'] ) != \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( get_option( 'sidebars_with_commas' ) == \"\" )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tupdate_option( 'sidebars_with_commas', esc_attr( $_POST['new_sidebar_name'] ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tupdate_option( 'sidebars_with_commas', get_option( 'sidebars_with_commas' ) . ',' . esc_attr( $_POST['new_sidebar_name'] ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'seo' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'theme_og_protocol', $_POST['theme_og_protocol'] );\n\t\t\t\t\tupdate_option( 'theme_seo_fields', $_POST['theme_seo_fields'] );\n\t\t\t\t\tupdate_option( 'site_description', $_POST['site_description'] );\n\t\t\t\t\tupdate_option( 'site_keywords', $_POST['site_keywords'] );\n\t\t\t\t\tupdate_option( 'tracking_code_head', $_POST['tracking_code_head'] );\n\t\t\t\t\tupdate_option( 'tracking_code', $_POST['tracking_code'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'contact' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'map_embed_code', $_POST['map_embed_code'] );\n\t\t\t\t\tupdate_option( 'enable_map', $_POST['enable_map'] );\n\t\t\t\t\tupdate_option( 'contact_form_email', $_POST['contact_form_email'] );\n\t\t\t\t\tupdate_option( 'contact_form_captcha', $_POST['contact_form_captcha'] );\n\t\t\t\t\tupdate_option( 'disable_contact_form', $_POST['disable_contact_form'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// end switch\n\t\t}\n\t\t// end if\n\t}", "private function setOptions()\n\t{\n\t\t$this->site = ( isset($_POST['site']) ) ? sanitize_text_field($_POST['site']) : null;\n\t\t$this->feed_type = ( isset($_POST['type']) && $_POST['type'] !== 'search' ) ? sanitize_text_field($_POST['type']) : 'search';\n\t\t$this->post_id = ( isset($_POST['id']) ) ? sanitize_text_field($_POST['id']) : null;\n\t\t$this->feed_format = ( isset($_POST['format']) && $_POST['format'] !== 'unformatted' ) ? sanitize_text_field($_POST['format']) : 'unformatted';\n\t}", "static function saveHandlerOptions ()\n {\n // There is no option yet\n return;\n }", "function genesis_extender_custom_options_save()\n{\n\tcheck_ajax_referer( 'custom-options', 'security' );\n\t\n\tif( !empty( $_POST['extender']['css_builder_popup_active'] ) || genesis_extender_get_custom_css( 'css_builder_popup_active' ) )\n\t\t$custom_css = genesis_extender_preserve_backslashes( genesis_extender_get_custom_css( 'custom_css' ) );\n\telse\n\t\t$custom_css = $_POST['extender']['custom_css'];\n\n\t$css_update = array(\n\t\t'custom_css' => $custom_css,\n\t\t'css_builder_popup_active' => !empty( $_POST['extender']['css_builder_popup_active'] ) ? 1 : 0\n\t);\n\t$css_update_merged = array_merge( genesis_extender_custom_css_options_defaults(), $css_update );\n\tupdate_option( 'genesis_extender_custom_css', $css_update_merged );\n\t\n\t$functions_default = '<?php\n/* Do not remove this line. Add your functions below. */\n';\n\t\n\tif( !empty( $_POST['custom_functions'] ) )\n\t{\n\t\t$functions_update = array(\n\t\t\t'custom_functions_effect_admin' => !empty( $_POST['custom_functions']['custom_functions_effect_admin'] ) ? 1 : 0,\n\t\t\t'custom_functions' => ( $_POST['custom_functions']['custom_functions'] != '' ) ? $_POST['custom_functions']['custom_functions'] : $functions_default\n\t\t);\n\t\t$functions_update_merged = array_merge( genesis_extender_custom_functions_options_defaults(), $functions_update );\n\t\tupdate_option( 'genesis_extender_custom_functions', $functions_update_merged );\n\t}\n\n\tif( !empty( $_POST['custom_js'] ) )\n\t{\n\t\t$js_update = array(\n\t\t\t'custom_js_in_head' => !empty( $_POST['custom_js']['custom_js_in_head'] ) ? 1 : 0,\n\t\t\t'custom_js' => $_POST['custom_js']['custom_js']\n\t\t);\n\t\t$js_update_merged = array_merge( genesis_extender_custom_js_options_defaults(), $js_update );\n\t\tupdate_option( 'genesis_extender_custom_js', $js_update_merged );\n\t}\n\n\tif ( ! empty( $_POST['custom_template_ids'] ) ) {\n\t\t\n\t\t$template_ids_empty = true;\n\t\tforeach( $_POST['custom_template_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( ! empty( $key ) )\n\t\t\t\t$template_ids_empty = false;\n\n\t\t}\n\t\tforeach( $_POST['custom_template_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( empty( $key ) && !$template_ids_empty ) {\n\t\t\t\t\n\t\t\t\techo 'Please fill in ALL \"File Name\" fields';\n\t\t\t\texit();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tgenesis_extender_update_templates( $_POST['custom_template_ids'], $_POST['custom_template_names'], $_POST['custom_template_types'], $_POST['custom_template_post_types'], $_POST['custom_template_textarea'] );\n\t\t\n\t}\n\n\tif( !empty( $_POST['custom_label_names'] ) )\n\t{\n\t\t$label_names_empty = true;\n\t\tforeach( $_POST['custom_label_names'] as $key )\n\t\t{\n\t\t\tif( !empty( $key ) )\n\t\t\t{\n\t\t\t\t$label_names_empty = false;\n\t\t\t}\n\t\t}\n\t\tforeach( $_POST['custom_label_names'] as $key )\n\t\t{\n\t\t\tif( empty( $key ) && !$label_names_empty )\n\t\t\t{\n\t\t\t\techo 'Please fill in ALL \"Name\" fields';\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\tgenesis_extender_update_labels( $_POST['custom_label_names'] );\n\n\t\tif( !empty( $_POST['custom_label_create_conditionals'] ) )\n\t\t{\n\t\t\t$custom_conditional_ids = array();\n\t\t\t$custom_conditional_tags = array();\n\t\t\tforeach( $_POST['custom_label_create_conditionals'] as $key => $value )\n\t\t\t{\n\t\t\t\t$custom_conditional_ids[] = 'has_label_' . str_replace( '-', '_', genesis_extender_sanatize_string( $_POST['custom_label_names'][$key] ) );\n\t\t\t\t$custom_conditional_tags[] = 'extender_has_label(\\'' . genesis_extender_sanatize_string( $_POST['custom_label_names'][$key] ) . '\\')';\n\t\t\t}\n\t\t\tgenesis_extender_update_conditionals( $custom_conditional_ids, $custom_conditional_tags );\n\t\t}\n\t}\n\t\n\tif( !empty( $_POST['custom_widget_conditionals_list'] ) )\n\t{\n\t\t$custom_widget_conditionals_list = $_POST['custom_widget_conditionals_list'];\n\t}\n\telse\n\t{\n\t\t$custom_widget_conditionals_list = array();\n\t}\n\t\n\tif( !empty( $_POST['custom_hook_conditionals_list'] ) )\n\t{\n\t\t$custom_hook_conditionals_list = $_POST['custom_hook_conditionals_list'];\n\t}\n\telse\n\t{\n\t\t$custom_hook_conditionals_list = array();\n\t}\n\t\n\tif( !empty( $_POST['custom_conditional_ids'] ) )\n\t{\n\t\t$conditional_ids_empty = true;\n\t\tforeach( $_POST['custom_conditional_ids'] as $key )\n\t\t{\n\t\t\tif( !empty( $key ) )\n\t\t\t{\n\t\t\t\t$conditional_ids_empty = false;\n\t\t\t}\n\t\t}\n\t\tforeach( $_POST['custom_conditional_ids'] as $key )\n\t\t{\n\t\t\tif( empty( $key ) && !$conditional_ids_empty )\n\t\t\t{\n\t\t\t\techo 'Please fill in ALL \"Name\" fields';\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\tgenesis_extender_update_conditionals( $_POST['custom_conditional_ids'], $_POST['custom_conditional_tags'] );\n\t}\n\tif( !empty( $_POST['custom_widget_ids'] ) )\n\t{\n\t\t$widget_ids_empty = true;\n\t\tforeach( $_POST['custom_widget_ids'] as $key )\n\t\t{\n\t\t\tif( !empty( $key ) )\n\t\t\t{\n\t\t\t\t$widget_ids_empty = false;\n\t\t\t}\n\t\t}\n\t\tforeach( $_POST['custom_widget_ids'] as $key )\n\t\t{\n\t\t\tif( empty( $key ) && !$widget_ids_empty )\n\t\t\t{\n\t\t\t\techo 'Please fill in ALL \"Name\" fields';\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\tgenesis_extender_update_widgets( $_POST['custom_widget_ids'], $custom_widget_conditionals_list, $_POST['custom_widget_hook'], $_POST['custom_widget_class'], $_POST['custom_widget_description'], $_POST['custom_widget_status'], $_POST['custom_widget_priority'] );\n\t}\n\tif( !empty( $_POST['custom_hook_ids'] ) )\n\t{\n\t\t$hook_ids_empty = true;\n\t\tforeach( $_POST['custom_hook_ids'] as $key )\n\t\t{\n\t\t\tif( !empty( $key ) )\n\t\t\t{\n\t\t\t\t$hook_ids_empty = false;\n\t\t\t}\n\t\t}\n\t\tforeach( $_POST['custom_hook_ids'] as $key )\n\t\t{\n\t\t\tif( empty( $key ) && !$hook_ids_empty )\n\t\t\t{\n\t\t\t\techo 'Please fill in ALL \"Name\" fields';\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\tgenesis_extender_update_hooks( $_POST['custom_hook_ids'], $custom_hook_conditionals_list, $_POST['custom_hook_hook'], $_POST['custom_hook_status'], $_POST['custom_hook_priority'], $_POST['custom_hook_textarea'] );\n\t}\n\t\n\tgenesis_extender_write_files( $css = true, $ez = false );\n\t\n\techo 'Custom Options Updated';\n\texit();\n}", "function save_admin_options()\n {\n return update_option($this->options_name, $this->options);\n }", "public function save_builder_settings() {\n\t\t_deprecated_function( 'save_builder_settings', '1.6', 'save_builder' );\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforminator_validate_ajax( \"forminator_save_builder_fields\" );\n\n\t\t$submitted_data = $this->get_post_data();\n\t\t$fields = array();\n\t\t$id = isset( $submitted_data['form_id'] ) ? $submitted_data['form_id'] : null;\n\t\t$id = intval( $id );\n\t\t$title = sanitize_text_field( $submitted_data['formName'] );\n\t\t$status = isset( $submitted_data['status'] ) ? sanitize_text_field( $submitted_data['status'] ) : '';\n\t\t$version = isset( $submitted_data['version'] ) ? sanitize_text_field( $submitted_data['version'] ) : '1.0';\n\n\t\tif ( is_null( $id ) || $id <= 0 ) {\n\t\t\t$form_model = new Forminator_Custom_Form_Model();\n\n\t\t\tif ( empty( $status ) ) {\n\t\t\t\t$status = Forminator_Custom_Form_Model::STATUS_PUBLISH;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$form_model = Forminator_Custom_Form_Model::model()->load( $id );\n\n\t\t\tif ( ! is_object( $form_model ) ) {\n\t\t\t\twp_send_json_error( __( \"Form model doesn't exist\", Forminator::DOMAIN ) );\n\t\t\t}\n\t\t\tif ( empty( $status ) ) {\n\t\t\t\t$status = $form_model->status;\n\t\t\t}\n\t\t}\n\t\t$form_model->set_var_in_array( 'name', 'formName', $submitted_data, 'forminator_sanitize_field' );\n\n\t\t// Sanitize settings\n\t\t$settings = forminator_sanitize_field( $submitted_data['data'] );\n\n\t\t// Sanitize custom css\n\t\tif ( isset( $submitted_data['data']['custom_css'] ) ) {\n\t\t\t$settings['custom_css'] = sanitize_textarea_field( $submitted_data['data']['custom_css'] );\n\t\t}\n\n\t\t// Sanitize thank you message\n\t\tif ( isset( $submitted_data['data']['thankyou-message'] ) ) {\n\t\t\t$settings['thankyou-message'] = $submitted_data['data']['thankyou-message'];\n\t\t}\n\n\t\t// Sanitize user email message\n\t\tif ( isset( $submitted_data['data']['user-email-editor'] ) ) {\n\t\t\t$settings['user-email-editor'] = $submitted_data['data']['user-email-editor'];\n\t\t}\n\n\t\t// Sanitize admin email message\n\t\tif ( isset( $submitted_data['data']['admin-email-editor'] ) ) {\n\t\t\t$settings['admin-email-editor'] = $submitted_data['data']['admin-email-editor'];\n\t\t}\n\n\t\t$settings['formName'] = $title;\n\t\t$settings['version'] = $version;\n\t\t$form_model->settings = $settings;\n\n\t\t// status\n\t\t$form_model->status = $status;\n\n\t\t// Save data\n\t\t$id = $form_model->save();\n\n\t\t// add privacy settings to global option\n\t\t$override_privacy = false;\n\t\tif ( isset( $settings['enable-submissions-retention'] ) ) {\n\t\t\t$override_privacy = filter_var( $settings['enable-submissions-retention'], FILTER_VALIDATE_BOOLEAN );\n\t\t}\n\t\t$retention_number = null;\n\t\t$retention_unit = null;\n\t\tif ( $override_privacy ) {\n\t\t\t$retention_number = 0;\n\t\t\t$retention_unit = 'days';\n\t\t\tif ( isset( $settings['submissions-retention-number'] ) ) {\n\t\t\t\t$retention_number = (int) $settings['submissions-retention-number'];\n\t\t\t}\n\t\t\tif ( isset( $settings['submissions-retention-unit'] ) ) {\n\t\t\t\t$retention_unit = $settings['submissions-retention-unit'];\n\t\t\t}\n\t\t}\n\n\t\tforminator_update_form_submissions_retention( $id, $retention_number, $retention_unit );\n\n\t\twp_send_json_success( $id );\n\t}", "function pu_display_setting($args)\n{\n extract( $args );\n\n $option_name = 'pu_theme_options';\n\n $options = get_option( $option_name );\n\n switch ( $type ) { \n case 'text': \n $options[$id] = stripslashes($options[$id]); \n $options[$id] = esc_attr( $options[$id]); \n echo \"<input class='regular-text$class' type='text' id='$id' name='\" . $option_name . \"[$id]' value='$options[$id]' />\"; \n echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\";\n break;\n case 'textarea': \n $options[$id] = stripslashes($options[$id]); \n //$options[$id] = esc_attr( $options[$id]);\n $options[$id] = esc_html( $options[$id]); \n\n printf(\n \twp_editor($options[$id], $id, \n \t\tarray('textarea_name' => $option_name . \"[$id]\",\n \t\t\t'style' => 'width: 200px'\n \t\t\t)) \n\t\t\t\t);\n // echo \"<textarea id='$id' name='\" . $option_name . \"[$id]' rows='10' cols='50'>\".$options[$id].\"</textarea>\"; \n // echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\"; \n break; \n }\n}", "function pu_display_setting($args)\n{\n extract($args);\n\n $option_name = 'pu_theme_options';\n\n $options = get_option($option_name);\n\n switch ($type) {\n case 'text':\n $options[$id] = stripslashes($options[$id]);\n $options[$id] = esc_attr($options[$id]);\n echo \"<input class='regular-text$class' type='text' id='$id' name='\" . $option_name . \"[$id]' value='$options[$id]' />\";\n echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\";\n break;\n case 'textarea':\n $options[$id] = stripslashes($options[$id]);\n //$options[$id] = esc_attr( $options[$id]);\n $options[$id] = esc_html($options[$id]);\n\n printf(\n wp_editor($options[$id], $id,\n array('textarea_name' => $option_name . \"[$id]\",\n 'style' => 'width: 200px',\n ))\n );\n // echo \"<textarea id='$id' name='\" . $option_name . \"[$id]' rows='10' cols='50'>\".$options[$id].\"</textarea>\";\n // echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\";\n break;\n }\n}", "public function get_widget_custom_settings($key, $widget)\r\n\t{\r\n\t\tglobal $xoouserultra;\r\n\t\t\r\n\t\t//$custom_widgets = get_option('userultra_custom_user_widgets');\r\n\t\t\r\n\t/*\t 'title' => $uu_title,\r\n\t\t\t\t 'type' =>$uu_type, // 1-text, 2-shortcode\t\r\n\t\t\t\t 'editable' =>$uu_editable ,\t\r\n\t\t\t\t 'native' =>0,\t\t\r\n\t\t\t\t 'content' =>$uu_content,*/\r\n\t\t\t\t \r\n\t\t$editable_0 = \"\";\r\n\t\t$editable_1 = \"\";\r\n\t\tif($widget['editable']==0) {$editable_0 = 'selected=\"selected\"';}\r\n\t\tif($widget['editable']==1) {$editable_1 = 'selected=\"selected\"';}\r\n\t\t\r\n\t\t$type_1 = \"\";\r\n\t\t$type_2 = \"\";\r\n\t\tif($widget['type']==1) {$type_1 = 'selected=\"selected\"';}\r\n\t\tif($widget['type']==2) {$type_2 = 'selected=\"selected\"';}\r\n\t\t\r\n\t\t$html = '';\r\n\t\t$html .= '<div class=\"uultra-adm-widget-cont-add-new\" style=\"width:98%\" >';\r\n \r\n\t\t$html .= '<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=\"50%\"> '.__(\"Name: \",'xoousers').'</td>\r\n\t\t\t\t<td width=\"50%\"><input name=\"uultra_add_mod_widget_title_'.$key.'\" type=\"text\" id=\"uultra_add_mod_widget_title_'.$key.'\" style=\"width:120px\" value=\"'.$widget['title'].'\" /> \r\n\t\t </td>\r\n\t\t </tr>\r\n\t\t <tr>\r\n\t\t\t\t<td width=\"50%\"> '.__('Type:','xoousers').'</td>\r\n\t\t\t\t<td width=\"50%\">\r\n\t\t\t\t<select name=\"uultra_add_mod_widget_type_'.$key.'\" id=\"uultra_add_mod_widget_type_'.$key.'\" size=\"1\">\r\n\t\t\t\t \r\n\t\t\t\t <option value=\"1\" '.$type_1.'>'.__(\"Text: \",'xoousers').'</option>\r\n\t\t\t\t <option value=\"2\" '.$type_2.'>Shortcode</option>\r\n\t\t\t\t</select>\r\n\r\n\t\t </td>\r\n\t\t\t </tr>\r\n\t\t<tr>\r\n\t\t\t\t<td width=\"50%\"> '.__('Editable by user:','xoousers').'</td>\r\n\t\t\t\t<td width=\"50%\">\r\n\t\t\t\t<select name=\"uultra_add_mod_widget_editable_'.$key.'\" id=\"uultra_add_mod_widget_editable_'.$key.'\" size=\"1\">\r\n\t\t\t\t \r\n\t\t\t\t <option value=\"0\" '.$editable_0.'>NO</option>\r\n\t\t\t\t <option value=\"1\" '.$editable_1.'>YES</option>\r\n\t\t\t\t</select>\r\n\r\n\t\t </td>\r\n\t\t\t </tr>\r\n\t\t\t \r\n\t\t\t <tr>\r\n\t\t\t\t<td>'.__('Content:','xoousers').'</td>\r\n\t\t\t\t<td>&nbsp;</textarea> \r\n\t\t\t </td>\r\n\t\t\t </tr>\r\n\t\t\t \r\n\t\t\t <tr>\r\n\t\t\t\t\r\n\t\t\t\t<td colspan=\"2\">\r\n\t\t\t\t\r\n\t\t\t\t<textarea name=\"uultra_add_mod_widget_content_'.$key.'\" id=\"uultra_add_mod_widget_content_'.$key.'\" style=\"width:98%;\" rows=\"5\">'.stripslashes($widget['content']).'</textarea>\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t \r\n\t\t\t </td>\r\n\t\t\t </tr> \r\n\t\t\t \r\n\t\t\t \r\n\t\t\t</table> '; \t\t\t\r\n\t\t\t \r\n\t\t\t$html .= ' <p class=\"submit\"></p> ';\r\n\t\t\t\t\r\n\t\t\t$html .= '</div>';\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\treturn $html;\r\n\t\r\n\t}", "function siteorigin_panels_save_options(){\n\tif( !current_user_can('manage_options') ) return;\n\tif( empty($_POST['_wpnonce']) || !wp_verify_nonce( $_POST['_wpnonce'], 'save_panels_settings' ) ) return;\n\n\t// Save the post types settings\n\t$post_types = isset( $_POST['siteorigin_panels_post_types'] ) ? array_keys( $_POST['siteorigin_panels_post_types'] ) : array();\n\n\t$settings = isset( $_POST['siteorigin_panels_settings'] ) ? $_POST['siteorigin_panels_settings'] : array();\n\tforeach($settings as $f => $v){\n\t\tswitch($f){\n\t\t\tcase 'inline-css' :\n\t\t\tcase 'responsive' :\n\t\t\tcase 'copy-content' :\n\t\t\tcase 'animations' :\n\t\t\tcase 'bundled-widgets' :\n\t\t\t$settings[$f] = !empty($settings[$f]);\n\t\t\t\tbreak;\n\t\t\tcase 'margin-bottom' :\n\t\t\tcase 'margin-sides' :\n\t\t\tcase 'mobile-width' :\n\t\t\t$settings[$f] = intval($settings[$f]);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Checkbox settings\n\t$settings['responsive'] = !empty($settings['responsive']);\n\t$settings['copy-content'] = !empty($settings['copy-content']);\n\t$settings['animations'] = !empty($settings['animations']);\n\t$settings['inline-css'] = !empty($settings['inline-css']);\n\t$settings['bundled-widgets'] = !empty($settings['bundled-widgets']);\n\n\t// Post type settings\n\t$settings['post-types'] = $post_types;\n\n\tupdate_option('siteorigin_panels_settings', $settings);\n\n\tglobal $siteorigin_panels_settings;\n\t$siteorigin_panels_settings = false;\n}", "function pu_display_setting($args) {\n extract($args);\n\n $option_name = 'pu_theme_options';\n\n $options = get_option($option_name);\n\n switch ($type) {\n case 'text':\n $options[$id] = stripslashes($options[$id]);\n $options[$id] = esc_attr($options[$id]);\n echo \"<input class='regular-text$class' type='text' id='$id' name='\" . $option_name . \"[$id]' value='$options[$id]' />\";\n echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\";\n break;\n case 'textarea':\n $options[$id] = stripslashes($options[$id]);\n //$options[$id] = esc_attr( $options[$id]);\n $options[$id] = esc_html($options[$id]);\n\n printf(\n wp_editor($options[$id], $id, array('textarea_name' => $option_name . \"[$id]\",\n 'style' => 'width: 200px'\n ))\n );\n // echo \"<textarea id='$id' name='\" . $option_name . \"[$id]' rows='10' cols='50'>\".$options[$id].\"</textarea>\"; \n // echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\"; \n break;\n }\n}", "function zdtw_menu_options_callback() {\n echo '<form id=\"'.$this->prefix.'-form\" class=\"zd-settings-form\" method=\"POST\" action=\"options.php\">'.\"\\n\";\n\n// print_r( $this->options );\n// echo $this->settings_page_id;\n\n // settings_fields( $option_group )\n settings_fields( $this->settings_page_id );\n// settings_fields( $this->prefix . '-general-section' );\n\n do_settings_fields( $this->settings_page_id, $this->prefix .'-general-section' );\n\n submit_button();\n\n echo '</form>'.\"\\n\";\n }", "function save_meta_options( $postID ){\n\t\t$post = $_POST;\n\t\tif((isset($post['update']) || isset($post['save']) || isset($post['publish']))){\n\n\n\t\t\t$user_template = (isset($post['pagelines_template'])) ? $post['pagelines_template'] : '';\n\n\t\t\tif($user_template != ''){\n\n\t\t\t\t$set = pl_meta($postID, PL_SETTINGS);\n\t\t\t\t\n\t\t\t\t$set['draft']['page-template'] = $user_template; \n\t\t\t\t$set['live']['page-template'] = $user_template; \n\t\t\t\t\n\t\t\t\tpl_meta_update($postID, PL_SETTINGS, $set);\n\t\t\t}\n\n\n\t\t}\n\t}", "function modify_js_options( $options ) {\n // Addon Options Cleaned Up A Bit (lowest pri)\n //\n if ( $this->slplus->is_CheckTrue( $this->addon->options['hide_bubble'] ) ) {\n\t $this->slplus->SmartOptions->bubblelayout->value = '';\n }\n\n // Options From URL Passing (Second Highest Priority)\n //\n $new_options = array();\n if ( ! empty( $_REQUEST['address'] ) && $this->is_address_passed_by_URL() ) {\n $new_options['immediately_show_locations'] = '1';\n $new_options['use_sensor'] = false;\n }\n\n // Widget Options (Highest Pri)\n //\n $widget_options = array();\n if ( $this->addon->widget->is_initial_widget_search( $_REQUEST ) ) {\n $widget_options = array(\n 'disable_initial_directory' => false ,\n 'immediately_show_locations' => '1' ,\n 'map_initial_display' => 'map',\n 'use_sensor' => false\n );\n\n // Discrete State Output - recenter map\n //\n if ( isset( $_REQUEST['slp_widget']['state'] ) && ! empty( $_REQUEST['slp_widget']['state'] ) ) {\n $widget_options['map_center'] = $_REQUEST['slp_widget']['state'];\n }\n\n // Set Radius\n //\n if ( ( isset( $_REQUEST['widget_address'] ) ) && isset( $_REQUEST['radius'] ) ) {\n $widget_options['initial_radius'] = $_REQUEST['radius'];\n }\n }\n\n if ( empty( $this->addon->options['map_region'] ) ) {\n $this->attribute_special_processing( 'map_region' );\n }\n\n // Lowest Priority On Left: current options (slplus->options), then addon options, then attribute settings, then URL passing stuff, then our widget needs\n $all_options = array_merge( $options, $this->addon->options , $this->attribute_js_options, $new_options , $widget_options );\n\n // Only keep original options that were changed or \"for our JS\" settings\n\t //\n\t // NOTE: None of the SmartOptions should appear here\n\t //\n\t $for_our_js = array(\n\t \t'address_autocomplete',\n\t \t'disable_initial_directory',\n\t 'selector_behavior',\n\t );\n\t foreach ( $all_options as $key => $value ) {\n\t \tif ( array_key_exists( $key , $options ) || in_array( $key , $for_our_js ) ) {\n\t \t\t$options[ $key ] = $all_options[ $key ]; // overwrite\n\t\t }\n\t }\n\n return $options;\n }", "function widget_text_save_callback() {\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$data = $_POST['data'];\r\n\r\n\t\t$vals = explode('&', $data);\r\n\r\n\t\tforeach($vals as $item){\r\n\t\t\t$arr = explode('=', $item);\r\n\t\t\t$key = urldecode($arr[0]);\r\n\t\t\t$val = urldecode($arr[1]);\r\n\t\t\tif(endsWith($key, '[text]')) {\r\n\t\t\t\t// so this a Text Widget submission, continue to process\r\n\t\t\t\t\r\n\t\t\t\t$used_shortcodes = array();\r\n\t\t\t\t$replacements = array();\r\n\t\t\t\t$css = $this->cactus_parse_inlinecss($val, $used_shortcodes, $replacements);\r\n\t\t\t\t\r\n\t\t\t\tfile_put_contents(dirname(__FILE__) . '/log.txt',$css, FILE_APPEND);\r\n\t\t\t\tif($css != ''){\r\n\t\t\t\t\t$new_val = $val;\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach($replacements as $replace){\r\n\t\t\t\t\t\t$new_val = str_replace($replace[0], $replace[1], $new_val);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$widget = str_replace('[text]', '', $key);\r\n\r\n\t\t\t\t\t// update global custom CSS, to be called in every pages\r\n\t\t\t\t\t$global_custom_css = get_option('ct_custom_css');\r\n\t\t\t\t\tif(!isset($global_custom_css) || !is_array($global_custom_css)){\r\n\t\t\t\t\t\t$global_custom_css = array();\r\n\t\t\t\t\t\tadd_option('ct_custom_css', $global_custom_css);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$global_custom_css[$widget] = $css;\r\n\t\t\t\t\tupdate_option('ct_custom_css', $global_custom_css);\r\n\r\n\t\t\t\t\t$shortcodes = get_option('ct_shortcodes_used_in_widgets');\r\n\t\t\t\t\tif(!isset($shortcodes) || !is_array($shortcodes)){\r\n\t\t\t\t\t\t$shortcodes = array();\r\n\t\t\t\t\t\tadd_option('ct_shortcodes_used_in_widgets', $shortcodes);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$shortcodes[$widget] = $used_shortcodes;\r\n\t\t\t\t\tupdate_option('ct_shortcodes_used_in_widgets', $shortcodes);\r\n\r\n\t\t\t\t\tpreg_match('/(.*)\\[(.*)\\]/', $widget, $matches);\r\n\t\t\t\t\t$id_base = substr($matches[1], 7);\r\n\r\n\t\t\t\t\t$widget_options = get_option('widget_' . $id_base);\r\n\r\n\t\t\t\t\t$widget_options[$matches[2]]['text'] = $new_val;\r\n\r\n\t\t\t\t\tupdate_option('widget_' . $id_base, $widget_options);\r\n\r\n\t\t\t\t\t// do this silently. So echo empty;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\twp_die(); // this is required to terminate immediately and return a proper response\r\n\t}", "function options() {\n wp_enqueue_style('adminstyles', plugins_url('css/admin-options.css', __FILE__));\n if (version_compare(get_bloginfo('version'), '3.3', '<')) {\n wp_head();\n }\n $buttonOptions = $this->_followOptions->getButtonOptions();\n $style = $this->_followOptions->getDefaultStyle();\n $title = $this->_followOptions->getDefaultTitle();\n\n $commonFollowOptions = get_option('addthis_follow_settings');\n $followWidgetOptions = get_option('widget_addthis-follow-widget');\n /**\n * Restore from widget settings if possible\n */\n if (($commonFollowOptions == false || empty($commonFollowOptions)) && $followWidgetOptions != false) {\n foreach ($followWidgetOptions as $key => $list) {\n if (is_int($key) && is_array($list)) {\n merge_options($list, $buttonOptions, $title, $style);\n }\n }\n $restoreOptions = array('title' => $title, 'style' => $style);\n foreach($buttonOptions as $key => $value) {\n $restoreOptions[$key] = $value['placeholder'];\n }\n add_option('addthis_follow_settings', $restoreOptions);\n } elseif ($commonFollowOptions != false && !empty($commonFollowOptions)) {\n /**\n * Follow options already exists, just update it\n */\n merge_options($commonFollowOptions, $buttonOptions, $title, $style);\n }\n\n $this->displayOptionsForm($buttonOptions, $style, $title);\n }", "function wp_ajax_save_widget()\n {\n }", "function form( $instance ) \r\n {\r\n $defaults = array( 'title' => __('OptinSkin', 'OptinSkin'));\r\n $instance = wp_parse_args( (array) $instance, $defaults );\r\n $instance_key = uniqid();\r\n?>\r\n\r\n <style type=\"text/css\">\r\n \t.ois_admin_widget_title {\r\n font-size:15px;\r\n padding: 0 0 7px 0px;\r\n }\r\n .ois_admin_widget {\r\n max-width: 250px;\r\n }\r\n .ois_widget_selection {\r\n min-width: 200px;\r\n }\r\n .ois_admin_widget p {\r\n max-width: 250px;\r\n }\r\n </style>\r\n <div class=\"ois_admin_widget\">\r\n <h3 style=\"padding-top: 0;margin-top:10px;\">Basic Settings</h3>\r\n <div class=\"ois_admin_widget_title\">\r\n Skin to Display:\r\n </div><select class=\"ois_widget_selection\" name=\"<?php echo $this->get_field_name( 'skin' ); ?>\">\r\n <?php\r\n $skins = get_option('ois_skins');\r\n foreach ($skins as $id=>$skin) {\r\n echo '<option value=\"' . $id . '\"';\r\n if (isset($instance['skin']) && $instance['skin'] == $id) {\r\n echo ' selected=\"selected\" ';\r\n } // if\r\n echo '>' . $skin['title'] . '</option>';\r\n } // foreach\r\n ?>\r\n </select>\r\n <hr>\r\n <h3>Split-Testing <span style=\"font-weight:normal;\">(Optional)</span></h3>\r\n\r\n <p><input class=\"ois_widget_split\" id=\"<?php echo $instance_key; ?>_split\" type=\"checkbox\" name=\"<?php echo $this->get_field_name( 'split-test' ); ?>\" <?php if ($instance['split-test'] == 'yes') {\r\n echo ' checked=\"checked\" ';\r\n }?> value=\"yes\"> <span style=\"font-size:13px;\">I want to split-test this widget</span></p>\r\n\r\n <div id=\"<?php echo $instance_key; ?>_selection\" style=\"padding: 2px 0 8px 0;\">\r\n <div class=\"ois_admin_widget_title\">\r\n Alternate Skin:\r\n </div><select class=\"ois_widget_selection\" name=\"<?php echo $this->get_field_name( 'skin-b' ); ?>\">\r\n <?php\r\n foreach ($skins as $id=>$skin) {\r\n echo '<option value=\"' . $id . '\"';\r\n if (isset($instance['skin-b']) && $instance['skin-b'] == $id) {\r\n echo ' selected=\"selected\" ';\r\n } // if\r\n echo '>' . $skin['title'] . '</option>';\r\n }\r\n ?>\r\n </select>\r\n </div>\r\n\r\n <p style=\"border: 1px solid #e0e0e0; padding: 7px;&lt;?php\r\n ?&gt;\" id=\"<?php echo $instance_key; ?>_info\">If split-testing is enabled, the widget will either show the first or second skin, based on a random algorithm.</p>\r\n </div><?php\r\n }", "function theme_options_do_page() {\n\tglobal $select_options, $radio_options;\n\n\tif ( ! isset( $_REQUEST['settings-updated'] ) )\n\t\t$_REQUEST['settings-updated'] = false;\n\n\t?>\n\t<div class=\"wrap\">\n\t\t<?php screen_icon(); echo \"<h2>Site Description</h2>\"; ?>\n\n\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields( 'sample_options' ); ?>\n\t\t\t<?php $options = get_option( 'site_description' ); ?>\n\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( 'Enter a site description', 'psnc' ); ?></th>\n\t\t\t\t\t<td>\n\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\t$args = array(\n\t\t\t\t\t\t 'textarea_rows' => 15,\n\t\t\t\t\t\t 'teeny' => true,\n\t\t\t\t\t\t 'quicktags' => true,\n\t\t\t\t\t\t 'media_buttons' => false\n\t\t\t\t\t\t);\n\t\t\t\t\t\t $saved_vals = $options['sometextarea'];\n\t\t\t\t\t\twp_editor( stripslashes($saved_vals), 'site_description[sometextarea]', $args );\n\t\t\t\t\t\tsubmit_button( 'Save description' );\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<label class=\"description\" for=\"site_description[sometextarea]\"><?php _e( 'This will appear on your home page and also help with SEO (HTML allowed).', 'psnc' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\n\t\t</form>\n\t</div>\n\t<?php\n\t\n}", "public function options_init() {\n\t\t\tglobal $allowedtags;\n\t\t\t$allowedtags['p'] = array();\n\t\t\t$this->allowedtags = $allowedtags;\n\n\t\t // set options equal to defaults\n\t\t $this->_options = get_option( $this->options_group[0]['options_name'] );\n\t\t if ( false === $this->_options ) {\n\t\t\t\t$this->_options = $this->get_defaults();\n\t\t }\n\t\t if ( isset( $_GET['undo'] ) && !isset( $_GET['settings-updated'] ) && is_array( $this->get_option('previous') ) ) {\n\t\t \t$this->_options = $this->get_option('previous');\n\t\t }\n\t\t update_option( $this->options_group[0]['options_name'], $this->_options );\t\t\n\t\t \n\t\t}", "function update_sss_options() {\n\t$sss_options = get_option('sss_plugin_options');\n\tif(!$sss_options)\n\t\t$sss_options = array();\n\t\n\tif ($_POST['sss_set_max_width']) { \n\t\t$safe_val_max_width = intval(addslashes(strip_tags($_POST['sss_set_max_width'])));\n\t\t$sss_options['max_width'] = $safe_val_max_width;\n\t}\n\telse\n\t\t$sss_options['max_width'] = 560;\n\tif ($_POST['sss_start_showing_from']) { \n\t\t$safe_val_start_showing_from = intval(addslashes(strip_tags($_POST['sss_start_showing_from'])));\n\t\t$sss_options['start_showing_from'] = $safe_val_start_showing_from;\n\t}\n\telse\n\t\t$sss_options['start_showing_from'] = 6;\n\tif ($_POST['sss_twitter_name']) { \n\t\t$safe_val_twitter_name = addslashes(strip_tags($_POST['sss_twitter_name']));\n\t\t$sss_options['twitter_name'] = $safe_val_twitter_name;\n\t}\n\telse\n\t\t$sss_options['twitter_name'] = '';\n\tif ($_POST['sss_story_source']) { \n\t\t$safe_val_story_source = addslashes(strip_tags($_POST['sss_story_source']));\n\t\t$sss_options['story_source'] = $safe_val_story_source;\n\t}\n\telse\n\t\t$sss_options['story_source'] = get_bloginfo('name');\n\tif ($_POST['sss_show_where']) { \n\t\t$safe_val_show_where = addslashes(strip_tags($_POST['sss_show_where']));\n\t\t$sss_options['show_where'] = $safe_val_show_where;\n\t}\n\telse\n\t\t$sss_options['show_where'] = 'both';\n\t\t\n\t// button selection settings\n\tif ($buttons_arr = $_POST['sss_which_buttons']) {\n\t\t$sss_options['which_buttons'] = array();\n\t\tforeach ($buttons_arr as $btn) {\n\t\t\tarray_push($sss_options['which_buttons'], addslashes(strip_tags($btn)));\n\t\t}\n\t}\n\telse\n\t\t$sss_options['which_buttons'] = array();\n\t\n\t//excluding IDs\n\tif ($_POST['sss_exclude_ids']) { \n\t\t$safe_val_exclude_ids = addslashes(strip_tags(preg_replace('/\\s+/', '', $_POST['sss_exclude_ids'])));\n\t\t$sss_exclude_ids = array();\n\t\t$sss_exclude_ids_temp = explode(',', $safe_val_exclude_ids);\n\t\tforeach($sss_exclude_ids_temp as $single_id)\n\t\t\tif(strlen($single_id) > 0 && intval($single_id) > 0)\n\t\t\t\tarray_push($sss_exclude_ids, intval($single_id));\n\t\t$sss_options['exclude_ids'] = array_unique($sss_exclude_ids);\n\t}\n\telse\n\t\t$sss_options['exclude_ids'] = array();\n\t\n\tif (update_option('sss_plugin_options', $sss_options)) {\n\t\techo '<div id=\"message\" class=\"updated fade\">';\n\t\techo '<p>Updated!</p>';\n\t\techo '</div>';\n\t} /*else {\n\t\techo '<div id=\"message\" class=\"error fade\">';\n\t\techo '<p>Unable to update. My bad.</p>';\n\t\techo '</div>';\n\t}*/\n}", "function doOptionsPage()\r\n\t{\r\n\t\t/*\tDeclare the different settings\t*/\r\n\t\tregister_setting('wpklikandpay_store_config_group', 'storeTpe', '' );\r\n\t\t// register_setting('wpklikandpay_store_config_group', 'storeRang', '' );\r\n\t\t// register_setting('wpklikandpay_store_config_group', 'storeIdentifier', '' );\r\n\t\tregister_setting('wpklikandpay_store_config_group', 'environnement', '' );\r\n\t\t// register_setting('wpklikandpay_store_config_group', 'urlSuccess', '' );\r\n\t\t// register_setting('wpklikandpay_store_config_group', 'urlDeclined', '' );\r\n\t\t// register_setting('wpklikandpay_store_config_group', 'urlCanceled', '' );\r\n\t\tsettings_fields( 'wpklikandpay_url_config_group' );\r\n\r\n\t\t/*\tAdd the section about the store main configuration\t*/\r\n\t\tadd_settings_section('wpklikandpay_store_config', __('Informations de la boutique', 'wpklikandpay'), array('wpklikandpay_option', 'storeConfigForm'), 'wpklikandpayStoreConfig');\r\n\r\n\t\t/*\tAdd the section about the back url\t*/\r\n\t\t// add_settings_section('wpklikandpay_url_config', __('Urls de retour apr&eacute;s un paiement', 'wpklikandpay'), array('wpklikandpay_option', 'urlConfigForm'), 'wpklikandpayUrlConfig');\r\n?>\r\n<form action=\"\" method=\"post\" >\r\n<input type=\"hidden\" name=\"saveOption\" id=\"saveOption\" value=\"save\" />\r\n\t<?php \r\n\t\tdo_settings_sections('wpklikandpayStoreConfig'); \r\n \r\n\t\t/*\tSave the configuration in case that the form has been send with \"save\" action\t*/\r\n\t\tif(isset($_POST['saveOption']) && ($_POST['saveOption'] == 'save'))\r\n\t\t{\r\n\t\t\t/*\tSave the store main configuration\t*/\r\n\t\t\tunset($optionList);$optionList = array();\r\n\t\t\t$optionList['storeTpe'] = $_POST['storeTpe'];\r\n\t\t\t$optionList['storeRang'] = $_POST['storeRang'];\r\n\t\t\t$optionList['storeIdentifier'] = $_POST['storeIdentifier'];\r\n\t\t\t$optionList['environnement'] = $_POST['environnement'];\r\n\t\t\twpklikandpay_option::saveStoreConfiguration('wpklikandpay_store_mainoption', $optionList);\r\n\t\t}\r\n\t?>\r\n\t<table summary=\"Store main configuration form\" cellpadding=\"0\" cellspacing=\"0\" class=\"storeMainConfiguration\" >\r\n\t\t<?php do_settings_fields('wpklikandpayStoreConfig', 'mainWKlikAndPayStoreConfig'); ?>\r\n\t</table>\r\n\t<br/><br/><br/>\r\n<!--\r\n\t<?php \r\n\t\t// do_settings_sections('wpklikandpayUrlConfig');\r\n\r\n\t\t/*\tSave the configuration in case that the form has been send with \"save\" action\t*/\r\n\t\tif(isset($_POST['saveOption']) && ($_POST['saveOption'] == 'save'))\r\n\t\t{\r\n\t\t\t/*\tSave the configuration for bakc url after payment\t*/\r\n\t\t\tunset($optionList);$optionList = array();\r\n\t\t\t$optionList['urlSuccess'] = $_POST['urlSuccess'];\r\n\t\t\t$optionList['urlDeclined'] = $_POST['urlDeclined'];\r\n\t\t\t$optionList['urlCanceled'] = $_POST['urlCanceled'];\r\n\t\t\twpklikandpay_option::saveStoreConfiguration('wpklikandpay_store_urloption', $optionList);\r\n\t\t}\r\n\t?>\r\n\t<table summary=\"Back url main configuration form\" cellpadding=\"0\" cellspacing=\"0\" class=\"storeMainConfiguration\" >\r\n\t\t<tr>\r\n\t\t\t<td colspan=\"2\" >\r\n\t\t<?php echo sprintf(__('Ajouter : %s dans les pages que vous allez cr&eacute;er.', 'wpklikandpay'), '<span class=\" bold\" >[wp-klikandpay_payment_return title=\"KlikAndPay return page\" ]</span>'); ?>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td colspan=\"2\" >&nbsp;</td>\r\n\t\t</tr>\r\n<?php \r\n\t\tdo_settings_fields('wpklikandpayUrlConfig', 'backUrlConfig'); \r\n?>\r\n\t</table>\r\n-->\r\n\t<br/><br/><br/>\r\n\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Enregistrer les options', 'wpklikandpay'); ?>\" />\r\n</form>\r\n<?php\r\n\t}", "public function save_settings() {\n\n\t\tif ( !isset( $_REQUEST['action'] ) || !isset( $_GET['page'] ) )\n\t\t\treturn;\n\n\t\tif ( 'vfb-settings' !== $_GET['page'] )\n\t\t\treturn;\n\n\t\tif ( 'vfb_settings' !== $_REQUEST['action'] )\n\t\t\treturn;\n\n\t\tcheck_admin_referer( 'vfb-update-settings' );\n\n\t\t$data = array();\n\n\t\tforeach ( $_POST['vfb-settings'] as $key => $val ) {\n\t\t\t$data[ $key ] = esc_html( $val );\n\t\t}\n\n\t\tupdate_option( 'vfb-settings', $data );\n\t}", "public function saveForm() {\n\n\t\tforeach ( $this->getOptionsList() as $element ) {\n\t\t\t$element->save();\n\t\t}\n\t\t$this->setLastAction( self::ACTION_SAVE );\n\n\t\t$custom_style = new Custom_CSS_Style();\n\t\t$custom_style->reinit();\n\t}", "function cinerama_edge_save_options() {\n\t\tglobal $cinerama_edge_global_options;\n\n\t\tif ( current_user_can( 'administrator' ) ) {\n\t\t\t$_REQUEST = stripslashes_deep( $_REQUEST );\n\n\t\t\tunset( $_REQUEST['action'] );\n\n\t\t\tcheck_ajax_referer( 'edgtf_ajax_save_nonce', 'edgtf_ajax_save_nonce' );\n\n\t\t\t$cinerama_edge_global_options = array_merge( $cinerama_edge_global_options, $_REQUEST );\n\n\t\t\tupdate_option( 'edgtf_options_cinerama', $cinerama_edge_global_options );\n\n\t\t\tdo_action( 'cinerama_edge_action_after_theme_option_save' );\n\t\t\techo esc_html__( 'Saved', 'cinerama' );\n\n\t\t\tdie();\n\t\t}\n\t}", "function genesis_extender_custom_options()\n{\n\tglobal $message;\n\t$custom_functions = get_option( 'genesis_extender_custom_functions' );\n\t$custom_js = get_option( 'genesis_extender_custom_js' );\n\t$custom_templates = genesis_extender_get_templates();\n\t$custom_labels = genesis_extender_get_labels();\n\t$custom_conditionals = genesis_extender_get_conditionals();\n\t$custom_widgets = genesis_extender_get_widgets();\n\t$custom_hooks = genesis_extender_get_hooks();\n?>\n\t<div class=\"wrap\">\n\t\t\n\t\t<div id=\"genesis-extender-custom-saved\" class=\"genesis-extender-update-box\"></div>\n\n\t\t<?php\n\t\tif( !empty( $_POST['action'] ) && $_POST['action'] == 'reset' )\n\t\t{\n\t\t\tgenesis_extender_reset_delete_template();\n\t\t\tupdate_option( 'genesis_extender_custom_css', genesis_extender_custom_css_options_defaults() );\n\t\t\tupdate_option( 'genesis_extender_custom_functions', genesis_extender_custom_functions_options_defaults() );\n\t\t\tupdate_option( 'genesis_extender_custom_js', genesis_extender_custom_js_options_defaults() );\n\t\t\tupdate_option( 'genesis_extender_custom_templates', array() );\n\t\t\tupdate_option( 'genesis_extender_custom_labels', array() );\n\t\t\tupdate_option( 'genesis_extender_custom_conditionals', array() );\n\t\t\tupdate_option( 'genesis_extender_custom_widget_areas', array() );\n\t\t\tupdate_option( 'genesis_extender_custom_hook_boxes', array() );\n\n\t\t\tgenesis_extender_get_custom_css( null, $args = array( 'cached' => false, 'array' => false ) );\n\t\t\t$custom_functions = get_option( 'genesis_extender_custom_functions' );\n\t\t\t$custom_js = get_option( 'genesis_extender_custom_js' );\n\t\t\t$custom_templates = genesis_extender_get_templates();\n\t\t\t$custom_labels = genesis_extender_get_labels();\n\t\t\t$custom_conditionals = genesis_extender_get_conditionals();\n\t\t\t$custom_widgets = genesis_extender_get_widgets();\n\t\t\t$custom_hooks = genesis_extender_get_hooks();\n\n\t\t\tgenesis_extender_write_files( $css = true, $ez = false );\n\t\t?>\n\t\t\t<script type=\"text/javascript\">jQuery(document).ready(function($){ $('#genesis-extender-custom-saved').html('Custom Options Reset').css(\"position\", \"fixed\").fadeIn('slow');window.setTimeout(function(){$('#genesis-extender-custom-saved').fadeOut( 'slow' );}, 2222); });</script>\n\t\t<?php\n\t\t}\n\n\t\tif( !empty( $_GET['activetab'] ) )\n\t\t{ ?>\n\t\t\t<script type=\"text/javascript\">jQuery(document).ready(function($) { $('#<?php echo $_GET['activetab']; ?>').click(); });</script>\t\n\t\t<?php\n\t\t} ?>\n\t\t\n\t\t<div id=\"icon-options-general\" class=\"icon32\"></div>\n\t\t\n\t\t<h2 id=\"genesis-extender-admin-heading\"><?php _e( 'Extender - Custom Options', 'extender' ); ?></h2>\n\t\t\n\t\t<div class=\"genesis-extender-css-builder-button-wrap\">\n\t\t\t<span id=\"show-hide-custom-css-builder\" class=\"button\"><?php _e( 'CSS Builder', 'extender' ); ?></span>\n\t\t</div>\n\n\t\t<div class=\"genesis-extender-php-builder-button-wrap\">\n\t\t\t<span id=\"show-hide-custom-php-builder\" class=\"button\"><?php _e( 'PHP Builder', 'extender' ); ?></span>\n\t\t</div>\n\t\t\n\t\t<div id=\"genesis-extender-admin-wrap\">\n\t\t\n\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-css-builder.php' ); ?>\n\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-php-builder.php' ); ?>\n\t\t\t\n\t\t\t<form action=\"/\" id=\"custom-options-form\" name=\"custom-options-form\">\n\t\t\t\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"genesis_extender_custom_options_save\" />\n\t\t\t\t<input type=\"hidden\" name=\"security\" value=\"<?php echo wp_create_nonce( 'custom-options' ); ?>\" />\n\t\t\t\n\t\t\t\t<div id=\"genesis-extender-floating-save\">\n\t\t\t\t\t<input type=\"submit\" value=\"<?php _e( 'Save Changes', 'extender' ); ?>\" name=\"Submit\" alt=\"Save Changes\" class=\"genesis-extender-save-button button button-primary\"/>\n\t\t\t\t\t<img class=\"genesis-extender-ajax-save-spinner\" src=\"<?php echo site_url() . '/wp-admin/images/spinner-2x.gif'; ?>\" />\n\t\t\t\t\t<span class=\"genesis-extender-saved\"></span>\n\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t<div id=\"genesis-extender-custom-options-nav\" class=\"genesis-extender-admin-nav\">\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li id=\"genesis-extender-custom-options-nav-css\" class=\"genesis-extender-options-nav-all genesis-extender-options-nav-active\"><a href=\"#\">CSS</a></li><li id=\"genesis-extender-custom-options-nav-functions\" class=\"genesis-extender-options-nav-all\"><a href=\"#\">Functions</a></li><li id=\"genesis-extender-custom-options-nav-js\" class=\"genesis-extender-options-nav-all\"><a href=\"#\">JS</a></li><li id=\"genesis-extender-custom-options-nav-templates\" class=\"genesis-extender-options-nav-all\"><a href=\"#\">Templates</a></li><li id=\"genesis-extender-custom-options-nav-labels\" class=\"genesis-extender-options-nav-all\"><a href=\"#\">Labels</a></li><li id=\"genesis-extender-custom-options-nav-conditionals\" class=\"genesis-extender-options-nav-all\"><a href=\"#\">Conditionals</a></li><li id=\"genesis-extender-custom-options-nav-widget-areas\" class=\"genesis-extender-options-nav-all\"><a href=\"#\">Widget Areas</a></li><li id=\"genesis-extender-custom-options-nav-hook-boxes\" class=\"genesis-extender-options-nav-all\"><a href=\"#\">Hook Boxes</a></li><li id=\"genesis-extender-custom-options-nav-image-uploader\" class=\"genesis-extender-options-nav-all\"><a class=\"genesis-extender-options-nav-last\" href=\"#\">Images</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div class=\"genesis-extender-custom-options-wrap\">\n\t\t\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-css.php' ); ?>\n\t\t\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-functions.php' ); ?>\n\t\t\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-js.php' ); ?>\n\t\t\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-templates.php' ); ?>\n\t\t\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-labels.php' ); ?>\n\t\t\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-conditionals.php' ); ?>\n\t\t\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-widget-areas.php' ); ?>\n\t\t\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-hook-boxes.php' ); ?>\n\t\t\t\t</div>\n\t\t\t\n\t\t\t</form>\n\n\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-image-uploader.php' ); ?>\n\n\t\t\t<div id=\"genesis-extender-admin-footer\">\n\t\t\t\t<p>\n\t\t\t\t\t<a href=\"http://cobaltapps.com\" target=\"_blank\">CobaltApps.com</a> | <a href=\"http://extenderdocs.cobaltapps.com/\" target=\"_blank\">Docs</a> | <a href=\"http://cobaltapps.com/my-account/\" target=\"_blank\">My Account</a> | <a href=\"http://cobaltapps.com/forum/\" target=\"_blank\">Community Forum</a> | <a href=\"http://cobaltapps.com/affiliates/\" target=\"_blank\">Affiliates</a> &middot;\n\t\t\t\t\t<a><span id=\"show-options-reset\" class=\"genesis-extender-options-reset-button button\" style=\"margin:0; float:none !important;\"><?php _e( 'Custom Options Reset', 'extender' ); ?></span></a><a href=\"http://extenderdocs.cobaltapps.com/article/156-custom-options-reset\" class=\"tooltip-mark\" target=\"_blank\">[?]</a>\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style=\"display:none; width:160px; border:none; background:none; margin:0 auto; padding:0; float:none; position:inherit;\" id=\"show-options-reset-box\" class=\"genesis-extender-custom-fonts-box\">\n\t\t\t\t<form style=\"float:left;\" id=\"genesis-extender-reset-custom-options\" method=\"post\">\n\t\t\t\t\t<input style=\"background:#D54E21; width:160px !important; color:#FFFFFF !important; -webkit-box-shadow:none; box-shadow:none;\" type=\"submit\" value=\"<?php _e( 'Reset Custom Options', 'extender' ); ?>\" class=\"genesis-extender-reset button\" name=\"Submit\" onClick='return confirm(\"<?php _e( 'Are you sure your want to reset your Genesis Extender Custom Options?', 'extender' ); ?>\")'/><input type=\"hidden\" name=\"action\" value=\"reset\" />\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t</div>\n\t</div> <!-- Close Wrap -->\n<?php\n}", "function category_browsing_options_form()\r\n\t//admin options for category_browsing_options module\r\n\t{\r\n\t\t$this->body .= \"<tr><td class=\\\"col_hdr\\\" colspan=\\\"2\\\" style=\\\"width: 100%; font-weight: bold; text-align: center;\\\">Options selected below will be applied to the Category Browsing Options Module</td></tr>\";\r\n\t\t$show_options = array (\r\n\t\t\t'cat_browse_opts_as_ddl' => $this->db->get_site_setting('cat_browse_opts_as_ddl'),\r\n\t\t\t'cat_browse_all_listings' => $this->db->get_site_setting('cat_browse_all_listings'),\r\n\t\t\t'cat_browse_end_today' => $this->db->get_site_setting('cat_browse_end_today'),\r\n\t\t\t'cat_browse_has_pics' => $this->db->get_site_setting('cat_browse_has_pics'),\r\n\t\t\t'cat_browse_has_pics' => $this->db->get_site_setting('cat_browse_has_pics'),\r\n\t\t\t'cat_browse_class_only' => $this->db->get_site_setting('cat_browse_class_only'),\r\n\t\t\t'cat_browse_auc_only' => $this->db->get_site_setting('cat_browse_auc_only'),\r\n\t\t\t'cat_browse_buy_now' => $this->db->get_site_setting('cat_browse_buy_now'),\r\n\t\t\t'cat_browse_buy_now_only' => $this->db->get_site_setting('cat_browse_buy_now_only'),\r\n\t\t\t'cat_browse_auc_bids' => $this->db->get_site_setting('cat_browse_auc_bids'),\r\n\t\t\t'cat_browse_auc_no_bids' => $this->db->get_site_setting('cat_browse_auc_no_bids')\r\n\t\t\t\r\n\t\t);\r\n\t\t$ddlTooltip = geoHTML::showTooltip('Show as Dropdown', 'Choose yes to display the module\\'s options in a dropdown list, or no to show them as a text-based, delimeter-separated list.');\r\n\t\t$this->input_radio_yes_no($show_options,\"cat_browse_opts_as_ddl\",\"Show as Dropdown $ddlTooltip\");\r\n\t\t$this->input_radio_yes_no($show_options,\"cat_browse_all_listings\",\"All listings\");\r\n\t\t$this->input_radio_yes_no($show_options,\"cat_browse_end_today\",\"Listings Ending within 24 hours\");\r\n\t\t$this->input_radio_yes_no($show_options,\"cat_browse_has_pics\",\"Listings with Photos\");\r\n\t\t\r\n\t\tif(geoMaster::is('classifieds') && geoMaster::is('auctions'))\r\n\t\t{\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_class_only\",\"Classifieds only\");\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_auc_only\",\"Auctions only\");\r\n\t\t}\r\n\t\tif(geoMaster::is('auctions'))\r\n\t\t{\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_buy_now\",\"Auctions using Buy Now\");\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_buy_now_only\",\"Auctions using Buy Now Only\");\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_auc_bids\",\"Auctions with Bids\");\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_auc_no_bids\",\"Auctions without Bids\");\r\n\t\t}\r\n\t\t\r\n\t}", "function get_widget_customization_options($widget_id)\r\n\t{\r\n\t\tglobal $xoouserultra;\t\t\r\n\t\t\r\n\t\t$html =\"\";\r\n\t\t$user_id = get_current_user_id();\r\n\t\t\r\n\t\t$custom_widgets = get_option('userultra_default_user_tabs');\r\n\t\t$widget = $custom_widgets[$widget_id];\r\n\t\t\r\n\t\t$widget_text = $widget[\"title\"];\r\n\t\t$uu_type = $widget[\"type\"];\r\n\t\t$uu_editable = $widget[\"editable\"];\r\n\t\t$uu_content = $widget[\"content\"];\r\n\t\t\r\n\t\tif($widget[\"native\"]==0) //this is a custom widget\r\n\t\t{\r\n\t\t\t\r\n\t\t\tif($uu_editable ==1 && $uu_type == 1) //this is a text widget that can be edited by the user\r\n\t\t\t{\r\n\t\t\t\t$meta = 'uultra_user_widget_cont_edition_'.$widget_id;\r\n\t\t\t\t\r\n\t\t\t\t$html .='<div class=\"uultra-widget-int-edit-content\">';\r\n\t\t\t\t$html .='<input type=\"submit\" name=\"uultra-update-widget-custom-user-information\" id=\"uultra-update-widget-custom-text\" class=\"xoouserultra-button uultra-edit-widget-content-html-editor\" value=\"Edit Content\" widget-id=\"'.$widget_id.'\">';\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//$html .='<input type=\"submit\" name=\"uultra-update-widget-custom-user-information\" id=\"uultra-update-widget-custom-text\" class=\"xoouserultra-button uultra-update-widget-custom-user-information\" value=\"Update\" widget-id=\"'.$widget_id.'\">';\t\r\n\t\t\t\t\r\n\t\t\t\t$html .='</div>';\r\n\t\t\t\r\n\t\t\t}elseif($uu_editable ==0 && $uu_type == 1){ //this is a text widget that cannot be edited\r\n\t\t\t\r\n\t\t\t\t$html .='<div class=\"uultra-widget-int-edit-content\">';\r\n\t\t\t\t$html .=''.$uu_content.'';\r\n\t\t\t\t$html .='</div>';\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{ //this is a native widget\r\n\t\t\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $html;\r\n\t\t\r\n\t\r\n\t}", "function saveCharSelectorSettingsObject()\n\t{\n\t\tglobal $ilSetting, $ilCtrl, $lng, $tpl;\n\t\t\n\t\trequire_once 'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';\n\t\t$char_selector = new ilCharSelectorGUI(ilCharSelectorConfig::CONTEXT_ADMIN);\n\t\t$form = $this->initCharSelectorSettingsForm($char_selector);\n if ($form->checkInput())\n {\n\t\t $char_selector->getFormValues($form);\n\n\t\t $ilSetting->set('char_selector_availability', $char_selector->getConfig()->getAvailability());\n\t\t $ilSetting->set('char_selector_definition', $char_selector->getConfig()->getDefinition());\n\t\t\t\n\t\t ilUtil::sendSuccess($lng->txt(\"msg_obj_modified\"), true);\n\t\t $ilCtrl->redirect($this, \"showCharSelectorSettings\");\n }\n $form->setValuesByPost();\n $tpl->setContent($form->getHTML());\n\t}", "function ot_after_save($options) {\r\n\t\t$clones = $options;\r\n\t\t$used_shortcodes = array();\r\n\t\t$global_css = '';\r\n\t\tforeach($options as $key => $val){\r\n\t\t\tif($key == 'archives_footer_cta_content'){\r\n\r\n\t\t\t\t$replacements = array();\r\n\t\t\t\t$css = $this->cactus_parse_inlinecss($val, $used_shortcodes, $replacements);\r\n\r\n\t\t\t\tif($css != ''){\r\n\r\n\t\t\t\t\t$new_val = $val;\r\n\t\t\t\t\tforeach($replacements as $replace){\r\n\t\t\t\t\t\t$new_val = str_replace($replace[0], $replace[1], $new_val);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$global_css .= ';' . $css;\r\n\t\t\t\t\t$clones[$key] = $new_val;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(startsWith($global_css,';')){\r\n\t\t\t$global_css = substr($global_css,1);\r\n\t\t}\r\n\r\n\t\t$shortcodes = get_option('ct_shortcodes_used_in_ot');\r\n\t\tif(!isset($shortcodes) || !is_array($shortcodes)){\r\n\t\t\tadd_option('ct_shortcodes_used_in_ot', array());\r\n\t\t}\r\n\r\n\t\t$shortcodes = $used_shortcodes;\r\n\t\tupdate_option('ct_shortcodes_used_in_ot', $shortcodes);\r\n\r\n\r\n\t\t// update global custom CSS in theme options, to be called in every pages\r\n\t\t$global_custom_css = get_option('ct_ot_custom_css');\r\n\t\tif(!isset($global_custom_css) || !is_array($global_custom_css)){\r\n\t\t\tadd_option('ct_ot_custom_css', '');\r\n\t\t}\r\n\r\n\t\t$global_custom_css = $global_css;\r\n\t\tupdate_option('ct_ot_custom_css', $global_custom_css);\r\n\r\n\t\tupdate_option(ot_options_id(), $clones);\r\n\r\n\t}", "function fudge_event_info_control() {\r\r\n if (isset($_POST['submitted'])) {\r\r\n update_option('fudge_event_info_widget_title', $_POST['eventdate']);\r\r\n update_option('fudge_event_info_widget_eventcity', $_POST['eventcity']);\r\r\n update_option('fudge_event_info_widget_eventtime', $_POST['eventtime']);\r\r\n update_option('fudge_event_info_widget_eventlocation', $_POST['eventlocation']);\r\r\n update_option('fudge_event_info_widget_menu', $_POST['eventmenu']);\r\r\n }\r\r\n //load options\r\r\n $eventdate = get_option('fudge_event_info_widget_title');\r\r\n $eventcity = get_option('fudge_event_info_widget_eventcity');\r\r\n $eventtime = get_option('fudge_event_info_widget_eventtime');\r\r\n $eventlocation = get_option('fudge_event_info_widget_eventlocation');\r\r\n $eventmenu = get_option('fudge_event_info_widget_menu');\r\r\n ?>\r\r\n <?php _e('Event Date:', 'fudge'); ?><br />\r\r\n <input type=\"text\" class=\"widefat\" name=\"eventdate\" value=\"<?php echo stripslashes($eventdate); ?>\" />\r\r\n <br /><br />\r\r\n <?php _e('Event Starting Time:', 'fudge'); ?><br />\r\r\n <input type=\"text\" class=\"widefat\" name=\"eventtime\" value=\"<?php echo stripslashes($eventtime); ?>\"/>\r\r\n <br /><br />\r\r\n <?php _e('Event City &amp; Country:', 'fudge'); ?><br />\r\r\n <input type=\"text\" class=\"widefat\" name=\"eventcity\" value=\"<?php echo stripslashes($eventcity); ?>\" />\r\r\n <br /><br />\r\r\n <?php _e('Event Location:', 'fudge'); ?><br />\r\r\n <input type=\"text\" class=\"widefat\" name=\"eventlocation\" value=\"<?php echo stripslashes($eventlocation); ?>\"/>\r\r\n <br /><br />\r\r\n <?php _e('Add to main navigation?', 'fudge'); ?><br />\r\r\n <input type=\"text\" class=\"widefat\" name=\"eventmenu\" value=\"<?php echo stripslashes($eventmenu); ?>\"/><br/>\r\r\n <small><?php _e('(Enter desired menu link text)', 'fudge'); ?></small>\r\r\n <br /><br />\r\r\n <input type=\"hidden\" name=\"submitted\" value=\"1\" />\r\r\n <?php\r\r\n}", "function save_option() {\n\t\t\tcheck_ajax_referer('ajax-nonce', 'nonce');\n\t\t\tif (isset($_POST['option']) && isset($_POST['value'])) {\n\t\t\t\tupdate_option($_POST['option'], stripslashes($_POST['value']));\n\t\t\t\techo 'saved';\n\t\t\t} else {\n\t\t\t\techo 'notsaved';\n\t\t\t}\n\t\t\tdie();\n\t\t}", "public function save()\n {\n update_option($this->optionKey, $this->fields);\n }", "function optionsframework_options() {\n\n\t// Typograpgy CSS list\n\t$typography = options_stylesheets_get_file_list(\n\t\tget_stylesheet_directory() . '/css/typography/', // $directory_path\n\t\t'css', // $filetype\n\t\tget_stylesheet_directory_uri() . '/css/typography/' // $directory_uri\n\t);\n\n\n\t// Layout CSS list\n\t$layout = options_stylesheets_get_file_list(\n\t\tget_stylesheet_directory() . '/css/layout/', // $directory_path\n\t\t'css', // $filetype\n\t\tget_stylesheet_directory_uri() . '/css/layout/' // $directory_uri\n\t);\n\t\n\t// Colors CSS list\n\t$colors = options_stylesheets_get_file_list(\n\t\tget_stylesheet_directory() . '/css/colors/', // $directory_path\n\t\t'css', // $filetype\n\t\tget_stylesheet_directory_uri() . '/css/colors/' // $directory_uri\n\t);\n\n\n\n\n\t$options = array();\n\t\t\n\n// Typography\n// typography in the Theme options\n\t\n \t$options['typography'] = array( \n\t\t\"name\" => \"Typography\",\n \t\t\"id\" => \"typography\",\n \t\t\"type\" => \"radio\",\n \t\t\"options\" => $typography );\n\n\n// Colors\n// Colors in the Theme options\n\t\n \t$options['colors'] = array( \n\t\t\"name\" => \"Colors\",\n \t\t\"id\" => \"colors\",\n \t\t\"type\" => \"radio\",\n \t\t\"options\" => $colors );\n \n\t// Color Picker\n\t\t\n $options['example_colorpicker'] = array(\n \t\"name\" => \"Colorpicker\",\n \t\"id\" => \"example_colorpicker\",\n \t\"std\" => \"#666666\",\n \t\"type\" => \"color\" );\n\n\n\n// Layout\n// Layout in the Theme options\n\t\n \t$options['layout'] = array( \n\t\t\"name\" => \"Layout CSS variants\",\n \t\t\"id\" => \"layout\",\n \t\t\"type\" => \"radio\",\n \t\t\"options\" => $layout );\n \n\n\n// site Width setting \n\t\t\n \t$options['site_width'] = array(\n \t \t\"name\" => \"Site Width\",\n \t \"id\" => \"site_width\",\n \t \"std\" => \"Default Value\",\n \t \"type\" => \"text\" );\n\n// Logo uploader\n\n\t$options['logo'] = array(\n\t\t\"name\" => \"Logo image\",\n\t\t\"desc\" => \"This creates a full size uploader that previews the image.\",\n\t\t\"id\" => \"logo\",\n\t\t\"type\" => \"upload\" );\n\t\t\n\n\treturn $options;\n}", "function em_ms_admin_options_page() {\n\tglobal $wpdb,$EM_Notices;\n\t//Check for uninstall/reset request\n\tif( !empty($_REQUEST['action']) && $_REQUEST['action'] == 'uninstall' ){\n\t\tem_admin_options_uninstall_page();\n\t\treturn;\n\t}\t\n\tif( !empty($_REQUEST['action']) && $_REQUEST['action'] == 'reset' ){\n\t\tem_admin_options_reset_page();\n\t\treturn;\n\t}\t\n\t//TODO place all options into an array\n\t$events_placeholders = '<a href=\"'.EM_ADMIN_URL .'&amp;events-manager-help#event-placeholders\">'. __('Event Related Placeholders','events-manager') .'</a>';\n\t$locations_placeholders = '<a href=\"'.EM_ADMIN_URL .'&amp;events-manager-help#location-placeholders\">'. __('Location Related Placeholders','events-manager') .'</a>';\n\t$bookings_placeholders = '<a href=\"'.EM_ADMIN_URL .'&amp;events-manager-help#booking-placeholders\">'. __('Booking Related Placeholders','events-manager') .'</a>';\n\t$categories_placeholders = '<a href=\"'.EM_ADMIN_URL .'&amp;events-manager-help#category-placeholders\">'. __('Category Related Placeholders','events-manager') .'</a>';\n\t$events_placeholder_tip = \" \". sprintf(__('This accepts %s and %s placeholders.','events-manager'),$events_placeholders, $locations_placeholders);\n\t$locations_placeholder_tip = \" \". sprintf(__('This accepts %s placeholders.','events-manager'), $locations_placeholders);\n\t$categories_placeholder_tip = \" \". sprintf(__('This accepts %s placeholders.','events-manager'), $categories_placeholders);\n\t$bookings_placeholder_tip = \" \". sprintf(__('This accepts %s, %s and %s placeholders.','events-manager'), $bookings_placeholders, $events_placeholders, $locations_placeholders);\n\t\n\tglobal $save_button;\n\t$save_button = '<tr><th>&nbsp;</th><td><p class=\"submit\" style=\"margin:0px; padding:0px; text-align:right;\"><input type=\"submit\" class=\"button-primary\" name=\"Submit\" value=\"'. __( 'Save Changes', 'events-manager') .' ('. __('All','events-manager') .')\" /></p></td></tr>';\n\t//Do some multisite checking here for reuse\n\t?>\t\n\t<script type=\"text/javascript\" charset=\"utf-8\"><?php include(EM_DIR.'/includes/js/admin-settings.js'); ?></script>\n\t<script type=\"text/javascript\" charset=\"utf-8\">\n\t\tjQuery(document).ready(function($){\n\t\t\t//events\n\t\t\t$('input[name=\"dbem_ms_global_events\"]').change(function(){\n\t\t\t\tif( $('input:radio[name=\"dbem_ms_global_events\"]:checked').val() == 1 ){\n\t\t\t\t\t$(\"tr#dbem_ms_global_events_links_row\").show();\n\t\t\t\t\t$('input:radio[name=\"dbem_ms_global_events_links\"]:checked').trigger('change');\n\t\t\t\t}else{\n\t\t\t\t\t$(\"tr#dbem_ms_global_events_links_row, tr#dbem_ms_events_slug_row\").hide();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}).first().trigger('change');\n\t\t\t$('input[name=\"dbem_ms_global_events_links\"]').change(function(){\n\t\t\t\tif( $('input:radio[name=\"dbem_ms_global_events_links\"]:checked').val() == 1 ){\n\t\t\t\t\t$(\"tr#dbem_ms_events_slug_row\").hide();\t\n\t\t\t\t}else{\t\t\t\t\n\t\t\t\t\t$(\"tr#dbem_ms_events_slug_row\").show();\n\t\t\t\t}\n\t\t\t}).first().trigger('change');\n\t\t\t//locations\n\t\t\t$('input[name=\"dbem_ms_mainblog_locations\"]').change(function(){\n\t\t\t\tif( $('input:radio[name=\"dbem_ms_mainblog_locations\"]:checked').val() == 1 ){\n\t\t\t\t\t$(\"tbody.em-global-locations\").hide();\n\t\t\t\t}else{\n\t\t\t\t\t$(\"tbody.em-global-locations\").show();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}).first().trigger('change');\n\t\t\t$('input[name=\"dbem_ms_global_locations\"]').change(function(){\n\t\t\t\tif( $('input:radio[name=\"dbem_ms_global_locations\"]:checked').val() == 1 ){\n\t\t\t\t\t$(\"tr#dbem_ms_global_locations_links_row\").show();\n\t\t\t\t\t$('input:radio[name=\"dbem_ms_global_locations_links\"]:checked').trigger('change');\n\t\t\t\t}else{\n\t\t\t\t\t$(\"tr#dbem_ms_global_locations_links_row, tr#dbem_ms_locations_slug_row\").hide();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}).first().trigger('change');\n\t\t\t$('input[name=\"dbem_ms_global_locations_links\"]').change(function(){\n\t\t\t\tif( $('input:radio[name=\"dbem_ms_global_locations_links\"]:checked').val() == 1 ){\n\t\t\t\t\t$(\"tr#dbem_ms_locations_slug_row\").hide();\t\n\t\t\t\t}else{\n\t\t\t\t\t$(\"tr#dbem_ms_locations_slug_row\").show();\t\t\t\t\n\t\t\t\t}\n\t\t\t});\t\t\n\t\t\t//MS Mode selection hiders \n\t\t\t$('input[name=\"dbem_ms_global_table\"]').change(function(){ //global\n\t\t\t\tif( $('input:radio[name=\"dbem_ms_global_table\"]:checked').val() == 1 ){\n\t\t\t\t\t$(\"tbody.em-global-options\").show();\n\t\t\t\t\t$('input:radio[name=\"dbem_ms_mainblog_locations\"]:checked').trigger('change');\n\t\t\t\t}else{\n\t\t\t\t\t$(\"tbody.em-global-options\").hide();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}).first().trigger('change');\t\n\t\t});\n\t</script>\n\t<style type=\"text/css\">.postbox h3 { cursor:pointer; }</style>\n\t<div class=\"wrap <?php if(empty($tabs_enabled)) echo 'tabs-active' ?>\">\n\t\t<div id='icon-options-general' class='icon32'><br /></div>\n\t\t<h1 id=\"em-options-title\"><?php _e ( 'Event Manager Options', 'events-manager'); ?></h1>\n\t\t<h2 class=\"nav-tab-wrapper\">\n\t\t\t<?php\n\t\t\t$tabs_enabled = defined('EM_SETTINGS_TABS') && EM_SETTINGS_TABS;\n\t\t\tif( $tabs_enabled ){\n\t\t\t\t$general_tab_link = esc_url(add_query_arg( array('em_tab'=>'general')));\n\t\t\t}else{\n\t\t\t\t$general_tab_link = '';\n\t\t\t}\n\t\t\t?>\n\t\t\t<a href=\"<?php echo $general_tab_link ?>#general\" id=\"em-menu-general\" class=\"nav-tab nav-tab-active\"><?php esc_html_e('General','events-manager'); ?></a>\n\t\t\t<?php\n\t\t\t$custom_tabs = apply_filters('em_ms_options_page_tabs', array());\n\t\t\tforeach( $custom_tabs as $tab_key => $tab_name ){\n\t\t\t\t$tab_link = !empty($tabs_enabled) ? esc_url(add_query_arg( array('em_tab'=>$tab_key))) : '';\n\t\t\t\t$active_class = !empty($tabs_enabled) && !empty($_GET['em_tab']) && $_GET['em_tab'] == $tab_key ? 'nav-tab-active':'';\n\t\t\t\techo \"<a href='$tab_link#$tab_key' id='em-menu-$tab_key' class='nav-tab $active_class'>$tab_name</a>\";\n\t\t\t}\n\t\t\t?>\n\t\t</h2>\n\t\t<?php echo $EM_Notices; ?>\n\t\t<form id=\"em-options-form\" method=\"post\" action=\"\">\n\t\t\t<div class=\"metabox-holder\"> \n\t\t\t<!-- // TODO Move style in css -->\n\t\t\t<div class='postbox-container' style='width: 99.5%'>\n\t\t\t<div id=\"\">\n\t\t\t<?php if( !$tabs_enabled || ($tabs_enabled && (empty($_REQUEST['em_tab']) || $_REQUEST['em_tab'] == 'general')) ): //make less changes for now, since we don't have any core tabs to add yet ?>\n\t\t \t<div class=\"em-menu-general em-menu-group\">\n\t\t\t\t<div class=\"postbox \" id=\"em-opt-ms-options\" >\n\t\t\t\t\t<div class=\"handlediv\" title=\"<?php __('Click to toggle', 'events-manager'); ?>\"><br /></div><h3><span><?php _e ( 'Multi Site Options', 'events-manager'); ?></span></h3>\n\t\t\t\t\t<div class=\"inside\">\n\t\t\t <table class=\"form-table\">\n\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\tem_options_radio_binary ( __( 'Enable global tables mode?', 'events-manager'), 'dbem_ms_global_table', __( 'Setting this to yes will make all events save in the main site event tables (EM must also be activated). This allows you to share events across different blogs, such as showing events in your network whilst allowing users to display and manage their events within their own blog. Bear in mind that activating this will mean old events created on the sub-blogs will not be accessible anymore, and if you switch back they will be but new events created during global events mode will only remain on the main site.','events-manager') );\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<tbody class=\"em-global-options\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tglobal $current_site;\n\t\t\t\t\t\t\t$global_slug_tip = __('%s belonging to other sub-sites will have an extra slug prepended to it so that your main site can differentiate between its own %s and those belonging to other sites in your network.','events-manager');\n\t\t\t\t\t\t\t$global_link_tip = __( 'When displaying global %s on the main site you have the option of users viewing the %s details on the main site or being directed to the sub-site.','events-manager');\n\t\t\t\t\t\t\t$global_post_tip = __( 'Displays %s from all sites on the network by default. You can still restrict %s by blog using shortcodes and template tags coupled with the <code>blog</code> attribute. Requires global tables to be turned on.','events-manager');\n\t\t\t\t\t\t\t$global_link_tip2 = __('You <strong>must</strong> have assigned a %s page in your <a href=\"%s\">main blog settings</a> for this to work.','events-manager');\n\t\t\t\t\t\t\t$options_page_link = get_admin_url($current_site->blog_id, 'edit.php?post_type='.EM_POST_TYPE_EVENT.'&page=events-manager-options#pages');\n\t\t\t\t\t\t\t?><tr class=\"em-header\"><td><h4><?php echo sprintf(__('%s Options','events-manager'),__('Event','events-manager')); ?></h4></td></tr><?php\n\t\t\t\t\t\t\tem_options_radio_binary ( sprintf(__( 'Display global events on main blog?', 'events-manager'), __('events','events-manager')), 'dbem_ms_global_events', sprintf($global_post_tip, __('events','events-manager'), __('events','events-manager')) );\n\t\t\t\t\t\t\tem_options_radio_binary ( sprintf(__( 'Link sub-site %s directly to sub-site?', 'events-manager'), __('events','events-manager')), 'dbem_ms_global_events_links', sprintf($global_link_tip, __('events','events-manager'), __('event','events-manager')).sprintf($global_link_tip2, __('event','events-manager'), $options_page_link) );\n\t\t\t\t\t\t\tem_options_input_text ( sprintf(__( 'Global %s slug', 'events-manager'),__('event','events-manager')), 'dbem_ms_events_slug', sprintf($global_slug_tip, __('Events','events-manager'), __('events','events-manager')).__('Example:','events-manager').'<code>http://yoursite.com/events/<strong>event</strong>/subsite-event-slug/', EM_EVENT_SLUG );\n\t\t\t\t\t\t\t?><tr class=\"em-header\"><td><h4><?php echo sprintf(__('%s Options','events-manager'),__('Location','events-manager')); ?></h4></td></tr><?php\n\t\t\t\t\t\t\tem_options_radio_binary ( sprintf(__( 'Locations on main blog?', 'events-manager'), __('locations','events-manager')), 'dbem_ms_mainblog_locations', __('If you would prefer all your locations to belong to your main blog, users in sub-sites will still be able to create locations, but the actual locations are created and reside in the main blog.','events-manager') );\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t<tbody class=\"em-global-options em-global-locations\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tem_options_radio_binary ( sprintf(__( 'Display global %s on main blog?', 'events-manager'), __('locations','events-manager')), 'dbem_ms_global_locations', sprintf($global_post_tip, __('locations','events-manager'), __('locations','events-manager')) );\n\t\t\t\t\t\t\tem_options_radio_binary ( sprintf(__( 'Link sub-site %s directly to sub-site?', 'events-manager'), __('locations','events-manager')), 'dbem_ms_global_locations_links', sprintf($global_link_tip, __('locations','events-manager'), __('location','events-manager')).sprintf($global_link_tip2, __('location','events-manager'), $options_page_link) );\n\t\t\t\t\t\t\tem_options_input_text ( sprintf(__( 'Global %s slug', 'events-manager'),__('location','events-manager')), 'dbem_ms_locations_slug', sprintf($global_slug_tip, __('Locations','events-manager'), __('locations','events-manager')).__('Example:','events-manager').'<code>http://yoursite.com/locations/<strong>location</strong>/subsite-location-slug/', EM_LOCATION_SLUG );\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t<?php echo $save_button; ?>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t \n\t\t\t\t\t</div> <!-- . inside --> \n\t\t\t\t</div> <!-- .postbox --> \n\t\t\t\t\n\t\t\t\t<?php \n\t\t\t\t//including shared MS/non-MS boxes\n\t\t\t\tem_admin_option_box_caps();\n\t\t\t\tem_admin_option_box_image_sizes();\n\t\t\t\tem_admin_option_box_email();\n\t\t\t\tem_admin_option_box_uninstall();\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t<?php do_action('em_ms_options_page_footer'); ?>\n\t\t\t</div> <!-- .em-menu-general -->\n\t\t\t<?php endif; ?>\n\t\t\t<?php\n\t\t\t//other tabs\n\t\t\tif( $tabs_enabled ){\n\t\t\t\tif( array_key_exists($_REQUEST['em_tab'], $custom_tabs) ){\n\t\t\t\t\t?>\n\t\t\t\t\t<div class=\"em-menu-bookings em-menu-group\">\n\t\t\t\t\t\t<?php do_action('em_ms_options_page_tab_'. $_REQUEST['em_tab']); ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tforeach( $custom_tabs as $tab_key => $tab_name ){\n\t\t\t\t\t?>\n\t\t\t\t\t<div class=\"em-menu-<?php echo esc_attr($tab_key) ?> em-menu-group\" style=\"display:none;\">\n\t\t\t\t\t\t<?php do_action('em_ms_options_page_tab_'. $tab_key); ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}\n\t\t\t?>\n\n\t\t\t<p class=\"submit\">\n\t\t\t\t<input type=\"submit\" class=\"button-primary\" name=\"Submit\" value=\"<?php esc_attr_e( 'Save Changes', 'events-manager'); ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"em-submitted\" value=\"1\" />\n\t\t\t\t<input type=\"hidden\" name=\"_wpnonce\" value=\"<?php echo wp_create_nonce('events-manager-options'); ?>\" />\n\t\t\t</p> \n\t\t\t\n\t\t\t</div> <!-- .metabox-sortables -->\n\t\t\t</div> <!-- .postbox-container -->\n\t\t\t\n\t\t\t</div> <!-- .metabox-holder -->\t\n\t\t</form>\n\t</div>\n\t<?php\n}", "function optionsframework_options() {\n\n\t$options = array();\n\t$options[] = array(\n\t\t'name' => __('Logo Upload', 'options_check'),\n\t\t'desc' => __('Logo Upload', 'options_check'),\n\t\t'id' => 'logo_upload',\n\t\t'type' => 'upload');\n\n\t$options[] = array(\n\t\t'name' => __('Footer Copyright', 'options_check'),\n\t\t'desc' => __('text input field.', 'options_check'),\n\t\t'id' => 'footer_copyright',\n\t\t'std' => 'Text',\n\t\t'class' => 'mini',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Blog description', 'options_check'),\n\t\t'desc' => __('Blog description.', 'options_check'),\n\t\t'id' => 'blog_description',\n\t\t'std' => 'Default Text',\n\t\t'type' => 'textarea');\n\n\t/**\n\t * For $settings options see:\n\t * http://codex.wordpress.org/Function_Reference/wp_editor\n\t *\n\t * 'media_buttons' are not supported as there is no post to attach items to\n\t * 'textarea_name' is set by the 'id' you choose\n\t */\n\n\n\treturn $options;\n}", "public function save_settings( $settings ) {\n\t\t$settings['_multiwidget'] = 1;\n\t\tupdate_option( $this->option_name, $settings );\n\t}", "public function add_options() {\n\t\t$types = get_option( 'ibx_docs_type' );\n\t\tif ( ! empty( $types ) ) {\n\t\t\t$docs_option = maybe_unserialize( $types );\n\t\t} else {\n\t\t\t$docs_option = array();\n\t\t}\n\n\t\tif (\n\t\t\t! isset( $_POST['docs_generate_nonce'] )\n\t\t\t|| ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['docs_generate_nonce'] ) ), 'docs__form_save' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t$post_title = '';\n\t\t$post_slug = '';\n\t\t// process form data.\n\t\tif ( isset( $_POST['title'] ) ) {\n\t\t\t$post_title = sanitize_text_field( wp_unslash( $_POST['title'] ) );\n\t\t\tif ( isset( $_POST['slug'] ) && ! empty( $_POST['slug'] ) ) {\n\t\t\t\t$post_slug = sanitize_text_field( wp_unslash( $_POST['slug'] ) );\n\t\t\t} else {\n\t\t\t\t$post_slug = sanitize_title_with_dashes( $post_title );\n\t\t\t}\n\t\t}\n\n\t\t$docs_option[ $post_slug ] = array(\n\t\t\t'title' => $post_title,\n\t\t\t'slug' => $post_slug,\n\t\t);\n\n\t\tupdate_option( 'ibx_docs_type', maybe_serialize( $docs_option ) );\n\t}", "public function save()\n\t{\n\t\t$old_options = get_option($this->filterName);\n\t\t//create new options\n\t\t$this->options = is_array($old_options) ? array_merge($old_options, $this->options) : $this->options;\n\t\t\n\t\t//verify default value\n\t\t$this->defaultOptions($this->options);\n\t\tupdate_option($this->filterName, $this->options);\n\t}", "protected function _saveOptions(): void\n {\n if ($this->_search->hasOption(Search::OPTION_SCROLL)) {\n $this->_options[0] = $this->_search->getOption(Search::OPTION_SCROLL);\n }\n\n if ($this->_search->hasOption(Search::OPTION_SCROLL_ID)) {\n $this->_options[1] = $this->_search->getOption(Search::OPTION_SCROLL_ID);\n }\n\n if ($this->_search->hasOption(Search::OPTION_SEARCH_IGNORE_UNAVAILABLE)) {\n $isNotInitial = (null !== $this->_options[2]);\n $this->_options[2] = $this->_search->getOption(Search::OPTION_SEARCH_IGNORE_UNAVAILABLE);\n\n // remove ignore_unavailable from options if not initial search\n if ($isNotInitial) {\n $searchOptions = $this->_search->getOptions();\n unset($searchOptions[Search::OPTION_SEARCH_IGNORE_UNAVAILABLE]);\n $this->_search->setOptions($searchOptions);\n }\n }\n }", "public function save_options_menu() {\n if ( !isset($_REQUEST['cs_nonce']) ) return;\n if ( !isset($_REQUEST['cs_options']) ) return;\n if ( !isset($_REQUEST['cs_page']) ) return;\n if ( !wp_verify_nonce( stripslashes($_REQUEST['cs_nonce']), 'save-caseswap-options') ) return;\n\n $section = stripslashes( $_REQUEST['cs_page'] );\n if ( !isset($this->option_pages[$section]) ) return;\n\n $options = $this->get_options();\n $submitted = $this->get_options( stripslashes_deep($_REQUEST['cs_options']) );\n\n // We only want to save the updated options for the page we clicked \"Save changes\" for.\n foreach( $this->option_pages[$section]['fields'] as $key ) {\n if ( isset($submitted[$key]) ) {\n $options[$key] = $submitted[$key];\n }else{\n $options[$key] = false;\n }\n }\n\n // Save the updated options\n update_option( 'caseswap-options', $options );\n\n $args = apply_filters( 'caseswap-options-saved-redirect-args', array('cs_page' => $section, 'cs_message' => 'options-saved'), $this );\n\n wp_redirect( add_query_arg( $args, $this->options_page_url) );\n exit;\n }", "public function handle_post_action_options() {\n\t\tIggoGrid::check_nonce( 'options' );\n\n\t\tif ( ! current_user_can( 'iggogrid_access_options_screen' ) ) {\n\t\t\twp_die( __( 'You do not have sufficient permissions to access this page.', 'default' ) );\n\t\t}\n\n\t\tif ( empty( $_POST['options'] ) || ! is_array( $_POST['options'] ) ) {\n\t\t\tIggoGrid::redirect( array( 'action' => 'options', 'message' => 'error_save' ) );\n\t\t} else {\n\t\t\t$posted_options = wp_unslash( $_POST['options'] );\n\t\t}\n\n\t\t// Valid new options that will be merged into existing ones\n\t\t$new_options = array();\n\n\t\t// Check each posted option value, and (maybe) add it to the new options\n\t\tif ( ! empty( $posted_options['admin_menu_parent_page'] ) && '-' != $posted_options['admin_menu_parent_page'] ) {\n\t\t\t$new_options['admin_menu_parent_page'] = $posted_options['admin_menu_parent_page'];\n\t\t\t// re-init parent information, as IggoGrid::redirect() URL might be wrong otherwise\n\t\t\t/** This filter is documented in classes/class-controller.php */\n\t\t\t$this->parent_page = apply_filters( 'iggogrid_admin_menu_parent_page', $posted_options['admin_menu_parent_page'] );\n\t\t\t$this->is_top_level_page = in_array( $this->parent_page, array( 'top', 'middle', 'bottom' ), true );\n\t\t}\n\t\tif ( ! empty( $posted_options['plugin_language'] ) && '-' != $posted_options['plugin_language'] ) {\n\t\t\t// only allow \"auto\" language and all values that have a translation\n\t\t\tif ( 'auto' == $posted_options['plugin_language'] || array_key_exists( $posted_options['plugin_language'], $this->get_plugin_languages() ) ) {\n\t\t\t\t$new_options['plugin_language'] = $posted_options['plugin_language'];\n\t\t\t}\n\t\t}\n\n\t\t// Custom CSS can only be saved if the user is allowed to do so\n\t\t$update_custom_css_files = false;\n\t\tif ( current_user_can( 'iggogrid_edit_options' ) ) {\n\t\t\t// Checkbox\n\t\t\t$new_options['use_custom_css'] = ( isset( $posted_options['use_custom_css'] ) && 'true' === $posted_options['use_custom_css'] );\n\n\t\t\tif ( isset( $posted_options['custom_css'] ) ) {\n\t\t\t\t$new_options['custom_css'] = $posted_options['custom_css'];\n\n\t\t\t\t$iggogrid_css = IggoGrid::load_class( 'IggoGrid_CSS', 'class-css.php', 'classes' );\n\t\t\t\t$new_options['custom_css'] = $iggogrid_css->sanitize_css( $new_options['custom_css'] ); // Sanitize and tidy up Custom CSS\n\t\t\t\t$new_options['custom_css_minified'] = $iggogrid_css->minify_css( $new_options['custom_css'] ); // Minify Custom CSS\n\n\t\t\t\t// Maybe update CSS files as well\n\t\t\t\t$custom_css_file_contents = $iggogrid_css->load_custom_css_from_file( 'normal' );\n\t\t\t\tif ( false === $custom_css_file_contents ) {\n\t\t\t\t\t$custom_css_file_contents = '';\n\t\t\t\t}\n\t\t\t\tif ( $new_options['custom_css'] !== $custom_css_file_contents ) { // don't write to file if it already has the desired content\n\t\t\t\t\t$update_custom_css_files = true;\n\t\t\t\t\t// Set to false again. As it was set here, it will be set true again, if file saving succeeds\n\t\t\t\t\t$new_options['use_custom_css_file'] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// save gathered new options (will be merged into existing ones), and flush caches of caching plugins, to make sure that the new Custom CSS is used\n\t\tif ( ! empty( $new_options ) ) {\n\t\t\tIggoGrid::$model_options->update( $new_options );\n\t\t\tIggoGrid::$model_table->_flush_caching_plugins_caches();\n\t\t}\n\n\t\tif ( $update_custom_css_files ) { // capability check is performed above\n\t\t\tIggoGrid::redirect( array( 'action' => 'options', 'item' => 'save_custom_css' ), true );\n\t\t}\n\n\t\tIggoGrid::redirect( array( 'action' => 'options', 'message' => 'success_save' ) );\n\t}", "public function configure()\n {\n if (sfContext::getInstance()->getModuleName() == 'file') {\n unset($this['judge_id'], $this['result'], $this['instruction'], \n $this['user_file_id'], $this['court_note_id'], $this['coordinator_id'],\n $this['barrister_id'], $this['appearing_type_id']/*, $this['appearing_id']*/\n );\n \n $this->widgetSchema['appearing_id']->setOption('method', 'obtainFullName');\n $this->widgetSchema['appearing_id']->setOption('table_method', 'getSolicitorsCB');\n \n $this->widgetSchema['court_id']->setAttribute('style', 'width:200px');\n $this->widgetSchema['listing_id']->setAttribute('style', 'width:150px');\n }\n else {\n //unset($this['coordinator_id']);\n $this->widgetSchema['result']->setAttributes(array('cols' => '70', 'rows' => '12'));\n $this->widgetSchema['user_file_id']->setOption('method', 'getClientName');\n $this->widgetSchema['court_note_id']->setLabel('Note');\n \n $this->widgetSchema['instruction'] = new sfWidgetFormTextarea(array(), array('cols' => '70', 'rows' => '4'));\n \n $this->widgetSchema['judge_id'] = new sfWidgetFormAjaxDoctrineChoice(array(\n 'model' => $this->getRelatedModelName('Judge'), \n 'form_module' => 'judge', \n 'add_empty' => true,\n 'method' => 'obtainFullName',\n 'table_method' => 'getJudgesCB'\n ));\n \n $this->widgetSchema['judge_id']->setLabel('Before');\n $this->validatorSchema['judge_id']->setOption('required', false);\n //$this->widgetSchema['judge_id']->setOption('method', 'obtainFullName');\n //$this->widgetSchema['judge_id']->setOption('table_method', 'getJudgesCB');\n \n $this->widgetSchema['appearing_id'] = new sfWidgetFormAjaxDoctrineChoice(array(\n 'model' => $this->getRelatedModelName('Appearing'), \n 'form_module' => 'user?_frm=MyAccount', \n 'add_empty' => true,\n 'method' => 'obtainFullName',\n 'table_method' => 'getSolicitorsCB'\n ));\n \n // added by William, 26/05/2013: add barrister\n $this->widgetSchema['barrister_id'] = new sfWidgetFormAjaxDoctrineChoice(array(\n 'model' => $this->getRelatedModelName('Barrister'), \n 'form_module' => 'user?_frm=MyAccount', \n 'add_empty' => true,\n 'method' => 'obtainFullName',\n 'table_method' => 'getBarristersCB'\n ));\n \n //$this->widgetSchema['appearing_id']->setOption('method', 'obtainFullName');\n //$this->widgetSchema['appearing_id']->setOption('table_method', 'getSolicitorsCB');\n \n // for the add/edit button widget\n if (!sfContext::getInstance()->getRequest()->getParameter('shbx') ) {\n $this->widgetSchema['court_id'] = new sfWidgetFormAjaxDoctrineChoice(array(\n 'model' => 'Agency', \n 'form_module' => 'agency?code=COU', \n 'add_empty' => true,\n ));\n }\n \n // for the add/edit button widget\n //if (!sfContext::getInstance()->getRequest()->getParameter('shbx') ) {\n $this->widgetSchema['listing_id'] = new sfWidgetFormAjaxDoctrineChoice(array(\n 'model' => 'Listing', \n 'form_module' => 'listing', \n 'add_empty' => true,\n 'order_by' => array('name', 'asc') \n ));\n \n $this->widgetSchema['court_note_id'] = new sfWidgetFormAjaxDoctrineChoice(array(\n 'model' => 'CourtNote', \n 'form_module' => 'courtNote', \n 'add_empty' => true,\n 'method' => 'getValue',\n 'order_by' => array('value', 'asc') \n ));\n //}\n \n $this->hideField('user_file_id');\n \n $this->addFee();\n $this->widgetSchema['Fee']->setLabel(false);\n }\n \n // add class to year to validate past dates\n $this->widgetSchema['date']->setAttribute('class', 'validateYear');\n\n // set method to load values to show\n $this->widgetSchema['court_id']->setOption('table_method', 'getCourtsCB');\n \n //$this->widgetSchema['coordinator_id']->setOption('method', 'obtainFullName');\n //$this->widgetSchema['coordinator_id']->setOption('table_method', 'getCoordinatorsCB');\n \n if (sfContext::getInstance()->getModuleName() == 'file') {\n // remove emptys\n $this->widgetSchema['court_id']->setOption('add_empty', false);\n }\n \n // sort some dropboxes\n $this->widgetSchema['listing_id']->addOption('order_by', array('name', 'asc'));\n \n // adding some extra validators\n //$this->widgetSchema['time'] = new sfWidgetFormTime();\n $this->widgetSchema['time'] = $this->formattedWidgetFormTime();\n $this->validatorSchema['time'] = new sfValidatorTime(array('required' => false));\n $this->validatorSchema['court_id']->setOption('required', true);\n \n /*$this->validatorSchema->setPostValidator(\n new sfValidatorCallback(array('callback' => array($this, 'setSpecialValues')))\n );*/\n $this->validatorSchema->setPostValidator(new sfValidatorAnd(array(\n new sfValidatorCallback(array('callback' => array($this, 'setSpecialValues'))),\n new sfValidatorCallback(array('callback' => array($this, 'setSpecialFeeValues')))\n )));\n \n // adding asterisk for required fields\n $this->setAsteriskForRequiredFields();\n \n // this formatting is applied only if form is called directly, without admin generator templates\n $first = ($this->getOption('first') !== null) ? $this->getOption('first') : false;\n $custom_decorator = new ExtendedFormSchemaFormatter($this->getWidgetSchema(), array('header' => $first));\n $this->widgetSchema->addFormFormatter('Myformatter', $custom_decorator);\n $this->widgetSchema->setFormFormatterName('Myformatter');\n }", "public function options_update() {\n\t\tregister_setting( $this->plugin_name, $this->plugin_name, array($this, 'validate', 'default' => array( \"url_nerd_instance\" => \"\", \"category_weight\" => \"0.04\", \"entity_weight\" => \"0.7\" ) ) );\n\t}", "function handleOptions ()\n\t{\n\t\t$default_options = $this->default_options;\n\n\t\t// Get options from WP options\n\t\t$options_from_table = get_option( $this->db_options_name_core );\n\n\t\tif ( empty( $options_from_table ) ) {\n\t\t\t$options_from_table = $this->default_options; // New installation\n\t\t} else {\n\n\t\t\t// As of version 2.2 I changed the way I store the default options.\n\t\t\t// I need to upgrade the options before setting the options but we don't update the version yet.\n\t\t\tif ( ! $options_from_table['general'] ) {\n\t\t\t\t$this->upgradeDefaultOptions_2_2();\n\t\t\t\t$options_from_table = get_option( $this->db_options_name_core ); // Get the new options\n\t\t\t}\n\n\t\t\t// Update default options by getting not empty values from options table\n\t\t\tforeach ( $default_options as $section_key => $section_array ) {\n\t\t\t\tforeach ( $section_array as $name => $value ) {\n\n\t\t\t\t\tif ( isset( $options_from_table[$section_key][$name] ) && (! is_null( $options_from_table[$section_key][$name] )) ) {\n\t\t\t\t\t\tif ( is_int( $value ) ) {\n\t\t\t\t\t\t\t$default_options[$section_key][$name] = ( int ) $options_from_table[$section_key][$name];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$default_options[$section_key][$name] = $options_from_table[$section_key][$name];\n\t\t\t\t\t\t\tif ( 'associated_id' == $name ) {\n\t\t\t\t\t\t\t\tif ( 'blogavirtualh-20' == $options_from_table[$section_key][$name] )\n\t\t\t\t\t\t\t\t\t$default_options[$section_key][$name] = 'avh-amazon-20';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If a newer version is running do upgrades if neccesary and update the database.\n\t\t\tif ( $this->version > $options_from_table['general']['version'] ) {\n\t\t\t\t// Starting with version 2.1 I switched to a new way of storing the widget options in the database. We need to convert these.\n\t\t\t\tif ( $options_from_table['general']['version'] < '2.1' ) {\n\t\t\t\t\t$this->upgradeWidgetOptions_2_1();\n\t\t\t\t}\n\n\t\t\t\tif ( $options_from_table['general']['version'] < '2.4' ) {\n\t\t\t\t\t$this->doRemoveCacheFolder();\n\t\t\t\t}\n\t\t\t\tif ( $options_from_table['general']['version'] < '3.0' ) {\n\t\t\t\t\t$this->upgradeWidgetSettings_3_0();\n\t\t\t\t}\n\n\t\t\t\t// Write the new default options and the proper version to the database\n\t\t\t\t$default_options['general']['version'] = $this->version;\n\t\t\t\tupdate_option( $this->db_options_name_core, $default_options );\n\t\t\t}\n\t\t}\n\t\t// Set the class property for options\n\t\t$this->options = $default_options;\n\t}", "public function customizer_widget_appearance()\r\n\t{\r\n\t\t\r\n\t\t$array_customizer = array();\t\t\r\n\t\t$widget_id = $_POST['p_id'];\t\t\r\n\t\t\t\t\r\n\t\t$widget_post_types = \"\";\r\n\t\tif($widget_id==5) //my posts widgets\r\n\t\t{\r\n\t\t\t$str_types = \"\";\r\n\t\t\t$widget_post_types = $_POST['widget_post_type_list'];\r\n\t\t\t$ii = 0;\r\n\t\t\t\r\n\t\t\tforeach($widget_post_types as $type)\r\n\t\t\t{\r\n\t\t\t\t//echo $type[\"value\"];\r\n\t\t\t\t$str_types .= $type[\"value\"];\r\n\t\t\t\t\r\n\t\t\t\tif(count($widget_post_types)-1>$ii)\r\n\t\t\t\t{\r\n\t\t\t\t\t$str_types .= \",\";\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$ii++;\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$array_customizer = array('widget_header_bg_color' =>$_POST['widget_header_bg_color'], 'widget_bg_color' =>$_POST['widget_bg_color'] ,'widget_header_text_color' =>$_POST['widget_header_text_color'] ,'widget_text_color' =>$_POST['widget_text_color'] ,'widget_transparent' =>$_POST['widget_transparent'] ,'widget_title' =>$_POST['widget_title'],'widget_post_types' =>$str_types);\r\n\t\t\r\n\t\t$widget_customization = serialize($array_customizer);\t\t\r\n\t\t$widget = 'uultra_widget_customing_'.$widget_id;\t\t\t\r\n\t\tupdate_option($widget,$widget_customization);\r\n\t\t\r\n\t\t//update widget properties only if it's a custom widget\r\n\t\t\r\n\t\tif($this->uultra_check_if_custom_widget($widget_id) && isset($_POST['uultra_add_mod_widget_title']) && $_POST['uultra_add_mod_widget_title'] !=\"\" )\t{\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//update widget array\t\r\n\t\t\t\r\n\t\t\t$custom_widgets = get_option('userultra_custom_user_widgets');\r\n\t\t\t\r\n\t\t\t$custom_widgets[$widget_id]['title'] = $_POST['uultra_add_mod_widget_title'];\r\n\t\t\t$custom_widgets[$widget_id]['type'] = $_POST['uultra_add_mod_widget_type'];\r\n\t\t\t$custom_widgets[$widget_id]['editable'] = $_POST['uultra_add_mod_widget_editable'];\r\n\t\t\t$custom_widgets[$widget_id]['content'] = $_POST['uultra_add_mod_widget_content'];\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\tupdate_option('userultra_custom_user_widgets', $custom_widgets);\r\n\t\t\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\techo __(\"Settings has been udpated! \", \"xoousers\");\r\n\t\tdie();\r\n\t\r\n\t}", "function widget_sandbox_rsslinks_control() {\n\t$options = $newoptions = get_option('widget_sandbox_rsslinks');\n\tif ( $_POST['rsslinks-submit'] ) {\n\t\t$newoptions['title'] = strip_tags( stripslashes( $_POST['rsslinks-title'] ) );\n\t}\n\tif ( $options != $newoptions ) {\n\t\t$options = $newoptions;\n\t\tupdate_option( 'widget_sandbox_rsslinks', $options );\n\t}\n\t$title = attribute_escape( $options['title'] );\n?>\n\t\t\t<p><label for=\"rsslinks-title\"><?php _e( 'Title:', 'sandbox' ) ?> <input class=\"widefat\" id=\"rsslinks-title\" name=\"rsslinks-title\" type=\"text\" value=\"<?php echo $title; ?>\" /></label></p>\n\t\t\t<input type=\"hidden\" id=\"rsslinks-submit\" name=\"rsslinks-submit\" value=\"1\" />\n<?php\n}", "function widget_ffes_feed_control() {\r\n $options = $newoptions = get_option('widget_ffes_feed');\r\n if ( $_POST['ffes-feed-submit'] ) {\r\n $newoptions['title'] = strip_tags(stripslashes($_POST['ffes-feed-title']));\r\n }\r\n if ( $options != $newoptions ) {\r\n $options = $newoptions;\r\n update_option('widget_ffes_feed', $options);\r\n }\r\n ?>\r\n <div style=\"text-align:right\">\r\n <label for=\"ffes-feed-title\" style=\"line-height:35px;display:block;\"><?php _e('Widget title:', 'ffes_widgets'); ?>\r\n <input type=\"text\" id=\"ffes-feed-title\" name=\"ffes-feed-title\" value=\"<?php echo wp_specialchars($options['title'], true); ?>\" /></label>\r\n <input type=\"hidden\" name=\"ffes-feed-submit\" id=\"ffes-feed-submit\" value=\"1\" />\r\n </div>\r\n <?php\r\n }", "function theme_options_do_page() {\n\tglobal $select_options, $radio_options;\n\n\tif ( ! isset( $_REQUEST['settings-updated'] ) )\n\t\t$_REQUEST['settings-updated'] = false;\n\n\t?>\n\t<div class=\"wrap\">\n\t\t<?php screen_icon(); echo \"<h2>\" . get_current_theme() . ' -- ' . __( 'Theme Options', 'htmlks4wp' ) . \"</h2>\"; ?>\n\n\t\t<?php if ( false !== $_REQUEST['settings-updated'] ) : ?>\n\t\t<div class=\"updated fade\"><p><strong><?php _e( 'Options saved', 'htmlks4wp' ); ?></strong></p></div>\n\t\t<?php endif; ?>\n\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields( 'htmlks4wp_options' ); ?>\n\t\t\t<?php $options = get_option( 'htmlks4wp_theme_options' ); ?>\n\n\t\t\t<table class=\"form-table\">\n\n\t\t\t\t<?php\n\t\t\t\t/**\n\t\t\t\t * [header] Google analytics code\n\t\t\t\t */\n\t\t\t\t?>\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( '[header] Google analytics code', 'htmlks4wp' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input id=\"htmlks4wp_theme_options[gacode]\" class=\"regular-text\" type=\"text\" name=\"htmlks4wp_theme_options[gacode]\" value=\"<?php esc_attr_e( $options['gacode'] ); ?>\" />\n\t\t\t\t\t\t<label class=\"description\" for=\"htmlks4wp_theme_options[gacode]\"><?php _e( '(e.g. \"UA-5668xxxx-1\", etc.)', 'htmlks4wp' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<?php\n\t\t\t\t/**\n\t\t\t\t * [footer] Year(s) in the copyright\n\t\t\t\t */\n\t\t\t\t?>\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( '[footer] Year(s) in the copyright', 'htmlks4wp' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input id=\"htmlks4wp_theme_options[copyrightyear]\" class=\"regular-text\" type=\"text\" name=\"htmlks4wp_theme_options[copyrightyear]\" value=\"<?php esc_attr_e( $options['copyrightyear'] ); ?>\" />\n\t\t\t\t\t\t<label class=\"description\" for=\"htmlks4wp_theme_options[copyrightyear]\"><?php _e( '(e.g. \"2015\", \"2010-2015\", etc.)', 'htmlks4wp' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<?php\n\t\t\t\t/**\n\t\t\t\t * [footer] Sitename in the copyright\n\t\t\t\t */\n\t\t\t\t?>\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( '[footer] Sitename in the copyright', 'htmlks4wp' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input id=\"htmlks4wp_theme_options[copyrightname]\" class=\"regular-text\" type=\"text\" name=\"htmlks4wp_theme_options[copyrightname]\" value=\"<?php esc_attr_e( $options['copyrightname'] ); ?>\" />\n\t\t\t\t\t\t<label class=\"description\" for=\"htmlks4wp_theme_options[copyrightname]\"><?php _e( 'Your sitename', 'htmlks4wp' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<?php\n\t\t\t\t/**\n\t\t\t\t * A sample checkbox option\n\t\t\t\t */\n\t\t\t\t?>\n\t\t\t\t<tr valign=\"top\" style=\"display: none;\"><th scope=\"row\"><?php _e( 'A checkbox', 'htmlks4wp' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input id=\"htmlks4wp_theme_options[option1]\" name=\"htmlks4wp_theme_options[option1]\" type=\"checkbox\" value=\"1\" <?php checked( '1', $options['option1'] ); ?> />\n\t\t\t\t\t\t<label class=\"description\" for=\"htmlks4wp_theme_options[option1]\"><?php _e( 'Sample checkbox', 'htmlks4wp' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<?php\n\t\t\t\t/**\n\t\t\t\t * A sample text input option\n\t\t\t\t */\n\t\t\t\t?>\n\t\t\t\t<tr valign=\"top\" style=\"display: none;\"><th scope=\"row\"><?php _e( 'Some text', 'htmlks4wp' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input id=\"htmlks4wp_theme_options[sometext]\" class=\"regular-text\" type=\"text\" name=\"htmlks4wp_theme_options[sometext]\" value=\"<?php esc_attr_e( $options['sometext'] ); ?>\" />\n\t\t\t\t\t\t<label class=\"description\" for=\"htmlks4wp_theme_options[sometext]\"><?php _e( 'Sample text input', 'htmlks4wp' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<?php\n\t\t\t\t/**\n\t\t\t\t * A sample select input option\n\t\t\t\t */\n\t\t\t\t?>\n\t\t\t\t<tr valign=\"top\" style=\"display: none;\"><th scope=\"row\"><?php _e( 'Select input', 'htmlks4wp' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<select name=\"htmlks4wp_theme_options[selectinput]\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t$selected = $options['selectinput'];\n\t\t\t\t\t\t\t\t$p = '';\n\t\t\t\t\t\t\t\t$r = '';\n\n\t\t\t\t\t\t\t\tforeach ( $select_options as $option ) {\n\t\t\t\t\t\t\t\t\t$label = $option['label'];\n\t\t\t\t\t\t\t\t\tif ( $selected == $option['value'] ) // Make default first in list\n\t\t\t\t\t\t\t\t\t\t$p = \"\\n\\t<option style=\\\"padding-right: 10px;\\\" selected='selected' value='\" . esc_attr( $option['value'] ) . \"'>$label</option>\";\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t$r .= \"\\n\\t<option style=\\\"padding-right: 10px;\\\" value='\" . esc_attr( $option['value'] ) . \"'>$label</option>\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\techo $p . $r;\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t\t<label class=\"description\" for=\"htmlks4wp_theme_options[selectinput]\"><?php _e( 'Sample select input', 'htmlks4wp' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<?php\n\t\t\t\t/**\n\t\t\t\t * A sample of radio buttons\n\t\t\t\t */\n\t\t\t\t?>\n\t\t\t\t<tr valign=\"top\" style=\"display: none;\"><th scope=\"row\"><?php _e( 'Radio buttons', 'htmlks4wp' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<fieldset><legend class=\"screen-reader-text\"><span><?php _e( 'Radio buttons', 'htmlks4wp' ); ?></span></legend>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tif ( ! isset( $checked ) )\n\t\t\t\t\t\t\t\t$checked = '';\n\t\t\t\t\t\t\tforeach ( $radio_options as $option ) {\n\t\t\t\t\t\t\t\t$radio_setting = $options['radioinput'];\n\n\t\t\t\t\t\t\t\tif ( '' != $radio_setting ) {\n\t\t\t\t\t\t\t\t\tif ( $options['radioinput'] == $option['value'] ) {\n\t\t\t\t\t\t\t\t\t\t$checked = \"checked=\\\"checked\\\"\";\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$checked = '';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<label class=\"description\"><input type=\"radio\" name=\"htmlks4wp_theme_options[radioinput]\" value=\"<?php esc_attr_e( $option['value'] ); ?>\" <?php echo $checked; ?> /> <?php echo $option['label']; ?></label><br />\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<?php\n\t\t\t\t/**\n\t\t\t\t * A sample textarea option\n\t\t\t\t */\n\t\t\t\t?>\n\t\t\t\t<tr valign=\"top\" style=\"display: none;\"><th scope=\"row\"><?php _e( 'A textbox', 'htmlks4wp' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<textarea id=\"htmlks4wp_theme_options[sometextarea]\" class=\"large-text\" cols=\"50\" rows=\"10\" name=\"htmlks4wp_theme_options[sometextarea]\"><?php echo esc_textarea( $options['sometextarea'] ); ?></textarea>\n\t\t\t\t\t\t<label class=\"description\" for=\"htmlks4wp_theme_options[sometextarea]\"><?php _e( 'Sample text box', 'htmlks4wp' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\n\t\t\t<p class=\"submit\">\n\t\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e( 'Save Options', 'htmlks4wp' ); ?>\" />\n\t\t\t</p>\n\t\t</form>\n\t</div>\n\t<?php\n}", "function update_options() {\n\t\tif ( get_current_blog_id() !== $this->options_blog_id ) {\n\t\t\treturn;\n\t\t}\n\n\t\tupdate_option( $this->option_name, $this->options );\n\t}", "public function config() {\n \n\t\t// Date Utilities\n\t\trequire_once( get_stylesheet_directory(). '/util-functions/date-util-functions.php' );\t\t\n\n\t\t/*\n\t\tglobal $wpdb;\t\t\t\t\n\t\t$results = $wpdb->get_results( \"SELECT * FROM $wpdb->sitemeta \", OBJECT );\t\n\t\techo \"<pre>\".print_r($results,1).\"</pre>\"; \n\t\t */\n\t\t\n\n\t\t//get saved data\t\n\t\tif ( !$widget_options = get_option( self::wid ) )\n\t\t{\n\t\t $widget_options = array();\n\t\t}\n\t\t//echo \"<pre>\".print_r($widget_options,1).\"</pre>\";\n\n\n\t\t//process update\t\n\t\tif ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['red_flag_parking']) ) \n\t\t{\n\t\t\t\n\t\t\t// define validation variables and set them empty values.\n\t\t\t$startingMonthErr = $startingDayErr = $startingYearErr = \"\";\n\t\t\t$startingMeridiemErr = $startingHourErr = $startingMinuteErr = \"\";\n\t\t\t\n\t\t\t$endingMonthErr = $endingDayErr = $endingYearErr = \"\";\n\t\t\t$endingMeridiemErr = $endingHourErr = $endingMinuteErr = \"\";\n\t\t\t\t\n\t\t\t// Error array.\t\t\n\t\t\t$Err = array();\t\n\t\t\t\n\t\t\t// Date Utilities\n\t\t\trequire_once( get_stylesheet_directory(). '/util-functions/date-util-functions.php' );\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t//get saved data\t\n\t\t\tif ( !$widget_options = get_site_option( self::wid ) )\n\t\t\t{\n\t\t\t \n\t\t\t $widget_options = array();\n\t\t\t \n\t\t\t}\n\t\t\t\n\t\t\t// create the starting time for Red Flag.\n\t\t\t$start_datetime = createDateTime(\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['starting_month'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['starting_day'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['starting_year'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['starting_hour'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['starting_minute'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['starting_meridiem']\n\t\t\t\t\t\t);\n\t\t\t$widget_options['start_datetime'] = $start_datetime;\n\t\t\t\n\t\t\t// create the ending time for Red Flag.\n\t\t\t$end_datetime = createDateTime(\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['ending_month'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['ending_day'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['ending_year'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['ending_hour'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['ending_minute'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['ending_meridiem']\n\t\t\t\t\t\t);\n\t\t\t$widget_options['end_datetime'] = $end_datetime;\n\t\t\t\n\t\t\t\n\t\t\t// days remaining for red flag.\n\t\t\t$widget_options['days remaining'] = dateDiff($start_datetime, $end_datetime);\n\t\t\t\n\t\t\t\n\t\t\t// validate start date is less than end date.\n\t\t\tif($start_datetime > $end_datetime)\n\t\t\t{\t\n\t\t\t\t\n\t\t\t\t$Err['datetimeErr'] = \"Starting date is greater than Ending date.\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate start date not in past.\n\t\t\tif(date('Y-m-d H:i:s') >= $start_datetime)\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['startTimeErr'] = \"Starting date is less than today's date.\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate start month is not empty.\t\t\t\t\t\n\t\t\tif(empty($_POST['red_flag_parking']['starting_month']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['startingMonthErr'] = \"Starting month is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$widget_options['starting_month'] = $_POST['red_flag_parking']['starting_month'];\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate start day is not empty.\n\t\t\tif(empty($_POST['red_flag_parking']['starting_day']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['startingDayErr'] = \"Starting day is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$widget_options['starting_day'] = $_POST['red_flag_parking']['starting_day'];\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate start year is not empty.\n\t\t\tif(empty($_POST['red_flag_parking']['starting_year']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['startingYearErr'] = \"Starting year is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\n\t\t\t\t$widget_options['starting_year'] = $_POST['red_flag_parking']['starting_year'];\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate start hour is not empty.\n\t\t\tif(empty($_POST['red_flag_parking']['starting_hour']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['startingHourErr'] = \"Starting hour is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$widget_options['starting_hour'] = $_POST['red_flag_parking']['starting_hour'];\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// no validation required since always 00.\n\t\t\t$widget_options['starting_minute'] = $_POST['red_flag_parking']['starting_minute'];\n\t\t\t\n\t\t\t\n\t\t\t// validate start meridiem is not empty.\n\t\t\tif(empty($_POST['red_flag_parking']['starting_meridiem']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['startingMeridiemErr'] = \"Starting meridiem is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$widget_options['starting_meridiem'] = $_POST['red_flag_parking']['starting_meridiem'];\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate end month is not empty.\n\t\t\tif(empty($_POST['red_flag_parking']['ending_month']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['endingMonthErr'] = \"Ending month is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$widget_options['ending_month'] = $_POST['red_flag_parking']['ending_month'];\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate end day is not empty.\n\t\t\tif(empty($_POST['red_flag_parking']['ending_day']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['endingDayErr'] = \"Ending day is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$widget_options['ending_day'] = $_POST['red_flag_parking']['ending_day'];\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate end year is not empty.\n\t\t\tif(empty($_POST['red_flag_parking']['ending_year']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['endingYearErr'] = \"Ending year is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$widget_options['ending_year'] = $_POST['red_flag_parking']['ending_year'];\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate end hour is not empty.\n\t\t\tif(empty($_POST['red_flag_parking']['ending_hour']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['endingHourErr'] = \"Ending hour is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\t$widget_options['ending_hour'] = $_POST['red_flag_parking']['ending_hour'];\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//no validation required always 00.\n\t\t\t$widget_options['ending_minute'] = $_POST['red_flag_parking']['ending_minute'];\n\t\t\t\n\t\t\t\n\t\t\t// validate end meridiem is not empty.\n\t\t\tif(empty($_POST['red_flag_parking']['ending_meridiem']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['endingMeridiemErr'] = \"Ending meridiem is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$widget_options['ending_meridiem'] = $_POST['red_flag_parking']['ending_meridiem'];\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate reset is zero or value of 1.\n\t\t\tif(empty($_POST['red_flag_parking']['reset']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$widget_options['reset'] = 0;\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$widget_options['reset'] = $_POST['red_flag_parking']['reset'];\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// and not reset then add the current user and active.\n\t\t\tif( empty($Err) ) \n\t\t\t{\t\t\n\t\t\t\t\n\t\t\t\t$widget_options['active'] = 1;\n\t\t\t\t\n\t\t\t\t$current_user = wp_get_current_user();\t\n\t\t\t\t\n\t\t\t\t$widget_options['set_by_user'] = $current_user->user_login;\t\n\t\t\t\t\n\t\t\t}\n\n\t\t\t// delete options.\n\t\t\tif($widget_options['reset'] == 1)\n\t\t\t{\n\t\t\t\t// used to reset \n\t\t\t\tself::delete_dashboard_widget_options( 'red_flag_widget_options' );\n\t\t\t\t\n\t\t\t\t//Red Flag ending time was reached. reset. reset. reset.\t\t\t\n\t\t\n\t\t\t\t//Register default settings...\n\t\t\t\tself::update_dashboard_widget_options(\n\t\t\t\t\tself::wid, //The widget id\n\t\t\t\t\tarray( //Associative array of options & default values\n\t\t\t\t\t\t'remaining_days' => 0,\n\t\t\t\t\t\t'reset' => 0,\n\t\t\t\t\t\t'start_conversion' => 0,\n\t\t\t\t\t\t'start_datetime' => '',\n\t\t\t\t\t\t'end_datetime' => '',\n\t\t\t\t\t\t'starting_year' => '',\n\t\t\t\t\t\t'starting_month' => '',\n\t\t\t\t\t\t'starting_day' => '',\n\t\t\t\t\t\t'starting_hour' => '',\n\t\t\t\t\t\t'starting_minute' => '',\n\t\t\t\t\t\t'starting_meridiem' => '',\n\t\t\t\t\t\t'starting_date' => '',\n\t\t\t\t\t\t'starting_time' => '',\n\t\t\t\t\t\t'ending_year' => '',\n\t\t\t\t\t\t'ending_month' => '',\n\t\t\t\t\t\t'ending_day' => '',\n\t\t\t\t\t\t'ending_hour' => '',\n\t\t\t\t\t\t'ending_minute' => '',\n\t\t\t\t\t\t'ending_meridiem' => '',\n\t\t\t\t\t\t'ending_date' => '',\n\t\t\t\t\t\t'ending_time' => '',\n\t\t\t\t\t\t'set_by_user' => '',\n\t\t\t\t\t\t'active' => 0\n\t\t\t\t\t),\n\t\t\t\t\ttrue //Add only (will not update existing options)\n\t\t\t\t);\n\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t//save update \n\t\t\t\tself::update_dashboard_widget_options( self::wid, $widget_options );\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//echo '<pre>'. print_r($Err,1) .'</pre>';\n\t\t\n\t\t// get widget options from the network database table.\n\t\t$get_widget_options = self::get_dashboard_widget_options('red_flag_parking');\n\t\t\t\t\n\t\t$get_starting_month = $get_widget_options['starting_month'];\n\t\t$get_starting_day = $get_widget_options['starting_day'];\n\t\t$get_starting_year = $get_widget_options['starting_year'];\n\t\t$get_starting_hour = $get_widget_options['starting_hour'];\n\t\t$get_starting_minute = $get_widget_options['starting_minute'];\n\t\t$get_starting_meridiem = $get_widget_options['starting_meridiem'];\n\t\t$get_ending_month = $get_widget_options['ending_month'];\n\t\t$get_ending_day = $get_widget_options['ending_day'];\n\t\t$get_ending_year = $get_widget_options['ending_year'];\n\t\t$get_ending_hour = $get_widget_options['ending_hour'];\n\t\t$get_ending_minute = $get_widget_options['ending_minute'];\n\t\t$get_ending_meridiem = $get_widget_options['ending_meridiem'];\n\t\t$get_set_by_user = $get_widget_options['set_by_user'];\n\t\t\n\t\t\n\t\t// set message to display on admin page.\n\t\tif(isset($get_widget_options['active']) && $get_widget_options['active'] == 1) \n\t\t{\n\t\t\t$active = '<div id=\"active\"> The Red Flag Parking is ACTIVE.</div>';\n\t\t} \n\t\telse{\n\t\t\t\n\t\t\t$active = '<div id=\"not-active\"> The Red Flag Parking is NOT ACTIVE.</div>';\n\t\t}\t\t\n\t\t\n\t\t// Admin Form\n\t\trequire_once( 'red-flag-parking-scheduling.php' );\t\t\n\t\t\n }", "function widget_sparkplug_control() {\n\tif ( !empty( $_POST['sidebar'] ) ) {\n\t\t$sparkie = array(\n\t\t\t\t\t\t'days' => $_POST['sparkplug_days'],\n\t\t\t\t\t\t'barColor' => $_POST['sparkplug_barColor'],\n\t\t\t\t\t\t'do_total' => !empty( $_POST['sparkplug_do_total'] ) ? 'yes' : 'no',\n\t\t\t\t\t\t'lineColor' => $_POST['sparkplug_lineColor'] \n\t\t\t\t\t);\n\t\tupdate_option( 'sparkplug_options', $sparkie );\n\t}\n\t\n\t$sparks = get_option( 'sparkplug_options' );\n\t\n\t$days = !empty( $sparks['days'] ) ? $sparks['days'] : 30;\n\t$barColor = !empty( $sparks['barColor'] ) ? $sparks['barColor'] : '#0066cc';\n\t$lineColor = !empty( $sparks['lineColor'] ) ? $sparks['lineColor'] : '#bdbdbd';\n\t$do_total = !empty( $sparks['do_total'] ) ? $sparks['do_total'] : 'yes';\n\t?>\n\t<p><label for=\"sparkplug_days\"><?php _e( 'Days to show:', 'sparkplug' ) ?><input type=\"text\" name=\"sparkplug_days\" id=\"sparkplug_days\" value=\"<?php echo $days; ?>\" class=\"widefat\" /></label></p>\n\t<p><label for=\"sparkplug_barColor\"><?php _e( 'Bar Color:', 'sparkplug' ) ?><input type=\"text\" name=\"sparkplug_barColor\" id=\"sparkplug_barColor\" value=\"<?php echo $barColor; ?>\" class=\"widefat\" /></label></p>\n\t<p><label for=\"sparkplug_do_total\"><?php _e( 'Overlay line everywhere but home:', 'sparkplug' ) ?><input type=\"checkbox\" name=\"sparkplug_do_total\" id=\"sparkplug_do_total\" value=\"true\"<?php echo 'yes' == $do_total ? ' checked=\"checked\"' : '' ?> /></label></p>\n\t<p><label for=\"sparkplug_lineColor\"><?php _e( 'Line Color:', 'sparkplug' ) ?><input type=\"text\" name=\"sparkplug_lineColor\" id=\"sparkplug_lineColor\" value=\"<?php echo $lineColor; ?>\" class=\"widefat\" /></label></p>\n\t<?php\n}", "function PricerrTheme_general_options()\n{\n $id_icon = 'icon-options-general2';\n $ttl_of_stuff = 'PricerrTheme - ' . __('General Settings', 'PricerrTheme');\n global $menu_admin_PricerrTheme_theme_bull;\n $arr = array(\"yes\" => __(\"Yes\", 'PricerrTheme'), \"no\" => __(\"No\", 'PricerrTheme'));\n\n //------------------------------------------------------\n\n echo '<div class=\"wrap\">';\n echo '<div class=\"icon32\" id=\"' . $id_icon . '\"><br/></div>';\n echo '<h2 class=\"my_title_class_sitemile\">' . $ttl_of_stuff . '</h2>';\n\n if (isset($_POST['PricerrTheme_save1'])) {\n update_option('PricerrTheme_show_views', trim($_POST['PricerrTheme_show_views']));\n update_option('PricerrTheme_admin_approve_job', trim($_POST['PricerrTheme_admin_approve_job']));\n update_option('PricerrTheme_admin_approve_request', trim($_POST['PricerrTheme_admin_approve_request']));\n update_option('PricerrTheme_enable_blog', trim($_POST['PricerrTheme_enable_blog']));\n\n update_option('PricerrTheme_enable_extra', trim($_POST['PricerrTheme_enable_extra']));\n update_option('PricerrTheme_max_time_to_wait', trim($_POST['PricerrTheme_max_time_to_wait']));\n update_option('PricerrTheme_job_listing', trim($_POST['PricerrTheme_job_listing']));\n update_option('PricerrTheme_featured_job_listing', trim($_POST['PricerrTheme_featured_job_listing']));\n update_option('PricerrTheme_for_strg', trim($_POST['PricerrTheme_for_strg']));\n update_option('PricerrTheme_i_will_strg', trim($_POST['PricerrTheme_i_will_strg']));\n update_option('PricerrTheme_show_limit_job_cnt', trim($_POST['PricerrTheme_show_limit_job_cnt']));\n update_option('PricerrTheme_en_country_flags', trim($_POST['PricerrTheme_en_country_flags']));\n update_option('PricerrTheme_ip_key_db', trim($_POST['PricerrTheme_ip_key_db']));\n update_option('PricerrTheme_default_nr_of_pics', trim($_POST['PricerrTheme_default_nr_of_pics']));\n update_option('PricerrTheme_mandatory_pics_for_jbs', trim($_POST['PricerrTheme_mandatory_pics_for_jbs']));\n update_option('PricerrTheme_taxonomy_page_with_sdbr', trim($_POST['PricerrTheme_taxonomy_page_with_sdbr']));\n update_option('PricerrTheme_enable_second_footer', trim($_POST['PricerrTheme_enable_second_footer']));\n update_option('PricerrTheme_enable_instant_deli', trim($_POST['PricerrTheme_enable_instant_deli']));\n update_option('PricerrTheme_show_pagination_homepage', trim($_POST['PricerrTheme_show_pagination_homepage']));\n\n update_option('PricerrTheme_jobs_permalink', trim($_POST['PricerrTheme_jobs_permalink']));\n update_option('PricerrTheme_location_permalink', trim($_POST['PricerrTheme_location_permalink']));\n update_option('PricerrTheme_category_permalink', trim($_POST['PricerrTheme_category_permalink']));\n\n update_option('PricerrTheme_nrpostsPage_home_page', trim($_POST['PricerrTheme_nrpostsPage_home_page']));\n\n\n $PricerrTheme_get_total_extras = $_POST['PricerrTheme_get_total_extras'];\n if ($PricerrTheme_get_total_extras > 10 or !is_numeric($PricerrTheme_get_total_extras)) $PricerrTheme_get_total_extras = 10;\n\n update_option('PricerrTheme_get_total_extras', trim($PricerrTheme_get_total_extras));\n\n do_action('PricerrTheme_general_settings_main_details_options_save');\n echo '<div class=\"saved_thing\">' . __('Settings saved!', 'PricerrTheme') . '</div>';\n }\n\n if (isset($_POST['PricerrTheme_save2'])) {\n update_option('PricerrTheme_filter_emails_private_messages', trim($_POST['PricerrTheme_filter_emails_private_messages']));\n update_option('PricerrTheme_filter_urls_private_messages', trim($_POST['PricerrTheme_filter_urls_private_messages']));\n update_option('PricerrTheme_filter_emails_chat_box', trim($_POST['PricerrTheme_filter_emails_chat_box']));\n update_option('PricerrTheme_filter_urls_chat_box', trim($_POST['PricerrTheme_filter_urls_chat_box']));\n\n echo '<div class=\"saved_thing\">' . __('Settings saved!', 'PricerrTheme') . '</div>';\n }\n\n if (isset($_POST['PricerrTheme_save3'])) {\n update_option('PricerrTheme_enable_shipping', trim($_POST['PricerrTheme_enable_shipping']));\n update_option('PricerrTheme_enable_flat_shipping', trim($_POST['PricerrTheme_enable_flat_shipping']));\n update_option('PricerrTheme_enable_location_based_shipping', trim($_POST['PricerrTheme_enable_location_based_shipping']));\n\n\n echo '<div class=\"saved_thing\">' . __('Settings saved!', 'PricerrTheme') . '</div>';\n }\n\n\n if (isset($_POST['PricerrTheme_save4'])) {\n update_option('PricerrTheme_enable_facebook_login', trim($_POST['PricerrTheme_enable_facebook_login']));\n update_option('PricerrTheme_facebook_app_id', trim($_POST['PricerrTheme_facebook_app_id']));\n update_option('PricerrTheme_facebook_app_secret', trim($_POST['PricerrTheme_facebook_app_secret']));\n\n\n echo '<div class=\"saved_thing\">' . __('Settings saved!', 'PricerrTheme') . '</div>';\n }\n\n\n if (isset($_POST['PricerrTheme_save5'])) {\n update_option('PricerrTheme_enable_twitter_login', trim($_POST['PricerrTheme_enable_twitter_login']));\n update_option('PricerrTheme_twitter_consumer_key', trim($_POST['PricerrTheme_twitter_consumer_key']));\n update_option('PricerrTheme_twitter_consumer_secret', trim($_POST['PricerrTheme_twitter_consumer_secret']));\n\n\n echo '<div class=\"saved_thing\">' . __('Settings saved!', 'PricerrTheme') . '</div>';\n }\n\n if (isset($_POST['PricerrTheme_save_n'])) {\n update_option('PricerrTheme_level1_extras', trim($_POST['PricerrTheme_level1_extras']));\n update_option('PricerrTheme_level2_extras', trim($_POST['PricerrTheme_level2_extras']));\n update_option('PricerrTheme_level3_extras', trim($_POST['PricerrTheme_level3_extras']));\n update_option('PricerrTheme_default_level_nr', trim($_POST['PricerrTheme_default_level_nr']));\n\n update_option('PricerrTheme_level1_vds', trim($_POST['PricerrTheme_level1_vds']));\n update_option('PricerrTheme_level2_vds', trim($_POST['PricerrTheme_level2_vds']));\n update_option('PricerrTheme_level3_vds', trim($_POST['PricerrTheme_level3_vds']));\n\n\n echo '<div class=\"saved_thing\">' . __('Settings saved!', 'PricerrTheme') . '</div>';\n }\n\n do_action('PricerrTheme_general_options_actions');\n\n ?>\n\n<div id=\"usual2\" class=\"usual\">\n <ul>\n <li><a href=\"#tabs1\"><?php _e('Main Settings', 'PricerrTheme'); ?></a></li>\n <li><a href=\"#tabs_new\"><?php _e('Level Settings', 'PricerrTheme'); ?></a></li>\n <li><a href=\"#tabs2\"><?php _e('Filters', 'PricerrTheme'); ?></a></li>\n <li><a href=\"#tabs3\"><?php _e('Shipping', 'PricerrTheme'); ?></a></li>\n <li><a href=\"#tabs4\"><?php _e('Facebook Connect', 'PricerrTheme'); ?></a></li>\n <li><a href=\"#tabs5\"><?php _e('Twitter Connect', 'PricerrTheme'); ?></a></li>\n <?php do_action('PricerrTheme_general_options_tabs'); ?>\n </ul>\n\n <div id=\"tabs_new\">\n <form method=\"post\" action=\"<?php bloginfo('siteurl'); ?>/wp-admin/admin.php?page=general-options&active_tab=tabs_new\">\n <table width=\"100%\" class=\"sitemile-table\">\n\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet('Set a value up to 10 max.'); ?></td>\n <td width=\"200\"><?php _e('Default User Level:', 'PricerrTheme'); ?></td>\n <td>\n <input type=\"text\" size=\"3\" name=\"PricerrTheme_default_level_nr\" value=\"<?php echo get_option('PricerrTheme_default_level_nr'); ?>\"/>\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet('Set a value up to 10 max.'); ?></td>\n <td width=\"200\"><?php _e('Level 1 Allowed Extras:', 'PricerrTheme'); ?></td>\n <td>\n <input type=\"text\" size=\"5\" name=\"PricerrTheme_level1_extras\" value=\"<?php echo get_option('PricerrTheme_level1_extras'); ?>\"/>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet('Set a value up to 10 max.'); ?></td>\n <td><?php _e('Level 2 Allowed Extras:', 'PricerrTheme'); ?></td>\n <td><input type=\"text\" size=\"5\" name=\"PricerrTheme_level2_extras\"\n value=\"<?php echo get_option('PricerrTheme_level2_extras'); ?>\"/></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet('Set a value up to 10 max.'); ?></td>\n <td><?php _e('Level 3 Allowed Extras:', 'PricerrTheme'); ?></td>\n <td>\n <input type=\"text\" size=\"5\" name=\"PricerrTheme_level3_extras\" value=\"<?php echo get_option('PricerrTheme_level3_extras'); ?>\"/>\n </td>\n </tr>\n\n\n <tr>\n <td colspan=\"3\"></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet('Set a value up to 3 max.'); ?></td>\n <td width=\"200\"><?php _e('Level 1 Allowed Videos:', 'PricerrTheme'); ?></td>\n <td>\n <input type=\"text\" size=\"5\" name=\"PricerrTheme_level1_vds\" value=\"<?php echo get_option('PricerrTheme_level1_vds'); ?>\"/>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet('Set a value up to 3 max.'); ?></td>\n <td width=\"200\"><?php _e('Level 2 Allowed Videos:', 'PricerrTheme'); ?></td>\n <td>\n <input type=\"text\" size=\"5\" name=\"PricerrTheme_level2_vds\" value=\"<?php echo get_option('PricerrTheme_level2_vds'); ?>\"/>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet('Set a value up to 3 max.'); ?></td>\n <td width=\"200\"><?php _e('Level 3 Allowed Videos:', 'PricerrTheme'); ?></td>\n <td>\n <input type=\"text\" size=\"5\" name=\"PricerrTheme_level3_vds\" value=\"<?php echo get_option('PricerrTheme_level3_vds'); ?>\"/>\n </td>\n </tr>\n\n\n <tr>\n <td></td>\n <td></td>\n <td>\n <input type=\"submit\" name=\"PricerrTheme_save_n\" value=\"<?php _e('Save Options', 'PricerrTheme'); ?>\"/>\n </td>\n </tr>\n\n </table>\n </form>\n\n </div>\n\n <div id=\"tabs1\">\n\n\n <form method=\"post\" action=\"\">\n <table width=\"100%\" class=\"sitemile-table\">\n\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet('Show homepage pagination.'); ?></td>\n <td width=\"240\"><?php _e('Homepage Pagination:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_show_pagination_homepage'); ?></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td><?php _e('Number of Homepage Lessons:', 'PricerrTheme'); ?></td>\n <td>\n <input type=\"text\" size=\"5\" name=\"PricerrTheme_nrpostsPage_home_page\" value=\"<?php echo get_option('PricerrTheme_nrpostsPage_home_page'); ?>\"/>\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet('This enables or disables the sidebar in the category and archive pages.'); ?>\n </td>\n <td width=\"240\">\n <?php _e('Enable instant delivery file:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_instant_deli'); ?>\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td>\n <?php _e('Number of Extras:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" size=\"5\" name=\"PricerrTheme_get_total_extras\" value=\"<?php echo get_option('PricerrTheme_get_total_extras'); ?>\"/>\n ( max number is 10 )\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet('This enables or disables the sidebar in the category and archive pages.'); ?>\n </td>\n <td width=\"240\">\n <?php _e('Category Pages have sidebars?:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_taxonomy_page_with_sdbr'); ?>\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet('This enables or disables the sidebar in the category and archive pages.'); ?>\n </td>\n <td width=\"240\">\n <?php _e('Enable second footer area?:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_second_footer'); ?>\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Mandatory to upload pictures for jobs:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_mandatory_pics_for_jbs'); ?>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Enable country flags:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_en_country_flags'); ?>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td>\n <?php _e('IPI Info DB Key:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" size=\"22\" name=\"PricerrTheme_ip_key_db\" value=\"<?php echo get_option('PricerrTheme_ip_key_db'); ?>\"/>\n ( register a key: http://www.ipinfodb.com/register.php )\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td>\n <?php _e('Max Amount of Pictures:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" size=\"5\" name=\"PricerrTheme_default_nr_of_pics\" value=\"<?php echo get_option('PricerrTheme_default_nr_of_pics'); ?>\"/>\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Show views in each job page:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_show_views'); ?>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Admin approves each job:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_admin_approve_job'); ?>\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Admin approves each request:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_admin_approve_request'); ?>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Enable Blog:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_blog'); ?>\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Enable Extra Services:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_extra'); ?>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td>\n <?php _e('Auto-mark job as completed after:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" size=\"6\" name=\"PricerrTheme_max_time_to_wait\" value=\"<?php echo get_option('PricerrTheme_max_time_to_wait'); ?>\"/>\n hours\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(__('After the time expires the job will be closed and your users can repost it. Leave 0 for never-expire jobs.', 'PricerrTheme')); ?>\n </td>\n <td><?php _e('Lesson listing period:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" size=\"6\" name=\"PricerrTheme_job_listing\" value=\"<?php echo get_option('PricerrTheme_job_listing'); ?>\"/>\n days\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td>\n <?php _e('Featured job listing period:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" size=\"6\" name=\"PricerrTheme_featured_job_listing\" value=\"<?php echo get_option('PricerrTheme_featured_job_listing'); ?>\"/>\n days\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Number of jobs show on homepage:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" name=\"PricerrTheme_show_limit_job_cnt\" size=\"10\" value=\"<?php echo get_option('PricerrTheme_show_limit_job_cnt'); ?>\"/>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Translation for \"I will provide\":', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" name=\"PricerrTheme_i_will_strg\" size=\"40\" value=\"<?php echo get_option('PricerrTheme_i_will_strg'); ?>\"/>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Translation for \"for\":', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" name=\"PricerrTheme_for_strg\" size=\"40\" value=\"<?php echo get_option('PricerrTheme_for_strg'); ?>\"/>\n </td>\n </tr>\n\n\n <tr>\n <td colspan=\"3\"></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td>\n <?php _e('Slug for Lessons Permalink:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" size=\"30\" name=\"PricerrTheme_jobs_permalink\" value=\"<?php echo get_option('PricerrTheme_jobs_permalink'); ?>\"/>\n *if left empty will show 'jobs'\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td>\n <?php _e('Slug for Location Permalink:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" size=\"30\" name=\"PricerrTheme_location_permalink\" value=\"<?php echo get_option('PricerrTheme_location_permalink'); ?>\"/>\n *if left empty will show 'location'\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td>\n <?php _e('Slug for Category Permalink:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" size=\"30\" name=\"PricerrTheme_category_permalink\" value=\"<?php echo get_option('PricerrTheme_category_permalink'); ?>\"/>\n *if left empty will show 'section'\n </td>\n </tr>\n\n\n <?php do_action('PricerrTheme_general_settings_main_details_options'); ?>\n\n <tr>\n <td></td>\n <td></td>\n <td>\n <input type=\"submit\" name=\"PricerrTheme_save1\" value=\"<?php _e('Save Options', 'PricerrTheme'); ?>\"/>\n </td>\n </tr>\n\n </table>\n </form>\n\n\n </div>\n\n <div id=\"tabs2\">\n\n <form method=\"post\" action=\"<?php bloginfo('siteurl'); ?>/wp-admin/admin.php?page=general-options&active_tab=tabs2\">\n <table width=\"100%\" class=\"sitemile-table\">\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Filter Email Addresses (private messages):', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_filter_emails_private_messages'); ?></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Filter URLs (private messages):', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_filter_urls_private_messages'); ?></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Filter Email Addresses (chat box):', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_filter_emails_chat_box'); ?></td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Filter URLs (chat box):', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_filter_urls_chat_box'); ?></td>\n </tr>\n\n\n <tr>\n <td></td>\n <td></td>\n <td>\n <input type=\"submit\" name=\"PricerrTheme_save2\" value=\"<?php _e('Save Options', 'PricerrTheme'); ?>\"/>\n </td>\n </tr>\n\n </table>\n </form>\n\n </div>\n\n <div id=\"tabs3\">\n\n <form method=\"post\" action=\"<?php bloginfo('siteurl'); ?>/wp-admin/admin.php?page=general-options&active_tab=tabs3\">\n <table width=\"100%\" class=\"sitemile-table\">\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"200\"><?php _e('Enable Shipping:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_shipping'); ?></td>\n </tr>\n <!-- \n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Enable only a flat fee:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_flat_shipping'); ?></td>\n </tr>\n \n <tr>\n <td colspan=\"3\"><?php _e('OR', 'PricerrTheme'); ?></td>\n </tr>\n \n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Location based:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_location_based_shipping'); ?></td>\n </tr>\n -->\n\n <tr>\n <td></td>\n <td></td>\n <td>\n <input type=\"submit\" name=\"PricerrTheme_save3\" value=\"<?php _e('Save Options', 'PricerrTheme'); ?>\"/>\n </td>\n </tr>\n\n </table>\n </form>\n\n </div>\n\n <div id=\"tabs4\">\n For facebook connect, install this plugin: <a\n href=\"http://wordpress.org/extend/plugins/wordpress-social-login/\">WordPress Social Login</a>\n <!-- \n \t<form method=\"post\" action=\"<?php bloginfo('siteurl'); ?>/wp-admin/admin.php?page=general-options&active_tab=tabs4\">\n <table width=\"100%\" class=\"sitemile-table\">\n \t\t\t\t\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"200\"><?php _e('Enable Facebook Login:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_facebook_login'); ?></td>\n </tr>\n \n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Facebook App ID:', 'PricerrTheme'); ?></td>\n <td><input type=\"text\" size=\"35\" name=\"PricerrTheme_facebook_app_id\" value=\"<?php echo get_option('PricerrTheme_facebook_app_id'); ?>\"/></td>\n </tr>\n \n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Facebook Secret Key:', 'PricerrTheme'); ?></td>\n <td><input type=\"text\" size=\"35\" name=\"PricerrTheme_facebook_app_secret\" value=\"<?php echo get_option('PricerrTheme_facebook_app_secret'); ?>\"/></td>\n </tr>\n \n <tr>\n <td ></td>\n <td ></td>\n <td><input type=\"submit\" name=\"PricerrTheme_save4\" value=\"<?php _e('Save Options', 'PricerrTheme'); ?>\"/></td>\n </tr>\n \n </table> \n \t</form>\n -->\n </div>\n\n <div id=\"tabs5\">\n For twitter connect, install this plugin: <a href=\"http://wordpress.org/extend/plugins/wordpress-social-login/\">WordPress\n Social Login</a> <!--\n <form method=\"post\" action=\"<?php bloginfo('siteurl'); ?>/wp-admin/admin.php?page=general-options&active_tab=tabs5\">\n <table width=\"100%\" class=\"sitemile-table\">\n \t\t\t\t\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"200\"><?php _e('Enable Twitter Login:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_twitter_login'); ?></td>\n </tr>\n \n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Twitter Consumer Key:', 'PricerrTheme'); ?></td>\n <td><input type=\"text\" size=\"35\" name=\"PricerrTheme_twitter_consumer_key\" value=\"<?php echo get_option('PricerrTheme_twitter_consumer_key'); ?>\"/></td>\n </tr>\n \n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Twitter Consumer Secret:', 'PricerrTheme'); ?></td>\n <td><input type=\"text\" size=\"35\" name=\"PricerrTheme_twitter_consumer_secret\" value=\"<?php echo get_option('PricerrTheme_twitter_consumer_secret'); ?>\"/></td>\n </tr>\n \n \n \t\t\t\t\t\t<tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Callback URL:', 'PricerrTheme'); ?></td>\n <td><?php echo get_bloginfo('template_url'); ?>/lib/social/twitter/callback.php</td>\n </tr>\n \n \t\t\t\t\n <tr>\n <td ></td>\n <td ></td>\n <td><input type=\"submit\" name=\"PricerrTheme_save5\" value=\"<?php _e('Save Options', 'PricerrTheme'); ?>\"/></td>\n </tr>\n \n </table> \n \t</form> -->\n </div>\n\n<?php do_action('PricerrTheme_general_options_div_content'); ?>\n\n <?php\n echo '</div>';\n\n}", "function worldlogger_options() {\n\t $opt_name = 'worldlogger_hash';\n\t $hidden_field_name = 'mt_submit_hidden';\n\t $data_field_name = 'worldlogger_hash';\n\n\t // Read in existing option value from database\n\t $opt_val = get_option( $opt_name );\n\n\t // See if the user has posted us some information\n\t // If they did, this hidden field will be set to 'Y'\n\t if( $_POST[ $hidden_field_name ] == 'Y' ) {\n\t // Read their posted value\n\t $opt_val = $_POST[ $data_field_name ];\n\t // Save the posted value in the database\n\t update_option( $opt_name, $opt_val );\n\n\t // Put an options updated message on the screen\n\n\t?>\n\t<div class=\"updated\"><p><strong><?php _e('Options saved.', 'mt_trans_domain' ); ?></strong></p></div>\n\t<?php } ?>\n\t<div class=\"wrap\">\n\t<h2><?= __( 'Worldlogger Options', 'worldlogger_domain' ) ?></h2>\n\tTo install Worldlogger, please create an account at <a href=\"http://www.worldlogger.com/signup\">worldlogger.com</a> and copy the hash in the \"Settings\" page of a website.\n\t<form name=\"form1\" method=\"post\" action=\"\">\n\t\t<table class=\"form-table\"> \n\t\t<tr valign=\"top\"> \n\t\t<th scope=\"row\"><label for=\"blogname\">Worldlogger Hash</label></th> \n\t\t<td><input type=\"text\" name=\"<?php echo $data_field_name; ?>\" value=\"<?php echo $opt_val; ?>\" size=\"40\"></td> \n\t\t</tr> \n\t\t</table>\n\t\t<input type=\"hidden\" name=\"<?php echo $hidden_field_name; ?>\" value=\"Y\">\n\t\t<p class=\"submit\"> \n\t\t<input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"Save Changes\" /> \n\t\t</p>\n\t</form>\n\t</div>\n\n\t<?php\n\n}", "function mmpm_theme_options_form(){\n\t\t$out = '';\n\t\t$submit_button = mmpm_ntab(7) . '<input type=\"submit\" class=\"button-primary pull-right\" value=\"' . __( 'Save All Changes', MMPM_TEXTDOMAIN_ADMIN ) . '\" />';\n\t\t$theme_meta = mmpm_ntab(7) . '<div>' . mmpm_ntab(8) . '<span class=\"theme_name\">' . __( MMPM_PLUGIN_NAME , MMPM_TEXTDOMAIN_ADMIN ) . '</span>' . ' <small>v' . MMPM_PLUGIN_VERSION . mmpm_ntab(7) . '</small></div>';\n\t\t$out .= mmpm_ntab(1) . '<div class=\"wrap bootstrap\">';\n\t\t$out .= mmpm_ntab(2) . '<div class=\"'. MMPM_PREFIX . '_theme_page\">';\n\t\t$out .= mmpm_ntab(3) . '<form id=\"'. MMPM_PREFIX . '_theme_options_form\" class=\"'. MMPM_PREFIX . '_theme_options_form\" method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">';\n\t\t$out .= mmpm_ntab(4) . '<div class=\"save_shanges row no_x_margin\">';\n\t\t$out .= mmpm_ntab(5) . '<div class=\"col-xs-12\">';\n\t\t$out .= mmpm_ntab(6) . '<div class=\"float_holder\">';\n\t\t$out .= $submit_button;\n\t\t$out .= $theme_meta;\n\t\t$out .= mmpm_ntab(6) . '</div>';\n\t\t$out .= mmpm_ntab(5) . '</div>';\n\t\t$out .= mmpm_ntab(4) . '</div>';\n//\t\t$out .= mmpm_ntab(4) . '<input type=\"hidden\" name=\"action\" value=\"update\" />';\n\t\t$out .= mmpm_ntab(4) . '<input type=\"hidden\" name=\"' . MMPM_OPTIONS_DB_NAME . '[last_modified]\" value=\"' . ( time() + 60 ) . '\" />';\n\t\tob_start();\n\t\tsettings_fields( 'mmpm_options_group' );\n\t\t$out .= mmpm_ntab(4) . ob_get_contents();\n\t\tob_end_clean();\n\t\t$out .= mmpm_theme_sections_generator();\n\t\t$out .= mmpm_ntab(4) . '<div class=\"save_shanges row no_x_margin\">';\n\t\t$out .= mmpm_ntab(5) . '<div class=\"col-xs-12\">';\n\t\t$out .= mmpm_ntab(6) . '<div class=\"float_holder\">';\n\t\t$out .= $submit_button;\n\t\t$out .= mmpm_ntab(6) . '</div>';\n\t\t$out .= mmpm_ntab(5) . '</div>';\n\t\t$out .= mmpm_ntab(4) . '</div>';\n\t\t$out .= mmpm_ntab(3) . '</form>';\n\t\t$out .= mmpm_ntab(2) . '</div><!-- class=\"'. MMPM_PREFIX . 'theme_page\" -->';\n\t\t$out .= mmpm_ntab(1) . '</div><!-- class=\"wrap\" -->';\n\n\t\techo $out; // general out\n\t}", "function edd_incentives_render_exit_options() {\n global $post;\n\n $post_id = $post->ID;\n $meta = get_post_meta( $post_id, '_edd_incentive_meta', true );\n $text_css = ( ! isset( $meta['button_type'] ) || $meta['button_type'] == 'text' ? '' : ' style=\"display: none;\"' );\n $button_css = ( isset( $meta['button_type'] ) && $meta['button_type'] == 'button' ? '' : ' style=\"display: none;\"' );\n $image_css = ( isset( $meta['button_type'] ) && $meta['button_type'] == 'image' ? '' : ' style=\"display: none;\"' );\n\n // Button type\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_button_type\">' . __( 'Button Type', 'edd-incentives' ) . '</label></strong><br />';\n echo '<select class=\"edd-incentives-select2\" name=\"_edd_incentive_meta[button_type]\" id=\"_edd_incentive_button_type\">';\n echo '<option value=\"text\"' . ( ! isset( $meta['button_type'] ) || $meta['button_type'] == 'text' ? ' selected' : '' ) . '>' . __( 'Text Link', 'edd-incentives' ) . '</option>';\n echo '<option value=\"image\"' . ( $meta['button_type'] == 'image' ? ' selected' : '' ) . '>' . __( 'Image Link', 'edd-incentives' ) . '</option>';\n echo '<option value=\"button\"' . ( $meta['button_type'] == 'button' ? ' selected' : '' ) . '>' . __( 'Button', 'edd-incentives' ) . '</option>';\n echo '</select>';\n echo '</p>';\n\n // Button text - text\n echo '<p class=\"edd-incentives-button-type-text\"' . $text_css . '>';\n echo '<strong><label for=\"_edd_incentive_link_text\">' . __( 'Link Text', 'edd-incentives' ) . '</label></strong><br />';\n echo '<input type=\"text\" class=\"widefat\" name=\"_edd_incentive_meta[link_text]\" id=\"_edd_incentive_link_text\" value=\"' . ( isset( $meta['link_text'] ) && $meta['link_text'] != '' ? $meta['link_text'] : '' ) . '\" />';\n echo '</p>';\n \n // Button text - button\n echo '<p class=\"edd-incentives-button-type-button\"' . $button_css . '>';\n echo '<strong><label for=\"_edd_incentive_button_text\">' . __( 'Button Text', 'edd-incentives' ) . '</label></strong><br />';\n echo '<input type=\"text\" class=\"widefat\" name=\"_edd_incentive_meta[button_text]\" id=\"_edd_incentive_button_text\" value=\"' . ( isset( $meta['button_text'] ) && $meta['button_text'] != '' ? $meta['button_text'] : '' ) . '\" />';\n echo '</p>';\n\n // Button image\n echo '<p class=\"edd-incentives-button-type-image\"' . $image_css . '>';\n echo '<strong><label for=\"_edd_incentive_button_image\">' . __( 'Button Image', 'edd-incentives' ) . '</label></strong><br />';\n if( ! isset( $meta['button_image'] ) || $meta['button_image'] == '' ) {\n echo '<input type=\"file\" name=\"_edd_incentive_button_image\" id=\"_edd_incentive_button_image\" value=\"\" size=\"25\" />';\n } else {\n echo '<img src=\"' . $meta['button_image'] . '\" style=\"width: 100%;\" />';\n echo '<a href=\"' . add_query_arg( array( 'edd-action' => 'remove_button_image' ) ) . '\" class=\"button button-secondary\">' . __( 'Remove', 'edd-incentives' ) . '</a>';\n }\n echo '</p>';\n}", "function ajb_options_do_page() {\n\n\tif ( ! isset( $_REQUEST['settings-updated'] ) )\n\t\t$_REQUEST['settings-updated'] = false ;\n\n\t?>\n\t<div class=\"wrap\">\n\t\t<?php screen_icon(); echo \"<h2>\" . get_current_theme() . __( ' Theme Options', 'ajb' ) . \"</h2>\"; ?>\n\n\t\t<?php if ( false !== $_REQUEST['settings-updated'] ) : ?>\n\t\t<div class=\"updated fade\"><p><strong><?php _e( 'Options saved', 'ajb' ); ?></strong></p></div>\n\t\t<?php endif; ?>\n\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields( 'ajb_option_group' ); ?>\n\t\t\t<?php $options = get_option( 'ajb_options' );\n\n\t\t\t_e( '<p>The <em>Community is...</em> section shows links to 5 pages. Enter here the information for these links.</p>', 'ajb' );\n\t\t\t?>\n\t\t\t<table class=\"form-table\">\n\n\t\t\t<?php\n\t\t\t/**\n\t\t\t * button link\n\t\t\t */\n\t\t\tfor ( $i=1; $i<=5; $i++ ) {\n\t\t\t\t?>\n\t\t\t\t <tr valign=\"top\"> <th scope=\"row\"><?php _e( 'Button ' . $i . ' Link', 'ajb' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t <input id=\"ajb_options[button_<?php echo $i; ?>_link]\" class=\"regular-text\" type=\"text\" name=\"ajb_options[button_<?php echo $i; ?>_link]\" value=\"<?php esc_attr_e( $options['button_' . $i . '_link'] ); ?>\" />\n\t\t\t\t\t <label class=\"description\" for=\"ajb_options[button_<?php echo $i; ?>_link]\"><?php _e( 'Link for link button ' . $i . '', 'ajb' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t </tr>\n\t\t\t\t \n\t\t\t<?php } ?>\n\n\t\t\t</table>\n\t\t\t\n\t\t\t<p class=\"submit\">\n\t\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e( 'Save Options', 'ajb' ); ?>\" />\n\t\t\t</p>\n\t\t</form>\n\t</div>\n\t<?php\n}", "function widget_opml_browser_register()\r\n {\r\n $options = get_option('widget_opml_browser');\r\n $need_update = false;\r\n if (isset($options['version'])) {\r\n $curver = $options['version'];\r\n if ($curver < 1.2) {\r\n $curver = 1.2;\r\n $options['version'] = $curver;\r\n $options[1]['title'] = $options['title'];\r\n $options[1]['opmlurl'] = $options['opmlurl'];\r\n $options[1]['opmlpath'] = $options['opmlpath'];\r\n $options[1]['reqhtml'] = $options['reqhtml'];\r\n $options[1]['reqfeed'] = $options['reqfeed'];\r\n $options[1]['noself'] = $options['noself'];\r\n $options[1]['opmllink'] = $options['opmllink'];\r\n $options[1]['closeall'] = $options['closeall'];\r\n $options[1]['indent'] = $options['indent'];\r\n $options['number'] = 1;\r\n $need_update = true;\r\n }\r\n /* No changes to options between 1.2 and 2.2 */\r\n\t if ($curver < 2.2) {\r\n\t $curver = 2.2;\r\n $options['version'] = $curver;\r\n\t\tfor ($i = 1; $i <= $options['number']; $i++)\r\n\t\t{\r\n\t\t $options[$i]['imageurl'] = get_settings('siteurl') . '/wp-content/plugins/opml-browser/images/';\r\n\t\t $options[$i]['tooltips'] = '1';\r\n\t\t $options[$i]['credit'] = '1';\r\n\t\t}\r\n\t\t$need_update = true;\r\n\t }\r\n\t if ($curver < 2.3) {\r\n\t $curver = 2.3;\r\n\t\t$options['version'] = $curver;\r\n\t\tfor ($i = 1; $i <= $options['number']; $i++)\r\n\t\t{\r\n\t\t $options[$i]['showfolders'] = '1';\r\n\t\t}\r\n\t\t$need_update = true;\r\n\t }\r\n\t if ($curver < 2.4) {\r\n\t $curver = 2.4;\r\n\t\t$options['version'] = $curver;\r\n\t\t$need_update = true;\r\n\t }\r\n }\r\n else {\r\n $curver = 2.4;\r\n $options['version'] = $curver;\r\n\t $options[1]['imageurl'] = get_settings('siteurl') . '/wp-content/plugins/opml-browser/images/';\r\n\t $options[1]['tooltips'] = '1';\r\n $options[1]['indent'] = \"5px\";\r\n\t $options[1]['credit'] = '1';\r\n $need_update = true;\r\n }\r\n\r\n $number = $options['number'];\r\n if ( $number < 1 ) {\r\n $number = 1;\r\n $options['number'] = 1;\r\n $need_update = true;\r\n }\r\n else if ( $number > 9 ) {\r\n $number = 9;\r\n $options['number'] = 9;\r\n $need_update = true;\r\n }\r\n\r\n // Apply any upgrades here by testing $curver and setting $need_update to true\r\n\r\n if ($need_update)\r\n update_option('widget_opml_browser', $options);\r\n\r\n for ($i = 1; $i <= 9; $i++) {\r\n $name = array('opml-browser %s', null, $i);\r\n register_sidebar_widget($name, $i <= $number ? 'widget_opml_browser' : /* unregister */ '', $i);\r\n register_widget_control($name, $i <= $number ? 'widget_opml_browser_control' : /* unregister */ '', 550, 500, $i);\r\n }\r\n add_action('sidebar_admin_setup', 'widget_opml_browser_setup');\r\n add_action('sidebar_admin_page', 'widget_opml_browser_page');\r\n\r\n // add the Link to the OPML file For Autodiscovery\r\n add_action('wp_head', 'opml_browser_head');\t\r\n\r\n // Add a filter for embedded browsers in content\r\n add_filter('the_content', 'opml_browser_content_filter');\r\n }", "public function setDefaultOptions()\n {\n // Set event data\n foreach ($this->events as $event => $handler) {\n $this->options['data']['widget-action-' . $event] = $handler;\n }\n\n if($this->jsWidget) {\n $this->options['data']['ui-widget'] = $this->jsWidget;\n }\n\n if($this->fadeIn) {\n $fadeIn = $this->fadeIn === true ? 'fast' : $this->fadeIn;\n $this->options['data']['widget-fade-in'] = $fadeIn;\n $this->visible = false;\n }\n\n if (!empty($this->init)) {\n $this->options['data']['ui-init'] = $this->init;\n }\n }", "function lbcb_print_option_buttons(){\n?>\n\t<input class=\"button-primary\" type=\"submit\" name=\"lbcb_options[save]\" id=\"lbcb_options[save]\" value=\"<?php _e( 'Save Options', 'lbcb_textdomain' ); ?>\"/>\n\t<input class=\"button-secondary\" type=\"submit\" name=\"lbcb_options[reset]\" id=\"lbcb_options[reset]\" value=\"<?php _e( 'Reset To Defaults', 'lbcb_textdomain' ); ?>\"/>\n\n<?php\n}", "function widget_supporters_init() {\r\n\tglobal $wpdb, $supporters_widget_main_blog_only;\r\n\t\t\r\n\t// Check for the required API functions\r\n\tif ( !function_exists('register_sidebar_widget') || !function_exists('register_widget_control') )\r\n\t\treturn;\r\n\r\n\t// This saves options and prints the widget's config form.\r\n\tfunction widget_supporters_control() {\r\n\t\tglobal $wpdb;\r\n\t\t$options = $newoptions = get_option('widget_supporters');\r\n\t\tif ( $_POST['supporters-submit'] ) {\r\n\t\t\t$newoptions['supporters-title'] = $_POST['supporters-title'];\r\n\t\t\t$newoptions['supporters-display'] = $_POST['supporters-display'];\r\n\t\t\t$newoptions['supporters-blog-name-characters'] = $_POST['supporters-blog-name-characters'];\r\n\t\t\t$newoptions['supporters-order'] = $_POST['supporters-order'];\r\n\t\t\t$newoptions['supporters-number'] = $_POST['supporters-number'];\r\n\t\t\t$newoptions['supporters-avatar-size'] = $_POST['supporters-avatar-size'];\r\n\t\t}\r\n\t\tif ( $options != $newoptions ) {\r\n\t\t\t$options = $newoptions;\r\n\t\t\tupdate_option('widget_supporters', $options);\r\n\t\t}\r\n\t?>\r\n\t\t\t\t<div style=\"text-align:left\">\r\n \r\n\t\t\t\t<label for=\"supporters-title\" style=\"line-height:35px;display:block;\"><?php _e('Title', 'widgets'); ?>:<br />\r\n <input class=\"widefat\" id=\"supporters-title\" name=\"supporters-title\" value=\"<?php echo $options['supporters-title']; ?>\" type=\"text\" style=\"width:95%;\">\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-display\" style=\"line-height:35px;display:block;\"><?php _e('Display', 'widgets'); ?>:\r\n <select name=\"supporters-display\" id=\"supporters-display\" style=\"width:95%;\">\r\n <option value=\"avatar_blog_name\" <?php if ($options['supporters-display'] == 'avatar_blog_name'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Avatar + Blog Name'); ?></option>\r\n <option value=\"avatar\" <?php if ($options['supporters-display'] == 'avatar'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Avatar Only'); ?></option>\r\n <option value=\"blog_name\" <?php if ($options['supporters-display'] == 'blog_name'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Blog Name Only'); ?></option>\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-blog-name-characters\" style=\"line-height:35px;display:block;\"><?php _e('Blog Name Characters', 'widgets'); ?>:<br />\r\n <select name=\"supporters-blog-name-characters\" id=\"supporters-blog-name-characters\" style=\"width:95%;\">\r\n <?php\r\n\t\t\t\t\tif ( empty($options['supporters-blog-name-characters']) ) {\r\n\t\t\t\t\t\t$options['supporters-blog-name-characters'] = 30;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$counter = 0;\r\n\t\t\t\t\tfor ( $counter = 1; $counter <= 500; $counter += 1) {\r\n\t\t\t\t\t\t?>\r\n <option value=\"<?php echo $counter; ?>\" <?php if ($options['supporters-blog-name-characters'] == $counter){ echo 'selected=\"selected\"'; } ?> ><?php echo $counter; ?></option>\r\n <?php\r\n\t\t\t\t\t}\r\n ?>\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-order\" style=\"line-height:35px;display:block;\"><?php _e('Order', 'widgets'); ?>:\r\n <select name=\"supporters-order\" id=\"supporters-order\" style=\"width:95%;\">\r\n <option value=\"most_recent\" <?php if ($options['supporters-order'] == 'most_recent'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Most Recent'); ?></option>\r\n <option value=\"random\" <?php if ($options['supporters-order'] == 'random'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Random'); ?></option>\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-number\" style=\"line-height:35px;display:block;\"><?php _e('Number', 'widgets'); ?>:<br />\r\n <select name=\"supporters-number\" id=\"supporters-number\" style=\"width:95%;\">\r\n <?php\r\n\t\t\t\t\tif ( empty($options['supporters-number']) ) {\r\n\t\t\t\t\t\t$options['supporters-number'] = 10;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$counter = 0;\r\n\t\t\t\t\tfor ( $counter = 1; $counter <= 25; $counter += 1) {\r\n\t\t\t\t\t\t?>\r\n <option value=\"<?php echo $counter; ?>\" <?php if ($options['supporters-number'] == $counter){ echo 'selected=\"selected\"'; } ?> ><?php echo $counter; ?></option>\r\n <?php\r\n\t\t\t\t\t}\r\n ?>\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-avatar-size\" style=\"line-height:35px;display:block;\"><?php _e('Avatar Size', 'widgets'); ?>:<br />\r\n <select name=\"supporters-avatar-size\" id=\"supporters-avatar-size\" style=\"width:95%;\">\r\n <option value=\"16\" <?php if ($options['supporters-avatar-size'] == '16'){ echo 'selected=\"selected\"'; } ?> ><?php _e('16px'); ?></option>\r\n <option value=\"32\" <?php if ($options['supporters-avatar-size'] == '32'){ echo 'selected=\"selected\"'; } ?> ><?php _e('32px'); ?></option>\r\n <option value=\"48\" <?php if ($options['supporters-avatar-size'] == '48'){ echo 'selected=\"selected\"'; } ?> ><?php _e('48px'); ?></option>\r\n <option value=\"96\" <?php if ($options['supporters-avatar-size'] == '96'){ echo 'selected=\"selected\"'; } ?> ><?php _e('96px'); ?></option>\r\n <option value=\"128\" <?php if ($options['supporters-avatar-size'] == '128'){ echo 'selected=\"selected\"'; } ?> ><?php _e('128px'); ?></option>\r\n </select>\r\n </label>\r\n\t\t\t\t<input type=\"hidden\" name=\"supporters-submit\" id=\"supporters-submit\" value=\"1\" />\r\n\t\t\t\t</div>\r\n\t<?php\r\n\t}\r\n// This prints the widget\r\n\tfunction widget_supporters($args) {\r\n\t\tglobal $wpdb, $current_site;\r\n\t\textract($args);\r\n\t\t$defaults = array('count' => 10, 'supportername' => 'wordpress');\r\n\t\t$options = (array) get_option('widget_supporters');\r\n\r\n\t\tforeach ( $defaults as $key => $value )\r\n\t\t\tif ( !isset($options[$key]) )\r\n\t\t\t\t$options[$key] = $defaults[$key];\r\n\r\n\t\t?>\r\n\t\t<?php echo $before_widget; ?>\r\n\t\t\t<?php echo $before_title . __($options['supporters-title']) . $after_title; ?>\r\n <br />\r\n <?php\r\n\r\n\t\t\t$newoptions['supporters-display'] = $_POST['supporters-display'];\r\n\t\t\t$newoptions['supporters-order'] = $_POST['supporters-order'];\r\n\t\t\t$newoptions['supporters-number'] = $_POST['supporters-number'];\r\n\t\t\t$newoptions['supporters-avatar-size'] = $_POST['supporters-avatar-size'];\r\n\t\t\t\t//=================================================//\r\n\t\t\t\t$now = time();\r\n\t\t\t\tif ( $options['supporters-order'] == 'most_recent' ) {\r\n\t\t\t\t\t$query = \"SELECT supporter_ID, blog_ID, expire FROM \" . $wpdb->base_prefix . \"supporters WHERE expire > '\" . $now . \"' ORDER BY supporter_ID DESC LIMIT \" . $options['supporters-number'];\r\n\t\t\t\t} else if ( $options['supporters-order'] == 'random' ) {\r\n\t\t\t\t\t$query = \"SELECT supporter_ID, blog_ID, expire FROM \" . $wpdb->base_prefix . \"supporters WHERE expire > '\" . $now . \"' ORDER BY RAND() LIMIT \" . $options['supporters-number'];\r\n\t\t\t\t}\r\n\t\t\t\t$supporters = $wpdb->get_results( $query, ARRAY_A );\r\n\t\t\t\tif (count($supporters) > 0){\r\n\t\t\t\t\tif ( $options['supporters-display'] == 'blog_name' || $options['supporters-display'] == 'avatar_blog_name' ) {\r\n\t\t\t\t\t\techo '<ul>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\tforeach ($supporters as $supporter){\r\n\t\t\t\t\t\t$blog_details = get_blog_details( $supporter['blog_ID'] );\r\n\t\t\t\t\t\tif ( $options['supporters-display'] == 'avatar_blog_name' ) {\r\n\t\t\t\t\t\t\techo '<li>';\r\n\t\t\t\t\t\t\techo '<a href=\"' . $blog_details->siteurl . '\">' . get_blog_avatar( $supporter['blog_ID'], $options['supporters-avatar-size'], '' ) . '</a>';\r\n\t\t\t\t\t\t\techo ' ';\r\n\t\t\t\t\t\t\techo '<a href=\"' . $blog_details->siteurl . '\">' . substr($blog_details->blogname, 0, $options['supporters-blog-name-characters']) . '</a>';\r\n\t\t\t\t\t\t\techo '</li>';\r\n\t\t\t\t\t\t} else if ( $options['supporters-display'] == 'avatar' ) {\r\n\t\t\t\t\t\t\techo '<a href=\"' . $blog_details->siteurl . '\">' . get_avatar( $supporter['blog_ID'], $options['supporters-avatar-size'], '' ) . '</a>';\r\n\t\t\t\t\t\t} else if ( $options['supporters-display'] == 'blog_name' ) {\r\n\t\t\t\t\t\t\techo '<li>';\r\n\t\t\t\t\t\t\techo '<a href=\"' . $blog_details->siteurl . '\">' . substr($blog_details->blogname, 0, $options['supporters-blog-name-characters']) . '</a>';\r\n\t\t\t\t\t\t\techo '</li>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( $options['supporters-display'] == 'blog_name' || $options['supporters-display'] == 'avatar_blog_name' ) {\r\n\t\t\t\t\t\techo '</ul>';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//=================================================//\r\n\t\t\t?>\r\n\t\t<?php echo $after_widget; ?>\r\n<?php\r\n\t}\r\n\t// Tell Dynamic Sidebar about our new widget and its control\r\n\tif ( $supporters_widget_main_blog_only == 'yes' ) {\r\n\t\tif ( $wpdb->blogid == 1 ) {\r\n\t\t\tregister_sidebar_widget(array(__('supporters'), 'widgets'), 'widget_supporters');\r\n\t\t\tregister_widget_control(array(__('supporters'), 'widgets'), 'widget_supporters_control');\r\n\t\t}\r\n\t} else {\r\n\t\tregister_sidebar_widget(array(__('supporters'), 'widgets'), 'widget_supporters');\r\n\t\tregister_widget_control(array(__('supporters'), 'widgets'), 'widget_supporters_control');\r\n\t}\r\n}", "function form( $instance ){\n\n\t\t\t// $instance Defaults\n\t\t\t$instance_defaults = $this->defaults;\n\n\t\t\t// If we have information in this widget, then ignore the defaults\n\t\t\tif( !empty( $instance ) ) $instance_defaults = array();\n\n\t\t\t// Parse $instance\n\t\t\t$instance = wp_parse_args( $instance, $instance_defaults );\n\n\t\t\textract( $instance, EXTR_SKIP );\n\n\t\t\t$design_bar_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_components' , array(\n\t\t\t\t\t'layout',\n\t\t\t\t\t'fonts',\n\t\t\t\t\t'custom',\n\t\t\t\t\t'columns',\n\t\t\t\t\t'liststyle',\n\t\t\t\t\t'imageratios',\n\t\t\t\t\t'background',\n\t\t\t\t\t'advanced'\n\t\t\t\t) );\n\n\t\t\t$design_bar_custom_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_custom_components' , array(\n\t\t\t\t\t'display' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-display',\n\t\t\t\t\t\t'label' => __( 'Display', 'layerswp' ),\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t\t'text_style' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'text_style' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'text_style' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $text_style ) ) ? $text_style : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Title &amp; Excerpt Position' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t\t\t'regular' => __( 'Regular' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t\t\t'overlay' => __( 'Overlay' , 'layerswp' )\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_media' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_media' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_media' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_media ) ) ? $show_media : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Featured Images' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_titles' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_titles' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_titles' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_titles ) ) ? $show_titles : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Titles' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_excerpts' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_excerpts' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_excerpts' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_excerpts ) ) ? $show_excerpts : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Excerpts' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n 'excerpt_length' => array(\n 'type' => 'number',\n 'name' => $this->get_field_name( 'excerpt_length' ) ,\n 'id' => $this->get_field_id( 'excerpt_length' ) ,\n 'min' => 0,\n 'max' => 10000,\n 'value' => ( isset( $excerpt_length ) ) ? $excerpt_length : NULL,\n 'label' => __( 'Excerpts Length' , 'layerswp' )\n ),\n\t\t\t\t\t\t\t\t'show_dates' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_dates' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_dates' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_dates ) ) ? $show_dates : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Dates' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_author' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_author' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_author' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_author ) ) ? $show_author : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Author' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_tags' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_tags' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_tags' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_tags ) ) ? $show_tags : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Tags' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_categories' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_categories' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_categories' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_categories ) ) ? $show_categories : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Categories' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_call_to_action' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_call_to_action' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_call_to_action' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_call_to_action ) ) ? $show_call_to_action : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show \"Read More\" Buttons' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n 'call_to_action' => array(\n 'type' => 'text',\n 'name' => $this->get_field_name( 'call_to_action' ) ,\n 'id' => $this->get_field_id( 'call_to_action' ) ,\n 'value' => ( isset( $call_to_action ) ) ? $call_to_action : NULL,\n 'label' => __( '\"Read More\" Text' , 'layerswp' )\n ),\n\t\t\t\t\t\t\t\t'show_pagination' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_pagination' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_pagination' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_pagination ) ) ? $show_pagination : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Pagination' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t) );\n\n\t\t\t$this->design_bar(\n\t\t\t\t'side', // CSS Class Name\n\t\t\t\tarray(\n\t\t\t\t\t'name' => $this->get_field_name( 'design' ),\n\t\t\t\t\t'id' => $this->get_field_id( 'design' ),\n\t\t\t\t), // Widget Object\n\t\t\t\t$instance, // Widget Values\n\t\t\t\t$design_bar_components, // Standard Components\n\t\t\t\t$design_bar_custom_components // Add-on Components\n\t\t\t); ?>\n\t\t\t<div class=\"layers-container-large\">\n\n\t\t\t\t<?php $this->form_elements()->header( array(\n\t\t\t\t\t'title' => __( 'Post' , 'layerswp' ),\n\t\t\t\t\t'icon_class' =>'post'\n\t\t\t\t) ); ?>\n\n\t\t\t\t<section class=\"layers-accordion-section layers-content\">\n\n\t\t\t\t\t<div class=\"layers-row layers-push-bottom\">\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'title' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'title' ) ,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Enter title here' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $title ) ) ? $title : NULL ,\n\t\t\t\t\t\t\t\t\t'class' => 'layers-text layers-large'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'excerpt' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'excerpt' ) ,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Short Excerpt' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $excerpt ) ) ? $excerpt : NULL ,\n\t\t\t\t\t\t\t\t\t'class' => 'layers-textarea layers-large'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php // Grab the terms as an array and loop 'em to generate the $options for the input\n\t\t\t\t\t\t$terms = get_terms( $this->taxonomy );\n\t\t\t\t\t\tif( !is_wp_error( $terms ) ) { ?>\n\t\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'category' ); ?>\"><?php echo __( 'Category to Display' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t\t<?php $category_options[ 0 ] = __( 'All' , 'layerswp' );\n\t\t\t\t\t\t\t\tforeach ( $terms as $t ) $category_options[ $t->term_id ] = $t->name;\n\t\t\t\t\t\t\t\techo $this->form_elements()->input(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'category' ) ,\n\t\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'category' ) ,\n\t\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Select a Category' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t\t'value' => ( isset( $category ) ) ? $category : NULL ,\n\t\t\t\t\t\t\t\t\t\t'options' => $category_options\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</p>\n\t\t\t\t\t\t<?php } // if !is_wp_error ?>\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'posts_per_page' ); ?>\"><?php echo __( 'Number of items to show' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t<?php $select_options[ '-1' ] = __( 'Show All' , 'layerswp' );\n\t\t\t\t\t\t\t$select_options = $this->form_elements()->get_incremental_options( $select_options , 1 , 20 , 1);\n\t\t\t\t\t\t\techo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'posts_per_page' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'posts_per_page' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $posts_per_page ) ) ? $posts_per_page : NULL ,\n\t\t\t\t\t\t\t\t\t'min' => '-1',\n\t\t\t\t\t\t\t\t\t'max' => '100'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'order' ); ?>\"><?php echo __( 'Sort by' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'order' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'order' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $order ) ) ? $order : NULL ,\n\t\t\t\t\t\t\t\t\t'options' => $this->form_elements()->get_sort_options()\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\n\t\t\t</div>\n\t\t<?php }", "public function hookConfigForm($args)\n {\n $view = get_view();\n $elementTable = $this->_db->getTable('Element');\n $configArgs -> options = get_option('viewer3d_options');\n if (isset($configArgs -> options)) {\n $configArgs -> options = json_decode($configArgs -> options);\n } else {\n $configArgs -> options = $this -> getDefaultOptions();\n set_option('viewer3d_options', json_encode($configArgs -> options));\n }\n //$configArgs -> options = $this -> getDefaultOptions();\n //set_option('viewer3d_options', json_encode($configArgs -> options));\n $this -> _showConfigForm($configArgs);\n \n }", "function JSOption()\n{\n\tglobal $options;\n\n\t// Check the session id.\n\tcheckSession('get');\n\n\t// If no variables are provided, leave the hell out of here.\n\tif (empty($_POST['v']) || !isset($_POST['val']))\n\t\texit;\n\n\t// Sorry, guests can't go any further than this..\n\tif (we::$is_guest || MID == 0)\n\t\tobExit(false);\n\n\t// If this is the admin preferences the passed value will just be an element of it.\n\tif ($_POST['v'] == 'admin_preferences')\n\t{\n\t\t$options['admin_preferences'] = !empty($options['admin_preferences']) ? unserialize($options['admin_preferences']) : array();\n\t\t// New thingy...\n\t\tif (isset($_GET['admin_key']) && strlen($_GET['admin_key']) < 5)\n\t\t\t$options['admin_preferences'][$_GET['admin_key']] = $_POST['val'];\n\n\t\t// Change the value to be something nice,\n\t\t$_POST['val'] = serialize($options['admin_preferences']);\n\t}\n\n\t// Update the option.\n\twesql::insert('replace',\n\t\t'{db_prefix}themes',\n\t\tarray('id_member' => 'int', 'variable' => 'string-255', 'value' => 'string-65534'),\n\t\tarray(MID, $_POST['v'], is_array($_POST['val']) ? implode(',', $_POST['val']) : $_POST['val'])\n\t);\n\n\tcache_put_data('theme_settings:' . MID, null, 60);\n\n\t// Don't output anything...\n\texit;\n}", "function sfg_home_button_options_callback() {\n//\n}", "private function set_end_options(): void {\n Simply_Static\\Options::instance()\n ->set('additional_files', Utils::array_to_option_string($this->files))\n ->set('additional_urls', Utils::array_to_option_string($this->urls))\n ->set('archive_end_time', Simply_Static\\Util::formatted_datetime())\n ->save();\n }", "function buildSettingsForm() {}", "function optionsframework_options() {\n\t// Theme Skin Color\n\t$theme_skin_colors = array(\n\t\t'45B6F7' => 100,\n\t\t'FF5E52' => 1,\n\t\t'2CDB87' => 2,\n\t\t'00D6AC' => 3,\n\t\t'16C0F8' => 4,\n\t\t'EA84FF' => 5,\n\t\t'FDAC5F' => 6,\n\t\t'FD77B2' => 7,\n\t\t'76BDFF' => 8,\n\t\t'C38CFF' => 9,\n\t\t'FF926F' => 10,\n\t\t'8AC78F' => 11,\n\t\t'C7C183' => 12,\n\t\t'555555' => 13\n\t);\n\t//List Type\n\t$list_type = array(\n\t\t'thumb' =>__('图文(缩略图尺寸:220*150,默认已自动裁剪)','im'),\n\t\t'text' =>__('文字','im'),\n\t\t'auto' =>__('自动(有缩略图时图文模式,否则文字模式)','im'),\n\t);\n\t//Post Widgets\n\t$post_widgets = array(\n\t\t'views' => __('阅读量(无需安装插件)','im'),\n\t\t'comments' => __('评论数(列表)','im'),\n\t\t'pubdate' => __('发布时间(列表)','im'),\n\t\t'authors' => __('作者(列表)','im'),\n\t\t'catlink' => __('分类链接(列表)','im')\n\t);\n\t$post_widgets_defaults = array(\n\t\t'views' => '1',\n\t\t'comments' => '1',\n\t\t'pubdate' => '1',\n\t\t'authors' => '1',\n\t\t'catlink' => '1'\n\t);\n\t// Pull all the categories into an array\n\t$options_categories = array();\n\t$options_categories_obj = get_categories();\n\tforeach ($options_categories_obj as $category) {\n\t\t$options_categories[$category->cat_ID] = $category->cat_name;\n\t}\n\n\t// Pull all tags into an array\n\t$options_tags = array();\n\t$options_tags_obj = get_tags();\n\tforeach ( $options_tags_obj as $tag ) {\n\t\t$options_tags[$tag->term_id] = $tag->name;\n\t}\n\n\t// Pull all the pages into an array\n\t$options_pages = array();\n\t$options_pages_obj = get_pages('sort_column=post_parent,menu_order');\n\t//$options_pages[''] = 'Select a page:';\n\tforeach ($options_pages_obj as $page) {\n\t\t$options_pages[$page->ID] = $page->post_title;\n\t}\n\n\t//Pull all the link categories into an array\n\t$options_linkcats = array();\n\t$options_linkcats_obj = get_terms('link_category');\n\tforeach ($options_linkcats_obj as $linkcats) {\n\t\t$options_linkcats[$linkcats->term_id] = $linkcats->name;\n\t}\n\t// If using image radio buttons, define a directory path\n\t$imagepath = get_stylesheet_directory_uri() . '/assets/images/';\n\t// ADs descriptions\n\t$ads_desc = __('可添加任意广告联盟代码或自定义代码', 'im');;\n\t$options = array();\n\t/**\n\t * Basic Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('基本设置','im'),\n\t\t'type' => 'heading'\n\t);\n\t// LOGO\n\t$options[] = array(\n\t\t'name' => __('LOGO','im'),\n\t\t'desc' => __('建议尺寸:140*32,格式PNG'),\n\t\t'id' => 'logo_src',\n\t\t'std' => $imagepath.'logo.png',\n\t\t'type' => 'upload'\n\t);\n\t// Brand Title\n\t$options[] = array(\n\t\t'name' => __('品牌文字','im'),\n\t\t'desc' => __('显示在logo旁边的两个短文字,换行填写两段文字','im'),\n\t\t'id' => 'brand',\n\t\t'std' => \"第一行\\n第二行\",\n\t\t'type' => 'textarea',\n\t\t'settings' => array(\n\t\t\t'rows' => 2\n\t\t)\n\t);\n\t// Theme Skin\n\t$options[] = array(\n\t\t'name' => __('主题风格','im'),\n\t\t'desc' => __('选择你喜欢的颜色,可自定义','im'),\n\t\t'id' => 'theme_skin',\n\t\t'std' => '45B6F7',\n\t\t'type' => 'colorradio',\n\t\t'options' => $theme_skin_colors\n\t);\n\t// Theme Skin Customize\n\t$options[] = array(\n\t\t'desc' => __('不喜欢上面的颜色可在此自定义,如不使用清空即可','im'),\n\t\t'id' => 'theme_skin_custom',\n\t\t'type' => 'color'\n\t);\n\t// Show Sidebar\n\t$options[] = array(\n\t\t'name' => __('是否显示侧栏','im'),\n\t\t'desc' => __('显示侧栏','im'),\n\t\t'id' => 'show_sidebar',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Content Max Width\n\t$options[] = array(\n\t\t'name' => __('网页最大宽度','im'),\n\t\t'desc' => __('单位:px','im'),\n\t\t'id' => 'site_width',\n\t\t'std' => 1200,\n\t\t'type' => 'text',\n\t\t'class'=> 'mini'\n\t);\n\t// Fixed Nav In PC Frontend\n\t$options[] = array(\n\t\t'name' => __('PC端滚动时导航固定','im'),\n\t\t'desc' => __('开启(由于网址导航页左侧菜单固定,对此页面无效)','im'),\n\t\t'id' => 'nav_fixed',\n\t\t'type' => 'checkbox'\n\t);\n\t// Open Article Links In New Tab\n\t$options[] = array(\n\t\t'name' => __('新窗口打开文章','im'),\n\t\t'desc' => __('新窗口打开文章','im'),\n\t\t'id' => 'target_blank',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Load Pages By Ajax\n\t$options[] = array(\n\t\t'name' => __('分页无限加载页数','im'),\n\t\t'desc' => __('为0时表示不开启该功能','im'),\n\t\t'id' => 'ajaxpager',\n\t\t'std' => 5,\n\t\t'type' => 'text',\n\t\t'class'=> 'mini'\n\t);\n\t// List Type\n\t$options[] = array(\n\t\t'name' => __('列表模式','im'),\n\t\t'id' => 'list_type',\n\t\t'std' => 'thumb',\n\t\t'type' => 'radio',\n\t\t'options' => $list_type\n\t);\n\t// Thumbnails\n\t$options[] = array(\n\t\t'name' => __('缩略图','im'),\n\t\t'desc' => __('自动提取文章首图为缩略图(如文章已设置特色图或外链缩略图,此设置无效)','im'),\n\t\t'id' => 'thumbnails',\n\t\t'type' => 'checkbox'\n\t);\n\t// Thumbnails Auto\n\t$options[] = array(\n\t\t'desc' => __('将自动加入文章首图地址后缀之前,默认为空。如:文章首图地址”aaa/bbb.jpg”,此处填写的字符是“-220x150”,则缩略图实际地址为“aaa/bbb-220x150.jpg”','im'),\n\t\t'id' => 'thumbnails_suffix',\n\t\t'std' => 'thumb',\n\t\t'type' => 'text',\n\t\t'class'=> 'mini thumbnails_hidden',\n\t);\n\t// Thumbnails Link\n\t$options[] = array(\n\t\t'desc' => __('外链缩略图(开启后会在后台编辑文章时出现外链缩略图地址输入框,填写一个图片地址即可在文章列表中显示。注:如文章添加了特色图像,列表中显示的缩略图优先选择该特色图像。)','im'),\n\t\t'id' => 'thumbnails_link',\n\t\t'type' => 'checkbox'\n\t);\n\t// Post widgets\n\t$options[] = array(\n\t\t'name' => __('文章小部件','im'),\n\t\t'desc' => __('列表中是否显示小部件','im'),\n\t\t'id' => 'post_widgets',\n\t\t'std' => $post_widgets_defaults,\n\t\t'type' => 'multicheck',\n\t\t'options' => $post_widgets\n\t);\n\t// Comment Pop Align Right\n\t$options[] = array(\n\t\t'name' => __('列表中评论数靠右','im'),\n\t\t'desc' => __('列表中评论数靠右','im'),\n\t\t'id' => 'list_comments_r',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Author Link\n\t$options[] = array(\n\t\t'name' => __('作者名加链接','im'),\n\t\t'desc' => __('列表、文章有作者的地方都会加上链接','im'),\n\t\t'id' => 'author_link',\n\t\t'type' => 'checkbox'\n\t);\n\t// Footer Extra Info\n\t$options[] = array(\n\t\t'name' => __('网站底部信息','im'),\n\t\t'desc' => __('版权、网站地图(网站地图可自行使用sitemap插件自动生成)等','im'),\n\t\t'id' => 'footer_extra_info',\n\t\t'std' => '<a href=\"'.site_url('/sitemap.xml').'\">'.__('网站地图', 'haoui').'</a>'.\"\\n\",\n\t\t'type' => 'textarea'\n\t);\n\t// Site Gray\n\t$options[] = array(\n\t\t'name' => __('网站整体变灰','im'),\n\t\t'desc' => __('网站整体变灰','im'),\n\t\t'id' => 'site_gray',\n\t\t'type' => 'checkbox'\n\t);\n\t// Footer Spreadings\n\t$options[] = array(\n\t\t'name' => __('站点底部推广区','im'),\n\t\t'desc' => __('是否开启站点底部推广区','im'),\n\t\t'id' => 'footer_spreadings',\n\t\t'type' => 'checkbox'\n\t);\n\t// Footer Spreadings Title\n\t$options[] = array(\n\t\t//'name' => __('标题','im'),\n\t\t'desc' => __('标题:建议20字内','im'),\n\t\t'id' => 'footer_spreadings_title',\n\t\t'std' => '更专业 更方便',\n\t\t'type' => 'text',\n\t\t'class'=> 'footer_spreadings_hidden'\n\t);\n\t// Footer Spreadings Buttons\n\tfor($i = 1;$i <= 2;$i++){\n\t\t// Footer Spreadings Buttons Title\n\t\t$options[] = array(\n\t\t\t'name' => __('按钮','im').$i,\n\t\t\t'desc' => __('按钮文字','im'),\n\t\t\t'id' => 'footer_spreadings_btn_title_'.$i,\n\t\t\t'type' => 'text',\n\t\t\t'class'=> 'footer_spreadings_hidden'\n\t\t);\n\t\t// Footer Spreadings Buttons Link\n\t\t$options[] = array(\n\t\t\t'desc' => __('按钮链接','im'),\n\t\t\t'id' => 'footer_spreadings_btn_link_'.$i,\n\t\t\t'type' => 'text',\n\t\t\t'class'=> 'footer_spreadings_hidden'\n\t\t);\n\t\t// Footer Spreadings Buttons Link Open Style\n\t\t$options[] = array(\n\t\t\t'desc' => __('新窗口打开','im'),\n\t\t\t'id' => 'footer_spreadings_btn_link_target_'.$i,\n\t\t\t'type' => 'checkbox',\n\t\t\t'class'=> 'footer_spreadings_hidden'\n\t\t);\n\t}\n\t/**\n\t * Home Page Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('首页设置','im'),\n\t\t'type' => 'heading'\n\t);\n\t// Don't show articles in these categories\n\t$options[] = array(\n\t\t'name' => __('首页不显示该分类下文章','im'),\n\t\t'id' => 'ignore_articles_cat',\n\t\t'type' => 'multicheck',\n\t\t'options' => $options_categories\n\t);\n\t// Don't show these posts\n\t$options[] = array(\n\t\t'name' => __('首页不显示以下ID文章','im'),\n\t\t'desc' => __('每行填写一个文章ID','im'),\n\t\t'id' => 'ignore_posts',\n\t\t'type' => 'textarea',\n\t\t'settings' => array(\n\t\t\t'rows' => 5\n\t\t)\n\t);\n\t// Notice District\n\t$options[] = array(\n\t\t'name' => __('公告模块','im'),\n\t\t'desc' => __('显示公告模块','im'),\n\t\t'id' => 'notice_district',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Notice District Title\n\t$options[] = array(\n\t\t'name' => __('公告模块标题','im'),\n\t\t'desc' => __('建议4个字以内','im'),\n\t\t'id' => 'notice_district_title',\n\t\t'std' => '站点公告',\n\t\t'type' => 'text',\n\t\t'class'=> 'notice_district_hidden'\n\t);\n\t// Notice District Contents From The Category Bellow\n\t$options[] = array(\n\t\t'name' => __('选择分类设置为网站公告','im'),\n\t\t'desc' => __('选择该分类为网站公告','im'),\n\t\t'id' => 'notice_district_cat',\n\t\t'type' => 'select',\n\t\t'class'=> 'notice_district_hidden',\n\t\t'options' => $options_categories\n\t);\n\t// Carousel Figure\n\t$options[] = array(\n\t\t'name' => __('轮播图','im'),\n\t\t'desc' => __('开启轮播图','im'),\n\t\t'id' => 'carousel_figure',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Carousel Figure Order\n\t$options[] = array(\n\t\t'name' => __('图片排序','im'),\n\t\t'desc' => __('数字间空格隔开,默认1 2 3 4 5','im'),\n\t\t'id' => 'carousel_figure_order',\n\t\t'std' => '1 2 3 4 5',\n\t\t'type' => 'text',\n\t\t'class'=> 'carousel_figure_hidden'\n\t);\n\t// Carousel Figure Item\n\tfor($i = 1;$i <= 5;$i++){\n\t\t// Carousel Figure Item Title\n\t\t$options[] = array(\n\t\t\t'name' => __('图片','im').$i,\n\t\t\t'desc' => __('图片标题','im'),\n\t\t\t'id' => 'carousel_figure_item_title_'.$i,\n\t\t\t'std' => 'IM',\n\t\t\t'type' => 'text',\n\t\t\t'class'=> 'carousel_figure_hidden'\n\t\t);\n\t\t// Carousel Figure Item Link\n\t\t$options[] = array(\n\t\t\t'desc' => __('链接地址','im'),\n\t\t\t'id' => 'carousel_figure_item_link_'.$i,\n\t\t\t'std' => 'http://www.webzgq.com',\n\t\t\t'type' => 'text',\n\t\t\t'class'=> 'carousel_figure_hidden'\n\t\t);\n\t\t// Carousel Figure Item Image\n\t\t$options[] = array(\n\t\t\t'desc' => __('图片上传(820*200)','im'),\n\t\t\t'id' => 'carousel_figure_item_image_'.$i,\n\t\t\t'std' => $imagepath.'xiu.jpg',\n\t\t\t'type' => 'upload',\n\t\t\t'class'=> 'carousel_figure_hidden'\n\t\t);\n\t\t// Carousel Figure Item Open Style\n\t\t$options[] = array(\n\t\t\t'desc' => __('新窗口打开','im'),\n\t\t\t'id' => 'carousel_figure_item_open_'.$i,\n\t\t\t'type' => 'checkbox',\n\t\t\t'class'=> 'carousel_figure_hidden'\n\t\t);\n\t}\n\t// List Section Title\n\t$options[] = array(\n\t\t'name' => __('列表板块标题','im'),\n\t\t'desc' => __('列表板块标题','im'),\n\t\t'id' => 'list_section_title',\n\t\t'std' => __('最新发布','im'),\n\t\t'type' => 'text'\n\t);\n\t// Contents of Right Part of the List Section Title \n\t$options[] = array(\n\t\t'name' => __('列表板块标题右侧内容','im'),\n\t\t'desc' => __('列表板块标题右侧内容','im'),\n\t\t'id' => 'list_section_title_r',\n\t\t'std' => '<a href=\"链接地址\">显示文字</a><a href=\"链接地址\">显示文字</a><a href=\"链接地址\">显示文字</a><a href=\"链接地址\">显示文字</a>',\n\t\t'type' => 'textarea'\n\t);\n\t/**\n\t * Article Page Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('文章页设置','im'),\n\t\t'type' => 'heading'\n\t);\n\t// Hide Share Section In Mobile Frontend\n\t$options[] = array(\n\t\t'name' => __('手机端不显示分享模块','im'),\n\t\t'desc' => __('手机端不显示分享模块','im'),\n\t\t'id' => 'hide_share_distric',\n\t\t'type' => 'checkbox'\n\t);\n\t// Enable subtitle\n\t$options[] = array(\n\t\t'name' => __('副标题','im'),\n\t\t'desc' => __('开启副标题','im'),\n\t\t'id' => 'enable_subtitle',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Show the prev&nest post of current post\n\t$options[] = array(\n\t\t'name' => __('显示上下篇文章','im'),\n\t\t'desc' => __('显示上下篇文章','im'),\n\t\t'id' => 'post_prevnext',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Show Author Info Section\n\t$options[] = array(\n\t\t'name' => __('显示文章作者介绍','im'),\n\t\t'desc' => __('显示文章作者介绍','im'),\n\t\t'id' => 'post_author_info',\n\t\t'type' => 'checkbox'\n\t);\n\t// Related Posts Section\n\t$options[] = array(\n\t\t'name' => __('相关文章','im'),\n\t\t'desc' => __('是否显示相关文章','im'),\n\t\t'id' => 'post_related_section',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Related Posts Section Title\n\t$options[] = array(\n\t\t'desc' => __('相关文章板块标题','im'),\n\t\t'id' => 'post_related_section_title',\n\t\t'std' => __('相关推荐',\"im\"),\n\t\t'type' => 'text',\n\t\t'class'=> 'post_related_section_hidden'\n\t);\n\t// Related Posts Number\n\t$options[] = array(\n\t\t'desc' => __('显示文章数量','im'),\n\t\t'id' => 'post_related_num',\n\t\t'std' => 10,\n\t\t'type' => 'text',\n\t\t'class'=> 'post_related_section_hidden'\n\t);\n\t// Article Source Section\n\t$options[] = array(\n\t\t'name' => __('文章来源','im'),\n\t\t'desc' => __('是否显示文章来源','im'),\n\t\t'id' => 'article_source_section',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Article Source Link\n\t$options[] = array(\n\t\t'desc' => __('是否加上来源链接','im'),\n\t\t'id' => 'article_source_section_link',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox',\n\t\t'class'=> 'article_source_section_hidden'\n\t);\n\t// Article Source Link Section Title\n\t$options[] = array(\n\t\t'desc' => __('自定义来源标题','im'),\n\t\t'id' => 'article_source_section_title',\n\t\t'std' => __('来源:','im'),\n\t\t'type' => 'text',\n\t\t'class'=> 'article_source_section_hidden'\n\t);\n\t// Post Content Indent\n\t$options[] = array(\n\t\t'name' => __('内容段落缩进','im'),\n\t\t'desc' => __('只对前端文章展示有效','im'),\n\t\t'id' => 'post_content_indent',\n\t\t'type' => 'checkbox'\n\t);\n\t// Copyright Section After Content\n\t$options[] = array(\n\t\t'name' => __('文章页尾版权提示','im'),\n\t\t'desc' => __('是否显示文章页尾版权提示','im'),\n\t\t'id' => 'post_copyright',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Copyright Section Title\n\t$options[] = array(\n\t\t'desc' => __('版权提示前缀','im'),\n\t\t'id' => 'post_copyright_prefix',\n\t\t'std' => __('未经允许不得转载:','im'),\n\t\t'type' => 'text',\n\t\t'class'=> 'post_copyright_hidden'\n\t);\n\t// Post keywords and discriptions\n\t$options[] = array(\n\t\t'name' => __('文章关键词及描述','im'),\n\t\t'desc' => __('自动使用主题配置的关键词和描述(具体规则可以自行查看页面源码)','im'),\n\t\t'id' => 'post_keywords_discriptions',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Post keywords and discriptions customizion\n\t$options[] = array(\n\t\t'name' => __('自定义文章关键词及描述','im'),\n\t\t'desc' => __('开启后需在编辑文章时书写关键词和描述,如为空则使用如上规则,开启此项必须开启如上选项','im'),\n\t\t'id' => 'post_keywords_discriptions_customizion',\n\t\t'type' => 'checkbox',\n\t\t'class'=> 'post_keywords_discriptions_hidden'\n\t);\n\t/**\n\t * Unique Page Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('独立页面','im'),\n\t\t'type' => 'heading'\n\t);\n\t// Site URL Navgation Page\n\t$options[] = array(\n\t\t'name' => __('网址导航页','im'),\n\t\t'desc' => __('标题下方描述','im'),\n\t\t'id' => 'navpage_desc',\n\t\t'std' => __('这里显示的是网址导航的一句话描述...','im'),\n\t\t'type' => 'text'\n\t);\n\t// Site URL Navgation Page Show Link Category\n\t$options[] = array(\n\t\t'desc' => __('要显示的链接分类','im'),\n\t\t'id' => 'navpage_cats',\n\t\t'type' => 'multicheck',\n\t\t'options' => $options_linkcats\n\t);\n\t// Reader Wall(time limit)\n\t$options[] = array(\n\t\t'name' => __('读者墙','im'),\n\t\t'desc' => __('限制在多少个月内(单位:月)','im'),\n\t\t'id' => 'readerwall_limit_time',\n\t\t'std' => 200,\n\t\t'type' => 'text',\n\t\t'class'=> 'mini'\n\t);\n\t// Reader Wall Number\n\t$options[] = array(\n\t\t'desc' => __('显示个数','im'),\n\t\t'id' => 'readerwall_limit_number',\n\t\t'std' => 200,\n\t\t'type' => 'text',\n\t\t'class'=> 'mini'\n\t);\n\t// Page Left Part Menus\n\t$options[] = array(\n\t\t'name' => __('页面左侧菜单','im'),\n\t\t'desc' => __('页面左侧菜单','im'),\n\t\t'id' => 'page_left_part_menus',\n\t\t'type' => 'multicheck',\n\t\t'options' => $options_pages\n\t);\n\t// Friend Links Categories\n\t$options[] = array(\n\t\t'name' => __('友情链接分类选择','im'),\n\t\t'desc' => __('友情链接分类选择','im'),\n\t\t'id' => 'friend_links_cat',\n\t\t'type' => 'multicheck',\n\t\t'options' => $options_linkcats\n\t);\n\t/**\n\t * SEO Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('SEO设置','im'),\n\t\t'type' => 'heading'\n\t);\n\t// Site keywords\n\t$options[] = array(\n\t\t'name' => __('站点默认关键字','im'),\n\t\t'desc' => __('建议个数在5-10之间,用英文逗号隔开','im'),\n\t\t'id' => 'site_keywords',\n\t\t'type' => 'textarea',\n\t\t'settings' => array(\n\t\t\t'rows' => 2\n\t\t)\n\t);\n\t// Site descriptions\n\t$options[] = array(\n\t\t'name' => __('站点描述','im'),\n\t\t'desc' => __('建议字数在30—70个之间','im'),\n\t\t'id' => 'site_descriptions',\n\t\t'type' => 'textarea',\n\t\t'settings' => array(\n\t\t\t'rows' => 2\n\t\t)\n\t);\n\t// Hyphen\n\t$options[] = array(\n\t\t'name' => __('全站连接符','im'),\n\t\t'desc' => __('一般为“-”或“_”,已经选择,请勿更改','im'),\n\t\t'id' => 'hythen',\n\t\t//'std' => _im('connector') ? _im('connector') : '-',\n\t\t'std' => '-',\n\t\t'type' => 'text',\n\t\t'class'=> 'mini'\n\t);\n\t// No category in URL\n\t$options[] = array(\n\t\t'name' => __('分类URL去除category字样','im'),\n\t\t'desc' => __('开启(主题已内置no-category插件功能,请不要安装插件;开启后请去设置-固定连接中点击保存即可)','im'),\n\t\t'id' => 'no_cat_in_url',\n\t\t'type' => 'checkbox'\n\t);\n\t// Friend Links Section In the Bottom of Page\n\t$options[] = array(\n\t\t'name' => __('底部友情链接','im'),\n\t\t'desc' => __('开启底部友情链接','im'),\n\t\t'id' => 'bottom_flinks',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Friend Links Section In the Bottom for home page\n\t$options[] = array(\n\t\t'desc' => __('只在首页开启','im'),\n\t\t'id' => 'bottom_flinks_home',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox',\n\t\t'class'=> 'bottom_flinks_hidden'\n\t);\n\t// Friend Links From Which Link Categories\n\t$options[] = array(\n\t\t'name' => __('选择一个友链的链接分类','im'),\n\t\t'desc' => __('选择一个友链的链接分类','im'),\n\t\t'id' => 'bottom_flinks_cat',\n\t\t'type' => 'select',\n\t\t'class'=> 'bottom_flinks_hidden',\n\t\t'options' => $options_linkcats\n\t);\n\t// Enable Baidu Inner Site Search\n\t$options[] = array(\n\t\t'name' => __('百度站内搜索','im'),\n\t\t'desc' => __('开启百度站内搜索','im'),\n\t\t'id' => 'enable_baidu_inner',\n\t\t'type' => 'checkbox'\n\t);\n\t// Baidu Inner Site Seach Code\n\t$options[] = array(\n\t\t'desc' => __('此处存放百度自定义站内搜索代码(http://zn.baidu.com设置并获取)','im'),\n\t\t'id' => 'baidu_search_code',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'enable_baidu_inner_hidden',\n\t\t'settings' => array(\n\t\t\t'rows' => 5\n\t\t)\n\t);\n\t/**\n\t * User Center Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('会员中心','im'),\n\t\t'type' => 'heading'\n\t);\n\t// Enable User Center\n\t$options[] = array(\n\t\t'name' => __('开启会员中心','im'),\n\t\t'desc' => __('开启会员中心','im'),\n\t\t'id' => 'enable_user_center',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Show User module in notice district of home page\n\t$options[] = array(\n\t\t'desc' => __('首页公告栏显示会员模块','im'),\n\t\t'id' => 'user_on_notice_module',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox',\n\t\t'class'=> 'enable_user_center_hidden'\n\t);\n\t// User Center template\n\t$options[] = array(\n\t\t'name' => __('会员中心页面','im'),\n\t\t'desc' => __('会员中心页面','im'),\n\t\t'id' => 'user_page',\n\t\t'type' => 'select',\n\t\t'class'=> 'enable_user_center_hidden',\n\t\t'options' => $options_pages\n\t);\n\t// User secure template\n\t$options[] = array(\n\t\t'name' => __('找回密码页面','im'),\n\t\t'desc' => __('找回密码页面','im'),\n\t\t'id' => 'user_pw_page',\n\t\t'type' => 'select',\n\t\t'class'=> 'enable_user_center_hidden',\n\t\t'options' => $options_pages\n\t);\n\t// Allow User Publish Posts\n\t$options[] = array(\n\t\t'name' => __('允许用户发布文章','im'),\n\t\t'desc' => __('允许用户发布文章','im'),\n\t\t'id' => 'allow_user_post',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox',\n\t\t'class'=> 'enable_user_center_hidden'\n\t);\n\t// Notifications of publishing\n\t$options[] = array(\n\t\t'name' => __('新投稿时邮件通知','im'),\n\t\t'desc' => __('新投稿时邮件通知','im'),\n\t\t'id' => 'notification_of_user_post',\n\t\t'type' => 'checkbox',\n\t\t'class'=> 'enable_user_center_hidden'\n\t);\n\t// Notifications of publishing by E-mail\n\t$options[] = array(\n\t\t'name' => __('通知邮箱','im'),\n\t\t'desc' => __('通知邮箱','im'),\n\t\t'id' => 'notification_by_email',\n\t\t'type' => 'text',\n\t\t'class'=> 'notification_of_user_post_hidden'\n\t);\n\t/**\n\t * ADs District Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('广告区','im'),\n\t\t'type' => 'heading'\n\t);\n\t// List Section of Home Page Top\n\t$options[] = array(\n\t\t'name' => __('首页文章列表板块上','im'),\n\t\t'desc' => __('首页文章列表板块上','im'),\n\t\t'id' => 'ads_index_01',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_index_01_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_index_01_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_index_01_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_index_01_hidden'\n\t);\n\t// List Section of Home Page Bottom\n\t$options[] = array(\n\t\t'name' => __('首页文章列表板块下','im'),\n\t\t'desc' => __('首页文章列表板块下','im'),\n\t\t'id' => 'ads_index_02',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_index_02_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_index_02_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_index_02_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_index_02_hidden'\n\t);\n\t// Content Section of Post Page Top\n\t$options[] = array(\n\t\t'name' => __('文章页正文上','im'),\n\t\t'desc' => __('文章页正文上','im'),\n\t\t'id' => 'ads_post_01',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_post_01_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_post_01_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_post_01_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_post_01_hidden'\n\t);\n\t// Words AD Right After Content Section of Post Page\n\t$options[] = array(\n\t\t'name' => __('文章页正文结尾文字广告','im'),\n\t\t'desc' => __('文章页正文结尾文字广告','im'),\n\t\t'id' => 'ads_post_02',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('前缀','im'),\n\t\t'id' => 'ads_post_02_prefix',\n\t\t'std' => __('专业','im'),\n\t\t'type' => 'text',\n\t\t'class'=> 'ads_post_02_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('标题','im'),\n\t\t'id' => 'ads_post_02_title',\n\t\t'std' => __('阿里巴巴','im'),\n\t\t'type' => 'text',\n\t\t'class'=> 'ads_post_02_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('链接','im'),\n\t\t'id' => 'ads_post_02_link',\n\t\t'std' => 'http://www.webzgq.com',\n\t\t'type' => 'text',\n\t\t'class'=> 'ads_post_02_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('是否新窗口打开','im'),\n\t\t'id' => 'ads_post_02_link_blank',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox',\n\t\t'class'=> 'ads_post_02_hidden'\n\t);\n\t// Content Section of Post Page Bottom\n\t$options[] = array(\n\t\t'name' => __('文章页正文下','im'),\n\t\t'desc' => __('文章页正文下','im'),\n\t\t'id' => 'ads_post_03',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_post_03_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_post_03_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_post_03_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_post_03_hidden'\n\t);\n\t// Above Comments Section of Post Page\n\t$options[] = array(\n\t\t'name' => __('文章页评论上','im'),\n\t\t'desc' => __('文章页评论上','im'),\n\t\t'id' => 'ads_post_04',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_post_04_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_post_04_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_post_04_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_post_04_hidden'\n\t);\n\t// List Section of Category Page Top\n\t$options[] = array(\n\t\t'name' => __('分类页列表板块上','im'),\n\t\t'desc' => __('分类页列表板块上','im'),\n\t\t'id' => 'ads_cat_01',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_cat_01_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_cat_01_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_cat_01_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_cat_01_hidden'\n\t);\n\t// List Section of Category Page Bottom\n\t$options[] = array(\n\t\t'name' => __('分类页列表板块下','im'),\n\t\t'desc' => __('分类页列表板块下','im'),\n\t\t'id' => 'ads_cat_02',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_cat_02_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_cat_02_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_cat_02_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_cat_02_hidden'\n\t);\n\t// List Section of Tag Page Top\n\t$options[] = array(\n\t\t'name' => __('标签页列表板块上','im'),\n\t\t'desc' => __('标签页列表板块上','im'),\n\t\t'id' => 'ads_tag_01',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_tag_01_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_tag_01_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_tag_01_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_tag_01_hidden'\n\t);\n\t// List Section of Tag Page Bottom\n\t$options[] = array(\n\t\t'name' => __('标签页列表板块下','im'),\n\t\t'desc' => __('标签页列表板块下','im'),\n\t\t'id' => 'ads_tag_02',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_tag_02_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_tag_02_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_tag_02_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_tag_02_hidden'\n\t);\n\t// List Section of Search Results Page Top\n\t$options[] = array(\n\t\t'name' => __('搜索页列表板块上','im'),\n\t\t'desc' => __('搜索页列表板块上','im'),\n\t\t'id' => 'ads_search_01',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_search_01_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_search_01_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_search_01_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_search_01_hidden'\n\t);\n\t// List Section of Search Results Page Bottom\n\t$options[] = array(\n\t\t'name' => __('搜索页列表板块下','im'),\n\t\t'desc' => __('搜索页列表板块下','im'),\n\t\t'id' => 'ads_search_02',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_search_02_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_search_02_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_search_02_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_search_02_hidden'\n\t);\n\t/**\n\t * Interaction Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('互动设置','im'),\n\t\t'type' => 'heading'\n\t);\n\t// Gravatar Link\n\t$options[] = array(\n\t\t'name' => __('Gravatar头像获取','im'),\n\t\t'id' => 'gravatar_url',\n\t\t'std' => 'ssl',\n\t\t'type' => 'radio',\n\t\t'options' => array(\n\t\t\t'normal' => __('原有方式', 'im'),\n\t\t\t'ssl' => __('从Gravatar官方ssl获取', 'im'),\n\t\t\t'duoshuo' => __('从多说服务器获取', 'im')\n\t\t)\n\t);\n\t// Social WEIBO\n\t$options[] = array(\n\t\t'name' => __('微博','im'),\n\t\t'desc' => __('微博','im'),\n\t\t'id' => 'weibo',\n\t\t'type' => 'text'\n\t);\n\t// Social TWITTER\n\t$options[] = array(\n\t\t'name' => __('Twitter','im'),\n\t\t'desc' => __('Twitter','im'),\n\t\t'id' => 'twitter',\n\t\t'type' => 'text'\n\t);\n\t// Social FACEBOOK\n\t$options[] = array(\n\t\t'name' => __('Facebook','im'),\n\t\t'desc' => __('Facebook','im'),\n\t\t'id' => 'facebook',\n\t\t'type' => 'text'\n\t);\n\t// Social QQ\n\t$options[] = array(\n\t\t'name' => __('QQ','im'),\n\t\t'desc' => __('QQ','im'),\n\t\t'id' => 'qq',\n\t\t'type' => 'text'\n\t);\n\t// Social WECHAT\n\t$options[] = array(\n\t\t'name' => __('微信','im'),\n\t\t'desc' => __('微信','im'),\n\t\t'id' => 'wechat',\n\t\t'std' => 'IM',\n\t\t'type' => 'text'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('二维码上传(200*200)','im'),\n\t\t'id' => 'wechat_qr',\n\t\t'type' => 'upload'\n\t);\n\t// Social RSS\n\t$options[] = array(\n\t\t'name' => __('RSS订阅','im'),\n\t\t'desc' => __('RSS订阅','im'),\n\t\t'id' => 'feed',\n\t\t'std' => get_feed_link(),\n\t\t'type' => 'text'\n\t);\n\t// Comment Title\n\t$options[] = array(\n\t\t'name' => __('评论标题','im'),\n\t\t'desc' => __('评论标题','im'),\n\t\t'id' => 'comment_title',\n\t\t'std' => __('评论', 'im'),\n\t\t'type' => 'text'\n\t);\n\t// Comment Placeholder\n\t$options[] = array(\n\t\t'name' => __('评论框默认字符','im'),\n\t\t'desc' => __('评论框默认字符','im'),\n\t\t'id' => 'comment_placehoder',\n\t\t'std' => __('你说呀','im'),\n\t\t'type' => 'text'\n\t);\n\t// Comment Submit Text\n\t$options[] = array(\n\t\t'name' => __('评论提交按钮字符','im'),\n\t\t'desc' => __('评论提交按钮字符','im'),\n\t\t'id' => 'comment_submit_text',\n\t\t'std' => __('提交评论', 'im'),\n\t\t'type' => 'text'\n\t);\n\t// Comment reply notify mail with extra info\n\t$options[] = array(\n\t\t'name' => __('用户评论被回复时邮件内容附自定义信息(被回复都会邮件通知)','im'),\n\t\t'desc' => __('邮件附加信息1','im'),\n\t\t'id' => 'mail_info1',\n\t\t'std' => __('订阅'.get_bloginfo('name'),'im'),\n\t\t'type' => 'text'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('邮件附加信息1链接','im'),\n\t\t'id' => 'mail_info1_link',\n\t\t'std' => get_feed_link(),\n\t\t'type' => 'text'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('邮件附加信息2','im'),\n\t\t'id' => 'mail_info2',\n\t\t'type' => 'text'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('邮件附加信息2链接','im'),\n\t\t'id' => 'mail_info2_link',\n\t\t'type' => 'text'\n\t);\n\t// Share Module\n\t$options[] = array(\n\t\t'name' => __('分享模块','im'),\n\t\t'desc' => __('分享模块','im'),\n\t\t'id' => 'share_module',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Share Module Code\n\t$options[] = array(\n\t\t'name' => __('分享代码','im'),\n\t\t'desc' => __('默认是百度分享代码,可以改成其他分享代码','im'),\n\t\t'id' => 'share_module_code',\n\t\t'std' => '<div class=\"bdsharebuttonbox\">\n<span>分享到:</span>\n<a class=\"bds_qzone\" data-cmd=\"qzone\" title=\"分享到QQ空间\"></a>\n<a class=\"bds_tsina\" data-cmd=\"tsina\" title=\"分享到新浪微博\"></a>\n<a class=\"bds_weixin\" data-cmd=\"weixin\" title=\"分享到微信\"></a>\n<a class=\"bds_tqq\" data-cmd=\"tqq\" title=\"分享到腾讯微博\"></a>\n<a class=\"bds_sqq\" data-cmd=\"sqq\" title=\"分享到QQ好友\"></a>\n<a class=\"bds_bdhome\" data-cmd=\"bdhome\" title=\"分享到百度新首页\"></a>\n<a class=\"bds_tqf\" data-cmd=\"tqf\" title=\"分享到腾讯朋友\"></a>\n<a class=\"bds_youdao\" data-cmd=\"youdao\" title=\"分享到有道云笔记\"></a>\n<a class=\"bds_more\" data-cmd=\"more\">更多</a> <span>(</span><a class=\"bds_count\" data-cmd=\"count\" title=\"累计分享0次\">0</a><span>)</span>\n</div>\n<script>\nwindow._bd_share_config = {\n common: {\n\t\t\"bdText\" : \"\",\n\t\t\"bdMini\" : \"2\",\n\t\t\"bdMiniList\" : false,\n\t\t\"bdPic\" : \"\",\n\t\t\"bdStyle\" : \"0\",\n\t\t\"bdSize\" : \"24\"\n },\n share: [{\n bdCustomStyle: \"'. get_stylesheet_directory_uri() .'/css/share.css\"\n }]\n}\nwith(document)0[(getElementsByTagName(\"head\")[0]||body).appendChild(createElement(\"script\")).src=\"http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion=\"+~(-new Date()/36e5)];\n</script>',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'share_module_hidden',\n\t\t'settings' => array(\n\t\t\t'rows' => 10\n\t\t)\n\t);\n\t/**\n\t * Performance Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('性能选项','im'),\n\t\t'type' => 'heading'\n\t);\n\t// Place jQuery in the bottom of site\n\t$options[] = array(\n\t\t'name' => __('jQuery底部加载','im'),\n\t\t'desc' => __('开启(可提升页面内容加载速度,但部分依赖jQuery的插件可能失效)','im'),\n\t\t'id' => 'jquery_bottom',\n\t\t'type' => 'checkbox'\n\t);\n\t// Js CDN\n\t$options[] = array(\n\t\t'name' => __('JS文件托管','im'),\n\t\t'desc' => __('JS文件是否托管','im'),\n\t\t'id' => 'js_cdn',\n\t\t'std' => 'localhost',\n\t\t'type' => 'radio',\n\t\t'options' => array(\n\t\t\t'localhost' => __('不托管', 'im'),\n\t\t\t'baidu' => __('百度', 'im'),\n\t\t\t'offi_site' => __('框架来源站点(分别引入jquery和bootstrap官方站点JS文件)', 'im')\n\t\t)\n\t);\n\t// Thumbnails loading by ajax \n\t$options[] = array(\n\t\t'name' => __('文章缩略图异步加载','im'),\n\t\t'desc' => __('文章缩略图异步加载','im'),\n\t\t'id' => 'ajax_thumbnail',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t/**\n\t * Functionalities Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('功能设置','im'),\n\t\t'type' => 'heading'\n\t);\n\t// Micro Categories\n\t$options[] = array(\n\t\t'name' => __('微分类','im'),\n\t\t'desc' => __('开启微分类','im'),\n\t\t'id' => 'micro_cat',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Show posts from Micro Categories in home page\n\t$options[] = array(\n\t\t'name' => __('在首页显示微分类最新文章','im'),\n\t\t'desc' => __('在首页显示微分类最新文章','im'),\n\t\t'id' => 'micro_cat_home',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox',\n\t\t'class'=> 'micro_cat_hidden'\n\t);\n\t// Micro Categories Title\n\t$options[] = array(\n\t\t'name' => __('标题(默认:今日观点)','im'),\n\t\t'desc' => __('标题(默认:今日观点)','im'),\n\t\t'id' => 'micro_cat_home_title',\n\t\t'std' => __('今日观点','im'),\n\t\t'type' => 'text',\n\t\t'class'=> 'micro_cat_hidden'\n\t);\n\t// Choose a category for micro category\n\t$options[] = array(\n\t\t'name' => __('选择分类设置为微分类','im'),\n\t\t'desc' => __('选择一个使用微分类展示模版,分类下文章将全文输出到微分类列表','im'),\n\t\t'id' => 'micro_cat_from',\n\t\t'type' => 'select',\n\t\t'class'=> 'micro_cat_hidden',\n\t\t'options' => $options_categories\n\t);\n\t// Sidebars scroll as Window scrolls for home page\n\t$options[] = array(\n\t\t'name' => __('侧栏随动','im'),\n\t\t'desc' => __('首页','im'),\n\t\t'id' => 'sidebar_scroll_index',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('设置随动模块,多个模块之间用空格隔开即可!默认:“1 2”,表示第1和第2个模块,建议最多3个模块','im'),\n\t\t'id' => 'sidebar_scroll_index_set',\n\t\t'std' => '1 2',\n\t\t'type' => 'text',\n\t\t'class'=> 'mini sidebar_scroll_index_hidden'\n\t);\n\t// Sidebars scroll as Window scrolls for cat&tag&search pages\n\t$options[] = array(\n\t\t'desc' => __('分类/标签/搜索页','im'),\n\t\t'id' => 'sidebar_scroll_list',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('设置随动模块,多个模块之间用空格隔开即可!默认:“1 2”,表示第1和第2个模块,建议最多3个模块','im'),\n\t\t'id' => 'sidebar_scroll_list_set',\n\t\t'std' => '1 2',\n\t\t'type' => 'text',\n\t\t'class'=> 'mini sidebar_scroll_list_hidden'\n\t);\n\t// Sidebars scroll as Window scrolls for post page\n\t$options[] = array(\n\t\t'desc' => __('文章页','im'),\n\t\t'id' => 'sidebar_scroll_post',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('设置随动模块,多个模块之间用空格隔开即可!默认:“1 2”,表示第1和第2个模块,建议最多3个模块','im'),\n\t\t'id' => 'sidebar_scroll_post_set',\n\t\t'std' => '1 2',\n\t\t'type' => 'text',\n\t\t'class'=> 'mini sidebar_scroll_post_hidden'\n\t);\n\t// Direct Link\n\t$options[] = array(\n\t\t'name' => __('直达链接','im'),\n\t\t'desc' => __('显示','im'),\n\t\t'id' => 'direct_link',\n\t\t'type' => 'multicheck',\n\t\t'options' => array(\n\t\t\t'list_article' => __('在文章列表页显示','im'),\n\t\t\t'article_article' => __('在文章页显示','im')\n\t\t)\n\t);\n\t// Direct Link Open Type\n\t$options[] = array(\n\t\t'desc' => __('新窗口打开','im'),\n\t\t'id' => 'direct_link_open_type',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Direct Link with arrtribute of nofollow\n\t$options[] = array(\n\t\t'desc' => __('链接添加nofollow','im'),\n\t\t'id' => 'direct_link_nofollow',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Direct Link Title\n\t$options[] = array(\n\t\t'desc' => __('自定义显示文字,默认为:直达链接','im'),\n\t\t'id' => 'direct_link_title',\n\t\t'std' => __('直达链接','im'),\n\t\t'type' => 'text'\n\t);\n\t/**\n\t * Customizitons Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('自定义','im'),\n\t\t'type' => 'heading'\n\t);\n\t// Custom your CSS code\n\t$options[] = array(\n\t\t'name' => __('自定义CSS样式','im'),\n\t\t'desc' => __('位于&lt;/head&gt;之前,直接写样式代码,不用添加&lt;style&gt;标签','im'),\n\t\t'id' => 'cus_csscode',\n\t\t'type' => 'textarea'\n\t);\n\t// Custom codes before </head>\n\t$options[] = array(\n\t\t'name' => __('自定义头部代码','im'),\n\t\t'desc' => __('位于&lt;/head&gt;之前,这部分代码是在主要内容显示之前加载,通常是CSS样式、自定义的&lt;meta&gt;标签、全站头部JS等需要提前加载的代码','im'),\n\t\t'id' => 'head_code',\n\t\t'type' => 'textarea'\n\t);\n\t// Custom codes before </body>\n\t$options[] = array(\n\t\t'name' => __('自定义底部代码','im'),\n\t\t'desc' => __('位于&lt;/body&gt;之前,这部分代码是在主要内容加载完毕加载,通常是JS代码','im'),\n\t\t'id' => 'foot_code',\n\t\t'type' => 'textarea'\n\t);\n\t// Custom the content above copyright section in the foot of the site\n\t$options[] = array(\n\t\t'name' => __('自定义网站底部内容','im'),\n\t\t'desc' => __('该块显示在网站底部版权上方,可已定义放一些链接或者图片之类的内容。','im'),\n\t\t'id' => 'cus_foot_content',\n\t\t'type' => 'textarea'\n\t);\n\t// Custom your analytic and on\n\t$options[] = array(\n\t\t'name' => __('网站统计代码','im'),\n\t\t'desc' => __('位于底部,用于添加第三方流量数据统计代码,如:Google analytics、百度统计、CNZZ、51la,国内站点推荐使用百度统计,国外站点推荐使用Google analytics','im'),\n\t\t'id' => 'trackcode',\n\t\t'type' => 'textarea'\n\t);\n\treturn $options;\n}", "protected function adjustOptionsValues()\n {\n $this->init();\n $this->create();\n }", "function save_settings() {\n\t\t$this->update_option( static::SETTINGS_KEY, $this->settings );\n\t}", "function optionsframework_options() {\n\n\t$options = array();\n\t\n\t//GENERAL\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('General', 'wpex'),\n\t\t\"type\" \t=> 'heading',\n\t);\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Custom Logo', 'wpex'),\n\t\t\"desc\" \t=> __('Upload your custom logo.', 'wpex'),\n\t\t\"std\" \t=> '',\n\t\t\"id\" \t=> 'custom_logo',\n\t\t\"type\" \t=> 'upload',\n\t);\n\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Notification Bar', 'att'),\n\t\t\"desc\" \t=> __('Enter your text for the notification bar.', 'att'),\n\t\t\"std\" \t=> 'This is your notification bar...you can <a href=\"#\">add a link here &rarr;</a> if you want.',\n\t\t\"id\" \t=> 'notification',\n\t\t\"type\" \t=> 'textarea',\n\t);\n\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Custom Excerpt Lenght', 'wpex'),\n\t\t\"desc\" \t=> __('Enter your desired custom excerpt length.', 'wpex'),\n\t\t\"id\" \t=> 'excerpt_length',\n\t\t\"std\" \t=> '17',\n\t\t\"type\" \t=> 'text'\n\t);\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('AJAX Loading Instead of Pagination?', 'wpex'),\n\t\t\"desc\" \t=> __('Check box to enable the load more button rather then generic 1,2,3 pagination.', 'wpex'),\n\t\t\"id\" \t=> 'ajax_loading',\n\t\t\"std\" \t=> '1',\n\t\t\"type\" \t=> 'checkbox',\n\t);\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Custom WP Gallery?', 'wpex'),\n\t\t\"desc\" \t=> __('This theme outputs a custom gallery style for the WordPress shortcode, if you don\\'t like it or are using a plugin for this you can unselect the custom functionality here.', 'wpex'),\n\t\t\"id\" \t=> 'custom_wp_gallery',\n\t\t\"std\" \t=> '1',\n\t\t\"type\" \t=> 'checkbox'\n\t);\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Enable Retina Support', 'wpex'),\n\t\t\"desc\"\t=> __('Check this box to enable retina support for featured images. If enabled for every cropped featured image the theme will create a second one that is retina optimized. So keep disabled to save server space.', 'wpex'),\n\t\t\"id\"\t=> 'enable_retina',\n\t\t\"std\"\t=> '0',\n\t\t\"type\"\t=> 'checkbox'\n\t);\n\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Featured Images For Single Posts', 'wpex'),\n\t\t\"desc\"\t=> __('Check this box to enable the display of featured images in single posts.', 'wpex'),\n\t\t\"id\"\t=> 'single_thumb',\n\t\t\"std\"\t=> '1',\n\t\t\"type\"\t=> 'checkbox'\n\t);\n\t\t\n\t\n\t//HOMEPAGE\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Home', 'wpex'),\n\t\t\"type\" \t=> 'heading',\n\t);\t\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Homepage Content', 'att'),\n\t\t\"desc\" \t=> __('Use this field to add content to your homepage area right below the main slider (or instead of the slider if you aren\\'t using it) and right above the latest posts.', 'att'),\n\t\t\"std\" \t=> '',\n\t\t\"id\" \t=> 'homepage_content',\n\t\t\"type\" \t=> 'editor',\n\t);\n\t\t\t\n\t\t\n\t//Slider\n\t$options[] = array(\n\t\t\"name\" \t=> __('Slides', 'att'),\n\t\t\"type\" \t=> 'heading',\n\t);\n\t\t\t\n\t\tif ( class_exists( 'Symple_Slides_Post_Type' ) ) {\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t\t=> __('Toggle: Slideshow', 'att'),\n\t\t\t\t\"desc\" \t\t=> __('Check this box to enable automatic slideshow for your slides.', 'att'),\n\t\t\t\t\"id\" \t\t=> \"slides_slideshow\",\n\t\t\t\t\"std\" \t\t=> \"true\",\n\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t'true' \t\t=> 'true',\n\t\t\t\t\t'false' \t=> 'false'\n\t\t\t) );\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t\t=> __('Toggle: Randomize', 'att'),\n\t\t\t\t\"desc\" \t\t=> __('Check this box to enable the randomize feature for your slides.', 'att'),\n\t\t\t\t\"id\" \t\t=> \"slides_randomize\",\n\t\t\t\t\"std\" \t\t=> \"false\",\n\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t'true' \t\t=> 'true',\n\t\t\t\t\t'false' \t=> 'false'\n\t\t\t) );\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t\t=> __('Animation', 'att'),\n\t\t\t\t\"desc\" \t\t=> __('Select your animation of choice.', 'att'),\n\t\t\t\t\"id\" \t\t=> \"slides_animation\",\n\t\t\t\t\"std\" \t\t=> \"slide\",\n\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t'fade' \t\t=> 'fade',\n\t\t\t\t\t'slide' \t=> 'slide'\n\t\t\t) );\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t\t=> __('Direction', 'att'),\n\t\t\t\t\"desc\" \t\t=> __('Select the direction for your slides. Slide animation only & if using the <strong>vertical direction</strong> all slides must have the same height.', 'att'),\n\t\t\t\t\"id\" \t\t=> \"slides_direction\",\n\t\t\t\t\"std\" \t\t=> \"horizontal\",\n\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t'horizontal' \t=> 'horizontal',\n\t\t\t\t\t'vertical' \t\t=> 'vertical'\n\t\t\t) );\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t=> __('SlideShow Speed', 'att'),\n\t\t\t\t\"desc\" \t=> __('Enter your preferred slideshow speed in milliseconds.', 'att'),\n\t\t\t\t\"id\" \t=> \"slideshow_speed\",\n\t\t\t\t\"std\" \t=> \"7000\",\n\t\t\t\t\"type\" \t=> \"text\",\n\t\t\t);\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t=> __('Animation Speed', 'att'),\n\t\t\t\t\"desc\" \t=> __('Enter your preferred animation speed in milliseconds.', 'att'),\n\t\t\t\t\"id\" \t=> \"animation_speed\",\n\t\t\t\t\"std\" \t=> \"600\",\n\t\t\t\t\"type\" \t=> \"text\",\n\t\t\t);\n\t\t}\n\t\t\t\n\t\t$options[] = array(\n\t\t\t\"name\" \t=> __('Slider Alternative', 'att'),\n\t\t\t\"desc\" \t=> __('If you prefer to use another slider you can enter the <strong>shortcode</strong> here.', 'att'),\n\t\t\t\"id\" \t=> \"slides_alt\",\n\t\t\t\"std\" \t=> \"\",\n\t\t\t\"type\" \t=> \"textarea\",\n\t\t);\n\n\treturn $options;\n}", "function save_widget($instance, $new_instance, $old_instance, $widget)\n {\n }", "function save_widget($instance, $new_instance, $old_instance, $widget)\n {\n }", "public function save_settings_fields() {\n\n\t\t\tif ( isset( $_POST[ $this->setting_field_prefix ] ) ) {\n\t\t\t\tif ( ( isset( $_POST[ $this->setting_field_prefix ]['nonce'] ) ) && ( wp_verify_nonce( $_POST[ $this->setting_field_prefix ]['nonce'], 'learndash_permalinks_nonce' ) ) ) {\n\n\t\t\t\t\t$post_fields = $_POST[ $this->setting_field_prefix ];\n\n\t\t\t\t\tif ( ( isset( $post_fields['courses'] ) ) && ( ! empty( $post_fields['courses'] ) ) ) {\n\t\t\t\t\t\t$this->setting_option_values['courses'] = $this->esc_url( $post_fields['courses'] );\n\n\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( isset( $post_fields['lessons'] ) ) && ( ! empty( $post_fields['lessons'] ) ) ) {\n\t\t\t\t\t\t$this->setting_option_values['lessons'] = $this->esc_url( $post_fields['lessons'] );\n\n\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( isset( $post_fields['topics'] ) ) && ( ! empty( $post_fields['topics'] ) ) ) {\n\t\t\t\t\t\t$this->setting_option_values['topics'] = $this->esc_url( $post_fields['topics'] );\n\n\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( isset( $post_fields['quizzes'] ) ) && ( ! empty( $post_fields['quizzes'] ) ) ) {\n\t\t\t\t\t\t$this->setting_option_values['quizzes'] = $this->esc_url( $post_fields['quizzes'] );\n\n\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( isset( $post_fields['nested_urls'] ) ) && ( ! empty( $post_fields['nested_urls'] ) ) ) {\n\t\t\t\t\t\t$this->setting_option_values['nested_urls'] = $this->esc_url( $post_fields['nested_urls'] );\n\n\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// We check the Course Options > Course Builder setting. If this is set to 'yes' then we MUST keep the nested URLs set to true.\n\t\t\t\t\t\tif ( ! isset( $this->setting_option_values['nested_urls'] ) ) {\n\t\t\t\t\t\t\t$this->setting_option_values['nested_urls'] = 'no';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( 'yes' !== $this->setting_option_values['nested_urls'] ) {\n\t\t\t\t\t\t\t$learndash_settings_courses_builder = get_option( 'learndash_settings_courses_management_display', array() );\n\t\t\t\t\t\t\tif ( ! isset( $learndash_settings_courses_builder['course_builder_shared_steps'] ) ) {\n\t\t\t\t\t\t\t\t$learndash_settings_courses_builder['course_builder_shared_steps'] = 'no';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( 'yes' === $learndash_settings_courses_builder['course_builder_shared_steps'] ) {\n\t\t\t\t\t\t\t\t$this->setting_option_values['nested_urls'] = 'yes';\n\n\t\t\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tupdate_option( $this->settings_section_key, $this->setting_option_values );\n\t\t\t\t}\n\t\t\t}\n\t\t}" ]
[ "0.69915545", "0.6716821", "0.66808283", "0.6677745", "0.66202074", "0.6602848", "0.6494906", "0.646696", "0.6403739", "0.6341822", "0.633675", "0.63270384", "0.6325295", "0.63135666", "0.6311957", "0.6301942", "0.62736166", "0.62450916", "0.62045175", "0.62020034", "0.62004656", "0.6185971", "0.61701196", "0.6169322", "0.61665225", "0.61621326", "0.6142852", "0.61389047", "0.61256206", "0.6122552", "0.6116993", "0.6103416", "0.6094289", "0.60885096", "0.6081796", "0.60729206", "0.6067193", "0.60584044", "0.60471684", "0.60049754", "0.59858334", "0.5974247", "0.5970085", "0.5966674", "0.59649014", "0.59643763", "0.5962281", "0.59570444", "0.59556425", "0.5954843", "0.59513044", "0.5938144", "0.5923419", "0.59134936", "0.590773", "0.59063023", "0.5896298", "0.5895321", "0.58918285", "0.5888565", "0.58876425", "0.58671117", "0.58631647", "0.5862946", "0.58579415", "0.58517134", "0.5844988", "0.58448666", "0.5844491", "0.5843406", "0.5822953", "0.58133674", "0.58123565", "0.58102083", "0.57977974", "0.579144", "0.5778165", "0.57730556", "0.57724005", "0.5770668", "0.57594156", "0.57565737", "0.5755925", "0.575439", "0.5750357", "0.5745281", "0.5738482", "0.5734676", "0.57298803", "0.57264066", "0.572057", "0.5708353", "0.57081413", "0.57081103", "0.5701432", "0.56964725", "0.5696039", "0.56897014", "0.56771094", "0.56771094", "0.566793" ]
0.0
-1
All config variables are here the same as default ones (incase config is missing, default is already statically compiled into core) SetupVariables function
protected function CustomVariables () { // Overwrite variables if you want them custom $this->Set ('autoload', true); $this->Set ('enable_query_strings', false); // Add your own variables $this->Set ('database_host', 'localhost'); $this->Set ('database_user', 'database_username'); $this->Set ('database_pass', 'database_password'); $this->Set ('database_name', 'database_name'); $this->Set ('database_prefix', 'database_prefix'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initVars() {\n\n\t\t}", "public function testconfig_vars()\n\t{\n\t\t$vars = array ('sys_name',\n\t\t\t 'sys_user_reg_restricted',\n\t\t\t 'sys_require_accept_conditions',\n\t\t\t 'sys_project_reg_restricted',\n\t\t\t 'sys_use_private_project',\n\t\t\t 'sys_default_domain',\n\t\t\t 'sys_scm_tarballs_path',\n\t\t\t 'sys_scm_snapshots_path',\n\t\t\t 'sys_theme',\n\t\t\t 'sys_lang',\n\t\t\t 'sys_default_timezone',\n\t\t\t 'sys_default_country_code',\n\t\t\t 'sys_use_scm',\n\t\t\t 'sys_use_tracker',\n\t\t\t 'sys_use_forum',\n\t\t\t 'sys_use_pm',\n\t\t\t 'sys_use_docman',\n\t\t\t 'sys_use_diary',\n\t\t\t 'sys_use_news',\n\t\t\t 'sys_use_mail',\n\t\t\t 'sys_use_survey',\n\t\t\t 'sys_use_frs',\n\t\t\t 'sys_use_project_tags',\n\t\t\t 'sys_use_project_full_list',\n\t\t\t 'sys_use_fti',\n\t\t\t 'sys_use_ftp',\n\t\t\t 'sys_use_trove',\n\t\t\t 'sys_use_snippet',\n\t\t\t 'sys_use_ssl',\n\t\t\t 'sys_use_people',\n\t\t\t 'sys_use_shell',\n\t\t\t 'sys_use_ratings',\n\t\t\t 'sys_use_ftpuploads',\n\t\t\t 'sys_use_manual_uploads',\n\t\t\t 'sys_use_gateways',\n\t\t\t 'sys_use_project_vhost',\n\t\t\t 'sys_use_project_database',\n\t\t\t 'sys_use_project_multimedia',\n\t\t\t 'sys_download_host',\n\t\t\t 'sys_shell_host',\n\t\t\t 'sys_users_host',\n\t\t\t 'sys_lists_host',\n\t\t\t 'sys_scm_host',\n\t\t\t 'sys_forum_return_domain',\n\t\t\t 'sys_chroot',\n\t\t\t 'sys_upload_dir',\n\t\t\t 'sys_ftp_upload_dir',\n\t\t\t 'sys_ftp_upload_host',\n\t\t\t 'sys_apache_user',\n\t\t\t 'sys_apache_group',\n\t\t\t 'sys_require_unique_email',\n\t\t\t 'sys_bcc_all_email_address',\n\t\t\t 'sys_themeroot',\n\t\t\t 'sys_force_login',\n\t\t\t 'sys_custom_path',\n\t\t\t 'sys_plugins_path',\n\t\t\t 'sys_use_jabber',\n\t\t\t 'sys_jabber_user',\n\t\t\t 'sys_jabber_server',\n\t\t\t 'sys_jabber_port',\n\t\t\t 'sys_jabber_pass',\n\t\t\t 'sys_ldap_host',\n\t\t\t 'sys_ldap_port',\n\t\t\t 'sys_ldap_version',\n\t\t\t 'sys_ldap_base_dn',\n\t\t\t 'sys_ldap_bind_dn',\n\t\t\t 'sys_ldap_admin_dn',\n\t\t\t 'sys_ldap_passwd',\n\t\t\t 'sys_news_group',\n\t\t\t 'sys_stats_group',\n\t\t\t 'sys_peer_rating_group',\n\t\t\t 'sys_template_group',\n\t\t\t 'sys_sendmail_path',\n\t\t\t 'sys_path_to_mailman',\n\t\t\t 'sys_path_to_jpgraph',\n\t\t\t 'sys_account_manager_type',\n\t\t\t 'unix_cipher',\n\t\t\t 'homedir_prefix',\n\t\t\t 'groupdir_prefix',\n\t\t\t 'sys_urlroot',\n\t\t\t 'sys_urlprefix',\n\t\t\t 'sys_images_url',\n\t\t\t 'sys_images_secure_url',\n\t\t\t 'sys_admin_email',\n\t\t\t 'sys_session_key',\n\t\t\t 'sys_session_expire',\n\t\t\t 'sys_show_source',\n\t\t\t 'default_trove_cat',\n\t\t\t 'sys_dbhost',\n\t\t\t 'sys_dbport',\n\t\t\t 'sys_dbname',\n\t\t\t 'sys_dbuser',\n\t\t\t 'sys_dbpasswd',\n\t\t\t 'sys_share_path',\n\t\t\t 'sys_var_path',\n\t\t\t 'sys_etc_path',\n\t\t\t) ;\n\n\t\t$pattern = implode ('|', $vars) ;\n\t\t\n\t\t$root = dirname(dirname(dirname(dirname(__FILE__))));\n\t\t$output = `cd $root ; find src tests -name '*.php' -type f | xargs pcregrep -n '\\\\$($pattern)\\b(?! *=[^=])' \\\n\t\t\t\t\t | grep -v ^src/common/include/config-vars.php`;\n\t\t$this->assertEquals('', $output, \"Found deprecated \\$var for var in ($pattern):\");\n\n\t\t$output = `cd $root ; find src tests -name '*.php' -type f | xargs pcregrep -n '\\\\\\$GLOBALS\\\\[.?($pattern).?\\\\](?! *=[^=])' \\\n\t\t\t\t\t | grep -v ^src/common/include/config-vars.php`;\n\t\t$this->assertEquals('', $output, \"Found deprecated \\$GLOBALS['\\$var'] for var in ($pattern):\");\n\t}", "public function setVariables()\n \t{\t\n \t\tif (isset($this->params->plugin)) {\n \t\t\t$this->setPlPath(App::pluginPath(Inflector::humanize($this->params->plugin)));\n \t\t}\n \t\t$this->setController($this->params->controller);\n \t\t$this->setAction($this->params->action);\n \t\t$this->setConstant(Configure::read('App'));\n \t\t\n \t}", "private function init_config() {\n set_config('siteadmins', '');\n set_config('siteguest', '');\n set_config('defaultuserroleid', '');\n set_config('defaultfrontpageroleid', '');\n }", "protected static function initializeGlobalVariables() {}", "private function setup_variables() {\n\t\t$this->file = __FILE__;\n\t\t$this->basename = plugin_basename( $this->file );\n\t\t$this->plugin_dir = plugin_dir_path( $this->file );\n\t\t$this->plugin_url = plugin_dir_url( $this->file );\n\t\t$this->cron_frequency = 'twicedaily';\n\t}", "public static function getDefaultVars(){\n\t\treturn Array(\n\t\t\t//--whether to output debug messages for this class\n\t\t\t'debug'=> false\n\t\t\t,'contentRelativePath'=> '_content'\n\t\t\t,'host'=> ($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['PWD']\n\t\t\t,'webRoot'=> ($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : $_SERVER['PWD']\n\t\t\t,'wpRelativePath'=> '_wp'\n\t\t\t,'protocol'=> (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) ? 'https' : 'http'\n\t\t);\n\t}", "private static function setup() {\n if(!isset(self::$settings)) {\n require 'regain/global_settings.php';\n self::$settings = $settings;\n }\n }", "function getEnvironmentVariables()\n{\n\tglobal $config_array;\n\n\tif ($customnr = getenv('CUSTOMERNR')) {\n\t\t$config_array['CUSTOMERNR'] = $customnr;\n\t}\n\n\tif ($apikey = getenv('APIKEY')) {\n\t\t$config_array['APIKEY'] = $apikey;\n\t}\n\n\tif ($apipassword = getenv('APIPASSWORD')) {\n\t\t$config_array['APIPASSWORD'] = $apipassword;\n\t}\n\n\tif ($domain = getenv('DOMAIN')) {\n\t\t$config_array['DOMAIN'] = $domain;\n\t}\n\n\tif ($hostipv4 = getenv('HOST_IPv4')) {\n\t\t$config_array['HOST_IPv4'] = $hostipv4;\n\t}\n\n\tif ($hostipv6 = getenv('HOST_IPv6')) {\n\t\t$config_array['HOST_IPv6'] = $hostipv6;\n\t}\n\n\tif ($useipv4 = getenv('USE_IPV4')) {\n\t\t$config_array['USE_IPV4'] = $useipv4;\n\t}\n\n\tif ($usefb = getenv('USE_FRITZBOX')) {\n\t\t$config_array['USE_FRITZBOX'] = $usefb;\n\t}\n\n\tif ($fbip = getenv('FRITZBOX_IP')) {\n\t\t$config_array['FRITZBOX_IP'] = $fbip;\n\t}\n\n\tif ($useipv6 = getenv('USE_IPV6')) {\n\t\t$config_array['USE_IPV6'] = $useipv6;\n\t}\n\n\tif ($ipv6interface = getenv('IPV6_INTERFACE')) {\n\t\t$config_array['IPV6_INTERFACE'] = $ipv6interface;\n\t}\n\n\tif ($ipv6priv = getenv('NO_IPV6_PRIVACY_EXTENSIONS')) {\n\t\t$config_array['NO_IPV6_PRIVACY_EXTENSIONS'] = $ipv6priv;\n\t}\n\n\tif ($changettl = getenv('CHANGE_TTL')) {\n\t\t$config_array['CHANGE_TTL'] = $changettl;\n\t}\n\n\tif ($apiurl = getenv('APIURL')) {\n\t\t$config_array['APIURL'] = $apiurl;\n\t}\n\n\tif ($sendmail = getenv('SEND_MAIL')) {\n\t\t$config_array['SEND_MAIL'] = $sendmail;\n\t}\n\n\tif ($mailrec = getenv('MAIL_RECIPIENT')) {\n\t\t$config_array['MAIL_RECIPIENT'] = $mailrec;\n\t}\n\n\tif ($sleepinsec = getenv('SLEEP_INTERVAL_SEC')) {\n\t\t$config_array['SLEEP_INTERVAL_SEC'] = $sleepinsec;\n\t}\n}", "public function setup()\n {\n \t// rtConfig::set('your-key', $your_value);\n }", "public function initVarfromDefs() {\n foreach ($this->extconfigs->getextConfig('sccpDefaults') as $key => $value) {\n if (empty($this->sccpvalues[$key])) {\n $this->sccpvalues[$key] = array('keyword' => $key, 'data' => $value, 'type' => '0', 'seq' => '0');\n }\n }\n }", "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 }", "public function prepareVars()\n {\n $this->vars['defaultCurrency'] = $this->defaultCurrency;\n $this->vars['defaultValue'] = $this->getPriceValue($this->defaultCurrency->id);\n $this->vars['currencies'] = Currency::orderBy('sort_order', 'ASC')->get();\n $this->vars['field'] = $this->formField;\n }", "protected function setup_config() {\n\t\t\t// TODO: Implement setup_config() method.\n\t\t}", "private function setup_vars()\n\t{\n\t\tglobal $persian_month_names, $timezone;\n\t\t$persian_month_names = array('',\n\t\t\t'فروردین',\n\t\t\t'اردیبهشت',\n\t\t\t'خرداد',\n\t\t\t'تیر',\n\t\t\t'مرداد',\n\t\t\t'شهریور',\n\t\t\t'مهر',\n\t\t\t'آبان',\n\t\t\t'آذر',\n\t\t\t'دی',\n\t\t\t'بهمن',\n\t\t\t'اسفند'\n\t\t);\n\n\t\t$timezone = get_option('timezone_string');\n\t\tif ($timezone != '')\n\t\t\tdate_default_timezone_set($timezone);\n\t\telse\n\t\t\tdate_default_timezone_set('Asia/Tehran');\n\t}", "public function cfg_setup()\n\t{\n\t\t$this->cfg = AppConfig::get()[\"app\"];\n\t\t$this->cfg[\"app_name\"] = $this->cfg[\"name\"];\n\n\t}", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n\n $path = explode('\\\\', get_class($this->model));\n\n $this->vars['task_id'] = array_pop($path) . '-' . $this->model->{$this->taskKey};\n $this->vars['task_name'] = $this->model->{$this->taskName};\n\n $this->vars['app_name'] = HarvestSettings::get('app_name', 'Harvest');\n $this->vars['app_url'] = Request::url();\n }", "protected function init()\n {\n $arVariablesExtend = Event::fire(self::EVENT_EXTEND_VARIABLES, []);\n\n foreach ($arVariablesExtend as $iIndex => $arExtend)\n {\n foreach ($arExtend as $sKey => $arVariable) {\n if (in_array($sKey, $this->arVariables)) {\n continue;\n }\n\n // Add to variables\n $this->arVariables[$sKey] = $arVariable;\n }\n }\n }", "public function config_vars()\n\t{\n\t\tglobal $txt;\n\n\t\t$return_data = array();\n\n\t\t$core_features = $this->settings();\n\n\t\t// Convert this to a format that admin search will understand\n\t\tforeach ($core_features as $id => $data)\n\t\t{\n\t\t\t$return_data[] = array('switch', $data['title'] ?? $txt['core_settings_item_' . $id]);\n\t\t}\n\n\t\treturn $return_data;\n\t}", "private function initVarConfMap()\n {\n\n // Set the global $confMapLocal\n switch ( true )\n {\n case( isset( $this->conf_view[ 'navigation.' ][ 'map.' ] ) ):\n // local configuration\n $this->confMap = $this->conf_view[ 'navigation.' ][ 'map.' ];\n if ( $this->pObj->b_drs_map )\n {\n $prompt = 'Local configuration in: views.' . $this->conf_path . '.navigation.map';\n t3lib_div :: devLog( '[INFO/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 0 );\n }\n break;\n // local configuration\n default:\n // global configuration\n $this->confMap = $this->pObj->conf[ 'navigation.' ][ 'map.' ];\n if ( $this->pObj->b_drs_map )\n {\n $prompt = 'Global configuration in: navigation.map';\n t3lib_div :: devLog( '[INFO/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 0 );\n }\n break;\n // global configuration\n }\n // Set the global $confMapLocal\n//var_dump(__METHOD__, __LINE__, array_keys($this->confMap));\n\n return;\n }", "public function SetCustomVars()\n\t\t{\n\t\t\t$this->_variables['displayname'] = array(\"name\" => GetLang($this->_languagePrefix.'DisplayName'),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang('DisplayNameHelp'),\n\t\t\t \"default\" => $this->GetName(),\n\t\t\t \"required\" => true\n\t\t\t);\n\n\t\t\t$this->_variables['productid'] = array(\"name\" => GetLang($this->_languagePrefix.'ProductId'),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'ProductIdHelp'),\n\t\t\t \"default\" => \"\",\n\t\t\t \"required\" => true\n\t\t\t);\n\n\t\t\t$this->_variables['sharedsecret'] = array(\"name\" => GetLang($this->_languagePrefix.'SharedSecret'),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'SharedSecretHelp'),\n\t\t\t \"default\" => \"\",\n\t\t\t \"required\" => true\n\t\t\t);\n\t\t}", "private function parseSettingsForEnvVariables()\n {\n foreach ($this->settings as $key => $value)\n {\n $this->settings[ $key ] = craft()->config->parseEnvironmentString($value);\n }\n }", "public function getSetVariables() {}", "public function SetCustomVars()\n\t{\n\t\t$this->_variables['displayname'] = array(\"name\" => GetLang('NabDisplayName'),\n\t\t \"type\" => \"textbox\",\n\t\t \"help\" => GetLang('DisplayNameHelp'),\n\t\t \"default\" => $this->GetName(),\n\t\t \"required\" => true\n\t\t);\n\n\t\t$this->_variables['vendor_name'] = array(\"name\" => GetLang('NabVendorName'),\n\t\t \"type\" => \"textbox\",\n\t\t \"help\" => GetLang('NabVendorNameHelp'),\n\t\t \"default\" => \"\",\n\t\t \"required\" => true\n\t\t);\n\n\t\t$this->_variables['email'] = array(\"name\" => GetLang('NabPaymentEmail'),\n\t\t \"type\" => \"textbox\",\n\t\t \"help\" => GetLang('NabPaymentAlertHelp'),\n\t\t \"default\" => \"\",\n\t\t \"required\" => true\n\t\t);\n\n\t\t$this->_variables['testmode'] = array(\"name\" => GetLang('NabTestMode'),\n\t\t \"type\" => \"dropdown\",\n\t\t \"help\" => GetLang(\"NabTestModeHelp\"),\n\t\t \"default\" => \"no\",\n\t\t \"required\" => true,\n\t\t \"options\" => array(GetLang(\"NabTestModeNo\") => \"NO\",\n\t\t\t\t\t\t GetLang(\"NabTestModeYes\") => \"YES\"\n\t\t\t),\n\t\t\t\"multiselect\" => false\n\t\t);\n\t}", "public function SetCustomVars()\n\t\t{\n\t\t\t$this->_variables['displayname'] = array(\"name\" => GetLang('DisplayName'),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang('DisplayNameHelp'),\n\t\t\t \"default\" => $this->GetName(),\n\t\t\t \"required\" => true\n\t\t\t);\n\n\t\t\t$this->_variables['vendorname'] = array(\"name\" => GetLang($this->_languagePrefix.'VendorName'),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'VendorNameHelp'),\n\t\t\t \"default\" => \"\",\n\t\t\t \"required\" => true\n\t\t\t);\n\n\t\t\t$this->_variables['cardcode'] = array(\"name\" => GetLang($this->_languagePrefix.'CardCode'),\n\t\t\t \"type\" => \"dropdown\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'CardCodeHelp'),\n\t\t\t \"default\" => \"no\",\n\t\t\t \"required\" => true,\n\t\t\t \"options\" => array(GetLang($this->_languagePrefix.'CardCodeNo') => \"NO\",\n\t\t\t\t\t\t\t GetLang($this->_languagePrefix.'CardCodeYes') => \"YES\"\n\t\t\t\t),\n\t\t\t\t\"multiselect\" => false\n\t\t\t);\n\n\t\t\t$this->_variables['testmode'] = array(\"name\" => GetLang($this->_languagePrefix.'TestMode'),\n\t \"type\" => \"dropdown\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'TestModeHelp'),\n\t\t\t \"default\" => \"no\",\n\t\t\t \"required\" => true,\n\t\t\t \"options\" => array(GetLang($this->_languagePrefix.'TestModeTest') => \"TEST\",\n\t\t\t\t\t\t\t GetLang($this->_languagePrefix.'TestModeSimulator') => \"SIMULATOR\",\n\t\t\t\t\t\t\t GetLang($this->_languagePrefix.'TestModeLive') => \"LIVE\"\n\t\t\t\t),\n\t\t\t\t\"multiselect\" => false\n\t\t\t);\n\t\t}", "public function setupConfig()\n {\n registry::getInstance()->set('config', $this->parseConfig());\n }", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n\n $this->vars['model'] = $this->model;\n $this->vars['category'] = Kategory::where(\"is_active\", \"1\")->lists('name', 'id');\n if (!empty($this->getLoadValue())) {\n $a= $this->vars['value'] = $this->getLoadValue();\n } else {\n $a= $this->vars['value'] = [];\n }\n }", "private function initialize() {\n $CI = get_instance();\n $CI->config->load('dwootemplate', TRUE);\n $config = $CI->config->item('dwootemplate');\n foreach ($config as $key => $val) {\n $this->$key = $val;\n }\n }", "function getSupportingConfigVars()\n {\n return array();\n }", "private function initialiseVariables(): void\n {\n $this->entityInterfaceFqn = $this->namespaceHelper->getEntityInterfaceFromEntityFqn($this->entityFqn);\n list($className, , $subDirs) = $this->namespaceHelper->parseFullyQualifiedName(\n $this->entityFqn,\n $this->srcSubFolderName,\n $this->projectRootNamespace\n );\n\n $this->singularNamespacedName = $this->namespaceHelper->getSingularNamespacedName(\n $this->entityFqn,\n $subDirs\n );\n $this->pluralNamespacedName = $this->namespaceHelper->getPluralNamespacedName(\n $this->entityFqn,\n $subDirs\n );\n $this->setDestinationDirectory(\n $className,\n $subDirs\n );\n $plural = ucfirst(MappingHelper::getPluralForFqn($this->entityFqn));\n $singular = ucfirst(MappingHelper::getSingularForFqn($this->entityFqn));\n $nsNoEntities = implode('\\\\', array_slice($subDirs, 2));\n $this->singularNamespace = ltrim($nsNoEntities . '\\\\' . $singular, '\\\\');\n $this->pluralNamespace = ltrim($nsNoEntities . '\\\\' . $plural, '\\\\');\n $this->dirsToRename = [];\n $this->filesCreated = [];\n }", "private function load_variables() : void {\n\t\t$this->today = new \\DateTime( 'NOW' );\n\t\t$this->start_date = new \\DateTime( FTW_START_DATE );\n\t\t$this->completion_date = new \\DateTime( FTW_COMPLETION_DATE );\n\t}", "public function SetCustomVars()\n\t\t{\n\t\t\t$this->_variables['displayname'] = array(\"name\" => GetLang($this->_languagePrefix.\"DisplayName\"),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang('DisplayNameHelp'),\n\t\t\t \"default\" => $this->GetName(),\n\t\t\t \"required\" => true\n\t\t\t);\n\n\t\t\t$this->_variables['MerchantId'] = array(\"name\" => GetLang($this->_languagePrefix.\"MerchantId\"),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'MerchantIdHelp'),\n\t\t\t \"default\" => '',\n\t\t\t \"required\" => true\n\t\t\t);\n\t\t\t$this->_variables['MerchantEmail'] = array(\"name\" => GetLang($this->_languagePrefix.\"MerchantEmail\"),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'MerchantEmailHelp'),\n\t\t\t \"default\" => '',\n\t\t\t \"required\" => true\n\t\t\t);\n\t\t\t$this->_variables['CallbackId'] = array(\"name\" => GetLang($this->_languagePrefix.\"CallbackId\"),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'CallbackIdHelp'),\n\t\t\t \"default\" => '',\n\t\t\t \"required\" => true\n\t\t\t);\n\t\t\t$this->_variables['SecretWord'] = array(\"name\" => GetLang($this->_languagePrefix.\"SecretWord\"),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'SecretWordHelp'),\n\t\t\t \"default\" => '',\n\t\t\t \"required\" => true\n\t\t\t);\n\t\t}", "public function setupDefaultContextVariables(): void\n {\n $this->sharedState()->basePath = '/';\n }", "private function updateVars(){\n // get configuration\n global $configuration;\n // if configuration file exists && class-settings\n if($configuration && array_key_exists('WPimgAttr', $configuration)):\n // class configuration\n $myConfig = $configuration['WPimgAttr'];\n // update vars\n $this->WPimgAttr_Alt_content = array_key_exists('Alt_content', $myConfig) ? $myConfig['Alt_content'] : $this->WPimgAttr_Alt_content;\n $this->WPimgAttr_Alt_attachment = array_key_exists('Alt_attachment', $myConfig) ? $myConfig['Alt_attachment'] : $this->WPimgAttr_Alt_attachment;\n $this->WPimgAttr_Alt_shortcode = array_key_exists('Alt_shortcode', $myConfig) ? $myConfig['Alt_shortcode'] : $this->WPimgAttr_Alt_shortcode;\n SELF::$WPimgAttr_Alt_languages = array_key_exists('Alt_languages', $myConfig) ? $myConfig['Alt_languages'] : SELF::$WPimgAttr_Alt_languages;\n endif;\n }", "protected function setUp () : void {\n\n $_ENV['foo'] = \"bar\";\n $_SERVER['foo'] = \"baz\";\n\n $_ENV['bar'] = \"lorem\";\n $_SERVER['baz'] = \"ipsum\";\n\n // And quux isn't defined.\n }", "private function setup_globals() {\r\n\t\t/** Versions **********************************************************/\r\n\r\n\t\t$this->version = '0.3-alpha';\r\n\t\t$this->db_version = '1';\r\n\r\n\t\t/** Paths *************************************************************/\r\n\r\n\t\t$this->file = __FILE__;\r\n\t\t$this->basename = apply_filters( 'atcf_plugin_basenname', plugin_basename( $this->file ) );\r\n\t\t$this->plugin_dir = apply_filters( 'atcf_plugin_dir_path', plugin_dir_path( $this->file ) );\r\n\t\t$this->plugin_url = apply_filters( 'atcf_plugin_dir_url', plugin_dir_url ( $this->file ) );\r\n\r\n\t\t$this->template_url = apply_filters( 'atcf_plugin_template_url', 'crowdfunding/' );\r\n\r\n\t\t// Includes\r\n\t\t$this->includes_dir = apply_filters( 'atcf_includes_dir', trailingslashit( $this->plugin_dir . 'includes' ) );\r\n\t\t$this->includes_url = apply_filters( 'atcf_includes_url', trailingslashit( $this->plugin_url . 'includes' ) );\r\n\r\n\t\t// Languages\r\n\t\t$this->lang_dir = apply_filters( 'atcf_lang_dir', trailingslashit( $this->plugin_dir . 'languages' ) );\r\n\r\n\t\t/** Misc **************************************************************/\r\n\r\n\t\t$this->domain = 'atcf'; \r\n\t}", "private static function default_settings() {\n\t\treturn array(\n\t\t\t'module_ga' => true,\n\t\t\t'module_ip' => true,\n\t\t\t'module_log' => true,\n\t\t\t'sent_data' => false,\n\t\t\t'api_key' => '',\n\t\t\t'mark_as_approved' => true,\n\t\t);\n\t}", "public static function getDefaultVars()\n {\n return [\n 'posts_per_page' => 15,\n 'topics_per_page' => 15,\n 'hot_threshold' => 20,\n 'email_from' => '', // use system default email\n 'url_ranks_images' => \"ranks\",\n 'post_sort_order' => 'ASC',\n 'log_ip' => false,\n 'extendedsearch' => false,\n 'm2f_enabled' => false,\n 'favorites_enabled' => false,\n 'removesignature' => false,\n 'striptags' => false,\n 'hooks' => ['providers' => [], 'subscribers' => []],\n 'rss2f_enabled' => false,\n 'timespanforchanges' => 24,\n 'forum_enabled' => true,\n 'forum_disabled_info' => 'Sorry! The forums are currently off-line for maintenance. Please try later.',\n 'signaturemanagement' => false,\n 'signature_start' => '--',\n 'signature_end' => '--',\n 'showtextinsearchresults' => false,\n 'minsearchlength' => 3,\n 'maxsearchlength' => 30,\n 'fulltextindex' => false,\n 'solved_enabled' => false,\n 'ajax' => false,\n 'striptagsfromemail' => false,\n 'indexTo' => '',\n 'notifyAdminAsMod' => 2,\n 'defaultPoster' => 2,\n 'onlineusers_moderatorcheck' => false,\n 'forum_subscriptions_enabled' => false,\n 'topic_subscriptions_enabled' => false,\n ];\n }", "static function set_config() {\n\t\tif ( file_exists( self::childpath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::childpath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'wpgrade-config' . EXT;\n\t\t}\n\t}", "function prepare_vars_for_template_usage()\n {\n }", "protected function paratestEnvironmentVariables()\n {\n if ($this->option('custom-argument')) {\n return array_merge(\n parent::paratestEnvironmentVariables(),\n [\n 'CUSTOM_ENV_VARIABLE' => 1,\n 'CUSTOM_ENV_VARIABLE_FOR_PARALLEL' => 1,\n ],\n );\n }\n\n return parent::paratestEnvironmentVariables();\n }", "private function fn_register_common_variables() {\n\t\t$current_user = wp_get_current_user();\n\t\t//perhaps we don't need this variable. still, lets continue with this.\n\t\t$this->app_data['swpmvc_current_user'] = $current_user;\n\t\t$this->app_data['inline_js'] = '';\n\t}", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }", "public static function loadVars(){\n\t\tif(!self::$vars){\n\t\t\tself::$vars = self::getDefaultVars();\n\t\t}\n\t\tforeach(func_get_args() as $arg){\n\t\t\tforeach($arg as $key=> $value){\n\t\t\t\tself::$vars[$key] = self::fillTokens($value);\n\t\t\t}\n\t\t}\n\t\treturn self::$vars;\n\t}", "public function prepareVars()\n {\n if ($this->showLogRelations !== null) {\n $this->showLogRelations = (array) $this->showLogRelations;\n }\n\n $this->vars['name'] = $this->formField->getName();\n $this->vars['model'] = $this->model;\n $this->vars['showUndoChangesButton'] = $this->showUndoChangesButton;\n }", "function setupInitialVars() {\n\t\tparent::setupInitialVars();\n\t\t\n\t\t$this->getEngine()->assign('uploadUri', $this->getController()->buildUriPath(uploadController::ACTION_UPLOAD));\n\t\t$this->getEngine()->assign('doUploadUri', $this->getController()->buildUriPath(uploadController::ACTION_DO_UPLOAD));\n\t\t$this->getEngine()->assign('doMovieSave', $this->getController()->buildUriPath(uploadController::ACTION_MOVIE_SAVE));\n\t}", "protected function addBootstrapVariables()\n {\n $objFile = new \\File($this->getBootstrapSrc('variables.less'));\n\n $strVariables = '';\n\n if ($objFile->size > 0)\n {\n $strVariables = $objFile->getContent();\n }\n\n if (!is_array($this->variablesOrderSRC))\n {\n return;\n }\n\n $objTarget = new \\File($this->getBootstrapCustomSrc($this->variablesSrc));\n\n // overwrite bootstrap variables with custom variables\n $objFilesModels = \\FilesModel::findMultipleByUuids($this->variablesOrderSRC);\n\n if ($objFilesModels !== null)\n {\n while ($objFilesModels->next())\n {\n $objFile = new \\File($objFilesModels->path);\n $strContent = $objFile->getContent();\n\n if ($this->isFileUpdated($objFile, $objTarget))\n {\n $this->rewrite = true;\n $this->rewriteBootstrap = true;\n if ($strContent)\n {\n $strVariables .= \"\\n\" . $strContent;\n }\n }\n else\n {\n $strVariables .= \"\\n\" . $strContent;\n }\n }\n }\n\n if ($this->rewriteBootstrap)\n {\n $objTarget->write($strVariables);\n $objTarget->close();\n }\n\n $this->objLess->parse($strVariables);\n }", "public static function ConfigConstants(&$ConfigVars){ \n $ConfigVars['database'] = array(\n 'datasource' => 'Database/Mysql',\n 'persistent' => false,\n 'host' => '127.0.0.1',\n 'port'=>3306,\n 'login' => 'root',\n #'password'=>'ypZMJfYcuO/5',\n 'password'=> 'aditya07',\n 'database' => self::DATABASEDEFAULT,\n 'prefix' => ''\n );\n //checking that it is runnig locally or not.\n $ConfigVars['RootUrl'] = ($_SERVER[\"REMOTE_ADDR\"]==\"127.0.0.1\") ? 'http://localhost/ams/' : 'http://127.0.0.1/ams/';\n\n }", "public function setupStaticEnvironment() {\n\n // setup static environment for blocks\n if(Zend_Registry::isRegistered(\"pimcore_tag_block_current\")) {\n $current = Zend_Registry::get(\"pimcore_tag_block_current\");\n if (!is_array($current)) {\n $current = array();\n }\n } else {\n $current = array();\n }\n\n if(Zend_Registry::isRegistered(\"pimcore_tag_block_numeration\")) {\n $numeration = Zend_Registry::get(\"pimcore_tag_block_numeration\");\n if (!is_array($numeration)) {\n $numeration = array();\n }\n } else {\n $numeration = array();\n }\n\n Zend_Registry::set(\"pimcore_tag_block_numeration\", $numeration);\n Zend_Registry::set(\"pimcore_tag_block_current\", $current);\n\n }", "private function settingEnvironmentVariables()\r\n {\r\n \t$this->Queue->engineOut(\"Q install directory located at \" . getcwd());\r\n \t$this->Queue->engineOut(\"Q Engine Service starting\");\r\n \t$this->Queue->engineOut(\"Timezone set to $this->tz\");\r\n\r\n putenv(\"VL_ENGINE_SERVICE_PID=$this->pid\");\r\n putenv(\"VL_ENGINE_VERBOSE=\".$this->engineProperties['engineVerbose']);\r\n putenv(\"VL_SESSION_KEY=$this->sessionKey\");\r\n\r\n $this->Queue->engineOut(\"Engine session key: $this->sessionKey\");\r\n $this->Queue->engineOut(\"System configured for \".$this->engineProperties['engineCount'].\" concurrent engine processes.\");\r\n $this->Queue->engineOut(\"Job scan interval configured for \".$this->engineProperties['engineTickSec'].\" seconds.\");\r\n }", "protected function variablesAssign()\n {\n $app = $this->app;\n $this->request = $app['request'];\n $this->session = $app['session'];\n $this->template = $app['template'];\n $this->theme = $app['theme'];\n\n // Set Request Format\n switch ($this->request->getRequestFormat()) {\n case 'json':\n $this->format = 'json';\n break;\n\n case 'xml':\n $this->format = 'xml';\n break;\n\n case 'csv':\n $this->format = 'csv';\n break;\n\n case 'html':\n default:\n $this->format = 'html';\n break;\n }\n }", "protected function preConfigure()\n\t{\n\t\t$this->setupConfig();\n\t\t$this->setupData();\n\n\t\t$this->debug = $this->config->debug;\n\t}", "protected function setTemplateVariables() {}", "public function defaultVariables_test($tester) {\n\t\t$this->setupTests();\n\t\t$this->process();\n\n\t\t$tester->assertNotBlank($this->name);\n\t\t$tester->assertTrue(!$this->hasChanged);\n\t}", "private function initVars()\n {\n // template array variables\n $this->tplVar['art_pubdate'] = array();\n $this->tplVar['art_modifydate'] = array();\n }", "private static function initialize_defaults() {\r\n\t\t\tself::$default_settings['credentials'] = array();\r\n\r\n\t\t\tself::$default_settings['has_first_question'] = 'no';\r\n\r\n\t\t\t// We want the Urtaks to appear by default, so let's append them\r\n\t\t\tself::$default_settings['placement'] = 'append';\r\n\r\n\t\t\t// We want to default post types to 'post' and 'page'\r\n\t\t\tself::$default_settings['post-types'] = array('page', 'post');\r\n\r\n\t\t\t// We want users to be able to start Urtaks by default\r\n\t\t\tself::$default_settings['user-start'] = 'yes';\r\n\r\n\t\t\t// We want Urtaks to support community moderation by default so that we get more questions and responses\r\n\t\t\tself::$default_settings['moderation'] = 'community';\r\n\r\n\t\t\t// Auto height and width\r\n\t\t\tself::$default_settings['height'] = '';\r\n\t\t\tself::$default_settings['width'] = '';\r\n\r\n\t\t\t// Counter settings\r\n\t\t\tself::$default_settings['counter-icon'] = 'yes';\r\n\t\t\tself::$default_settings['counter-responses'] = 'yes';\r\n\r\n\t\t\t// Profanity\r\n\t\t\tself::$default_settings['blacklisting'] = 'no';\r\n\t\t\tself::$default_settings['blacklist_override'] = 'no';\r\n\t\t\tself::$default_settings['blacklist_words'] = '';\r\n\t\t}", "public function prepareVars()\n {\n $this->vars['relationManageId'] = $this->manageId;\n $this->vars['relationLabel'] = $this->config->label ?: $this->field;\n $this->vars['relationManageTitle'] = $this->manageTitle;\n $this->vars['relationField'] = $this->field;\n $this->vars['relationType'] = $this->relationType;\n $this->vars['relationSearchWidget'] = $this->searchWidget;\n $this->vars['relationToolbarWidget'] = $this->toolbarWidget;\n $this->vars['relationManageMode'] = $this->manageMode;\n $this->vars['relationManageWidget'] = $this->manageWidget;\n $this->vars['relationToolbarButtons'] = $this->toolbarButtons;\n $this->vars['relationViewMode'] = $this->viewMode;\n $this->vars['relationViewWidget'] = $this->viewWidget;\n $this->vars['relationViewModel'] = $this->viewModel;\n $this->vars['relationPivotWidget'] = $this->pivotWidget;\n $this->vars['relationSessionKey'] = $this->relationGetSessionKey();\n $this->vars['relationExtraConfig'] = $this->extraConfig;\n }", "private function updateVars(){\n // get configuration\n global $configuration;\n // if configuration file exists && class-settings\n if($configuration && array_key_exists('gutenberg', $configuration)):\n // class configuration\n $myConfig = $configuration['gutenberg'];\n // update vars\n $this->WPgutenberg_active = array_key_exists('active', $myConfig) ? $myConfig['active'] : $this->WPgutenberg_active;\n $this->WPgutenberg_css = array_key_exists('css', $myConfig) ? $myConfig['css'] : $this->WPgutenberg_css;\n $this->WPgutenberg_Stylesfile = array_key_exists('Stylesfile', $myConfig) ? $myConfig['Stylesfile'] : $this->WPgutenberg_Stylesfile;\n $this->WPgutenberg_DefaultPatterns = array_key_exists('Patterns', $myConfig) ? $myConfig['Patterns'] : $this->WPgutenberg_DefaultPatterns;\n $this->WPgutenberg_fontsizeScaler = array_key_exists('fontsizeScaler', $myConfig) ? $myConfig['fontsizeScaler'] : $this->WPgutenberg_fontsizeScaler;\n $this->WPgutenberg_AllowedBlocks = array_key_exists('AllowedBlocks', $myConfig) ? $myConfig['AllowedBlocks'] : $this->WPgutenberg_AllowedBlocks;\n $this->WPgutenberg_CustomAllowedBlocks = array_key_exists('CustomAllowedBlocks', $myConfig) ? $myConfig['CustomAllowedBlocks'] : $this->WPgutenberg_CustomAllowedBlocks;\n SELF::$WPgutenberg_ColorPalette = array_key_exists('ColorPalette', $myConfig) ? $myConfig['ColorPalette'] : SELF::$WPgutenberg_ColorPalette;\n SELF::$WPgutenberg_FontSizes = array_key_exists('FontSizes', $myConfig) ? $myConfig['FontSizes'] : SELF::$WPgutenberg_FontSizes;\n SELF::$WPgutenberg_ColorPalette_CP = array_key_exists('ColorPalette_CP', $myConfig) ? $myConfig['ColorPalette_CP'] : SELF::$WPgutenberg_ColorPalette_CP;\n endif;\n }", "protected function getDefaultParameters()\n {\n return [\n 'core.root_path' => './../',\n 'core.php_ext' => 'php',\n 'core.environment' => 'production',\n 'core.debug' => false,\n 'core.cache_dir' => './../cache/production/',\n 'passwords.driver.argon2_memory_cost' => 1024,\n 'passwords.driver.argon2_threads' => 2,\n 'passwords.driver.argon2_time_cost' => 2,\n 'passwords.driver.bcrypt_cost' => 10,\n 'text_formatter.cache.dir' => './../cache/production/',\n 'text_formatter.cache.parser.key' => '_text_formatter_parser',\n 'text_formatter.cache.renderer.key' => '_text_formatter_renderer',\n 'core.template.cache_path' => './../cache/production/twig/',\n 'tables.acl_groups' => 'phpbb_acl_groups',\n 'tables.acl_options' => 'phpbb_acl_options',\n 'tables.acl_roles' => 'phpbb_acl_roles',\n 'tables.acl_roles_data' => 'phpbb_acl_roles_data',\n 'tables.acl_users' => 'phpbb_acl_users',\n 'tables.attachments' => 'phpbb_attachments',\n 'tables.auth_provider_oauth_token_storage' => 'phpbb_oauth_tokens',\n 'tables.auth_provider_oauth_states' => 'phpbb_oauth_states',\n 'tables.auth_provider_oauth_account_assoc' => 'phpbb_oauth_accounts',\n 'tables.banlist' => 'phpbb_banlist',\n 'tables.bbcodes' => 'phpbb_bbcodes',\n 'tables.bookmarks' => 'phpbb_bookmarks',\n 'tables.bots' => 'phpbb_bots',\n 'tables.captcha_qa_questions' => 'phpbb_captcha_questions',\n 'tables.captcha_qa_answers' => 'phpbb_captcha_answers',\n 'tables.captcha_qa_confirm' => 'phpbb_qa_confirm',\n 'tables.config' => 'phpbb_config',\n 'tables.config_text' => 'phpbb_config_text',\n 'tables.confirm' => 'phpbb_confirm',\n 'tables.disallow' => 'phpbb_disallow',\n 'tables.drafts' => 'phpbb_drafts',\n 'tables.ext' => 'phpbb_ext',\n 'tables.extensions' => 'phpbb_extensions',\n 'tables.extension_groups' => 'phpbb_extension_groups',\n 'tables.forums' => 'phpbb_forums',\n 'tables.forums_access' => 'phpbb_forums_access',\n 'tables.forums_track' => 'phpbb_forums_track',\n 'tables.forums_watch' => 'phpbb_forums_watch',\n 'tables.groups' => 'phpbb_groups',\n 'tables.icons' => 'phpbb_icons',\n 'tables.lang' => 'phpbb_lang',\n 'tables.log' => 'phpbb_log',\n 'tables.login_attempts' => 'phpbb_login_attempts',\n 'tables.migrations' => 'phpbb_migrations',\n 'tables.moderator_cache' => 'phpbb_moderator_cache',\n 'tables.modules' => 'phpbb_modules',\n 'tables.notification_types' => 'phpbb_notification_types',\n 'tables.notifications' => 'phpbb_notifications',\n 'tables.poll_options' => 'phpbb_poll_options',\n 'tables.poll_votes' => 'phpbb_poll_votes',\n 'tables.posts' => 'phpbb_posts',\n 'tables.privmsgs' => 'phpbb_privmsgs',\n 'tables.privmsgs_folder' => 'phpbb_privmsgs_folder',\n 'tables.privmsgs_rules' => 'phpbb_privmsgs_rules',\n 'tables.privmsgs_to' => 'phpbb_privmsgs_to',\n 'tables.profile_fields' => 'phpbb_profile_fields',\n 'tables.profile_fields_data' => 'phpbb_profile_fields_data',\n 'tables.profile_fields_options_language' => 'phpbb_profile_fields_lang',\n 'tables.profile_fields_language' => 'phpbb_profile_lang',\n 'tables.ranks' => 'phpbb_ranks',\n 'tables.reports' => 'phpbb_reports',\n 'tables.reports_reasons' => 'phpbb_reports_reasons',\n 'tables.search_results' => 'phpbb_search_results',\n 'tables.search_wordlist' => 'phpbb_search_wordlist',\n 'tables.search_wordmatch' => 'phpbb_search_wordmatch',\n 'tables.sessions' => 'phpbb_sessions',\n 'tables.sessions_keys' => 'phpbb_sessions_keys',\n 'tables.sitelist' => 'phpbb_sitelist',\n 'tables.smilies' => 'phpbb_smilies',\n 'tables.sphinx' => 'phpbb_sphinx',\n 'tables.styles' => 'phpbb_styles',\n 'tables.styles_template' => 'phpbb_styles_template',\n 'tables.styles_template_data' => 'phpbb_styles_template_data',\n 'tables.styles_theme' => 'phpbb_styles_theme',\n 'tables.styles_imageset' => 'phpbb_styles_imageset',\n 'tables.styles_imageset_data' => 'phpbb_styles_imageset_data',\n 'tables.teampage' => 'phpbb_teampage',\n 'tables.topics' => 'phpbb_topics',\n 'tables.topics_posted' => 'phpbb_topics_posted',\n 'tables.topics_track' => 'phpbb_topics_track',\n 'tables.topics_watch' => 'phpbb_topics_watch',\n 'tables.user_group' => 'phpbb_user_group',\n 'tables.user_notifications' => 'phpbb_user_notifications',\n 'tables.users' => 'phpbb_users',\n 'tables.warnings' => 'phpbb_warnings',\n 'tables.words' => 'phpbb_words',\n 'tables.zebra' => 'phpbb_zebra',\n 'core.disable_super_globals' => true,\n 'datetime.class' => '\\\\phpbb\\\\datetime',\n 'mimetype.guesser.priority.lowest' => -2,\n 'mimetype.guesser.priority.low' => -1,\n 'mimetype.guesser.priority.default' => 0,\n 'mimetype.guesser.priority.high' => 1,\n 'mimetype.guesser.priority.highest' => 2,\n 'passwords.algorithms' => [\n 0 => 'passwords.driver.argon2id',\n 1 => 'passwords.driver.argon2i',\n 2 => 'passwords.driver.bcrypt_2y',\n 3 => 'passwords.driver.bcrypt',\n 4 => 'passwords.driver.salted_md5',\n 5 => 'passwords.driver.phpass',\n ],\n 'allow_install_dir' => false,\n 'debug.exceptions' => false,\n 'debug.load_time' => false,\n 'debug.sql_explain' => false,\n 'debug.memory' => false,\n 'debug.show_errors' => false,\n 'session.log_errors' => false,\n 'tables' => [\n 'acl_groups' => 'phpbb_acl_groups',\n 'acl_options' => 'phpbb_acl_options',\n 'acl_roles' => 'phpbb_acl_roles',\n 'acl_roles_data' => 'phpbb_acl_roles_data',\n 'acl_users' => 'phpbb_acl_users',\n 'attachments' => 'phpbb_attachments',\n 'auth_provider_oauth_token_storage' => 'phpbb_oauth_tokens',\n 'auth_provider_oauth_states' => 'phpbb_oauth_states',\n 'auth_provider_oauth_account_assoc' => 'phpbb_oauth_accounts',\n 'banlist' => 'phpbb_banlist',\n 'bbcodes' => 'phpbb_bbcodes',\n 'bookmarks' => 'phpbb_bookmarks',\n 'bots' => 'phpbb_bots',\n 'captcha_qa_questions' => 'phpbb_captcha_questions',\n 'captcha_qa_answers' => 'phpbb_captcha_answers',\n 'captcha_qa_confirm' => 'phpbb_qa_confirm',\n 'config' => 'phpbb_config',\n 'config_text' => 'phpbb_config_text',\n 'confirm' => 'phpbb_confirm',\n 'disallow' => 'phpbb_disallow',\n 'drafts' => 'phpbb_drafts',\n 'ext' => 'phpbb_ext',\n 'extensions' => 'phpbb_extensions',\n 'extension_groups' => 'phpbb_extension_groups',\n 'forums' => 'phpbb_forums',\n 'forums_access' => 'phpbb_forums_access',\n 'forums_track' => 'phpbb_forums_track',\n 'forums_watch' => 'phpbb_forums_watch',\n 'groups' => 'phpbb_groups',\n 'icons' => 'phpbb_icons',\n 'lang' => 'phpbb_lang',\n 'log' => 'phpbb_log',\n 'login_attempts' => 'phpbb_login_attempts',\n 'migrations' => 'phpbb_migrations',\n 'moderator_cache' => 'phpbb_moderator_cache',\n 'modules' => 'phpbb_modules',\n 'notification_types' => 'phpbb_notification_types',\n 'notifications' => 'phpbb_notifications',\n 'poll_options' => 'phpbb_poll_options',\n 'poll_votes' => 'phpbb_poll_votes',\n 'posts' => 'phpbb_posts',\n 'privmsgs' => 'phpbb_privmsgs',\n 'privmsgs_folder' => 'phpbb_privmsgs_folder',\n 'privmsgs_rules' => 'phpbb_privmsgs_rules',\n 'privmsgs_to' => 'phpbb_privmsgs_to',\n 'profile_fields' => 'phpbb_profile_fields',\n 'profile_fields_data' => 'phpbb_profile_fields_data',\n 'profile_fields_options_language' => 'phpbb_profile_fields_lang',\n 'profile_fields_language' => 'phpbb_profile_lang',\n 'ranks' => 'phpbb_ranks',\n 'reports' => 'phpbb_reports',\n 'reports_reasons' => 'phpbb_reports_reasons',\n 'search_results' => 'phpbb_search_results',\n 'search_wordlist' => 'phpbb_search_wordlist',\n 'search_wordmatch' => 'phpbb_search_wordmatch',\n 'sessions' => 'phpbb_sessions',\n 'sessions_keys' => 'phpbb_sessions_keys',\n 'sitelist' => 'phpbb_sitelist',\n 'smilies' => 'phpbb_smilies',\n 'sphinx' => 'phpbb_sphinx',\n 'styles' => 'phpbb_styles',\n 'styles_template' => 'phpbb_styles_template',\n 'styles_template_data' => 'phpbb_styles_template_data',\n 'styles_theme' => 'phpbb_styles_theme',\n 'styles_imageset' => 'phpbb_styles_imageset',\n 'styles_imageset_data' => 'phpbb_styles_imageset_data',\n 'teampage' => 'phpbb_teampage',\n 'topics' => 'phpbb_topics',\n 'topics_posted' => 'phpbb_topics_posted',\n 'topics_track' => 'phpbb_topics_track',\n 'topics_watch' => 'phpbb_topics_watch',\n 'user_group' => 'phpbb_user_group',\n 'user_notifications' => 'phpbb_user_notifications',\n 'users' => 'phpbb_users',\n 'warnings' => 'phpbb_warnings',\n 'words' => 'phpbb_words',\n 'zebra' => 'phpbb_zebra',\n ],\n 'core.adm_relative_path' => 'adm/',\n 'core.table_prefix' => 'phpbb_',\n 'cache.driver.class' => 'phpbb\\\\cache\\\\driver\\\\file',\n 'dbal.new_link' => false,\n ];\n }", "function load_default_vars()\r\n {\r\n parent::load_default_vars();\r\n $this->vars['URL_REPOS'] = '//your-private-repos-server/repos/'; // Unnecessary\r\n $this->vars['URL_RSC'] = $this->vars['URL_ASSETS'] . $this->manifest['activity_current'] . '/';\r\n }", "public function onConfigUpdated() {\n\t\tparent::onConfigUpdated();\n\t\tif (\n\t\t\t\t($order = ini_get('request_order'))\n\t\t\t\t|| ($order = ini_get('variables_order'))\n\t\t) {\n\t\t\t$this->variablesOrder = $order;\n\t\t}\n\t\telse {\n\t\t\t$this->variablesOrder = null;\n\t\t}\n\n\t}", "public function setup_settings() {\n\t\t$this->init_sections();\n\t\t$this->init_fields();\n\t\t$this->settings_fields();\n\t}", "public function setup()\n {\n $this->config = new Config($this->emailOrMobileNumber, $this->merchantKey);\n }", "public function testConstructSetsPropertiesIfVariableIsDefined()\n {\n $values = [\n 'development' => $this->value,\n 'testing' => strrev($this->value)\n ];\n \n $service = new DetectEnvironment($this->name, $values);\n \n $this->assertEquals($this->value, $this->getProperty('actualValue', $service));\n $this->assertEquals($values, $this->getProperty('possibleValues', $service));\n \n return;\n }", "function fill_general_variables()\n\t\t{\n\t\t\t//collect error messages before\n\t\t\t$this->message[] = $this->process_monitor->get_error(false, _DEBUG);\n\t\t\t$this->fill_form_variables();\n\t\t\t$this->t->set_var(array(\n\t\t\t\t'monitor_stats'\t\t\t=> $this->fill_monitor_stats($this->stats),\n\t\t\t));\n\t\t}", "private function initViewVars()\n {\n $this->viewEngine->vars['loggedUserId'] = $this->model->config->getVar('loggedUserId');\n $this->viewEngine->vars['isUserLogged'] = $this->model->config->getVar('isUserLogged');\n $this->viewEngine->vars['loggedUserRole'] = $this->model->config->getVar('loggedUserRole');\n\n $this->viewEngine->vars['charset'] = $this->model->config->getModuleVar('common', 'charset');\n $this->viewEngine->vars['stylesFolder'] = JAPA_PUBLIC_DIR . 'styles/'.$this->model->config->getModuleVar('common', 'styles_folder');\n $this->viewEngine->vars['scriptsFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'scripts_folder');\n $this->viewEngine->vars['imagesFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'images_folder');\n $this->viewEngine->vars['viewsFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'views_folder');\n $this->viewEngine->vars['controllersFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'controllers_folder');\n $this->viewEngine->vars['urlBase'] = $this->router->getBase();\n $this->viewEngine->vars['adminWebController'] = $this->model->config->getVar('default_module_application_controller');\n $this->viewEngine->vars['default_lang'] = $this->model->config->getModuleVar('common', 'default_lang');\n }", "protected function phpunitEnvironmentVariables()\n {\n if ($this->option('custom-argument')) {\n return array_merge(\n parent::phpunitEnvironmentVariables(),\n [\n 'CUSTOM_ENV_VARIABLE' => 1,\n 'CUSTOM_ENV_VARIABLE_FOR_PHPUNIT' => 1,\n ],\n );\n }\n\n return parent::phpunitEnvironmentVariables();\n }", "public static function provideOnResourceLoaderGetConfigVars() {\n\t}", "public static function initCoreVars($force=false)\n {\n // The empty arrays for handlers and settings are required to prevent messages with E_ALL error reporting\n self::$modvars = new ArrayObject(array(\n EventUtil::HANDLERS => array(),\n ServiceUtil::HANDLERS => array(),\n 'Settings' => array(),\n ));\n\n // don't init vars during the installer or upgrader\n if (!$force && System::isInstalling()) {\n return;\n }\n\n // This loads all module variables into the modvars static class variable.\n $modvars = DBUtil::selectObjectArray('module_vars');\n foreach ($modvars as $var) {\n if (!array_key_exists($var['modname'], self::$modvars)) {\n self::$modvars[$var['modname']] = array();\n }\n if (array_key_exists($var['name'], $GLOBALS['ZConfig']['System'])) {\n self::$modvars[$var['modname']][$var['name']] = $GLOBALS['ZConfig']['System'][$var['name']];\n } elseif ($var['value'] == '0' || $var['value'] == '1') {\n self::$modvars[$var['modname']][$var['name']] = $var['value'];\n } else {\n self::$modvars[$var['modname']][$var['name']] = unserialize($var['value']);\n }\n }\n\n // Pre-load the module variables array with empty arrays for known modules that\n // do not define any module variables to prevent unnecessary SQL queries to\n // the module_vars table.\n $knownModules = self::getAllMods();\n foreach ($knownModules as $key => $mod) {\n if (!array_key_exists($mod['name'], self::$modvars)) {\n self::$modvars[$mod['name']] = array();\n }\n }\n }", "public function provideVariables()\n {\n return [\n 'first test' => [\n 'variables' => [\n 'var1' => 'val1',\n 'var2' => 'val2',\n 'var3' => 'val3',\n ],\n ]\n ];\n }", "protected function configureVariables()\n {\n return array(\n 'name' => array(\n 'type' => 'string',\n 'label' => 'Name of the task'\n ),\n 'after' => array(\n 'type' => 'string',\n 'label' => 'Name of the task to execute this task after'\n ),\n 'before' => array(\n 'type' => 'string',\n 'label' => 'Name of the task to execute this task before'\n ),\n 'onBefore' => array(\n 'type' => 'array',\n 'label' => 'Array of sub tasks to execute prior to this task'\n ),\n 'onAfter' => array(\n 'type' => 'array',\n 'label' => 'Array of sub tasks to execute after this task'\n ),\n 'message' => array(\n 'type' => 'string',\n 'label' => 'Message to output when job is run with --dry-run or prior to execution'\n ),\n 'if' => array(\n 'type' => array('string', 'callback', 'bool'),\n 'label' => 'Expression string, callback returning true or false or boolean. Depending of that the task will be executed or not'\n ),\n 'executeInPreview' => array(\n 'type' => 'bool',\n 'default' => false,\n 'label' => 'Whether to execute this task even when job is run with --dry-run'\n ),\n 'force' => array(\n 'type' => 'bool',\n 'default' => false,\n 'label' => 'Whether this task should be run even when prior tasks (inside the current workflow) failed, exited or broke execution.'\n ),\n 'toVar' => array(\n 'type' => 'string',\n 'label' => 'The variable to save the return value of the execute method of the task to.'\n ),\n );\n }", "public function initializeGlobalTimeTrackingVariablesSetsGlobalVariablesDataProvider() {}", "abstract protected function loadDefaults();", "private function initialiseConfig()\n {\n $this->mergeConfigFrom(__DIR__ . '/..' . Settings::LARAVEL_REAL_CONFIG, Settings::LARAVEL_CONFIG_NAME);\n }", "public function setup_environment() {\n\n define( 'IWJ_TEMPLATE_PATH', $this->template_path() );\n\n //$this->add_thumbnail_support();\n //$this->add_image_sizes();\n }", "public function init_globals() {\n\t\t\t$current_theme = wp_get_theme();\n\t\t\t$this->theme_name = strtolower( preg_replace( '#[^a-zA-Z]#', '', $current_theme->get( 'Name' ) ) );\n\t\t\t$this->envato_username = apply_filters( $this->theme_name . '_theme_setup_wizard_username', 'dfdevelopment' );\n\t\t\t$this->oauth_script = apply_filters( $this->theme_name . '_theme_setup_wizard_oauth_script', $this->custom_url.'/files/envato/wptoken/server-script.php' );\n\t\t\t$this->page_slug = apply_filters( $this->theme_name . '_theme_setup_wizard_page_slug', $this->theme_name . '-setup' );\n\t\t\t$this->parent_slug = apply_filters( $this->theme_name . '_theme_setup_wizard_parent_slug', '' );\n\n\t\t\t//If we have parent slug - set correct url\n\t\t\tif ( $this->parent_slug !== '' ) {\n\t\t\t\t$this->page_url = 'admin.php?page=' . $this->page_slug;\n\t\t\t} else {\n\t\t\t\t$this->page_url = 'themes.php?page=' . $this->page_slug;\n\t\t\t}\n\t\t\t$this->page_url = apply_filters( $this->theme_name . '_theme_setup_wizard_page_url', $this->page_url );\n\n\t\t\t//set relative plugin path url\n\t\t\t$this->plugin_url = trailingslashit( get_template_directory_uri() . '/inc/envato_setup' );\n\t\t}", "private function getDefaultConfiguration() \n {\n return array(\n\n // the default cache directory is inside the tattoo library\n 'cache' => __DIR__ . '/../cache/',\n\n // the development mode forces tattoo to always \n // rebuild the files.\n 'development' => false,\n\n // compiler options\n 'compiler' => array(\n\n // automatically escape all outputet variables\n 'autoEscapeVariables' => true,\n\n // define the escaping function. This configuration\n // should always be a string, but calm your horses\n // the string will be directly used in the compiling\n // proccess so use this with attention.\n 'defaultEscapeFunction' => 'htmlentities',\n ),\n );\n }", "protected function getDefaultParameters()\n {\n return array(\n 'config.directory' => __DIR__ . '/../../../../',\n );\n }", "protected function Init() \n {\n // Load the APP config.php and add the defined vars\n $this->load($this->files['app']['file_path'], 'app');\n \n // Load the core.config.php and add the defined vars\n $this->load($this->files['core']['file_path'], 'core', 'config');\n \n // Load the database.config.php and add the defined vars\n $this->load($this->files['db']['file_path'], 'db', 'DB_configs');\n }", "protected function setAcoVariables() {\n\n $this->set('plugin',\n isset($this->params['named']['plugin']) ? $this->params['named']['plugin'] : '');\n $this->set('controller_name', $this->params['named']['controller']);\n $this->set('action', $this->params['named']['action']);\n }", "function wp_scss_set_font_variables() {\n\n\t// Get the defaults.\n\tglobal $starter_default_fonts;\n\tglobal $starter_default_colors;\n\n\t// Create array of color variables.\n\t$variables = [];\n\n\tforeach ( $starter_default_colors as $key => $value ) {\n\n\t\t$variables[ $key ] = get_theme_mod( $key, $value );\n\n\t}\n\n\t// Create array of font variables.\n\tforeach ( $starter_default_fonts as $key => $value ) {\n\n\t\tif ( 'font-size-body' === $key || 'font-size-heading' === $key ) {\n\n\t\t\t// Add px to value if variable is font-size.\n\t\t\t$variables[ $key ] = sprintf( '%spx', get_theme_mod( $key, $value ) );\n\n\t\t} elseif ( 'font-weight-body' === $key || 'font-weight-heading' === $key ) {\n\n\t\t\t// Convert 'regular' to 400 for valid CSS.\n\t\t\tif ( 'regular' === get_theme_mod( $key ) ) {\n\t\t\t\t$variables[ $key ] = '400';\n\t\t\t} else {\n\t\t\t\t$variables[ $key ] = get_theme_mod( $key, $value );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// All other variables.\n\t\t\t$variables[ $key ] = get_theme_mod( $key, $value );\n\n\t\t}\n\t}\n\treturn $variables;\n\n}", "private function mergeDefaultSettings(){\n\t\t//Get a copy of the default configuration.\n\t\t$defaultConfig = $this->getDefaultConfig();\n\t\t//Check for a 'general' section\n\t\tif(array_key_exists('general', $this->configuration)){\n\t\t\t//If it exists, compare the default keys to the loaded config for missing values\n\t\t\t$missingGeneral = array_diff_key($defaultConfig['general'], $this->configuration['general']);\n\t\t\t//Iterate through the missing values and attach them to the running configuration.\n\t\t\tif(count($missingGeneral) > 0){\n\t\t\t\tforeach($missingGeneral as $key=>$parameter){\n\t\t\t\t\t$this->configuration['general'][$key] = $parameter;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t//Section doesn't exist, so we need to set it to the defaults.\n\t\t\t$this->configuration['general'] = $defaultConfig['general'];\n\t\t}\n\t\t//Check for a 'options' section\n\t\tif(array_key_exists('options', $this->configuration)){\n\t\t\t//If it exists, compare the default keys to the loaded config for missing values\n\t\t\t$missingOptions = array_diff_key($defaultConfig['options'], $this->configuration['options']);\n\t\t\t//Iterate through the missing values and attach them to the running configuration.\n\t\t\tif(count($missionOptions) > 0){\n\t\t\t\tforeach($missingOptions as $key=>$parameter){\n\t\t\t\t\t$this->configuration['options'][$key] = $parameter;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t//Section doesn't exist, so we need to set it to the defaults.\n\t\t\t$this->configuration['options'] = $defaultConfig['options'];\n\t\t}\n\t}", "protected function parseVariable(): void\n {\n $sBaseUrl = $this->sBaseUrl;\n\n /**\n * $getCurrentTplName is used in \"variables.inc.php\" file\n */\n $getCurrentTplName = static function () use ($sBaseUrl) {\n $aDirs = explode('/', $sBaseUrl);\n return !empty($aDirs[2]) ? $aDirs[2] : PH7_DEFAULT_THEME;\n };\n\n $this->setVariables(include('variables.inc.php'));\n }", "function qodef_re_set_global_map_variables() {\n \t\n \tif( qodef_re_theme_installed() ) {\n\t\t\t$global_map_variables = array();\n\t\t\n\t\t\t$global_map_variables['mapStyle'] = json_decode(bridge_qode_get_meta_field_intersect('real_estate_map_style'));\n\t\t\t$global_map_variables['scrollable'] = bridge_qode_options()->getOptionValue('real_estate_maps_scrollable') == 'yes' ? true : false;\n\t\t\t$global_map_variables['draggable'] = bridge_qode_options()->getOptionValue('real_estate_maps_draggable') == 'yes' ? true : false;\n\t\t\t$global_map_variables['streetViewControl'] = bridge_qode_options()->getOptionValue('real_estate_maps_street_view_control') == 'yes' ? true : false;\n\t\t\t$global_map_variables['zoomControl'] = bridge_qode_options()->getOptionValue('real_estate_maps_zoom_control') == 'yes' ? true : false;\n\t\t\t$global_map_variables['mapTypeControl'] = bridge_qode_options()->getOptionValue('real_estate_maps_type_control') == 'yes' ? true : false;\n\t\t\n\t\t\t$global_map_variables = apply_filters('qodef_re_filter_js_global_map_variables', $global_map_variables);\n\t\t\n\t\t\twp_localize_script('bridge-default', 'qodefMapsVars', array(\n\t\t\t\t'global' => $global_map_variables\n\t\t\t));\n\t\t}\n }", "public function deleteConfigVars()\n {\n $config_vars = [\n 'DF_AI_ADMIN_ENDPOINT',\n 'DF_AI_API_ENDPOINT',\n 'DF_AI_APIKEY',\n 'DF_API_KEY',\n 'DF_API_LAYER_DESCRIPTION',\n 'DF_CSS_VS',\n 'DF_CUSTOMEXPLODEATTR',\n 'DF_DEBUG',\n 'DF_DEBUG_CURL',\n 'DF_DSBL_AJAX_TKN',\n 'DF_DSBL_DFCKIE_JS',\n 'DF_DSBL_DFFAC_JS',\n 'DF_DSBL_DFLINK_JS',\n 'DF_DSBL_DFPAG_JS',\n 'DF_DSBL_FAC_CACHE',\n 'DF_DSBL_HTTPS_CURL',\n 'DF_EB_LAYER_DESCRIPTION',\n 'DF_ENABLED_V9',\n 'DF_ENABLE_HASH',\n 'DF_EXTRA_CSS',\n 'DF_FACETS_TOKEN',\n 'DF_FEATURES_SHOWN',\n 'DF_FEED_FULL_PATH',\n 'DF_FEED_INDEXED',\n 'DF_FEED_MAINCATEGORY_PATH',\n 'DF_GROUP_ATTRIBUTES_SHOWN',\n 'DF_GS_DESCRIPTION_TYPE',\n 'DF_GS_DISPLAY_PRICES',\n 'DF_GS_IMAGE_SIZE',\n 'DF_GS_MPN_FIELD',\n 'DF_GS_PRICES_USE_TAX',\n 'DF_INSTALLATION_ID',\n 'DF_SHOW_LAYER',\n 'DF_SHOW_LAYER_MOBILE',\n 'DF_REGION',\n 'DF_RESTART_OV',\n 'DF_SHOW_PRODUCT_FEATURES',\n 'DF_SHOW_PRODUCT_VARIATIONS',\n 'DF_UPDATE_ON_SAVE_DELAY',\n 'DF_UPDATE_ON_SAVE_LAST_EXEC',\n 'DF_FEED_INDEXED',\n ];\n\n $hashid_vars = array_column(\n Db::getInstance()->executeS('\n SELECT name FROM ' . _DB_PREFIX_ . \"configuration where name like 'DF_HASHID_%'\"),\n 'name'\n );\n\n $config_vars = array_merge($config_vars, $hashid_vars);\n\n foreach ($config_vars as $var) {\n Configuration::deleteByName($var);\n }\n\n return true;\n }", "abstract protected function define_my_settings();", "public function setUpDefaultVars() {\n $this->response['numAttempts'] = new qti_variable('single', 'integer', array('value' => 0));\n $this->response['duration'] = new qti_variable('single', 'float', array('value' => 0));\n $this->outcome['completionStatus'] = new qti_variable('single', 'identifier', array('value' => 'not_attempted'));\n \n // TODO: We have this to get around mistakes (?) in the example QTI - should we?\n $this->outcome['completion_status'] = $this->outcome['completionStatus'];\n }", "protected function defineConfig()\n {\n // Get config paths\n $configs = $this->config->getDirectly(__DIR__ . '/../Config/path.php')['default_config'] ?? [];\n\n // Add all of them to config collector if $configs is an array\n if (is_array($configs)) {\n foreach ($configs as $alias => $path) {\n $this->config->set($alias, $path);\n }\n }\n }", "public function prepareVars()\n {\n $this->vars['value'] = $this->getKeyValue();\n $this->vars['field'] = $this->formField;\n $this->vars['nameValue'] = $this->getNameValue();\n $this->vars['descriptionValue'] = $this->getDescriptionValue();\n $this->vars['addresses'] = $this->getAddresses();\n $this->vars['listWidget'] = $this->listWidget;\n $this->vars['searchWidget'] = $this->searchWidget;\n\n $this->vars['title'] = $this->title;\n $this->vars['prompt'] = str_replace('%s', '<i class=\"icon-th-list\"></i>', e(trans($this->prompt)));\n\n }", "public function set_defaults()\n {\n $this->dir = null;\n $this->out = 'a';\n $this->mod = false;\n $this->err = false;\n $this->nort = false;\n $this->nostd = false;\n $this->quiet = false;\n $this->werror = false;\n $this->run = false;\n $this->format = false;\n $this->check = false;\n $this->version = false;\n $this->lib_paths = [ realpath(__DIR__ . '/../lib') ]; // install dir\n $this->log_dest = null; // stderr\n $this->log_time = false;\n $this->log_width = 80;\n $this->log_level = LOG_LEVEL_WARNING;\n $this->pack = null; // defaults to \"zip\"\n $this->stub = null; // defaults to \"none\"\n }", "protected function fillConfigurations()\n {\n if (config('database.connections.mysql_dump') === null) {\n throw new ConfigIsNotProperlyDefinedException('[database.connections.mysql_dump]');\n }\n\n $this->newConfigName = 'mysql_dump';\n $this->oldDbName = env('DB_DATABASE', null);\n $this->newDbName = env('DB_DUMP_DATABASE', null);\n $this->user = env('DB_USERNAME', null);\n $this->password = env('DB_PASSWORD', null);\n\n if ($this->oldDbName === null\n || $this->newDbName === null\n || $this->user === null\n || $this->password === null) {\n throw new EnvFileIsNotProperlyDefinedException('[DB_DATABASE, DB_DUMP_DATABASE, DB_USERNAME, DB_PASSWORD]');\n }\n }", "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}", "private function setupDefaults() {\n $defaults = array(\n // Indicates to the system the set of fields that will be included in the response: 3.0 is the default version. 3.1 \n // allows the merchant to utilize the Card Code feature, and is the current standard version.\n 'x_version'=>'3.1', \n \n // In order to receive a delimited response from the payment gateway, this field must be submitted with a value\n // of TRUE or the merchant has to configure a delimited response through the Merchant Interface. \n 'x_delim_data'=>'TRUE',\n \n // The character that is used to separate fields in the transaction response. The payment gateway will use the\n // character passed in this field or the value stored in the Merchant Interface if no value is passed. If this field is passed,\n // and the value is null, it will override the value stored in the Merchant Interface and there is no delimiting character in the transaction response.\n // A single symbol Ex. , (comma) | (pipe) \" (double quotes) ' (single quote) : (colon) ; (semicolon) / (forward slash) \\ (back slash) - (dash) * (star)\n 'x_delim_char'=>$this->responseDelimeter,\n \n // SIM applications use relay response. Set this to false if you are using AIM.\n 'x_relay_response'=>'FALSE',\n \n // IP address of the customer initiating the transaction. If this value is not passed, it will default to 255.255.255.255.\n 'x_customer_ip'=>$_SERVER['REMOTE_ADDR'],\n );\n $this->NVP = array_merge($this->NVP, $defaults); \n }", "function default_configuration()\r\n {\r\n return array();\r\n }", "private function defaultSettings()\n {\n\t\t$default_config = array(\n 'Plugins.Keypic.SigninEnabled' => false,\n\t\t\t 'Plugins.Keypic.SignupEnabled' => true,\n\t\t\t 'Plugins.Keypic.PostEnabled' => true,\n\t\t\t 'Plugins.Keypic.CommentEnabled' => true,\n\t\t\t 'Plugins.Keypic.SigninWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.PostWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.CommentWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.SigninRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.PostRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.CommentRequestType' => 'getScript',\n\t\t );\n\t\t \n\t\tSaveToConfig($default_config);\n }", "private function setDefaultValues()\n {\n return LengowConfiguration::resetAll();\n }", "function setupInitialVars() {\n\t\tparent::setupInitialVars();\n\t\t\n\t\t$this->getEngine()->assign('daoUriView', $this->buildUriPath(grantsController::ACTION_SEARCH));\n\t}", "public function setup() {\n // If .htaccess file or local settings file does not exit lets create them.\n if ((file_exists($this->getSiteRoot() . '.htaccess.default') && !file_exists($this->getSiteRoot() . '.htaccess')) || !file_exists($this->getSiteRoot() . 'sites/default/settings.local.php')) {\n $this->say(\"Missing .htaccess or settings.local.php\");\n $name = $this->confirm(\"Missing .htaccess or settings.local.php Copy the default?\");\n if ($name) {\n // Only copy the .htaccess.default if it default exists.\n if (file_exists($this->getSiteRoot() . '.htaccess.default')) {\n $this->_exec('cp ' . $this->getSiteRoot() . '.htaccess.default ' . $this->getSiteRoot() . '.htaccess');\n }\n\n $this->drupalCreateSettings();\n $this->npmInstall();\n $this->dbGet();\n $this->siteInit = TRUE;\n $this->start();\n }\n }\n else {\n $this->dbGet();\n $this->siteInit = TRUE;\n $this->start();\n }\n }", "public function initConfig() {\r\n\t$config = array();\r\n\tinclude($this->name . '/config.php');\r\n\t\\app::$config = array_merge(\\app::$config, $config);\r\n }", "protected function preConfigure()\n\t{\n\t\tparent::preConfigure();\n\t\t\n\t\t$this->debug->setFlag(OLPBlackbox_DebugConf::DATAX_IDV, FALSE);\n\t\t$this->debug->setFlag(OLPBlackbox_DebugConf::DATAX_PERF, FALSE);\n\t}" ]
[ "0.6588747", "0.65023637", "0.6322836", "0.62487996", "0.62450653", "0.6211987", "0.61995757", "0.614621", "0.6106223", "0.60706204", "0.60244054", "0.60039264", "0.5987584", "0.5975801", "0.5956693", "0.5936735", "0.593521", "0.5916018", "0.59126204", "0.59119403", "0.59085035", "0.5908436", "0.58906955", "0.58831376", "0.5844488", "0.5837832", "0.5775624", "0.57741463", "0.57624006", "0.57583606", "0.57549554", "0.57389134", "0.57315075", "0.5730515", "0.5728564", "0.5722126", "0.57198817", "0.5719196", "0.57141197", "0.57049364", "0.5699459", "0.567557", "0.5670036", "0.56593966", "0.5657862", "0.5644272", "0.56416446", "0.563437", "0.5628461", "0.56264126", "0.56212896", "0.56204903", "0.56180966", "0.56062335", "0.56036484", "0.5602772", "0.55982804", "0.5582494", "0.55507356", "0.5524125", "0.5514502", "0.5504171", "0.5503992", "0.5503088", "0.550083", "0.5497125", "0.5496999", "0.54968894", "0.5496169", "0.54926765", "0.5485617", "0.5485569", "0.5482688", "0.54819286", "0.5473695", "0.5468833", "0.54636604", "0.54617184", "0.5458541", "0.54548687", "0.545446", "0.54500127", "0.5448821", "0.5423363", "0.5410246", "0.54102117", "0.54085237", "0.54071647", "0.54040885", "0.5402349", "0.5396464", "0.5392834", "0.5387865", "0.53852767", "0.5382291", "0.538162", "0.53805363", "0.5377815", "0.53771126", "0.53740793" ]
0.65782815
1
Replace services in SilverStripe's injector with fake instances. The service names are usually class names.
public function registerServices() { $services = Config::inst()->get('FakeManager', 'services'); if($services) { foreach($services as $origName => $fakeName) { $fakeObj = Injector::inst()->create($fakeName); if($this->db && $fakeObj instanceof FakeDatabaseConsumerInterface) { $fakeObj->setDb($this->db); } $this->services[$origName] = $fakeObj; Injector::inst()->registerService($fakeObj, $origName); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function services(){\n\n $facades = Array(\n 'Cache' => 'Disco\\classes\\Cache',\n 'Crypt' => 'Disco\\classes\\Crypt',\n 'Data' => 'Disco\\classes\\Data',\n 'DB' => 'Disco\\classes\\DB',\n 'Email' => 'Disco\\classes\\Email',\n 'Event' => 'Disco\\classes\\Event',\n 'Html' => 'Disco\\classes\\Html',\n 'Form' => 'Disco\\classes\\Form',\n 'Model' => 'Disco\\classes\\ModelFactory',\n 'Queue' => 'Disco\\classes\\Queue',\n 'Session' => 'Disco\\classes\\Session',\n 'Template' => 'Disco\\classes\\Template',\n 'View' => 'Disco\\classes\\View'\n );\n\n foreach($facades as $facade=>$v){\n $this->make($facade,$v);\n }//foreach\n\n $this->as_factory('Router',function(){\n return new \\Disco\\classes\\Router::$base;\n });\n\n }", "public function testServicesShouldBeDifferent()\n\t{\n\t\t$container = new Container();\n\n\t\t$container['service'] = $container->factory(function () {\n\t\t\treturn new Service();\n\t\t});\n\n\t\t$serviceOne = $container['service'];\n\n\t\t$this->assertInstanceOf(__NAMESPACE__ . '\\Mock\\Service', $serviceOne);\n\n\t\t$serviceTwo = $container['service'];\n\n\t\t$this->assertInstanceOf(__NAMESPACE__ . '\\Mock\\Service', $serviceTwo);\n\n\t\t$this->assertNotSame($serviceOne, $serviceTwo);\n\t}", "public function register_services(): void {\n\t\t// Bail early so we don't instantiate services twice.\n\t\tif ( \\count( $this->service_container ) > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Add the injector as the very first service.\n\t\t$this->service_container->put(\n\t\t\tstatic::SERVICE_PREFIX . static::INJECTOR_ID,\n\t\t\t$this->injector\n\t\t);\n\n\t\t$services = $this->get_service_classes();\n\n\t\tif ( $this->enable_filters ) {\n\t\t\t/**\n\t\t\t * Filter the default services that make up this plugin.\n\t\t\t *\n\t\t\t * This can be used to add services to the service container for\n\t\t\t * this plugin.\n\t\t\t *\n\t\t\t * @param array<string, string> $services Associative array of identifier =>\n\t\t\t * class mappings. The provided\n\t\t\t * classes need to implement the\n\t\t\t * Service interface.\n\t\t\t */\n\t\t\t$filtered_services = apply_filters(\n\t\t\t\tstatic::HOOK_PREFIX . static::SERVICES_FILTER,\n\t\t\t\t$services\n\t\t\t);\n\n\t\t\t$services = $this->validate_services( $filtered_services );\n\t\t}\n\n\t\twhile ( null !== key( $services ) ) {\n\t\t\t$id = $this->maybe_resolve( key( $services ) );\n\n\t\t\t$class = $this->maybe_resolve( current( $services ) );\n\n\t\t\t// Delay registering the service until all requirements are met.\n\t\t\tif (\n\t\t\t\tis_a( $class, HasRequirements::class, true )\n\t\t\t) {\n\t\t\t\tif ( ! $this->requirements_are_met( $id, $class, $services ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->schedule_potential_service_registration( $id, $class );\n\n\t\t\tnext( $services );\n\t\t}\n\t}", "private function addMockServicesToContainer() {\n $this->registerServiceWithContainerMock('current_user', $this->getNewUserMock());\n $this->registerServiceWithContainerMock('entity_type.manager', $this->getNewEntityTypeManagerMock());\n }", "public static function i(): ServicesFactory\n {\n return parent::getInstance();\n }", "public function testHandleWithMockServicesOverwrite(): void\n {\n $this->mockService(stdClass::class, function () {\n return json_decode('{\"first\":true}');\n });\n $this->mockService(stdClass::class, function () {\n return json_decode('{\"second\":true}');\n });\n $this->get('/dependencies/requiredDep');\n $this->assertResponseOk();\n $this->assertResponseContains('\"second\":true', 'Contains the data from the stdClass mock container.');\n }", "protected function setupBuiltInServices() {\n // generic services\n ServiceProviderInstaller::setup(new CacheServiceProvider());\n ServiceProviderInstaller::setup(new ConfigServiceProvider());\n ServiceProviderInstaller::setup(new DatabaseServiceProvider());\n ServiceProviderInstaller::setup(new FilesystemServiceProvider());\n ServiceProviderInstaller::setup(new LoggerServiceProvider());\n ServiceProviderInstaller::setup(new MiddlewareQueueServiceProvider());\n ServiceProviderInstaller::setup(new ModulesServiceProvider());\n ServiceProviderInstaller::setup(new RouterServiceProvider());\n ServiceProviderInstaller::setup(new SessionServiceProvider());\n ServiceProviderInstaller::setup(new TranslatorServiceProvider());\n ServiceProviderInstaller::setup(new UrlServiceProvider());\n ServiceProviderInstaller::setup(new VersionUriServiceProvider());\n ServiceProviderInstaller::setup(new VoltServiceProvider());\n // listener services\n $this->di->setShared('dispatcher.listener', new DispatcherListener());\n $this->di->setShared('router.listener', new RouterListener());\n $this->di->setShared('view.listener', new ViewListener());\n $this->di->setShared('db.listener', new DatabaseListener());\n // defaults\n $this->di->setShared('application', new MvcApplication());\n $this->di->setShared('dispatcher', DispatcherFactory::factory(/* module */''));\n $this->di->setShared('view', Factory::html());\n }", "public function register_services() {\n\t\t// Bail early so we don't instantiate services twice.\n\t\tif ( ! empty( $this->services ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$classes = $this->get_service_classes();\n\n\t\t$this->services = array_map(\n\t\t\t[ $this, 'instantiate_service' ],\n\t\t\t$classes\n\t\t);\n\n\t\tarray_walk( $this->services, function ( Service $service ) {\n\t\t\t$service->register();\n\t\t} );\n\t}", "protected function setRawServices(array $services) {\n foreach ($services as $name => $service) {\n $this->di->setShared($name, $service);\n }\n }", "public function registerServices() {\n\t\t$services = $this->getServices();\n\t\t$services = array_map( [ $this, 'instantiateServices' ], $services );\n\t\t\n\t\tarray_walk( $services, function ( Service $service ) {\n\t\t\t$service->register();\n\t\t} );\n\t}", "public function testDefaultServices()\n {\n $di = new DIFactoryConfigMagic(\"di.php\");\n $services = $di->getServices();\n $defaultServices = [\n \"request\",\n \"response\",\n \"url\",\n \"router\",\n \"view\",\n \"viewRenderFile\",\n \"session\",\n \"textfilter\",\n ];\n\n foreach ($services as $service) {\n $this->assertContains($service, $defaultServices);\n }\n }", "public function registerServices()\n {\n /**\n * @var $container Container\n */\n $container = $this->getContainer();\n\n $services = $container->settings['services'];\n\n if (is_array($services) && !empty($services)) {\n foreach ($services as $service) {\n /**\n * @var $instance ServiceInterface\n */\n $instance = new $service();\n\n $container[$instance->name()] = $instance->register();\n\n unset($instance);\n }\n }\n\n unset($container, $services, $service);\n }", "public static function setDeferredServices($services){\n \\Illuminate\\Foundation\\Application::setDeferredServices($services);\n }", "protected function addSiteServices()\n {\n $this->container->JobPosting = function ($container) {\n return new JobPosting();\n };\n\n $this->container->Pagination = $this->container->factory(function ($container) {\n return new Pagination($container);\n });\n\n $this->container->Registration = function ($container) {\n return new Registration($container);\n };\n\n $this->container->Semantic = function ($container) {\n return new Semantic($container);\n };\n\n $this->container->User = function ($container) {\n return new User($container);\n };\n }", "public function testInvalidClassNameServiceProvider()\n {\n $app = new Application();\n $provider = array();\n $serviceRegisterProvider = new ServiceRegisterProvider();\n $serviceRegisterProvider->registerServiceProvider($app, $provider);\n }", "protected function registerBaseServices()\n {\n $container = $this->getContainer();\n\n $container->share('logger', function () use ($container) {\n return new Logger($container->get('config'));\n });\n\n $this->registerService(new Providers\\ConfigProvider());\n $this->registerService(new Providers\\FileSystemProvider());\n $this->registerService(new Providers\\ParserManagerProvider());\n $this->registerService(new Providers\\BackendProvider());\n }", "public function testOverwritePreviousDefinedService()\n {\n $di = new DIFactoryConfigMagic(\"di.php\");\n $service = 'session';\n\n $di->set($service, function () {\n $session = new \\stdClass();\n return $session;\n });\n\n $session = $di->get($service);\n $this->assertInstanceOf('\\stdClass', $session);\n }", "public function loadFactoriesFromContainers()\n {\n $newFactoriesPath = '/app/Ship/Engine/Loaders/FactoryMixer';\n\n App::singleton(Factory::class, function ($app) use ($newFactoriesPath) {\n $faker = $app->make(Generator::class);\n\n return Factory::construct($faker, base_path() . $newFactoriesPath);\n });\n }", "private function bindServices()\n {\n // $this->app->singleton('package-blueprint-service', function ($app) {\n // return new FooService();\n // });\n }", "public static function register_services()\n {\n foreach ( self::get_services() as $class )\n {\n $service = self::instantiate( $class );\n if( method_exists( $service, 'register' ) )\n $service->register();\n }\n }", "public function should_lazily_build_registered_services() {\n\t\t$app = new _App();\n\n\t\t$app->register( 'objectOne', function () {\n\t\t\treturn new ObjectOne();\n\t\t} );\n\n\t\tglobal $constructed;\n\t\t$this->assertEmpty( $constructed );\n\n\t\t$this->assertInstanceOf( 'ObjectOne', $app->objectOne );\n\t\t$this->assertContains( 'ObjectOne', $constructed );\n\t}", "public function replace(array $services): self\n {\n foreach ($services as $name => $definition) {\n if ($this->has($name)) {\n $this->original[$name] = $this->get($name);\n $this->remove($name);\n }\n\n $this->set($name, $definition);\n }\n\n return $this;\n }", "public static function register_services()\n {\n foreach ( self::get_services() as $class ) {\n $service = self::instantiate( $class );\n if ( method_exists( $service, 'register' ) ) {\n $service->register();\n }\n }\n }", "protected function resetSingletons() {}", "protected function registerServices()\n {\n\n $di = new FactoryDefault();\n\n /**\n * Read services\n */\n include CORE_PATH . \"/config/services.php\";\n\n /**\n * Get config service for use in inline setup below\n */\n $config = $di->getConfig();\n\n\n include CORE_PATH . '/config/loader.php';\n\n \n\n $this->setDI($di);\n }", "public function testBuildWillIgnorePreviouslySetServiceWhenCreatingViaFactory(): void\n {\n $container = new Container();\n\n $serviceName = 'ServiceName';\n\n // Define our service\n $container->setFactory(\n $serviceName,\n static function () {\n return new \\stdClass();\n }\n );\n\n // Request it by it's service name so we 'set' the service\n $service = $container->get($serviceName);\n\n $builtService = $container->build($serviceName);\n\n $this->assertInstanceOf(\\stdClass::class, $service);\n $this->assertInstanceOf(\\stdClass::class, $builtService);\n\n // The services should not be the same object instance\n $this->assertNotSame($service, $builtService);\n\n // We expect the existing service to not have been modified and additional calls to get\n // resolve to the existing set service (and will not execute the factory)\n $this->assertSame($service, $container->get($serviceName));\n }", "private function load_services() {\n\t\tforeach ( $this->get_services() as $service_classname ) {\n\t\t\t$this->load_service( $service_classname );\n\t\t}\n\t}", "public static function register_services(): void\n {\n foreach (self::get_services() as $class) {\n $service = self::instantiate($class);\n if (method_exists($class, 'register')) {\n $service->register();\n }\n }\n }", "public static function register_services()\n {\n foreach (self::get_services() as $class) {\n $service = self::instantiate($class);\n if (method_exists($service, 'register')) {\n $service->register();\n }\n }\n }", "private function registerServices() {\n // Modules\n $this->addService('modules', 'MyTravel\\Core\\Service\\Modules::setService');\n // Routing\n $this->addService('routing', 'MyTravel\\Core\\Service\\Routing::setService');\n // Event dispatcher\n $this->serviceContainer\n ->register('events', 'Symfony\\Component\\EventDispatcher\\EventDispatcher');\n // Database\n $this->addService('db', 'MyTravel\\Core\\Service\\Db::setService');\n // Access\n $this->addService('access', 'MyTravel\\Core\\Service\\Access::setService');\n }", "private function buildInjectors()\n\t{\n\t\t$container = $this;\n\n\t\t// Debug tracer\n\t\t$this->tracer = new Tracer;\n\n\t\t// Build provider injector\n\t\t$providerInjector =\n\t\t$this->providerInjector = new Injector(\n\t\t\t// Cache\n\t\t\t$this->providerCache, \n\t\t\t// Factory\n\t\t\tfunction($name) {\n\t\t\t\t$name = substr($name, 0, -8);\n\t\t\t\tthrow new LogicException(\"Provider for '$name' not found\\n\" . $this->tracer);\n\t\t\t}, \n\t\t\t// Debug tracer\n\t\t\t$this->tracer\n\t\t);\n\n\t\t// Build instance injector\n\t\t$this->instanceInjector = new Injector(\n\t\t\t// Cache\n\t\t\t$this->instanceCache, \n\t\t\t// Factory\n\t\t\tfunction($name) use ($providerInjector, $container) {\n\n\t\t\t\tif ($lazy = strpos($name, 'lazy::') === 0) {\n\t\t\t\t\t$name = substr($name, 6);\n\t\t\t\t}\n\n\t\t\t\t$this->tracer->request($name);\n\n\t\t\t\t$provider = $providerInjector->get($name . 'Provider');\n\t\t\t\t// Determin factory dependencies\n\t\t\t\t$factoryAndDependencies = Container::getDependencyArray($provider->getFactory());\n\t\t\t\t$instance = $lazy \n\t\t\t\t\t? function() use ($factoryAndDependencies){\n\t\t\t\t\t\treturn $this->invoke($factoryAndDependencies);\n\t\t\t\t\t} \n\t\t\t\t\t: $this->invoke($factoryAndDependencies);\n\n\t\t\t\t// Inject container\n\t\t\t\tif ($instance instanceof ContainerAwareInterface) {\n\t\t\t\t\t$instance->setContainer($container);\n\t\t\t\t}\n\n\t\t\t\t$this->tracer->received($name . ($lazy ? ' [lazy]' : ''));\n\n\t\t\t\treturn $instance;\n\t\t\t}, \n\t\t\t// Debug tracer\n\t\t\t$this->tracer\n\t\t);\n\n\t\t// Implement container as provider\n\t\t$this->provider('Container', new Provider([function(){\n\t\t\treturn $this;\n\t\t}]));\n\n\t\t// Implement instance injector as provider\n\t\t$this->provider('Injector', new Provider([function() {\n\t\t\treturn $this->instanceInjector;\n\t\t}]));\n\t}", "public static function loadPersistentServices()\n {\n $handlers = ModUtil::getVar(self::HANDLERS, 'definitions', array());\n if (!$handlers) {\n return;\n }\n\n foreach ($handlers as $id => $handler) {\n self::$serviceManager->registerService(new Zikula_ServiceManager_Service($id, $handler['definition'], $handler['shared']));\n }\n }", "public function setProviders()\n {\n $services = $this->container['services']??null;\n\n if (is_array($services)) {\n foreach ($services as $service) {\n $service::register($this->container);\n $service::boot($this->container);\n }\n }\n }", "protected function otherServiceProviders()\n {\n $providers = [\n \\Collective\\Html\\HtmlServiceProvider::class,\n \\Intervention\\Image\\ImageServiceProvider::class,\n \\Acacha\\AdminLTETemplateLaravel\\Providers\\AdminLTETemplateServiceProvider::class,\n \\Serff\\Cms\\Core\\Providers\\InstallationServiceProvider::class,\n \\Serff\\Cms\\Core\\Providers\\AdminServiceProvider::class,\n ];\n\n $manifestPath = app()->getCachedServicesPath();\n\n (new ProviderRepository(app(), new Filesystem, $manifestPath))\n ->load($providers);\n }", "public function testHandleWithMockServicesFromReflectionContainer(): void\n {\n $this->mockService(ReflectionDependency::class, function () {\n return new ReflectionDependency();\n });\n $this->get('/dependencies/reflectionDep');\n $this->assertResponseOk();\n $this->assertResponseContains('{\"dep\":{}}', 'Contains the data from the reflection container');\n }", "public function loadServices($providers);", "private function initDi() {\n\t\t$this->_di = new FactoryDefault();\n\t}", "protected function registerServices()\n {\n $this->singleton('request', function ($app) {\n return new Request($app);\n });\n\n $this->singleton('response', function ($app) {\n return new Response($app);\n });\n\n $this->singleton('route', function ($app) {\n return new Route($app);\n });\n\n $this->singleton('view', function ($app) {\n return new View($app);\n });\n\n $this->singleton('exception', function ($app) {\n return new Exception($app, $app->exception);\n });\n\n $this->singleton('crypt', function ($app) {\n return new Crypt($app->getSecret());\n });\n\n $this->singleton('cookie', function ($app) {\n return new Cookie($app, $app->getConfig('state')['cookie']);\n });\n\n $this->singleton('session', function ($app) {\n return new Session(new SessionDatabaseHandler($app, $app->getConfig('state')['session']));\n });\n\n return $this->factory();\n }", "private function initDependencies()\n {\n // == HTML ==========================================================\n $this->di->mapService('core.html.factory', '\\Core\\Html\\HtmlFactory');\n\n // == AJAX ==========================================================\n $this->di->mapService('core.ajax', '\\Core\\Ajax\\Ajax');\n }", "public function addServices($provider)\n\t{\n\t\t$services = new $provider;\n\t\t$services = $services->register();\n\t\tforeach($services as $key => $item)\n\t\t\tContainer::registerClass( $key , $item );\n\t}", "protected abstract function resolveService();", "public function setServices($services) {\n $this->services = $services;\n }", "private function initializeServices()\n {\n $this->emailManager = $this->getService('mycp.service.email_manager');\n $this->translatorService = $this->getService('translator');\n $this->securityService = $this->getService('Secure');\n $this->router = $this->getService('router');\n }", "public function testArbitraryValuesAreRegisteredInServiceProvider()\n {\n $c = new Container;\n\n $c->addServiceProvider('League\\Container\\Test\\Asset\\ServiceProviderFake');\n\n $this->assertEquals('value', $c->get('test.variable'));\n }", "protected function addCommonServices()\n {\n $this->container->AssetFiles = function ($container) {\n return new AssetFiles($container);\n };\n\n $this->container->EmailIncoming = function ($container) {\n return new EmailIncoming($container);\n };\n\n $this->container->EmailOutgoing = function ($container) {\n return new EmailOutgoing($container);\n };\n\n $this->container->ExceptionHandler = function ($container) {\n return new ExceptionHandler($container);\n };\n\n $this->container->Format = function ($container) {\n return new Format($container);\n };\n\n $this->container->Identicon = function ($container) {\n return new Identicon();\n };\n\n // overriding inflector already loaded, not an option to set the inflector in fof.xml\n $this->container->inflector = function ($container) {\n return new Inflector();\n };\n\n $this->container->Language = function ($container) {\n return new Language($container);\n };\n\n $this->container->MessageCounts = function ($container) {\n return new MessageCounts($container);\n };\n\n $this->container->TableFields = function ($container) {\n return new TableFields($container);\n };\n\n $this->container->Text = function ($container) {\n return new Text();\n };\n }", "public function setServices($services)\n {\n $this->services = $services;\n }", "public function testServiceOverrides()\n {\n $templating = $this->createMock(Templating::class);\n $routing = $this->createMock(Router::class);\n $securityChecker = $this->createMock(SecurityChecker::class);\n\n $config = [\n 'app_base_path' => __DIR__ . '/test_app',\n 'security.config' => [],\n 'templating' => $templating,\n 'routing' => $routing,\n 'security.checker' => $securityChecker,\n ];\n\n $app = new Application($config);\n $this->assertSame($templating, $app->get('templating'));\n $this->assertSame($routing, $app->get('routing'));\n $this->assertSame($securityChecker, $app->get('security.checker'));\n }", "private static function loadServices() {\n\n Application::$services = array();\n\n $config = Application::getConfig();\n\n if ($handle = opendir($config[\"system\"][\"service-folder\"])) {\n\n /* Das ist der korrekte Weg, ein Verzeichnis zu durchlaufen. */\n while (false !== ($entry = readdir($handle))) {\n if ($entry != \".\" && $entry != \"..\") {\n require $config[\"system\"][\"service-folder\"] . \"/\" . $entry;\n $className = $config[\"system\"][\"namespace\"] . \"\\\\services\\\\\" . basename($entry,\".php\");\n $testClass = new \\ReflectionClass($className);\n if (!$testClass->isAbstract()) {\n Application::$services[basename($entry,\".php\")] = new $className();\n }\n\n }\n }\n closedir($handle);\n }\n }", "protected function loadServices()\n {\n $di = $this->getDI();\n\n // Register the dispatcher setting a Namespace for controllers\n $di->setShared('dispatcher', function () {\n\n\n $dispatcher = new Dispatcher();\n $dispatcher->setDefaultNamespace('Phalcana\\Controllers');\n\n $listener = new Dispatch;\n $events = new Manager();\n $events->attach('dispatch', $listener);\n $dispatcher->setEventsManager($events);\n\n return $dispatcher;\n });\n\n $di->setShared('router', $this->loadRoutes(new Router(false)));\n }", "public function testValuesServiceProvider()\n {\n $app = new Application();\n $provider = array(\n 'class' => 'MJanssen\\Provider\\ServiceProviderFoo',\n 'values' => array(\n 'foo' => 'baz'\n )\n );\n $serviceRegisterProvider = new ServiceRegisterProvider();\n $serviceRegisterProvider->registerServiceProvider($app, $provider);\n }", "public static function getRealServiceManager()\n {\n // When we fix our unit tests to mock all dependencies\n // we need to put this line back in to speed up our tests\n //return m::mock('\\Laminas\\ServiceManager\\ServiceManager')->makePartial();\n\n $serviceManager = new ServiceManager(new ServiceManagerConfig());\n $serviceManager->setService('ApplicationConfig', self::$config);\n $serviceManager->get('ModuleManager')->loadModules();\n $serviceManager->setAllowOverride(true);\n\n $config = $serviceManager->get('Config');\n $config['service_api_mapping']['endpoints']['backend'] = 'http://some-fake-backend/';\n $serviceManager->setService('Config', $config);\n\n $translator = m::mock(\\Laminas\\I18n\\Translator\\Translator::class)->makePartial();\n /** @var Translator $mvcTranslator */\n $mvcTranslator = m::mock(Translator::class, [$translator])->makePartial();\n $serviceManager->setService('MvcTranslator', $mvcTranslator);\n\n /*\n * NP 17th Nov 2014\n *\n * Although this is commented out I'd like to leave it in for now;\n * it's a more elegant way to trap unmocked backend requests than\n * setting a fake URL as above. Only trouble is at the moment $path\n * always comes through as null... needs a bit of investigation\n *\n $closure = function ($method, $path, $params) {\n $str = sprintf(\n \"Trapped unmocked backend request: %s %s\",\n $method, $path\n );\n throw new \\Exception($str);\n };\n\n $serviceManager->setService(\n 'ServiceApiResolver',\n m::mock()\n ->shouldReceive('getClient')\n ->andReturn(\n m::mock('\\Common\\Util\\RestClient[request]', [new \\Laminas\\Uri\\Http])\n ->shouldReceive('request')\n ->andReturnUsing($closure)\n ->getMock()\n )\n ->getMock()\n );\n */\n\n return $serviceManager;\n }", "public static function fake()\n {\n static::swap(new FastlyFake());\n }", "public function setOriginalService(object $original): void;", "public function filterTagFactoryNewInstanceServices(UnitTester $I, Example $example)\n {\n $I->wantToTest('Tag\\TagFactory - newInstance() - services ' . $example[0]);\n $escaper = new Escaper();\n $factory = new TagFactory($escaper);\n $service = $factory->newInstance($example[0]);\n\n $class = $example[1];\n $I->assertInstanceOf($class, $service);\n }", "public function __construct()\n {\n $this->factories = [];\n }", "protected function registerServices()\r\n\t{\r\n\r\n\t\t$di = new FactoryDefault();\r\n\r\n\t\t$loader = new Loader();\r\n\r\n\t\t/**\r\n\t\t * We're a registering a set of directories taken from the configuration file\r\n\t\t */\r\n\t\t$loader->registerDirs(\r\n\t\t\tarray(\r\n\t\t\t\t__DIR__ . '/../apps/library/',\r\n\t\t\t\t__DIR__ . '/../apps/plugins/'\r\n\t\t\t)\r\n\t\t)->register();\r\n\r\n\r\n\r\n\t\t//Registering a router\r\n\t\t$di->set('router', function(){\r\n\r\n\t\t\t$router = new Router();\r\n\r\n\t\t\t$router->setDefaultModule(\"frontend\");\r\n\t\t\t$router->setDefaultController(\"index\");\r\n\t\t\t$router->setDefaultAction(\"index\");\r\n\r\n $router->add(\"/register/recoveryPassword\", array(\r\n 'module' => 'frontend',\r\n 'controller' => 'register',\r\n 'action' => 'recoveryPassword',\r\n ));\r\n $router->add(\"/register/index\", array(\r\n 'module' => 'frontend',\r\n 'controller' => 'register',\r\n 'action' => 'index',\r\n ));\r\n\r\n $router->add(\"/help/about\", array(\r\n 'module' => 'frontend',\r\n 'controller' => 'help',\r\n 'action' => 'about',\r\n ));\r\n\r\n\t\t\t\r\n\t\t\t$router->add(\"/ajax/getlast\", array(\r\n\t\t\t\t'module' => 'frontend',\r\n\t\t\t\t'controller' => 'ajax',\r\n\t\t\t\t'action' => 'getlast',\r\n\t\t\t));\r\n\t\t\t\r\n\t\t\t$router->add(\"/:controller/:action/:params\", array(\r\n\t\t\t\t'module' => 'frontend',\r\n\t\t\t\t'controller' => 1,\r\n\t\t\t\t'action' => 2,\r\n\t\t\t\t'params'=>3\r\n\t\t\t));\r\n\r\n\t\t\t$router->add(\"/admin/:controller/:action/:params\", array(\r\n\t\t\t\t'module' => 'backend',\r\n\t\t\t\t'controller' => 1,\r\n\t\t\t\t'action' => 2,\r\n\t\t\t\t'params'=>3\r\n\t\t\t));\r\n\r\n// $router->add(\"/admin/register\", array(\r\n// 'module' => 'backend',\r\n// 'controller' => 'register',\r\n// 'action' => 'index',\r\n// ));\r\n\r\n\t\t\t$router->add(\"/admin\", array(\r\n\t\t\t\t'module' => 'backend',\r\n\t\t\t\t'controller' => 'login',\r\n\t\t\t\t'action' => 'index',\r\n\t\t\t));\r\n\r\n\t\t\t$router->add(\"/admin/\", array(\r\n\t\t\t\t'module' => 'backend',\r\n\t\t\t\t'controller' => 'login',\r\n\t\t\t\t'action' => 'index',\r\n\t\t\t));\r\n\r\n\t\t\t$router->add(\"/admin/login\", array(\r\n\t\t\t\t'module' => 'backend',\r\n\t\t\t\t'controller' => 'login',\r\n\t\t\t\t'action' => 'index',\r\n\t\t\t));\r\n\r\n\r\n\r\n//\t\t\t$router->notFound(array(\r\n//\t\t\t\t\"controller\" => \"index\",\r\n//\t\t\t\t\"action\" => \"page404\",\r\n//\t\t\t));\r\n\r\n\t\t\treturn $router;\r\n\r\n\t\t});\r\n\r\n\t\t$this->setDI($di);\r\n\t}", "public function testContainerAddServiceProviderAcceptsServiceProviderByReference()\n {\n $c = new Container;\n\n $c->addServiceProvider('League\\Container\\Test\\Asset\\ServiceProviderFake');\n\n $this->assertInstanceOf('League\\Container\\Test\\Asset\\Baz', $c->get('test'));\n $this->assertInstanceOf('stdClass', $c->get('test.instance'));\n }", "public function registerServices()\n {\n $this->app->bind('helpers.lib', function($app) {\n return new LibHelper;\n });\n $this->app->bind('helpers.theme', function($app) {\n return ThemeHelper::instance();\n });\n $this->app->bind('helpers.acf', function($app) {\n $helper = AcfHelper::instance();\n $helper->setThemeHelper($this->app['helpers.theme']);\n $helper->setLib($this->app['helpers.lib']);\n\n return $helper;\n });\n }", "protected function buildServiceReplacements(array $replace)\n {\n// return array_merge($replace, [\n// 'DummyFullModelClass' => $modelClass,\n// 'DummyModelClass' => class_basename($modelClass),\n// 'DummyModelVariable' => lcfirst(class_basename($modelClass)),\n// ]);\n return null;\n }", "public function __construct()\n {\n $this->services = [];\n }", "public static function addDeferredServices($services){\n \\Illuminate\\Foundation\\Application::addDeferredServices($services);\n }", "public function register($providers, $force = false)\n { \n foreach((array) $providers as $provider){\n if (!$provider instanceof ServiceProvider || $force) {\n $provider = new $provider($this);\n if (method_exists($provider, 'register')) {\n $provider->register();\n }\n }\n \n $this->providers[get_class($provider)] = $provider;\n\n if (!$provider->isDeferred() && method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function registerServices(){\n }", "public function testConfigServiceProviders()\n {\n $app = new Application();\n\n $app['custom.providers'] = array(\n array(\n 'class' => 'MJanssen\\Provider\\ServiceProviderFoo'\n ),\n array(\n 'class' => 'MJanssen\\Provider\\ServiceProviderBaz'\n )\n );\n\n $app->register(new ServiceRegisterProvider('custom.providers'));\n\n $this->assertEquals(new stdClass(), $app['foo']);\n $this->assertEquals(new stdClass(), $app['baz']);\n }", "private function resetContainer()\n {\n // Synthetic services\n $kernel = Shopware()->Container()->get('kernel');\n $connection = Shopware()->Container()->get('db_connection');\n $application = Shopware()->Container()->get('application');\n\n Shopware()->Container()->reset();\n\n Shopware()->Container()->set('kernel', $kernel);\n Shopware()->Container()->set('db_connection', $connection);\n Shopware()->Container()->set('application', $application);\n }", "protected function getTranslator_DefaultService()\n {\n $this->services['translator.default'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('translation.loader.csv' => function () {\n return ${($_ = isset($this->services['translation.loader.csv']) ? $this->services['translation.loader.csv'] : $this->services['translation.loader.csv'] = new \\Symfony\\Component\\Translation\\Loader\\CsvFileLoader()) && false ?: '_'};\n }, 'translation.loader.dat' => function () {\n return ${($_ = isset($this->services['translation.loader.dat']) ? $this->services['translation.loader.dat'] : $this->services['translation.loader.dat'] = new \\Symfony\\Component\\Translation\\Loader\\IcuDatFileLoader()) && false ?: '_'};\n }, 'translation.loader.ini' => function () {\n return ${($_ = isset($this->services['translation.loader.ini']) ? $this->services['translation.loader.ini'] : $this->services['translation.loader.ini'] = new \\Symfony\\Component\\Translation\\Loader\\IniFileLoader()) && false ?: '_'};\n }, 'translation.loader.json' => function () {\n return ${($_ = isset($this->services['translation.loader.json']) ? $this->services['translation.loader.json'] : $this->services['translation.loader.json'] = new \\Symfony\\Component\\Translation\\Loader\\JsonFileLoader()) && false ?: '_'};\n }, 'translation.loader.mo' => function () {\n return ${($_ = isset($this->services['translation.loader.mo']) ? $this->services['translation.loader.mo'] : $this->services['translation.loader.mo'] = new \\Symfony\\Component\\Translation\\Loader\\MoFileLoader()) && false ?: '_'};\n }, 'translation.loader.php' => function () {\n return ${($_ = isset($this->services['translation.loader.php']) ? $this->services['translation.loader.php'] : $this->services['translation.loader.php'] = new \\Symfony\\Component\\Translation\\Loader\\PhpFileLoader()) && false ?: '_'};\n }, 'translation.loader.po' => function () {\n return ${($_ = isset($this->services['translation.loader.po']) ? $this->services['translation.loader.po'] : $this->services['translation.loader.po'] = new \\Symfony\\Component\\Translation\\Loader\\PoFileLoader()) && false ?: '_'};\n }, 'translation.loader.qt' => function () {\n return ${($_ = isset($this->services['translation.loader.qt']) ? $this->services['translation.loader.qt'] : $this->services['translation.loader.qt'] = new \\Symfony\\Component\\Translation\\Loader\\QtFileLoader()) && false ?: '_'};\n }, 'translation.loader.res' => function () {\n return ${($_ = isset($this->services['translation.loader.res']) ? $this->services['translation.loader.res'] : $this->services['translation.loader.res'] = new \\Symfony\\Component\\Translation\\Loader\\IcuResFileLoader()) && false ?: '_'};\n }, 'translation.loader.xliff' => function () {\n return ${($_ = isset($this->services['translation.loader.xliff']) ? $this->services['translation.loader.xliff'] : $this->services['translation.loader.xliff'] = new \\Symfony\\Component\\Translation\\Loader\\XliffFileLoader()) && false ?: '_'};\n }, 'translation.loader.yml' => function () {\n return ${($_ = isset($this->services['translation.loader.yml']) ? $this->services['translation.loader.yml'] : $this->services['translation.loader.yml'] = new \\Symfony\\Component\\Translation\\Loader\\YamlFileLoader()) && false ?: '_'};\n })), new \\Symfony\\Component\\Translation\\Formatter\\MessageFormatter(new \\Symfony\\Component\\Translation\\MessageSelector()), 'en', array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => 'yaml', 1 => 'yml'), 'translation.loader.xliff' => array(0 => 'xlf', 1 => 'xliff'), 'translation.loader.po' => array(0 => 'po'), 'translation.loader.mo' => array(0 => 'mo'), 'translation.loader.qt' => array(0 => 'ts'), 'translation.loader.csv' => array(0 => 'csv'), 'translation.loader.res' => array(0 => 'res'), 'translation.loader.dat' => array(0 => 'dat'), 'translation.loader.ini' => array(0 => 'ini'), 'translation.loader.json' => array(0 => 'json')), array('cache_dir' => ($this->targetDirs[0].'/translations'), 'debug' => true, 'resource_files' => array('af' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.af.xlf')), 'ar' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ar.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ar.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ar.xlf')), 'az' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.az.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.az.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.az.xlf')), 'bg' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.bg.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.bg.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.bg.xlf')), 'ca' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ca.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ca.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ca.xlf')), 'cs' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.cs.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.cs.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.cs.xlf')), 'cy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.cy.xlf')), 'da' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.da.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.da.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.da.xlf')), 'de' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.de.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.de.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.de.xlf')), 'el' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.el.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.el.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.el.xlf')), 'en' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.en.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.en.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.en.xlf')), 'es' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.es.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.es.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.es.xlf')), 'et' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.et.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.et.xlf')), 'eu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.eu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.eu.xlf')), 'fa' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fa.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fa.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.fa.xlf')), 'fi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fi.xlf')), 'fr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.fr.xlf')), 'gl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.gl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.gl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.gl.xlf')), 'he' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.he.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.he.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.he.xlf')), 'hr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.hr.xlf')), 'hu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hu.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.hu.xlf')), 'hy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hy.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hy.xlf')), 'id' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.id.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.id.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.id.xlf')), 'it' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.it.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.it.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.it.xlf')), 'ja' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ja.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ja.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ja.xlf')), 'lb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lb.xlf')), 'lt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lt.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lt.xlf')), 'lv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lv.xlf')), 'mn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.mn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.mn.xlf')), 'nb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nb.xlf')), 'nl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nl.xlf')), 'nn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nn.xlf')), 'no' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.no.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.no.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.no.xlf')), 'pl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pl.xlf')), 'pt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pt.xlf')), 'pt_BR' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pt_BR.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pt_BR.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pt_BR.xlf')), 'ro' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ro.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ro.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ro.xlf')), 'ru' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ru.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ru.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ru.xlf')), 'sk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sk.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sk.xlf')), 'sl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sl.xlf')), 'sq' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sq.xlf')), 'sr_Cyrl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sr_Cyrl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sr_Cyrl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sr_Cyrl.xlf')), 'sr_Latn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sr_Latn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sr_Latn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sr_Latn.xlf')), 'sv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sv.xlf')), 'th' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.th.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.th.xlf')), 'tl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.tl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.tl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.tl.xlf')), 'tr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.tr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.tr.xlf')), 'uk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.uk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.uk.xlf')), 'vi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.vi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.vi.xlf')), 'zh_CN' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.zh_CN.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.zh_CN.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.zh_CN.xlf')), 'zh_TW' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.zh_TW.xlf')), 'pt_PT' => array(0 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pt_PT.xlf')), 'ua' => array(0 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ua.xlf')))));\n\n $instance->setConfigCacheFactory(${($_ = isset($this->services['config_cache_factory']) ? $this->services['config_cache_factory'] : $this->getConfigCacheFactoryService()) && false ?: '_'});\n $instance->setFallbackLocales(array(0 => 'en'));\n\n return $instance;\n }", "private function bindFacades()\n {\n foreach ($this->facades as $name => $facade) {\n app()->bind($name, function () use ($facade) {\n return new $facade;\n });\n }\n }", "public static function do($container, $lazyLoad = true)\n {\n return $container->privates['.service_locator.HfAtj.6'] = new \\Symfony\\Component\\DependencyInjection\\Argument\\ServiceLocator($container->getService, [\n 'App\\\\Controller\\\\MessageController::showUserMessages' => ['privates', '.service_locator.q6hA_O0', 'get_ServiceLocator_Q6hAO0Service', true],\n 'App\\\\Controller\\\\ProductController::modify' => ['privates', '.service_locator.q6hA_O0', 'get_ServiceLocator_Q6hAO0Service', true],\n 'App\\\\Controller\\\\RegistrationController::register' => ['privates', '.service_locator.bM9FoQw', 'get_ServiceLocator_BM9FoQwService', true],\n 'App\\\\Controller\\\\SecurityController::login' => ['privates', '.service_locator.jA4ECp0', 'get_ServiceLocator_JA4ECp0Service', true],\n 'App\\\\Controller\\\\UserController::modifyUser' => ['privates', '.service_locator.q6hA_O0', 'get_ServiceLocator_Q6hAO0Service', true],\n 'App\\\\Controller\\\\UserController::showMyProducts' => ['privates', '.service_locator.q6hA_O0', 'get_ServiceLocator_Q6hAO0Service', true],\n 'App\\\\Controller\\\\UserController::showUserWishlist' => ['privates', '.service_locator.q6hA_O0', 'get_ServiceLocator_Q6hAO0Service', true],\n 'App\\\\Kernel::loadRoutes' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'App\\\\Kernel::registerContainerConfiguration' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'App\\\\Kernel::terminate' => ['privates', '.service_locator.KfwZsne', 'get_ServiceLocator_KfwZsneService', true],\n 'kernel::loadRoutes' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'kernel::registerContainerConfiguration' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'kernel::terminate' => ['privates', '.service_locator.KfwZsne', 'get_ServiceLocator_KfwZsneService', true],\n 'App\\\\Controller\\\\MessageController:showUserMessages' => ['privates', '.service_locator.q6hA_O0', 'get_ServiceLocator_Q6hAO0Service', true],\n 'App\\\\Controller\\\\ProductController:modify' => ['privates', '.service_locator.q6hA_O0', 'get_ServiceLocator_Q6hAO0Service', true],\n 'App\\\\Controller\\\\RegistrationController:register' => ['privates', '.service_locator.bM9FoQw', 'get_ServiceLocator_BM9FoQwService', true],\n 'App\\\\Controller\\\\SecurityController:login' => ['privates', '.service_locator.jA4ECp0', 'get_ServiceLocator_JA4ECp0Service', true],\n 'App\\\\Controller\\\\UserController:modifyUser' => ['privates', '.service_locator.q6hA_O0', 'get_ServiceLocator_Q6hAO0Service', true],\n 'App\\\\Controller\\\\UserController:showMyProducts' => ['privates', '.service_locator.q6hA_O0', 'get_ServiceLocator_Q6hAO0Service', true],\n 'App\\\\Controller\\\\UserController:showUserWishlist' => ['privates', '.service_locator.q6hA_O0', 'get_ServiceLocator_Q6hAO0Service', true],\n 'kernel:loadRoutes' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'kernel:registerContainerConfiguration' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'kernel:terminate' => ['privates', '.service_locator.KfwZsne', 'get_ServiceLocator_KfwZsneService', true],\n ], [\n 'App\\\\Controller\\\\MessageController::showUserMessages' => '?',\n 'App\\\\Controller\\\\ProductController::modify' => '?',\n 'App\\\\Controller\\\\RegistrationController::register' => '?',\n 'App\\\\Controller\\\\SecurityController::login' => '?',\n 'App\\\\Controller\\\\UserController::modifyUser' => '?',\n 'App\\\\Controller\\\\UserController::showMyProducts' => '?',\n 'App\\\\Controller\\\\UserController::showUserWishlist' => '?',\n 'App\\\\Kernel::loadRoutes' => '?',\n 'App\\\\Kernel::registerContainerConfiguration' => '?',\n 'App\\\\Kernel::terminate' => '?',\n 'kernel::loadRoutes' => '?',\n 'kernel::registerContainerConfiguration' => '?',\n 'kernel::terminate' => '?',\n 'App\\\\Controller\\\\MessageController:showUserMessages' => '?',\n 'App\\\\Controller\\\\ProductController:modify' => '?',\n 'App\\\\Controller\\\\RegistrationController:register' => '?',\n 'App\\\\Controller\\\\SecurityController:login' => '?',\n 'App\\\\Controller\\\\UserController:modifyUser' => '?',\n 'App\\\\Controller\\\\UserController:showMyProducts' => '?',\n 'App\\\\Controller\\\\UserController:showUserWishlist' => '?',\n 'kernel:loadRoutes' => '?',\n 'kernel:registerContainerConfiguration' => '?',\n 'kernel:terminate' => '?',\n ]);\n }", "public function testBuildWillResolveAliasToServiceName(): void\n {\n $container = new Container();\n\n $alias = 'FooAliasName';\n $name = 'FooServiceName';\n\n // Define our service\n $container->setFactory(\n $name,\n static function () {\n return new \\stdClass();\n }\n );\n $container->setAlias($alias, $name);\n\n $this->assertInstanceOf(\\stdClass::class, $container->build($alias));\n }", "public function setDeferredServices(array $services): void\n {\n $this->deferredServices = $services;\n }", "public function _inject($data)\n {\n foreach ($data as $meta => $mock)\n {\n $this->app->instance($meta, $mock);\n }\n }", "public function __construct()\n {\n $this->Service = new ContactsService();\n $this->GroupService = new GroupService();\n }", "private function factoryService($className, EngineBlock_Corto_ProxyServer $server)\n {\n $diContainer = EngineBlock_ApplicationSingleton::getInstance()->getDiContainer();\n\n switch($className) {\n case EngineBlock_Corto_Module_Service_ProvideConsent::class :\n return new EngineBlock_Corto_Module_Service_ProvideConsent(\n $server,\n $diContainer->getXmlConverter(),\n $diContainer->getConsentFactory(),\n $diContainer->getConsentService(),\n $diContainer->getAuthenticationStateHelper(),\n $diContainer->getTwigEnvironment(),\n $diContainer->getProcessingStateHelper()\n );\n case EngineBlock_Corto_Module_Service_ProcessConsent::class :\n return new EngineBlock_Corto_Module_Service_ProcessConsent(\n $server,\n $diContainer->getXmlConverter(),\n $diContainer->getConsentFactory(),\n $diContainer->getAuthenticationStateHelper(),\n $diContainer->getProcessingStateHelper()\n );\n case EngineBlock_Corto_Module_Service_AssertionConsumer::class :\n return new EngineBlock_Corto_Module_Service_AssertionConsumer(\n $server,\n $diContainer->getXmlConverter(),\n $diContainer->getSession(),\n $diContainer->getProcessingStateHelper(),\n $diContainer->getStepupGatewayCallOutHelper(),\n $diContainer->getServiceProviderFactory()\n );\n case EngineBlock_Corto_Module_Service_ProcessedAssertionConsumer::class :\n return new EngineBlock_Corto_Module_Service_ProcessedAssertionConsumer(\n $server,\n $diContainer->getProcessingStateHelper()\n );\n case EngineBlock_Corto_Module_Service_StepupAssertionConsumer::class :\n return new EngineBlock_Corto_Module_Service_StepupAssertionConsumer(\n $server,\n $diContainer->getSession(),\n $diContainer->getProcessingStateHelper(),\n $diContainer->getStepupGatewayCallOutHelper(),\n $diContainer->getLoaRepository()\n );\n case EngineBlock_Corto_Module_Service_SingleSignOn::class :\n return new EngineBlock_Corto_Module_Service_SingleSignOn(\n $server,\n $diContainer->getXmlConverter(),\n $diContainer->getTwigEnvironment(),\n $diContainer->getServiceProviderFactory()\n );\n case EngineBlock_Corto_Module_Service_ContinueToIdp::class :\n return new EngineBlock_Corto_Module_Service_ContinueToIdp(\n $server,\n $diContainer->getXmlConverter(),\n $diContainer->getTwigEnvironment(),\n $diContainer->getServiceProviderFactory()\n );\n default :\n return new $className($server, $diContainer->getXmlConverter(), $diContainer->getTwigEnvironment());\n }\n }", "private function initService() {\n\t\t/** check if config->service exists */\n\t\t$config = $this->_config->get('config');\n\t\tif (!property_exists($config, 'service')) {\n\t\t\tthrow new Exception('Configuration file requires \"service\" filed');\n\t\t}\n\n $services = $config->service->toArray();\n\n /** inject service into Di container */\n foreach ($services as $name => $options) {\n \t$bootstarp = $this;\n \t$shared = $options['shared'] ? : FALSE;\n\n \t$this->_di->set($name, function() use ($bootstarp, $options) {\n \t\tif (!class_exists($options['lib'])) {\n \t\t\tthrow new Exception('Class \"' . $options['lib'] .'\" is not found');\n \t\t}\n\n \t\t/** check if there is a specify config file */\n \t\t$config = NULL;\n \t\tif (!empty($options['config'])) {\n\t\t\t\t\t/** get config */\n\t\t\t\t\t$config = $bootstarp->_config->get($options['config'])->toArray();\n \t\t}\n\n \t\t/** check if the class implements with the interface iService */\n \t\t$instance = new $options['lib']();\n \t\tif (!$instance instanceof iService) {\n \t\t\tthrow new Exception('class ' . $options['lib'] . ' not implements with interface iService');\n \t\t}\n\n \t\t/** init service */\n \t\treturn $instance->init($config);\n \t}, $shared);\n }\n\t}", "private function _registerPluginServices($classes)\n\t{\n\t\t$services = array();\n\n\t\tforeach ($classes as $class)\n\t\t{\n\t\t\t$parts = explode('_', $class);\n\n\t\t\tforeach ($parts as $index => $part)\n\t\t\t{\n\t\t\t\t$parts[$index] = lcfirst($part);\n\t\t\t}\n\n\t\t\t$serviceName = implode('_', $parts);\n\t\t\t$serviceName = mb_substr($serviceName, 0, - mb_strlen('Service'));\n\n\t\t\tif (!craft()->getComponent($serviceName, false))\n\t\t\t{\n\t\t\t\t// Register the component with the handle as (className or className_*) minus the \"Service\" suffix\n\t\t\t\t$nsClass = __NAMESPACE__.'\\\\'.$class;\n\t\t\t\t$services[$serviceName] = array('class' => $nsClass);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Exception(Craft::t('The plugin “{handle}” tried to register a service “{service}” that conflicts with a core service name.', array('handle' => $class, 'service' => $serviceName)));\n\t\t\t}\n\t\t}\n\n\t\tcraft()->setComponents($services, false);\n\t}", "public function loadDeferredProviders()\n {\n foreach ($this->deferredServices as $service => $provider) {\n $this->loadDeferredProvider($service);\n }\n\n $this->deferredServices = array();\n }", "private function get_services() {\n\t\treturn [\n\t\t\tServices\\Language_Loader::class,\n\t\t\tServices\\Setup_Database::class,\n\t\t\tServices\\Scripts_And_Templates::class,\n\t\t\tServices\\Admin_Pages::class,\n\t\t\tServices\\Setup_Settings_Page::class,\n\t\t\tServices\\Loggers_Loader::class,\n\t\t\tServices\\Dropins_Loader::class,\n\t\t\tServices\\Setup_Log_Filters::class,\n\t\t\tServices\\Setup_Pause_Resume_Actions::class,\n\t\t\tServices\\Setup_Purge_DB_Cron::class,\n\t\t\tServices\\API::class,\n\t\t\tServices\\Dashboard_Widget::class,\n\t\t\tServices\\Network_Menu_Items::class,\n\t\t\tServices\\Plugin_List_Link::class,\n\t\t];\n\t}", "public function loadDeferredProviders(): void\n {\n foreach ($this->deferredServices as $service => $provider) {\n $this->loadDeferredProvider($service);\n }\n\n $this->deferredServices = [];\n }", "function create_service_map($soap) {\n foreach ($this->services as $service) {\n require_once($service . '.php');\n if (class_exists($service)) {\n $c = (string) $service; \n $object = new $c();\n $soap->addObjectMap($object, 'urn:php-islandora-soapservice');\n }\n else {\n $this->log->lwrite(\"Could not load class $service, check the config files list \n of services to make sure they are correct\", 'SOAP_SERVER', NULL, NULL, 'ERROR');\n }\n }\n }", "public function testReplace()\n {\n $this->container->replace(['bar' => 'foo']);\n $this->assertEquals(['bar' => 'foo'], $this->container->all());\n }", "protected function registerServices()\n {\n $this->app->bind(SocialProvidersManager::class, SocialiteProvidersManager::class);\n\n $this->app->singleton(TwoFactor::class, function () {\n return new AuthyTwoFactor(new Client());\n });\n }", "public function getServiceProvider();", "public function testDependencyInjection()\n {\n $generator = $this->getTokenGeneratorForTesting();\n\n $this->assertTrue($generator instanceof AbstractRandomnessInjectable);\n $this->assertTrue($generator->getRandomGenerator() instanceof CryptoRandom);\n\n $generator->setRandomGenerator(new QuasiRandom());\n $this->assertTrue($generator->getRandomGenerator() instanceof QuasiRandom);\n\n $generator->setRandomGenerator(new PseudoRandom());\n $this->assertTrue($generator->getRandomGenerator() instanceof PseudoRandom);\n\n $generator = $generator->setRandomGenerator(new CryptoRandom())->seedRandomGenerator();\n $this->assertTrue($generator->getRandomGenerator() instanceof CryptoRandom);\n }", "public function testGetWillCreateAndReturnUnregisteredServiceIfTheNameResolvesToAValidClassName(): void\n {\n $container = new Container();\n\n $name = \\stdClass::class;\n $this->assertFalse($container->has($name));\n $service = $container->get(\\stdClass::class);\n\n $this->assertInstanceOf($name, $service);\n $this->assertTrue($container->has($name));\n $this->assertSame($service, $container->get($name));\n }", "public static function do($container, $lazyLoad = true)\n {\n return $container->privates['.service_locator.RSOGwE7'] = new \\Symfony\\Component\\DependencyInjection\\Argument\\ServiceLocator($container->getService, [\n 'App\\\\Controller\\\\Admin\\\\AdminController::configureUserMenu' => ['privates', '.service_locator.q6hA_O0', 'get_ServiceLocator_Q6hAO0Service', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::batchDelete' => ['privates', '.service_locator.AWPr3oy', 'get_ServiceLocator_AWPr3oyService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::batchDelete' => ['privates', '.service_locator.AWPr3oy', 'get_ServiceLocator_AWPr3oyService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::batchDelete' => ['privates', '.service_locator.AWPr3oy', 'get_ServiceLocator_AWPr3oyService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::batchDelete' => ['privates', '.service_locator.AWPr3oy', 'get_ServiceLocator_AWPr3oyService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::batchDelete' => ['privates', '.service_locator.AWPr3oy', 'get_ServiceLocator_AWPr3oyService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::batchDelete' => ['privates', '.service_locator.AWPr3oy', 'get_ServiceLocator_AWPr3oyService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::batchDelete' => ['privates', '.service_locator.AWPr3oy', 'get_ServiceLocator_AWPr3oyService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::batchDelete' => ['privates', '.service_locator.AWPr3oy', 'get_ServiceLocator_AWPr3oyService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::batchDelete' => ['privates', '.service_locator.AWPr3oy', 'get_ServiceLocator_AWPr3oyService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\HomeController::index' => ['privates', '.service_locator.ZkQamH8', 'get_ServiceLocator_ZkQamH8Service', true],\n 'App\\\\Controller\\\\MailerController::addEmail' => ['privates', '.service_locator.O7Avvig', 'get_ServiceLocator_O7AvvigService', true],\n 'App\\\\Controller\\\\MailerController::addName' => ['privates', '.service_locator.O7Avvig', 'get_ServiceLocator_O7AvvigService', true],\n 'App\\\\Controller\\\\MailerController::addPhone' => ['privates', '.service_locator.O7Avvig', 'get_ServiceLocator_O7AvvigService', true],\n 'App\\\\Controller\\\\MailerController::callback_form' => ['privates', '.service_locator.CpaXrFh', 'get_ServiceLocator_CpaXrFhService', true],\n 'App\\\\Controller\\\\MailerController::contact_form' => ['privates', '.service_locator.CpaXrFh', 'get_ServiceLocator_CpaXrFhService', true],\n 'App\\\\Controller\\\\MailerController::vakancy_form' => ['privates', '.service_locator.CpaXrFh', 'get_ServiceLocator_CpaXrFhService', true],\n 'App\\\\Controller\\\\PageController::index' => ['privates', '.service_locator.mvPZSTS', 'get_ServiceLocator_MvPZSTSService', true],\n 'App\\\\Controller\\\\PageController::vakancy' => ['privates', '.service_locator.ZkQamH8', 'get_ServiceLocator_ZkQamH8Service', true],\n 'App\\\\Controller\\\\SecurityController::login' => ['privates', '.service_locator.UDgw6Ol', 'get_ServiceLocator_UDgw6OlService', true],\n 'App\\\\Kernel::loadRoutes' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'App\\\\Kernel::registerContainerConfiguration' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'App\\\\Kernel::terminate' => ['privates', '.service_locator.KfwZsne', 'get_ServiceLocator_KfwZsneService', true],\n 'kernel::loadRoutes' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'kernel::registerContainerConfiguration' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'kernel::terminate' => ['privates', '.service_locator.KfwZsne', 'get_ServiceLocator_KfwZsneService', true],\n 'App\\\\Controller\\\\Admin\\\\AdminController:configureUserMenu' => ['privates', '.service_locator.q6hA_O0', 'get_ServiceLocator_Q6hAO0Service', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:batchDelete' => ['privates', '.service_locator.AWPr3oy', 'get_ServiceLocator_AWPr3oyService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:batchDelete' => ['privates', '.service_locator.AWPr3oy', 'get_ServiceLocator_AWPr3oyService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:batchDelete' => ['privates', '.service_locator.AWPr3oy', 'get_ServiceLocator_AWPr3oyService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:batchDelete' => ['privates', '.service_locator.AWPr3oy', 'get_ServiceLocator_AWPr3oyService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:batchDelete' => ['privates', '.service_locator.AWPr3oy', 'get_ServiceLocator_AWPr3oyService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:batchDelete' => ['privates', '.service_locator.AWPr3oy', 'get_ServiceLocator_AWPr3oyService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:batchDelete' => ['privates', '.service_locator.AWPr3oy', 'get_ServiceLocator_AWPr3oyService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:batchDelete' => ['privates', '.service_locator.AWPr3oy', 'get_ServiceLocator_AWPr3oyService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:batchDelete' => ['privates', '.service_locator.AWPr3oy', 'get_ServiceLocator_AWPr3oyService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\HomeController:index' => ['privates', '.service_locator.ZkQamH8', 'get_ServiceLocator_ZkQamH8Service', true],\n 'App\\\\Controller\\\\MailerController:addEmail' => ['privates', '.service_locator.O7Avvig', 'get_ServiceLocator_O7AvvigService', true],\n 'App\\\\Controller\\\\MailerController:addName' => ['privates', '.service_locator.O7Avvig', 'get_ServiceLocator_O7AvvigService', true],\n 'App\\\\Controller\\\\MailerController:addPhone' => ['privates', '.service_locator.O7Avvig', 'get_ServiceLocator_O7AvvigService', true],\n 'App\\\\Controller\\\\MailerController:callback_form' => ['privates', '.service_locator.CpaXrFh', 'get_ServiceLocator_CpaXrFhService', true],\n 'App\\\\Controller\\\\MailerController:contact_form' => ['privates', '.service_locator.CpaXrFh', 'get_ServiceLocator_CpaXrFhService', true],\n 'App\\\\Controller\\\\MailerController:vakancy_form' => ['privates', '.service_locator.CpaXrFh', 'get_ServiceLocator_CpaXrFhService', true],\n 'App\\\\Controller\\\\PageController:index' => ['privates', '.service_locator.mvPZSTS', 'get_ServiceLocator_MvPZSTSService', true],\n 'App\\\\Controller\\\\PageController:vakancy' => ['privates', '.service_locator.ZkQamH8', 'get_ServiceLocator_ZkQamH8Service', true],\n 'App\\\\Controller\\\\SecurityController:login' => ['privates', '.service_locator.UDgw6Ol', 'get_ServiceLocator_UDgw6OlService', true],\n 'kernel:loadRoutes' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'kernel:registerContainerConfiguration' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'kernel:terminate' => ['privates', '.service_locator.KfwZsne', 'get_ServiceLocator_KfwZsneService', true],\n ], [\n 'App\\\\Controller\\\\Admin\\\\AdminController::configureUserMenu' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::batchDelete' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::index' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::new' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController::updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::batchDelete' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::index' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::new' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController::updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::batchDelete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::index' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::new' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController::updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::batchDelete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::index' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::new' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController::updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::batchDelete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::index' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::new' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController::updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::batchDelete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::index' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::new' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController::updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::batchDelete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::index' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::new' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController::updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::batchDelete' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::index' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::new' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController::updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::batchDelete' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::index' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::new' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController::updateEntity' => '?',\n 'App\\\\Controller\\\\HomeController::index' => '?',\n 'App\\\\Controller\\\\MailerController::addEmail' => '?',\n 'App\\\\Controller\\\\MailerController::addName' => '?',\n 'App\\\\Controller\\\\MailerController::addPhone' => '?',\n 'App\\\\Controller\\\\MailerController::callback_form' => '?',\n 'App\\\\Controller\\\\MailerController::contact_form' => '?',\n 'App\\\\Controller\\\\MailerController::vakancy_form' => '?',\n 'App\\\\Controller\\\\PageController::index' => '?',\n 'App\\\\Controller\\\\PageController::vakancy' => '?',\n 'App\\\\Controller\\\\SecurityController::login' => '?',\n 'App\\\\Kernel::loadRoutes' => '?',\n 'App\\\\Kernel::registerContainerConfiguration' => '?',\n 'App\\\\Kernel::terminate' => '?',\n 'kernel::loadRoutes' => '?',\n 'kernel::registerContainerConfiguration' => '?',\n 'kernel::terminate' => '?',\n 'App\\\\Controller\\\\Admin\\\\AdminController:configureUserMenu' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:batchDelete' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:index' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:new' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\BrandCrudController:updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:batchDelete' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:index' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:new' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\ModelCrudController:updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:batchDelete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:index' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:new' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceBrandCrudController:updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:batchDelete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:index' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:new' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceCategoryCrudController:updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:batchDelete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:index' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:new' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceClassCrudController:updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:batchDelete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:index' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:new' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceModelCrudController:updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:batchDelete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:index' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:new' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PriceServiceCrudController:updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:batchDelete' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:index' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:new' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\ServiceCrudController:updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:batchDelete' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:index' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:new' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\SpecialOfferCrudController:updateEntity' => '?',\n 'App\\\\Controller\\\\HomeController:index' => '?',\n 'App\\\\Controller\\\\MailerController:addEmail' => '?',\n 'App\\\\Controller\\\\MailerController:addName' => '?',\n 'App\\\\Controller\\\\MailerController:addPhone' => '?',\n 'App\\\\Controller\\\\MailerController:callback_form' => '?',\n 'App\\\\Controller\\\\MailerController:contact_form' => '?',\n 'App\\\\Controller\\\\MailerController:vakancy_form' => '?',\n 'App\\\\Controller\\\\PageController:index' => '?',\n 'App\\\\Controller\\\\PageController:vakancy' => '?',\n 'App\\\\Controller\\\\SecurityController:login' => '?',\n 'kernel:loadRoutes' => '?',\n 'kernel:registerContainerConfiguration' => '?',\n 'kernel:terminate' => '?',\n ]);\n }", "public function testCallWithServicesNotCalled()\n {\n $pattern = 'pattern';\n $controller = function () {\n return func_get_args();\n };\n\n $call = 0;\n\n $services = new Container();\n $services['service1'] = function () use (&$call) {\n return ++$call;\n };\n\n $route = new Route(new RoutePattern($pattern), $controller);\n $route->call($services);\n $this->assertSame(1, $services['service1']); ///service1 is called for the first time\n }", "public static function do($container, $lazyLoad = true)\n {\n return $container->privates['.service_locator.aLD1qaU'] = new \\Symfony\\Component\\DependencyInjection\\Argument\\ServiceLocator($container->getService, [\n 'App\\\\Controller\\\\ArticleController::delete' => ['privates', '.service_locator.Bag_SHO', 'get_ServiceLocator_BagSHOService', true],\n 'App\\\\Controller\\\\ArticleController::edit' => ['privates', '.service_locator.Bag_SHO', 'get_ServiceLocator_BagSHOService', true],\n 'App\\\\Controller\\\\ArticleController::index' => ['privates', '.service_locator.Zr91eP6', 'get_ServiceLocator_Zr91eP6Service', true],\n 'App\\\\Controller\\\\ArticleController::show' => ['privates', '.service_locator.Bag_SHO', 'get_ServiceLocator_BagSHOService', true],\n 'App\\\\Controller\\\\RegistrationController::register' => ['privates', '.service_locator.iNa3IJi', 'get_ServiceLocator_INa3IJiService', true],\n 'App\\\\Controller\\\\SecurityController::login' => ['privates', '.service_locator.xA8Fw_.', 'get_ServiceLocator_XA8Fw_Service', true],\n 'App\\\\Kernel::loadRoutes' => ['privates', '.service_locator.C9JCBPC', 'get_ServiceLocator_C9JCBPCService', true],\n 'App\\\\Kernel::registerContainerConfiguration' => ['privates', '.service_locator.C9JCBPC', 'get_ServiceLocator_C9JCBPCService', true],\n 'App\\\\Kernel::terminate' => ['privates', '.service_locator.beq5mCo', 'get_ServiceLocator_Beq5mCoService', true],\n 'kernel::loadRoutes' => ['privates', '.service_locator.C9JCBPC', 'get_ServiceLocator_C9JCBPCService', true],\n 'kernel::registerContainerConfiguration' => ['privates', '.service_locator.C9JCBPC', 'get_ServiceLocator_C9JCBPCService', true],\n 'kernel::terminate' => ['privates', '.service_locator.beq5mCo', 'get_ServiceLocator_Beq5mCoService', true],\n 'App\\\\Controller\\\\ArticleController:delete' => ['privates', '.service_locator.Bag_SHO', 'get_ServiceLocator_BagSHOService', true],\n 'App\\\\Controller\\\\ArticleController:edit' => ['privates', '.service_locator.Bag_SHO', 'get_ServiceLocator_BagSHOService', true],\n 'App\\\\Controller\\\\ArticleController:index' => ['privates', '.service_locator.Zr91eP6', 'get_ServiceLocator_Zr91eP6Service', true],\n 'App\\\\Controller\\\\ArticleController:show' => ['privates', '.service_locator.Bag_SHO', 'get_ServiceLocator_BagSHOService', true],\n 'App\\\\Controller\\\\RegistrationController:register' => ['privates', '.service_locator.iNa3IJi', 'get_ServiceLocator_INa3IJiService', true],\n 'App\\\\Controller\\\\SecurityController:login' => ['privates', '.service_locator.xA8Fw_.', 'get_ServiceLocator_XA8Fw_Service', true],\n 'kernel:loadRoutes' => ['privates', '.service_locator.C9JCBPC', 'get_ServiceLocator_C9JCBPCService', true],\n 'kernel:registerContainerConfiguration' => ['privates', '.service_locator.C9JCBPC', 'get_ServiceLocator_C9JCBPCService', true],\n 'kernel:terminate' => ['privates', '.service_locator.beq5mCo', 'get_ServiceLocator_Beq5mCoService', true],\n ], [\n 'App\\\\Controller\\\\ArticleController::delete' => '?',\n 'App\\\\Controller\\\\ArticleController::edit' => '?',\n 'App\\\\Controller\\\\ArticleController::index' => '?',\n 'App\\\\Controller\\\\ArticleController::show' => '?',\n 'App\\\\Controller\\\\RegistrationController::register' => '?',\n 'App\\\\Controller\\\\SecurityController::login' => '?',\n 'App\\\\Kernel::loadRoutes' => '?',\n 'App\\\\Kernel::registerContainerConfiguration' => '?',\n 'App\\\\Kernel::terminate' => '?',\n 'kernel::loadRoutes' => '?',\n 'kernel::registerContainerConfiguration' => '?',\n 'kernel::terminate' => '?',\n 'App\\\\Controller\\\\ArticleController:delete' => '?',\n 'App\\\\Controller\\\\ArticleController:edit' => '?',\n 'App\\\\Controller\\\\ArticleController:index' => '?',\n 'App\\\\Controller\\\\ArticleController:show' => '?',\n 'App\\\\Controller\\\\RegistrationController:register' => '?',\n 'App\\\\Controller\\\\SecurityController:login' => '?',\n 'kernel:loadRoutes' => '?',\n 'kernel:registerContainerConfiguration' => '?',\n 'kernel:terminate' => '?',\n ]);\n }", "public function createServiceObjects() \n {\n var_dump('jj', Ini::$serviceConnections);\n //if (!empty(Ini::$serviceConnections)) \n //{\n foreach (Ini::$serviceConnections as $connectionName => $connectionDetail) \n {\n Ini::loadModule(Sysutils::Ucase($connectionDetail->type) . 'Service', 'Services', '\\Sys');\n $fqClassname = '\\\\Sys\\\\'. Sysutils::Ucase($connectionDetail->type) . 'Service';\n $this->autoLoadedServices[$connectionName] = array('url' => $connectionDetail->url, 'type' => $connectionDetail->type);\n $this->{$connectionName} = new $fqClassname($connectionDetail->url);\n }\n \n //}\n }", "protected function registerApplicationBaseServiceProviders(): void\n {\n foreach ([\n \\Radiate\\Support\\Environment\\EnvironmentServiceProvider::class,\n \\Radiate\\Support\\Config\\ConfigServiceProvider::class,\n \\Radiate\\Exceptions\\ExceptionServiceProvider::class,\n \\Radiate\\Support\\Facades\\FacadeServiceProvider::class,\n \\Radiate\\Routing\\RoutingServiceProvider::class,\n \\Radiate\\View\\ViewServiceProvider::class\n ] as $serviceProvider) {\n $this->registerServiceProvider($serviceProvider);\n }\n }", "public function registerFactories()\n {\n if (! app()->environment('production') && $this->app->runningInConsole()) {\n app(Factory::class)->load(module_path($this->moduleName, 'Database/factories'));\n }\n }", "public function registerDefaultServices()\n {\n /*\n * Add Paths to container\n */\n $this['basePath'] = $this->basePath();\n $this['storagePath'] = $this->basePath().'/storage';\n $this['appPath'] = $this->appPath();\n\n $this->register(new DefaultServices($this));\n\n $this->register(new ErrorHandlerService($this));\n\n // Enable debug based on user configuration\n if (true === $this->app->config->get('app')['debug']) {\n Debug::enable();\n }\n\n /*\n * retister View Provider\n */\n $this->register(new ViewServiceProvider($this));\n\n /*\n * Register Route Provider\n */\n $this->register(new RouteServiceProvider($this));\n\n /*\n * Register Database Provider\n */\n $this->register(new DatabaseServiceprovider($this));\n }", "public function testRegisterServiceProviders()\n {\n $app = new Application();\n $serviceRegisterProvider = new ServiceRegisterProvider();\n\n $providers = array(\n array(\n 'class' => 'MJanssen\\Provider\\ServiceProviderFoo'\n ),\n array(\n 'class' => 'MJanssen\\Provider\\ServiceProviderBaz'\n )\n );\n\n $serviceRegisterProvider->registerServiceProviders($app, $providers);\n\n $this->assertEquals(new stdClass(), $app['foo']);\n $this->assertEquals(new stdClass(), $app['baz']);\n }", "public function setNames(array $services) : Service\n {\n $this->services = $services + $this->services;\n\n return $this;\n }", "public function __set($name, $value) {\n $this->services[$name] = $value;\n }", "public function testHandleWithMockServices(): void\n {\n $this->mockService(stdClass::class, function () {\n return json_decode('{\"mock\":true}');\n });\n $this->get('/dependencies/requiredDep');\n $this->assertResponseOk();\n $this->assertResponseContains('\"mock\":true', 'Contains the data from the stdClass mock container.');\n }", "public function setService(){\n if($this->getRecord()->getRecordType() === \"yt\"){\n $this->service = new YoutubeService();\n }\n if($this->getRecord()->getRecordType() === \"gm\"){\n $this->service = new GoogleMapService();\n }\n }", "public static function do($container, $lazyLoad = true)\n {\n return $container->privates['.service_locator.UBsnImH'] = new \\Symfony\\Component\\DependencyInjection\\Argument\\ServiceLocator($container->getService, [\n 'App\\\\Controller\\\\AccountsManagersController::delete' => ['privates', '.service_locator.c8ujQRB', 'get_ServiceLocator_C8ujQRBService', true],\n 'App\\\\Controller\\\\AccountsManagersController::edit' => ['privates', '.service_locator.c8ujQRB', 'get_ServiceLocator_C8ujQRBService', true],\n 'App\\\\Controller\\\\AccountsManagersController::index' => ['privates', '.service_locator.h1Uin5A', 'get_ServiceLocator_H1Uin5AService', true],\n 'App\\\\Controller\\\\CertificatesController::delete' => ['privates', '.service_locator.eNPQ.su', 'get_ServiceLocator_ENPQ_SuService', true],\n 'App\\\\Controller\\\\CertificatesController::edit' => ['privates', '.service_locator.eNPQ.su', 'get_ServiceLocator_ENPQ_SuService', true],\n 'App\\\\Controller\\\\CertificatesController::index' => ['privates', '.service_locator.qokbOEK', 'get_ServiceLocator_QokbOEKService', true],\n 'App\\\\Controller\\\\CertificatesController::show' => ['privates', '.service_locator.eNPQ.su', 'get_ServiceLocator_ENPQ_SuService', true],\n 'App\\\\Controller\\\\CertificatesController::showcertif' => ['privates', '.service_locator.qokbOEK', 'get_ServiceLocator_QokbOEKService', true],\n 'App\\\\Controller\\\\ClientsController::delete' => ['privates', '.service_locator.NCyIbkW', 'get_ServiceLocator_NCyIbkWService', true],\n 'App\\\\Controller\\\\ClientsController::edit' => ['privates', '.service_locator.NCyIbkW', 'get_ServiceLocator_NCyIbkWService', true],\n 'App\\\\Controller\\\\ClientsController::index' => ['privates', '.service_locator.bG4u8IS', 'get_ServiceLocator_BG4u8ISService', true],\n 'App\\\\Controller\\\\ClientsController::show' => ['privates', '.service_locator.NCyIbkW', 'get_ServiceLocator_NCyIbkWService', true],\n 'App\\\\Controller\\\\DomainsController::delete' => ['privates', '.service_locator._5KbXZp', 'get_ServiceLocator_5KbXZpService', true],\n 'App\\\\Controller\\\\DomainsController::edit' => ['privates', '.service_locator._5KbXZp', 'get_ServiceLocator_5KbXZpService', true],\n 'App\\\\Controller\\\\DomainsController::index' => ['privates', '.service_locator.EEyVVvI', 'get_ServiceLocator_EEyVVvIService', true],\n 'App\\\\Controller\\\\DomainsController::show' => ['privates', '.service_locator._5KbXZp', 'get_ServiceLocator_5KbXZpService', true],\n 'App\\\\Controller\\\\HostsController::delete' => ['privates', '.service_locator.Tae1Oi4', 'get_ServiceLocator_Tae1Oi4Service', true],\n 'App\\\\Controller\\\\HostsController::edit' => ['privates', '.service_locator.Tae1Oi4', 'get_ServiceLocator_Tae1Oi4Service', true],\n 'App\\\\Controller\\\\HostsController::index' => ['privates', '.service_locator.QeXc3uq', 'get_ServiceLocator_QeXc3uqService', true],\n 'App\\\\Controller\\\\HostsController::show' => ['privates', '.service_locator.Tae1Oi4', 'get_ServiceLocator_Tae1Oi4Service', true],\n 'App\\\\Controller\\\\ProjectsController::delete' => ['privates', '.service_locator.ESSPwr_', 'get_ServiceLocator_ESSPwrService', true],\n 'App\\\\Controller\\\\ProjectsController::edit' => ['privates', '.service_locator.ESSPwr_', 'get_ServiceLocator_ESSPwrService', true],\n 'App\\\\Controller\\\\ProjectsController::index' => ['privates', '.service_locator.1coBbU6', 'get_ServiceLocator_1coBbU6Service', true],\n 'App\\\\Controller\\\\SecurityController::login' => ['privates', '.service_locator.UDgw6Ol', 'get_ServiceLocator_UDgw6OlService', true],\n 'App\\\\Controller\\\\ServersController::delete' => ['privates', '.service_locator.1OunK_7', 'get_ServiceLocator_1OunK7Service', true],\n 'App\\\\Controller\\\\ServersController::edit' => ['privates', '.service_locator.1OunK_7', 'get_ServiceLocator_1OunK7Service', true],\n 'App\\\\Controller\\\\ServersController::index' => ['privates', '.service_locator.uLBPYqJ', 'get_ServiceLocator_ULBPYqJService', true],\n 'App\\\\Controller\\\\ServersController::show' => ['privates', '.service_locator.1OunK_7', 'get_ServiceLocator_1OunK7Service', true],\n 'App\\\\Controller\\\\UserController::delete' => ['privates', '.service_locator.ch4Jgvl', 'get_ServiceLocator_Ch4JgvlService', true],\n 'App\\\\Controller\\\\UserController::edit' => ['privates', '.service_locator.ch4Jgvl', 'get_ServiceLocator_Ch4JgvlService', true],\n 'App\\\\Controller\\\\UserController::index' => ['privates', '.service_locator.yOw3ZtS', 'get_ServiceLocator_YOw3ZtSService', true],\n 'App\\\\Controller\\\\UserController::show' => ['privates', '.service_locator.ch4Jgvl', 'get_ServiceLocator_Ch4JgvlService', true],\n 'App\\\\Kernel::loadRoutes' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'App\\\\Kernel::registerContainerConfiguration' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'App\\\\Kernel::terminate' => ['privates', '.service_locator.KfwZsne', 'get_ServiceLocator_KfwZsneService', true],\n 'kernel::loadRoutes' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'kernel::registerContainerConfiguration' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'kernel::terminate' => ['privates', '.service_locator.KfwZsne', 'get_ServiceLocator_KfwZsneService', true],\n 'App\\\\Controller\\\\AccountsManagersController:delete' => ['privates', '.service_locator.c8ujQRB', 'get_ServiceLocator_C8ujQRBService', true],\n 'App\\\\Controller\\\\AccountsManagersController:edit' => ['privates', '.service_locator.c8ujQRB', 'get_ServiceLocator_C8ujQRBService', true],\n 'App\\\\Controller\\\\AccountsManagersController:index' => ['privates', '.service_locator.h1Uin5A', 'get_ServiceLocator_H1Uin5AService', true],\n 'App\\\\Controller\\\\CertificatesController:delete' => ['privates', '.service_locator.eNPQ.su', 'get_ServiceLocator_ENPQ_SuService', true],\n 'App\\\\Controller\\\\CertificatesController:edit' => ['privates', '.service_locator.eNPQ.su', 'get_ServiceLocator_ENPQ_SuService', true],\n 'App\\\\Controller\\\\CertificatesController:index' => ['privates', '.service_locator.qokbOEK', 'get_ServiceLocator_QokbOEKService', true],\n 'App\\\\Controller\\\\CertificatesController:show' => ['privates', '.service_locator.eNPQ.su', 'get_ServiceLocator_ENPQ_SuService', true],\n 'App\\\\Controller\\\\CertificatesController:showcertif' => ['privates', '.service_locator.qokbOEK', 'get_ServiceLocator_QokbOEKService', true],\n 'App\\\\Controller\\\\ClientsController:delete' => ['privates', '.service_locator.NCyIbkW', 'get_ServiceLocator_NCyIbkWService', true],\n 'App\\\\Controller\\\\ClientsController:edit' => ['privates', '.service_locator.NCyIbkW', 'get_ServiceLocator_NCyIbkWService', true],\n 'App\\\\Controller\\\\ClientsController:index' => ['privates', '.service_locator.bG4u8IS', 'get_ServiceLocator_BG4u8ISService', true],\n 'App\\\\Controller\\\\ClientsController:show' => ['privates', '.service_locator.NCyIbkW', 'get_ServiceLocator_NCyIbkWService', true],\n 'App\\\\Controller\\\\DomainsController:delete' => ['privates', '.service_locator._5KbXZp', 'get_ServiceLocator_5KbXZpService', true],\n 'App\\\\Controller\\\\DomainsController:edit' => ['privates', '.service_locator._5KbXZp', 'get_ServiceLocator_5KbXZpService', true],\n 'App\\\\Controller\\\\DomainsController:index' => ['privates', '.service_locator.EEyVVvI', 'get_ServiceLocator_EEyVVvIService', true],\n 'App\\\\Controller\\\\DomainsController:show' => ['privates', '.service_locator._5KbXZp', 'get_ServiceLocator_5KbXZpService', true],\n 'App\\\\Controller\\\\HostsController:delete' => ['privates', '.service_locator.Tae1Oi4', 'get_ServiceLocator_Tae1Oi4Service', true],\n 'App\\\\Controller\\\\HostsController:edit' => ['privates', '.service_locator.Tae1Oi4', 'get_ServiceLocator_Tae1Oi4Service', true],\n 'App\\\\Controller\\\\HostsController:index' => ['privates', '.service_locator.QeXc3uq', 'get_ServiceLocator_QeXc3uqService', true],\n 'App\\\\Controller\\\\HostsController:show' => ['privates', '.service_locator.Tae1Oi4', 'get_ServiceLocator_Tae1Oi4Service', true],\n 'App\\\\Controller\\\\ProjectsController:delete' => ['privates', '.service_locator.ESSPwr_', 'get_ServiceLocator_ESSPwrService', true],\n 'App\\\\Controller\\\\ProjectsController:edit' => ['privates', '.service_locator.ESSPwr_', 'get_ServiceLocator_ESSPwrService', true],\n 'App\\\\Controller\\\\ProjectsController:index' => ['privates', '.service_locator.1coBbU6', 'get_ServiceLocator_1coBbU6Service', true],\n 'App\\\\Controller\\\\SecurityController:login' => ['privates', '.service_locator.UDgw6Ol', 'get_ServiceLocator_UDgw6OlService', true],\n 'App\\\\Controller\\\\ServersController:delete' => ['privates', '.service_locator.1OunK_7', 'get_ServiceLocator_1OunK7Service', true],\n 'App\\\\Controller\\\\ServersController:edit' => ['privates', '.service_locator.1OunK_7', 'get_ServiceLocator_1OunK7Service', true],\n 'App\\\\Controller\\\\ServersController:index' => ['privates', '.service_locator.uLBPYqJ', 'get_ServiceLocator_ULBPYqJService', true],\n 'App\\\\Controller\\\\ServersController:show' => ['privates', '.service_locator.1OunK_7', 'get_ServiceLocator_1OunK7Service', true],\n 'App\\\\Controller\\\\UserController:delete' => ['privates', '.service_locator.ch4Jgvl', 'get_ServiceLocator_Ch4JgvlService', true],\n 'App\\\\Controller\\\\UserController:edit' => ['privates', '.service_locator.ch4Jgvl', 'get_ServiceLocator_Ch4JgvlService', true],\n 'App\\\\Controller\\\\UserController:index' => ['privates', '.service_locator.yOw3ZtS', 'get_ServiceLocator_YOw3ZtSService', true],\n 'App\\\\Controller\\\\UserController:show' => ['privates', '.service_locator.ch4Jgvl', 'get_ServiceLocator_Ch4JgvlService', true],\n 'kernel:loadRoutes' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'kernel:registerContainerConfiguration' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'kernel:terminate' => ['privates', '.service_locator.KfwZsne', 'get_ServiceLocator_KfwZsneService', true],\n ], [\n 'App\\\\Controller\\\\AccountsManagersController::delete' => '?',\n 'App\\\\Controller\\\\AccountsManagersController::edit' => '?',\n 'App\\\\Controller\\\\AccountsManagersController::index' => '?',\n 'App\\\\Controller\\\\CertificatesController::delete' => '?',\n 'App\\\\Controller\\\\CertificatesController::edit' => '?',\n 'App\\\\Controller\\\\CertificatesController::index' => '?',\n 'App\\\\Controller\\\\CertificatesController::show' => '?',\n 'App\\\\Controller\\\\CertificatesController::showcertif' => '?',\n 'App\\\\Controller\\\\ClientsController::delete' => '?',\n 'App\\\\Controller\\\\ClientsController::edit' => '?',\n 'App\\\\Controller\\\\ClientsController::index' => '?',\n 'App\\\\Controller\\\\ClientsController::show' => '?',\n 'App\\\\Controller\\\\DomainsController::delete' => '?',\n 'App\\\\Controller\\\\DomainsController::edit' => '?',\n 'App\\\\Controller\\\\DomainsController::index' => '?',\n 'App\\\\Controller\\\\DomainsController::show' => '?',\n 'App\\\\Controller\\\\HostsController::delete' => '?',\n 'App\\\\Controller\\\\HostsController::edit' => '?',\n 'App\\\\Controller\\\\HostsController::index' => '?',\n 'App\\\\Controller\\\\HostsController::show' => '?',\n 'App\\\\Controller\\\\ProjectsController::delete' => '?',\n 'App\\\\Controller\\\\ProjectsController::edit' => '?',\n 'App\\\\Controller\\\\ProjectsController::index' => '?',\n 'App\\\\Controller\\\\SecurityController::login' => '?',\n 'App\\\\Controller\\\\ServersController::delete' => '?',\n 'App\\\\Controller\\\\ServersController::edit' => '?',\n 'App\\\\Controller\\\\ServersController::index' => '?',\n 'App\\\\Controller\\\\ServersController::show' => '?',\n 'App\\\\Controller\\\\UserController::delete' => '?',\n 'App\\\\Controller\\\\UserController::edit' => '?',\n 'App\\\\Controller\\\\UserController::index' => '?',\n 'App\\\\Controller\\\\UserController::show' => '?',\n 'App\\\\Kernel::loadRoutes' => '?',\n 'App\\\\Kernel::registerContainerConfiguration' => '?',\n 'App\\\\Kernel::terminate' => '?',\n 'kernel::loadRoutes' => '?',\n 'kernel::registerContainerConfiguration' => '?',\n 'kernel::terminate' => '?',\n 'App\\\\Controller\\\\AccountsManagersController:delete' => '?',\n 'App\\\\Controller\\\\AccountsManagersController:edit' => '?',\n 'App\\\\Controller\\\\AccountsManagersController:index' => '?',\n 'App\\\\Controller\\\\CertificatesController:delete' => '?',\n 'App\\\\Controller\\\\CertificatesController:edit' => '?',\n 'App\\\\Controller\\\\CertificatesController:index' => '?',\n 'App\\\\Controller\\\\CertificatesController:show' => '?',\n 'App\\\\Controller\\\\CertificatesController:showcertif' => '?',\n 'App\\\\Controller\\\\ClientsController:delete' => '?',\n 'App\\\\Controller\\\\ClientsController:edit' => '?',\n 'App\\\\Controller\\\\ClientsController:index' => '?',\n 'App\\\\Controller\\\\ClientsController:show' => '?',\n 'App\\\\Controller\\\\DomainsController:delete' => '?',\n 'App\\\\Controller\\\\DomainsController:edit' => '?',\n 'App\\\\Controller\\\\DomainsController:index' => '?',\n 'App\\\\Controller\\\\DomainsController:show' => '?',\n 'App\\\\Controller\\\\HostsController:delete' => '?',\n 'App\\\\Controller\\\\HostsController:edit' => '?',\n 'App\\\\Controller\\\\HostsController:index' => '?',\n 'App\\\\Controller\\\\HostsController:show' => '?',\n 'App\\\\Controller\\\\ProjectsController:delete' => '?',\n 'App\\\\Controller\\\\ProjectsController:edit' => '?',\n 'App\\\\Controller\\\\ProjectsController:index' => '?',\n 'App\\\\Controller\\\\SecurityController:login' => '?',\n 'App\\\\Controller\\\\ServersController:delete' => '?',\n 'App\\\\Controller\\\\ServersController:edit' => '?',\n 'App\\\\Controller\\\\ServersController:index' => '?',\n 'App\\\\Controller\\\\ServersController:show' => '?',\n 'App\\\\Controller\\\\UserController:delete' => '?',\n 'App\\\\Controller\\\\UserController:edit' => '?',\n 'App\\\\Controller\\\\UserController:index' => '?',\n 'App\\\\Controller\\\\UserController:show' => '?',\n 'kernel:loadRoutes' => '?',\n 'kernel:registerContainerConfiguration' => '?',\n 'kernel:terminate' => '?',\n ]);\n }", "protected function registerSingletons()\n {\n foreach($this->prependNamespace($this->singletons) as $singleton){\n # Make the singleton once, and then bind the instance\n $this->app->instance($singleton, $this->app->make($singleton));\n }\n }", "public function testThrowsWhenServiceProviderLies()\n {\n $liar = new class extends AbstractServiceProvider\n {\n protected $provides = [\n 'lie'\n ];\n\n public function register()\n {\n }\n };\n\n $container = new Container;\n\n $container->addServiceProvider($liar);\n\n $this->assertTrue($container->has('lie'));\n\n $this->expectException(ContainerException::class);\n\n $container->get('lie');\n }", "public function loadService(\\Phalconry\\Di\\ServiceProviderInterface $provider);" ]
[ "0.6312676", "0.62457955", "0.6202498", "0.6135621", "0.6112149", "0.59715587", "0.5936051", "0.5912065", "0.58333063", "0.580694", "0.57813543", "0.57766896", "0.57750434", "0.57244205", "0.57021767", "0.5689793", "0.56820965", "0.56757486", "0.56680375", "0.56636864", "0.5649", "0.56393015", "0.5628485", "0.5618673", "0.5609608", "0.55986804", "0.5554986", "0.5548941", "0.55470514", "0.55186915", "0.5514876", "0.5511162", "0.55031615", "0.5479693", "0.54123604", "0.5410936", "0.5404542", "0.53692484", "0.5362201", "0.5354613", "0.5334917", "0.5309401", "0.5308226", "0.5306147", "0.5304278", "0.53036094", "0.5302031", "0.53001666", "0.5285398", "0.5277962", "0.52614427", "0.52540463", "0.52443016", "0.5241271", "0.5228083", "0.5213449", "0.5202445", "0.5198231", "0.5185181", "0.51699543", "0.5159127", "0.5154626", "0.5148088", "0.51398927", "0.5123995", "0.512311", "0.51189476", "0.5118559", "0.5096028", "0.5086735", "0.508505", "0.5079291", "0.5074493", "0.5069583", "0.50654864", "0.50634325", "0.5060218", "0.50575745", "0.5043704", "0.5038441", "0.50383455", "0.5030065", "0.50247014", "0.5022108", "0.50216603", "0.50204027", "0.50162643", "0.5015153", "0.50123477", "0.50121486", "0.50120133", "0.5008982", "0.50083804", "0.5007966", "0.50034374", "0.4991582", "0.497982", "0.49794206", "0.49792284", "0.49780193" ]
0.69556475
0
checks to see if local fields are empty as well as fields of children
public function isEmpty() { return !( ($this->dict['account_id'] && $this->dict['account_id'] != 0) || ($this->dict['entry'] && !$this->dict['entry']->isEmpty()) || ($this->dict['recurring'] && !$this->dict['recurring']->isEmpty()) || ($this->dict['entryDefault'] && !$this->dict['entryDefault']->isEmpty()) || ($this->dict['recurringDefault'] && !$this->dict['recurringDefault']->isEmpty()) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getAllFieldsAreEmpty() {}", "public function hasFields()\n {\n return !empty($this->fields);\n }", "public function hasFields(){ return !empty($this->field_map); }", "public function hasFields()\n {\n return null !== @$this->fields;\n }", "public function isField() : bool\n {\n return null == $this->fields || empty($this->fields);\n }", "function acf_have_local_fields($parent = '')\n{\n}", "function is_field_empty(array $fields) {\n foreach ($fields as $key => $value) {\n $fields[$key] = isset($value) ? trim($value) : '';\n }\n /* If there is nothing a field then valid empty index is false */\n if (in_array(\"\", $fields, true)) {\n return false;\n }\n /* return array */\n return $fields;\n}", "public function hasFields()\n {\n \n $hasFields = !empty($this->fields);\n \n return $hasFields;\n }", "public function hasFields(){\n return $this->_has(1);\n }", "function fillEmptyFields()\n\t{\n\t\tif(isset($this->data[$this->name])) \n\t\t{\n\t\t\t$data = $this->data[$this->name];\n\t\t} else {\n\t\t\t$data = $this->data;\n\t\t}\n\t\t\n\t\tforeach($this->_schema as $fieldname => $details) \n\t\t{\n\t\t\tif(!isset($data[$fieldname]))\n\t\t\t\t$this->set($fieldname, '');\n\t\t}\n\t}", "public function has_fields()\n {\n }", "function not_empty(array $fields) { // création tableau\r\n\t\r\n\r\n\t\tif (count($fields)!=0)\t{ // verif.si il y a des elements dans le tableau\r\n\t\t\r\n\r\n\t\t\tforeach ($fields as $field) {\r\n\r\n\t\t\t\tif (empty($_POST[$field]) || trim($_POST[$field])==\"\") {\r\n\r\n\t\t\t\t\r\n\t\t\t\t\t\treturn false; // verif.que tous les champs soient remplis, sinon \"false\"\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\r\n\t\t\t}\t\r\n\r\n\r\n\t\t}", "static function checkForEmptyFields($fieldnames = array()) {\n\n $failure = false;\n foreach ($fieldnames as $fieldname) {\n $test = getInput($fieldname);\n if (!$test) {\n $failure = true;\n new SystemMessage($fieldname . \" can't be left empty\");\n }\n }\n if ($failure) {\n forward();\n }\n }", "public function isEmpty()\n {\n return\n empty($this->items)\n && empty($this->fields);\n }", "function not_empty($fields = [])\r\n{\r\n if (count($fields) !=0) {\r\n foreach ($fields as $field) {\r\n if (empty($_POST [$field]) || trim($_POST[$field]) == \"\") { //trim escape all spaces. If empty : false\r\n return false;\r\n }\r\n }\r\n return true ; //fields filled\r\n }\r\n}", "function ve_information_section_is_empty() {\n\t/**\n\t * Flag that is used to determine if there is content on some of the information fields\n\t */\n\t$empty_flag = false;\n\t/**\n\t * Check if we are in front-page:\n\t */\n\tif (is_page_template('page-templates/front-page.php')){\n\t\tif ( get_field('front_page_about_us') ) {\n\t\t\t$empty_flag = true;\n\t\t}\n\t\tif ( get_field('front_page_mission') ) {\n\t\t\t$empty_flag = true;\n\t\t}\n\t\treturn $empty_flag;\n\t}\n\t/**\n\t * If NOT in front-page:\n\t */\n\telse {\n\t\t/**\n\t\t * Check if we are in companies page:\n\t\t */\n\t\tif (is_singular('companies')) {\n\t\t\tif ( get_field('company_about_us') ) {\n\t\t\t\t$empty_flag = true;\n\t\t\t}\n\t\t\tif ( get_field('company_mission') ) {\n\t\t\t\t$empty_flag = true;\n\t\t\t}\n\t\t\tif ( get_field('company_our_business') ) {\n\t\t\t\t$empty_flag = true;\n\t\t\t}\n\t\t\treturn $empty_flag;\n\t\t}\n\t\t/**\n\t\t * Check if we are in group of companies page:\n\t\t */\n\t\tif (is_singular('group_of_companies')) {\n\t\t\tif ( get_field('group_of_companies_about_us') ) {\n\t\t\t\t$empty_flag = true;\n\t\t\t}\n\t\t\tif ( get_field('group_of_companies_mission') ) {\n\t\t\t\t$empty_flag = true;\n\t\t\t}\n\t\t\tif ( get_field('group_of_companies_our_business') ) {\n\t\t\t\t$empty_flag = true;\n\t\t\t}\n\t\t\treturn $empty_flag;\n\t\t}\n\t}\n}", "function fieldsEmpty() {\n if(empty($_POST['title']) || empty($_POST['date']) || empty($_POST['location'])) {\n return true;\n } else {\n return false;\n }\n}", "function checkEmptyField($field) {\n\t return isset($field) && $field !== \"\" && $field !== '';\n }", "public function hasParentFieldDescription(): bool;", "function _ting_boost_field_filter($element) {\n return !(empty($element['field_name']) || empty($element['field_value']));\n}", "function filled_out($form_vars)\r\n{\r\n foreach ($form_vars as $key => $value)\r\n {\r\n if (!isset($key) || ($value == \"\"))\r\n return true;\r\n }\r\n return true;\r\n}", "public function hasRequiredFields()\n {\n // If any of our fields are empty, reject stuff\n $all_fields_found = true;\n $field_list = array(\n 'email',\n 'password',\n 'password2',\n 'first_name',\n 'last_name',\n 'speaker_info'\n );\n\n foreach ($field_list as $field) {\n if (!isset($this->_data[$field])) {\n $all_fields_found = false;\n break;\n }\n }\n\n return $all_fields_found;\n }", "function filled_out($form_vars) {\n foreach ($form_vars as $key => $value) {\n if ((!isset($key)) || ($value == '')) {\n return false;\n }\n }\n return true;\n}", "function empty_field($field)\n{\n return empty($field);\n}", "public function isEmpty()\r\n {\r\n return count($this->childs) > 0 ? false : true;\r\n }", "function validate_fields() {\n\t\treturn true;\n\t}", "function empty_field_check() {\n $all_full =\n isset($_POST['email']) &&\n isset($_POST['username']) &&\n isset($_POST['password']) &&\n isset($_POST['name']) &&\n isset($_POST['surname']);\n \n if(!$all_full)\n launch_error(\"Some fields are empty.\");\n}", "public function isVoid()\n {\n return empty($this->fields);\n }", "public function validate_fields() {\n \n\t\t\n \n\t\t}", "function filled_out($form_vars) {\n\t\t// test that if each variable has a value\n\t\tforeach ($form_vars as $key => $value) {\n\t\t\tif ((!isset($key)) || ($value == '')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "static function all_Empty()\r\n {\r\n echo PageBuilder::printError(\"Please enter valid data in all the fields, nothing can not be empty.\");\r\n }", "public function valid () {\n return isset($this->__fields[key($this->__fields)]);\n }", "function checkFields( $args )\r\n {\r\n\t\treturn true;\r\n }", "protected function prepare_fields()\n {\n }", "function acf_is_empty($var)\n{\n}", "public function havingIsNull($field);", "protected function isCurrentValid() {\n if (!$this->isBound()) return false;\n if ($this->suppress_errors) return false;\n foreach ($this->__fields() as $field) {\n if ($this->$field->errors()) return false;\n $this->cleaned_data[$field] = $this->$field->cleaned_value();\n }\n return true;\n }", "public function validate_fields() {\n \n\t\t//...\n \n }", "function _empty($var) {\n\t\tif (is_object($var) and empty($var)===false) {\n\t\t\t//if (empty(get_object_vars($var)))\n\t\t\t\t\n\t\t}\n\t}", "public function isFilled()\n {\n return ! empty($this->data);\n }", "private function previously_added_fields_available() {\n $fields = wpcf_admin_fields_get_fields( true, true, false, $this->type );\n\n // abort if no fields created yet\n if( empty( $fields ) )\n return false;\n\n // already used fields in current group\n $already_used_fields = isset( $_REQUEST['current'] ) && is_array( $_REQUEST['current'] )\n ? $_REQUEST['current']\n : array();\n\n // if there's the same amount of fields and used fields we have no fields left to show,\n // as one field can't be assigned twice to a group\n if( count( $fields ) == count( $already_used_fields ) )\n return false;\n\n // add this point we definitely have previously added fields which weren't used yet.\n return true;\n }", "public function isEmpty()\n {\n \t$empty = $this->getHousingCount() == 0;\n \t$empty = $empty && is_null($this->getHousingDescription());\n \t$empty = $empty && $this->getOtherCount() == 0;\n \t$empty = $empty && is_null($this->getOtherDescription());\n \t$empty = $empty && $this->getPhotoCount() == 0;\n \t$empty = $empty && is_null($this->getPhotoDescription());\n \t$empty = $empty && $this->getSheetCount() == 0;\n \t$empty = $empty && is_null($this->getSheetDescription());\n \t$empty = $empty && $this->getVolumeCount() == 0;\n \t$empty = $empty && is_null($this->getVolumeDescription());\n \t\t$empty = $empty && $this->getBoxCount() == 0;\n \t$empty = $empty && is_null($this->getBoxDescription());\n \t\treturn $empty;\n }", "public function isChildOnly();", "public function is_empty() {\n\t\treturn (\n\t\t\t! isset( $this->root )\n\t\t\t|| ! $this->root->hasChildNodes()\n\t\t);\n\t}", "public function hasDetailFields()\n {\n return $this->owner->getDetailFields()->exists();\n }", "public function isValid() {\n\t\treturn !( empty( $this->fk_NMC ) || empty( $this->titre ) || empty( $this->contenu ) );\n\t}", "public function hasInvisibleChildren() {\n return $this->children()->invisible()->count();\n }", "private function hasForeignFields()\r\n\t{\r\n\t\tforeach ($this->fields as $field)\r\n\t\t{\r\n\t\t\tif ($field instanceOf ForeignField)\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "function filled_out($forms){\n\t\tforeach ($forms as $key => $value) {\n\t\t\tif( (!isset($key)) || ($value == '') ){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function hasField();", "function is_empty() {\n\t\treturn !$this->count();\n\t}", "public function load_fields() {\n\n // Verify if fields exists\n if ( self::$the_fields ) {\n\n return self::$the_fields;\n\n } else {\n\n return false;\n\n }\n\n }", "private function has_children() {\n return !empty($this->menuitems);\n }", "public function valid()\r\n {\r\n return (current($this->children) !== FALSE);\r\n }", "public function empty()\n {\n $forms = $this->belongsToMany(Form::class);\n $users = $this->belongsToMany(User::class);\n\n return ($forms->count() == 0 && $users->count() == 0) ? true : false;\n }", "public function hasAnyDiff()\n {\n return count($this->fields) > 0;\n }", "function isChildren()\n {\n return count($this->children)>0;\n }", "function acf_get_local_fields($parent = '')\n{\n}", "public function hasBlankFields($array) : bool\n { \n return (in_array('', $array, true) || in_array(null, $array, true)) ? true && $this->setError(true) : false;\n }", "public function hasCustomFields() : bool\n {\n return !empty($this->customFields);\n }", "function validate_not_empty($field_input, &$field)\n{\n if (strlen($field_input) == 0) {\n $field['error'] = 'field is empty';\n return false;\n }\n return true;\n}", "function checkEmptyFields($custInfo) { \n $errorMessageIfEmpty = array(\n \"CustFirstName\" => \"First name is empty\",\n \"CustLastName\" => \"Last name is empty\",\n \"CustAddress\" => \"Address is required\",\n \"CustCity\" => \"City field is empty\",\n \"CustProv\" => \"Province field is empty\",\n \"CustPostal\" => \"Postal Code is empty\",\n \"CustCountry\" => \"Country field is empty\",\n \"CustHomePhone\" => \"Home phone number is required\",\n \"CustBusPhone\" => \"Bus/Cell phone number is required\",\n \"CustEmail\" => \"Please enter your email\",\n \"username\" => \"Username field is empty\",\n \"password\" => \"Password field is empty\"\n );\n \n $actualErrors = array();\n \n foreach($custInfo as $key => $value) {\n if(array_key_exists($key, $errorMessageIfEmpty)) {\n if(trim($value) == \"\") {\n $actualErrors[$key] = $errorMessageIfEmpty[$key];\n } \n }\n } \n return $actualErrors;\n }", "public function isEmpty()\r\n {\r\n return isset($this->data['total']) AND $this->data['total'] == '0';\r\n }", "function acf_not_empty($var)\n{\n}", "public function validate($fields = false, $primary_key = false){\n\n\t\t$clean = parent::pre_validate($fields, $primary_key);\n\n\t\tif($clean->isEmpty('name')){\n\t\t\t$this->addError('name', text('db:error:groupname'));\n\t\t}\n\n\t\treturn $fields;\n\n\t}", "private function _isNull() {\n if (is_null($this->value)) {\r\n return true;\r\n }\n if (empty($this->value) && (in_array($this->type, array('multiple', 'ordered', 'string')))) {\n return true;\n }\n return false;\n }", "function _acf_do_prepare_local_fields()\n{\n}", "public function existsChildField($nameField){\n return (count(Reportedetalle::find()->where(\n ['hidreporte'=>$this->id,\n 'nombre_campo'=>$nameField]\n )->asArray()->all())>0)?true:false; \n \n }", "function validate()\n {\n if (!$this->ParentId && !$this->Content)\n throw Exception(\"ParentId and Content cannot both be NULL\");\n }", "public function notEmpty()\n {\n $this->non_empty = true;\n }", "function _testIsEmpty()\n {\n parent::_testIsEmpty();\n $this->assertFalse($this->m_attribute->isEmpty(array($this->m_attribute->m_name=>array(0=>1,1=>2))), \"isempty\");\n }", "public function is_empty()\r\n {\r\n if( $this->is_submit() && ($this->taintedInputs->length()=== 0))\r\n return true; \r\n else\r\n return false;\r\n }", "private function checkFields()\r\n {\r\n $vars = array('user', 'pass', 'numbers', 'message', 'date', 'ids', 'data_start', 'data_end',\r\n 'lido', 'status', 'entregue', 'data_confirmacao', 'return_format'\r\n );\r\n\r\n $final = array();\r\n foreach ($vars as $key => $value) {\r\n if ($this->$value !== '') {\r\n $final[$value] = $this->$value;\r\n }\r\n }\r\n return $final;\r\n }", "public function isEmpty()\n {\n $properties = get_object_vars($this);\n $properties = AttributeFilter::notEmpty($properties);\n return empty($properties);\n }", "public function hasField() {\n return $this->_has(1);\n }", "public function hasField() {\n return $this->_has(1);\n }", "public function hasField() {\n return $this->_has(1);\n }", "function is_empty()\n {\n }", "protected function fillableNotSet()\n {\n return ! isset($this->fillable);\n }", "function has_full_field_standings() {\n return $this->full_field_calc == 0;\n }", "public function hasChildren() {\n\t\treturn $this->children()->count() > 0;\n\t}", "function has_sub_field($field_name, $post_id = \\false)\n{\n}", "private function check_sanity()\n {\n if (!is_object($this->qb))\n {\n return false;\n }\n \n if (empty($this->pager_id))\n {\n\n return false;\n }\n return true;\n }", "public function hasUnlistedChildren(): bool\n {\n return $this->children()->unlisted()->count() > 0;\n }", "public function hasField($key){ return !empty($this->field_map[$key]); }", "abstract protected function getMandatoryModelsFields();", "public function nonEmpty();", "function isEmpty(){\n\t\tif($this->first==null) return true;\n\t\telse return false;\n\t}", "function testEmptyPOSTExpectsNullArrayForFieldKey() {\n\t\t// arrange\n\t\t$_POST = array();\n\t\tglobal $post;\n\t\t$TestValidTextField = new TestValidTextField();\n\t\t$validated = array();\n\t\t$saved = array();\n\n\t\t// act\n\t\t$TestValidTextField->validate( $post->ID, $TestValidTextField->fields['field'], $validated, $saved );\n\n\t\t// assert\n\t\t$this->assertTrue( empty( $validated ) );\n\t}", "public function hasChildren()\n {\n return !empty($this->children);\n }", "public function hasInputFields() {\n\t\treturn $this->inputFields;\n\t}", "public function validate_fields() {\n\n\t\t$this->validate_refund_address_field();\n\t}", "function is_blank($value) {\n if (is_object($value) && method_exists($value, 'is_blank')) return $value->is_blank();\n if (is_string($value)) $value = trim($value);\n return is_empty($value);\n}", "function acf_is_local_field($key = '')\n{\n}", "function _ting_ranking_field_filter($element) {\n return !empty($element['field_name']);\n}", "public function fill_fields() {\n if (isset($this->id) && isset($this->name)) {\n /* already filled */\n return true;\n } else if (isset($this->id)) {\n $stmt = $this->pdo->prepare(\"select name from $this->table where id = :id\");\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n if (count($res) != 1) {\n return false;\n } else {\n $this->name = $res[0][0];\n return true;\n }\n } else if (isset($this->name)) {\n $stmt = $this->pdo->prepare(\"select id from $this->table where name = :name\");\n $stmt->bindValue(':name', $this->name);\n $stmt->execute();\n $res = $stmt->fetchAll();\n if (count($res) != 1) {\n return false;\n } else {\n $this->id = $res[0][0];\n return true;\n }\n } else {\n return false;\n }\n }", "public function isMultiVar() {\n\t\treturn $this->_children !== null && $this->_parent === null;\n\t}", "function checkForLists() {\n $res = true;\n foreach ($this->listFields() as $fieldName) {\n $fieldInfo = $this->getFieldInfo($fieldName);\n $res = $this->_checkForList($fieldName, $fieldInfo);\n }\n return $res;\n }", "public function validateFields($par)\n {\n $i=0;\n foreach ($par as $key => $value){\n if(empty($value)){\n $i++;\n }\n }\n if($i==0){\n return true;\n }else{\n $this->setErro(\"Preencha todos os dados!\");\n return false;\n }\n }", "function isEmpty($field, $msg, $inner=FALSE){\n\t\t$value = $this->_getValue($field);\n\t\tif (trim($value) == \"\"){\n if($inner==FALSE){\n $this->_errorList[] = array(\"field\" => $field,\n\t\t\"value\" => $value, \"msg\" => $msg);\n\t\treturn false;\n }else{\n return false;\n }\n\t\t\n\t\t}else{\n\t\treturn true;\n\t\t}\n\t}" ]
[ "0.76100683", "0.6693551", "0.6575833", "0.64146197", "0.63944066", "0.6362705", "0.63606447", "0.62480253", "0.6243596", "0.61988574", "0.6135376", "0.61104053", "0.6026322", "0.60221744", "0.6022099", "0.5991924", "0.5986454", "0.5961513", "0.5937311", "0.584389", "0.5839058", "0.58370054", "0.58094937", "0.5788603", "0.5787225", "0.5784692", "0.5780266", "0.57788587", "0.5773656", "0.5772518", "0.5751727", "0.5743746", "0.5743534", "0.5727451", "0.56954944", "0.5693043", "0.5689088", "0.56784254", "0.5668455", "0.5664272", "0.56561613", "0.56441826", "0.55992657", "0.5596067", "0.5584385", "0.5583569", "0.5573962", "0.55655503", "0.5562961", "0.5559187", "0.55571455", "0.5545332", "0.55452454", "0.55441004", "0.55408114", "0.553544", "0.5534979", "0.5516717", "0.55131596", "0.5494596", "0.54918075", "0.5484951", "0.54833156", "0.5479319", "0.54718906", "0.5467633", "0.5463624", "0.5462794", "0.545432", "0.5443887", "0.544332", "0.5439721", "0.54298466", "0.54263484", "0.54254484", "0.54254484", "0.54254484", "0.5424746", "0.54192406", "0.54107845", "0.54096764", "0.54061115", "0.5403548", "0.54031175", "0.54009336", "0.5400263", "0.5399677", "0.53954834", "0.5394811", "0.53924954", "0.53916484", "0.53858435", "0.53846943", "0.5381795", "0.5381049", "0.5378937", "0.537822", "0.5374122", "0.53737324", "0.5373652" ]
0.58774996
19
Reverse geo: given geocoordinates return the address
public function show(Apartment $apartment, Geolocation $geolocation) { return $geolocation->getAddress($apartment->latitude, $apartment->longitude); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function helperReverseGeocode($lat, $lng) {\n\t\t$addressData = array();\n\t\t$lng = floatval($lat);\n\t\t$lng = floatval($lat);\n\n\t\tif ($key == '' || $lng == 0 || $lat == 0 ) {\n\t\t\treturn $addressData;\n\t\t}\n\n\t\t$coords\t\t= $lat . ',' . $lng;\n\t\t$url\t\t\t= 'http://maps.google.com/maps/geo?q='.$coords.'&output=json&oe=utf8&sensor=false&key='.$this->config['mapKey'];\n\t\t$address\t= json_decode(t3lib_div::getURL($url));\n\n\t\t// get the response\n\t\tif ($address->Status->code == '200' && count($address->Placemark) > 0) {\n\t\t\t$addressObj = $address->Placemark[0];\n\n\t\t\t$addressData['all']\t\t\t\t\t= $addressObj->address;\n\t\t\t$addressData['country']\t\t\t= $addressObj->AddressDetails->Country->CountryName;\n\t\t\t$addressData['countryshort']= $addressObj->AddressDetails->Country->CountryNameCode;\n\t\t\t$addressData['region']\t\t\t= $addressObj->AddressDetails->Country->AdministrativeArea->AdministrativeAreaName;\n\t\t\t$addressData['subarea']\t\t\t= $addressObj->AddressDetails->Country->AdministrativeArea->SubAdministrativeArea->SubAdministrativeAreaName;\n\t\t\t$addressData['city']\t\t\t\t= $addressObj->AddressDetails->Country->AdministrativeArea->SubAdministrativeArea->Locality->LocalityName;\n\t\t\t$addressData['zip']\t\t\t\t\t= $addressObj->AddressDetails->Country->AdministrativeArea->SubAdministrativeArea->Locality->PostalCode->PostalCodeNumber;\n\t\t\t$addressData['address']\t\t\t= $addressObj->AddressDetails->Country->AdministrativeArea->SubAdministrativeArea->Locality->Thoroughfare->ThoroughfareName;\n\t\t}\n\n\t\treturn $addressData;\n\t}", "public function reverse($latitude, $longitude);", "protected function reverseGeocoding($geo = [])\n {\n // Sanitize\n $geo = empty($geo) ? $this->geoIP() : $geo;\n\n if (isset($geo['error'])) {\n return [];\n }\n\n return $this->reverseGeocodingWithLatLng($geo['latitude'], $geo['longitude']);\n }", "function reverse_geocode_data($data,$lat=0,$lng=0)\n{\n $data = @json_decode($data, 1);\n\n $_locale = [\"lat\"=>$lat,\"lng\"=>$lng,\"city\" => \"\", \"state\" => \"\", \"country\" => \"\", \"success\" => false];\n\n if (!isset($data['status']) || $data['status'] != \"OK\") {\n return $_locale;\n }\n\n foreach ($data['results'] as $localities) {\n\n foreach ($localities as $locality) {\n if(is_array($locality)) {\n foreach ($locality as $key => $locale) {\n\n if (isset($locale['types'])) {\n $types = $locale['types'];\n\n if ($types[0] == \"locality\") {\n $_locale['city'] = $locale['long_name'];\n }\n\n if ($types[0] == \"administrative_area_level_1\") {\n $_locale['state'] = $locale['long_name'];\n }\n\n if ($types[0] == \"country\") {\n $_locale['country'] = $locale['long_name'];\n }\n\n }\n }\n }\n }\n\n }\n\n $_locale['success'] = true;\n\n return $_locale;\n}", "public function reverseLatLng(Coordinate $coordinate)\n {\n $url = \"https://maps.googleapis.com/maps/api/geocode/json?latlng={$coordinate->getLatitude()},{$coordinate->getLongitude()}&key={$this->key}\";\n $placeRequest = new GuzzleHttp\\Psr7\\Request('GET', $url);\n $placeResponse = $this->http->send($placeRequest);\n $contents = $placeResponse->getBody()->getContents();\n $result = json_decode($contents, true);\n\n return $result;\n }", "public function getCoordinates(Address $address)\n {\n $type = NULL;\n\n //set latitude and longitude of new user\n //remove bis, ter from address street for localization research because it makes the research inaccurate \n $base = strtolower(trim($address->getStreet1().' '.$address->getZipCity()->getZipCode().' '.$address->getZipCity()->getCity())) ; \n \n if(preg_match('/^\\d+/',$base)){\n $type = 'housenumber';\n }elseif(preg_match('/^hameau/',$base)){\n $type = 'locality';\n }elseif(preg_match('/^(allée|allee|rue|impasse|square|avenue)/',$base)){\n $type = 'street';\n }\n\n //replace strings for better score\n $base = preg_replace('/\\s(bis|ter)\\s/',' ',$base);\n $base = preg_replace('/^(\\d+)(bis|ter)\\s/','${1} ',$base);\n $base = preg_replace('/\\,/',' ',$base);\n $base = preg_replace('/\\s(st)e?\\s/',' saint ',$base);\n $base = preg_replace('/\\s(dr)\\s/',' docteur ',$base);\n $base = preg_replace('/\\s(jo|j\\.o)\\s/',' jeux olympiques ',$base);\n\n $arrayParams = array( \n 'q' => $base,\n //'postcode' => $address->getZipCity()->getZipCode(),\n 'lat'=>'45.19251',\n 'lon'=>'5.72756',\n 'limit' => 2 \n ); \n if($type){\n $arrayParams['type'] = $type;\n }\n\n $res = $this->api->get('https://api-adresse.data.gouv.fr/','search/',$arrayParams);\n\n if($res['code'] == 200){ \n $features = $res['results']['features']; \n\n if( count($features) > 1){ \n if($features[0]['properties']['score'] > $features[1]['properties']['score'] ){\n $location = $features[0]; \n }else{\n $location = $features[1]; \n }\n }elseif(count($features) == 1){ \n $location = $features[0]; \n }else{\n return array('latitude'=>NULL ,'longitude'=>NULL, 'closest'=>array('label'=>'Aucune'));\n } \n\n $score = $location['properties']['score'];\n if($score <= 0.67){ \n if($score >= 0.60 && isset($location['properties']['oldcity'])){// if the address matches a former deprecated city name\n return array('latitude'=>$location['geometry']['coordinates'][1] ,'longitude'=>$location['geometry']['coordinates'][0]);\n }\n if($score >= 0.58){\n $similarityStreet = similar_text(strtolower($address->getStreet1()),strtolower($location['properties']['name']),$prec);\n if(! ($location['properties']['type'] == 'municipality')){//if municipality, name is city\n if($prec >= 50){\n return array('latitude'=>$location['geometry']['coordinates'][1] ,'longitude'=>$location['geometry']['coordinates'][0]);\n }\n }\n }\n return array('latitude'=>NULL ,'longitude'=>NULL,'closest' => $location['properties']);\n }else{\n return array('latitude'=>$location['geometry']['coordinates'][1] ,'longitude'=>$location['geometry']['coordinates'][0]);\n }\n }else{\n throw new \\Exception('geolocalization_api_failed : '.$res['results']['description']);\n }\n\n }", "public function geocode(Address $address);", "function getAddressCoordinates($address, City $city=null);", "function getCoordination($address){\r\n $address = str_replace(\" \", \"+\", $address); // replace all the white space with \"+\" sign to match with google search pattern\r\n \r\n $url = \"http://maps.google.com/maps/api/geocode/json?sensor=false&address=$address\";\r\n \r\n $response = file_get_contents($url);\r\n \r\n $json = json_decode($response,TRUE); //generate array object from the response from the web\r\n\r\n $latitude = ($json[\"results\"][0][\"geometry\"][\"location\"][\"lat\"]);\r\n $longitude = ($json[\"results\"][0][\"geometry\"][\"location\"][\"lng\"]);\r\n\r\n return array(\"latitude\" => $latitude, \"longitude\" => $longitude);\r\n }", "public static function geodecode_request($addr_str){\n\n $url = 'http://maps.googleapis.com/maps/api/geocode/json?';\n\n $param = array(\n 'address' => \"$addr_str\",\n 'sensor' => 'false',\n );\n\n $url = $url.http_build_query($param);\n\n $response = file_get_contents($url);\n $json = json_decode($response, TRUE);\n\n if($json['status'] == 'OVER_QUERY_LIMIT')\n throw new Exception(self::OVER_QUERY_LIMIT);\n\n if($json['status'] != 'OK')\n throw new Exception(self::NO_RESULT);\n\n $results = first($json['results']);\n\n $lat = (float)$results['geometry']['location']['lat'];\n $lon = (float)$results['geometry']['location']['lng'];\n\n return compact('lat', 'lon', 'request');\n }", "function helperGeocodeAddress($address='', $zip='', $city='', $country='') {\n\t\t$geocode\t= array();\n\t\t$coords\t\t= array();\n\t\t$search\t\t= false;\n\n\t\tif ($address != '') {\n\t\t\t$geocode[] = $address;\n\t\t\t$search = true;\n\t\t}\n\t\tif ($zip != '') {\n\t\t\t$geocode[] = $zip;\n\t\t\t$search = true;\n\t\t}\n\t\tif ($city != '') {\n\t\t\t$geocode[] = $city;\n\t\t\t$search = true;\n\t\t}\n\t\tif ($country != '') {\n\t\t\t$geocode[] = $country;\n\t\t} else {\n\t\t\t$geocode[] = $this->config['defaultCountry'];\n\t\t}\n\n\t\t// just if there are some values additional to the country\n\t\tif ($search) {\n\t\t\t$geocode = implode(',', $geocode);\n\n\t\t\t// call google service\n\t\t\t$url = 'http://maps.google.com/maps/geo?q='.urlencode($geocode).'&output=csv&key='.$this->config['mapKey'];\n\t\t\t$response=stripslashes(t3lib_div::getURL($url));\n\n\t\t\t// determain the result\n\t\t\t$response = explode(',', $response);\n\n\t\t\t// if there is a result\n\t\t\t$coords['status'] \t= $response[0];\n\t\t\t$coords['accuracy']\t= $response[1];\n\t\t\t$coords['lat']\t\t\t= $response[2];\n\t\t\t$coords['lng']\t\t\t= $response[3];\n\t\t} else {\n\t\t\t\t$coords['status']\t= 601;\n\t\t}\n\n\t\treturn $coords;\n\t}", "function rec_regenerate_coordinates() {\n\n\tif( ! isset( $_GET['coord_debug'] ) ) {\n\t\treturn;\n\t}\n\n\t$posts = new WP_Query(\n\t\tarray(\n\t\t\t'post_type'\t\t=>\tepl_get_core_post_types(),\n\t\t\t'post_status'\t=>\t'any',\n\t\t\t'posts_per_page' =>\t-1,\n\t\t\t'meta_query'\t=>\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'key'\t\t=>\t'property_address_coordinates',\n\t\t\t\t\t'value'\t\t=>\tarray(\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'compare'\t=>\t'IN'\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t);\n\twhile( $posts->have_posts() ) {\n\t\t$posts->the_post();\n\t\t$coord = get_property_meta( 'property_address_coordinates' );\n\t\t\n\t\t$query_address = epl_property_get_the_full_address();\n\t\t$query_address = trim( $query_address );\n\n\t\tif( $query_address != ',' ) {\n\t\n\t\t\t$googleapiurl = \"https://maps.google.com/maps/api/geocode/json?address=$query_address&sensor=false\";\n\t if( epl_get_option('epl_google_api_key') != '' ) {\n\t $googleapiurl = $googleapiurl.'&key='.epl_get_option('epl_google_api_key');\n\t }\n\n\t $geo_response = wp_remote_get( $googleapiurl );\n\t $geocode = $geo_response['body'];\n\t $output = json_decode($geocode);\n\t /** if address is validated & google returned response **/\n\t if( !empty($output->results) && $output->status == 'OK' ) {\n\n\t $lat = $output->results[0]->geometry->location->lat;\n\t $long = $output->results[0]->geometry->location->lng;\n\t $coord = $lat.','.$long;\n\n\t update_post_meta( get_the_ID(), 'property_address_coordinates', $coord);\n\t update_post_meta( get_the_ID(), 'property_address_display', 'yes');\n\t }\n }\n\t}\n}", "public static function geodecode_addr($addr_infos, $addr_hash = false, $bypass_cache=false) {\n\n $addr_filter = array(\n 'street_number',\n 'route',\n 'postal_code',\n 'locality',\n 'area_level_2',\n 'area_level_1',\n 'country',\n );\n $addr_data = array_sort($addr_infos, $addr_filter);\n $addr_data = array_filter(array_map('trim',$addr_data));\n\n // build addr_str (add area_level ?)\n $addr_str .= $addr_data['street_number']?\"{$addr_data['street_number']} \":'';\n $addr_str .= $addr_data['route']?\"{$addr_data['route']}, \":'';\n $addr_str .= $addr_data['postal_code']?\"{$addr_data['postal_code']} \":'';\n $addr_str .= $addr_data['locality']?\"{$addr_data['locality']}, \":'';\n $addr_str .= $addr_data['country']?\"{$addr_data['country']}\":'';\n\n if(!$addr_hash)\n $addr_hash = strtolower(md5(strtoupper($addr_str))); // hash the strtoup for better cache optimization\n\n $verif_hash = array('geodetic_hash' => $addr_hash);\n $cached = sql::row(self::cache_table, $verif_hash);\n if($cached && !$bypass_cache) {\n return array(\n 'geodetic_lat' => $cached['geodetic_lat'],\n 'geodetic_lon' => $cached['geodetic_lon'],\n 'return_code' => geotools::CACHED,\n );\n }\n\n $data = array(\n 'geodetic_hash' => $addr_hash,\n 'geodetic_addr' => $addr_str,\n );\n $result = array(\n 'geodetic_lat' => null,\n 'geodetic_lon' => null,\n 'return_code' => geotools::OK,\n );\n try {\n $geodetic = self::geodecode_request($addr_str);\n $result['geodetic_lat'] = $geodetic['lat'];\n $result['geodetic_lon'] = $geodetic['lon'];\n } catch(Exception $e){\n if($e->getMessage() == geotools::OVER_QUERY_LIMIT)\n $result['return_code'] = geotools::OVER_QUERY_LIMIT; // to recompute later\n else\n $result['return_code'] = geotools::NO_RESULT;\n }\n\n // Update cache\n sql::insert(\"ks_geodecode_cache\", array_merge($data, $result));\n\n return $result;\n }", "public function getPreparedReverseGeocodeValues(array $values = []) {\n return array_map(function ($value) {\n return array_combine(['lat', 'lon'], array_map(\n 'trim',\n explode(',', trim($value['value']), 2)\n ));\n }, $values);\n }", "function get_address(){\t\t\n\t\t\t\t\tmysql_connect(get_option('dbhost'), get_option('dbuser'), get_option('dbpwd')) or\n\t\t\t\t\t\tdie(\"Could not connect: \" . mysql_error());\n\t\t\t\t\t\t\tmysql_select_db(get_option('dbname'));\n\t\t\t\t\t\t\t$result = mysql_query(\"SELECT Address,name FROM wp_terms where term_group = '1'\");\n\t\t\t\t\t$colum = \"\";\n\t\t\t\t\t$addr = \"\";\t\t\n\t\t\t\t\t\twhile ($row = mysql_fetch_array($result, MYSQL_NUM)) {\n\t\t\t\t\t\t\t$addr = $row[0];\n\t\t\t\t\t\t\t$name = $row[1];\n\t\t\t\t\t$colum .= getCoordinates($addr);\n\t\t\t\t\t\t\t//printf(\"%s\", $addr);\n\t\t\t\t\t\t\t//\tprintf(\"%s\", $colum); \n\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\tmysql_free_result($result);\n\t\t\t\t\t\t\t\t$coords = $colum;\n\t\t\t\t\t\t\t//\t$coords = implode(\"|\", $colum);\n\t\t\t\t\t\t\t\t//\t\tprintf(\"%s\", $coords); \n\t\t\t\t\t\t\t\t$coords = explode(\",\",$colum);\n\t\t\t\t\t\t\t\t\t$coordsTmp = \"\";\n\t\t\t\t\t\t\t\t\t\tfor($i = 0;$i < count($coords);$i++){\n\t\t\t\t\t\t\t\t\t\t\t$coordsTmp .='|'.$coords[$i].','.$coords[$i+1].' ';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo $name;\t\t\t\t\t\n\t\t\t\t\t$map4 = create_Map($coordsTmp,$addr);\n\t\t\treturn $map4;\n\t\t}", "function ShipToAddress()\r\n\t{\r\n\t\r\n\t}", "function get_address_data($address) {\n\n\t$data = explode(',', $address);\n\n\n\t$house = trim($data[count($data)-1]); //last\n\tpreg_match_all('/[\\d]+/m', $house, $matches, PREG_SET_ORDER, 0);\n\t$house = $matches[0][0];\n\n\tif ($house == null) {\n\t\t$house = 0;\n\t\t$street = trim($data[count($data)-1]);\n\t}\n\telse {\n\t\t$street = trim($data[count($data)-2]);\n\t}\n\n\t\n\n\t$street = str_replace('ул.', '', $street);\n\t$street = str_replace('улица', '', $street);\n\t$street = trim($street);\n\t\n\n\treturn [\n\t\t'street' => $street,\n\t\t'house' => $house\n\t];\n}", "function getGeo($address) {\n\t\tif(!empty($address)){\n\t\t\t//build a string with each part of the address\n\t $formattedAddress = str_replace(' ','+',$address);\n\t\t\t//Send request and receive json data by address\n\t\t\t$geocodeFromAddr = file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?address='.urlencode($formattedAddress).'&sensor=false');\n\t\t\t$output = json_decode($geocodeFromAddr);\n\t\t\t//Check if it was a valid address\n\t\t\tif(empty($output->results)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t//Get latitude and longitute from json data\n\t\t\t$geocode['lat'] = $output->results[0]->geometry->location->lat;\n\t\t\t$geocode['lng'] = $output->results[0]->geometry->location->lng;\n\t\t\t$address_data = $output->results[0]->address_components;\n\t\t\tfor ($i = 0; $i < sizeof($address_data); $i++) {\n\t\t\t\tif ($address_data[$i]->types[0] == \"locality\") {\n\t\t\t\t\t$geocode['city'] = $address_data[$i]->long_name;\n\t\t\t\t}\n\t\t\t\tif ($address_data[$i]->types[0] == \"administrative_area_level_1\") {\n\t\t\t\t\t$geocode['state'] = $address_data[$i]->long_name;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Return latitude, longitude, city, and state of the given address\n\t\t\tif(!empty($geocode) && !empty($geocode['city']) && !empty($geocode['state'])){\n\t\t\t\treturn $geocode;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "function getGeocodeData($address) {\n $address = urlencode($address);\n $googleMapUrl = \"https://maps.googleapis.com/maps/api/geocode/json?address={$address}&key=AIzaSyCXB6yLq41R_CSfl2saDa1pqqOutnamespace OCFram\\Blog\\Model;PwVNnI\";\n $geocodeResponseData = file_get_contents($googleMapUrl);\n $responseData = json_decode($geocodeResponseData, true);\n if($responseData['status']=='OK') {\n $latitude = isset($responseData['results'][0]['geometry']['location']['lat']) ? $responseData['results'][0]['geometry']['location']['lat'] : \"\";\n $longitude = isset($responseData['results'][0]['geometry']['location']['lng']) ? $responseData['results'][0]['geometry']['location']['lng'] : \"\";\n $formattedAddress = isset($responseData['results'][0]['formatted_address']) ? $responseData['results'][0]['formatted_address'] : \"\";\n if($latitude && $longitude && $formattedAddress) {\n $geocodeData = $latitude . \";\" . $longitude;\n return $geocodeData;\n } else {\n return false;\n }\n } else {\n echo \"ERROR: {$responseData['status']}\";\n return false;\n }\n }", "function wpsl_get_address_latlng( $address ) {\n\n $latlng = '';\n $response = wpsl_call_geocode_api( $address );\n\n if ( !is_wp_error( $response ) ) {\n $response = json_decode( $response['body'], true );\n\n if ( $response['status'] == 'OK' ) {\n $latlng = $response['results'][0]['geometry']['location']['lat'] . ',' . $response['results'][0]['geometry']['location']['lng'];\n }\n }\n\n return $latlng;\n}", "public function geoReverseGeoCode(\n\t$lat, $long, $accuracy = null, $granularity = null, $maxResults = null\n )\n {\n\t// build parameters\n\t$parameters['lat'] = (float) $lat;\n\t$parameters['long'] = (float) $long;\n\tif ($accuracy != null) {\n\t $parameters['accuracy'] = (string) $accuracy;\n\t}\n\tif ($granularity != null) {\n\t $parameters['granularity'] = (string) $granularity;\n\t}\n\tif ($maxResults != null) {\n\t $parameters['max_results'] = (int) $maxResults;\n\t}\n\n\t// make the call\n\treturn (array) $this->doCall('geo/reverse_geocode.json', $parameters);\n }", "public function getGeo($address)\n\t{\n\t\t$json=file_get_contents($this->api.urlencode($address));\n\n\t\t$data=json_decode($json,TRUE);\n\n\t\tif($data['status']==\"OK\")\n\t\t{\n\t\t\treturn array_merge(array($address),array_values($data['results'][0]['geometry']['location']));\n\t\t}\n\n\t\treturn FALSE;\n\n\t}", "public static function getShipToAddress($address)\n {\n $addressLine1 = \"\";\n if (array_key_exists(0, $address->getStreet(0))) {\n $addressLine1 = $address->getStreet(0)[0];\n }\n $addressLine2 = \"\";\n if (array_key_exists(1, $address->getStreet(0))) {\n $addressLine2 = $address->getStreet(0)[1];\n }\n $city = $address->getCity();\n $stateCode = $address->getRegionCode();\n\n $zip = $address->getPostcode();\n\n $country = $address->getCountryModel()->getIso2Code();\n\n // if we only have state + zip, then don't verify address.\n $tStateCode = trim($stateCode);\n $tZip = trim($zip);\n $verifyAddress =\n (\n (trim($addressLine1) == false)\n && (trim($city) == false)\n && (trim($addressLine2) == false)\n && ($tStateCode != false)\n && ($tZip != false && strlen($tZip) == 5)\n ) == true ? false : true;\n if (isset($country) && strcasecmp($country, 'US') !== 0) {\n $verifyAddress = false;\n }\n\n $estimatedAddress = array(\n 'PrimaryAddressLine'=>$addressLine1,\n 'SecondaryAddressLine'=>$addressLine2,\n 'City'=>$city,\n 'State'=>$stateCode,\n 'PostalCode'=>$zip,\n 'Plus4'=>\"\",\n 'Country'=>$country,\n 'VerifyAddress'=>$verifyAddress);\n\n return $estimatedAddress;\n }", "public function getPostalCodeFromCoords() {\r\n\t\t$this->autoRender = false;\r\n\r\n\t\t$this->layout = 'ajax';\r\n\r\n\t\t$this->response->type('json');\r\n\r\n\t\t$response = $this->StreetAddress->getPostalCodeFromCoords(\r\n\t\t\t$this->request->data('latitude'),\r\n\t\t\t$this->request->data('longitude')\r\n\t\t);\r\n\r\n\t\tif ($response) {\r\n\t\t\t$this->response->body(json_encode($response));\r\n\t\t} else {\r\n\t\t\t$this->response->body(false);\r\n\t\t}\r\n\r\n\r\n\t}", "function _geo_code( $address, $post_data ) {\n\n\t\tif ( !is_null($address) ) {\n\n\t\t\tif ( strtolower( str_replace( \" \", \"\", $post_data['o_address']) ) == strtolower( str_replace( \" \", \"\", $address) ) ) {\n\t\t\t\t//The Address has not changed, just send bak the orig. lat and lon.//\n\t\t\t\t//die(print_r($post_data['lat'].' '.$post_data['lon']))\n\t\t\t\treturn array('lat' => $post_data['lat'], 'lon' => $post_data['lon']);\n\t\t\t} else {\n\t\t\t\t//The address changed, so lets re-geocoge it and send back new coords.//\n\t\t\t\t$url = 'http://maps.googleapis.com/maps/api/geocode/json?address='.urlencode($address).'&sensor=false';\n\t\t\t\t$data = wp_remote_get( $url );\n\t\t\t\t\n\t\t\t\t$j = json_decode($data['body']);\n\t\t\t\treturn array( 'lat' => $j->results[0]->geometry->location->lat, 'lon' => $j->results[0]->geometry->location->lng);\n\t\t\t}\n\t\t\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public static function getLoggedInUserFullAddress()\n {\n \t$userId = Auth::getUser()->ID;\n \t$user = self::select('address1','zip','city','state')->where('ID', $userId)->first();\n \t$address = str_ireplace(\" \",\"+\",$user->address1).',+'.$user->zip.',+'.str_ireplace(\" \",\"+\",$user->city).',+'.str_ireplace(\" \",\"+\",$user->state);\n \treturn $address;\n }", "public function geocode($address)\n {\n $requestUrl = 'https://maps.googleapis.com/maps/api/geocode/json?';\n $params = array(\n 'sensor' => 'false',\n 'language' => 'de',\n 'address' => $address,\n );\n\n $requestUrl .= http_build_query($params);\n\t\n $json = json_decode(file_get_contents($requestUrl), true);\n $return = array(\n 'status' => $json['status'],\n 'succeed' => $json['status'] == 'OK',\n );\n\n if ($json['status'] == 'OK') {\n $result = $json['results'][0];\n\n $return['formatted_address'] = $result['formatted_address'];\n $return['coordinates'] = new Point($result['geometry']['location']['lat'], $result['geometry']['location']['lng']);\n\n // find zip code and city name\n $return = array_merge($return, $this->parseAddressComponents($result));\n\n if (isset($result['partial_match']) && $result['partial_match']) {\n $return['partial_match'] = true;\n }\n }\n\n return $return;\n }", "function getlatlng($address)\n\t{\n\t\t#perintah pengulangan jika terdapat query limit saat mendapatkan data\n\t\tgetlatlng:\n\t\t$data = json_decode(file_get_contents(\"http://maps.google.com/maps/api/geocode/json?address=\" . urlencode($address)));\n\t\t\n\t\t#berhenti jika data tidak lagi over query limit\n\t\tif($data->status == \"OVER_QUERY_LIMIT\")\n\t\t{\n\t\t\tgoto getlatlng;\n\t\t}else \n\t\t{\n\t\t\treturn \"{$data->results[0]->geometry->location->lat},{$data->results[0]->geometry->location->lng}\";\n\t\t}\n\t}", "function geocode($address) {\n\t\t// http://maps.google.com/maps/api/geocode/json?address=\n\n\t\t// encodage de l'adresse pour la soumettre par url (remplacer les espaces présents dans l'adresse par des %20)\n\t\t$address = urlencode($address);\n\n\t\t// url de l'API pour géocoder \n\t\t$urlApi = \"http://maps.google.com/maps/api/geocode/json?address=$address\";\n\n\t\t// appel à l'api gmap decode (en GET - réponse en JSON)\n\t\t$responseJson = file_get_contents($urlApi);\n\n\t\t// décodage du json pour le transformer en array php associatif (-> 2ème paramètre : true)\n\t\t$responseArray = json_decode($responseJson, true);\n\n/*\t\techo '<pre>';\n\t\tprint_r($responseArray);\n\t\techo '</pre>';*/\n\n\t\t// on prépare un tableau associatif de retour pcq on 2 infos (lat et lng à retourner alors \n\t\t// qu'une fonction ne peut avoir qu'un seul retour)\n\t\t$response = [];\n\n\t\t// je teste le status de réponse de l'api -> OK (sinon, cela signifie qu'il n'y a pas de correspondance -> 'zero résult')\n\t\tif($responseArray['status'] == 'OK') {\n\t\t\t$lat = $responseArray['results']['0']['geometry']['location']['lat'];\n\t\t\t$lng = $responseArray['results']['0']['geometry']['location']['lng'];\n\n/*\t\t\techo $lat.'</br>';\n\t\t\techo $lng.'</br>';*/\n\n\t\t\t// test facultatif - on vérifie seulement que lat et lng sont bien présentes \n\t\t\tif($lat && $lng) {\n\t\t\t\t$response['lat'] = $lat;\n\t\t\t\t$response['lng'] = $lng;\n\t\t\t}\n\t\t}\n\t\treturn $response;\n\t}", "function getCoordinates($address){\r\n\t$key = \"AIzaSyA2PDrfTTbXNZKOn15K-VbWgLfdTevM3qw\";\r\n\t$url = \"https://maps.googleapis.com/maps/api/geocode/json?address=\".urlencode($address).\"&sensor=false&key=\".$key;\r\n\t$json = file_get_contents($url);\r\n\t$results = json_decode($json, true);\r\n\r\n\t$stack = array();\r\n\t$status = $results['status'];\r\n\tif ($status == \"OK\") {\r\n\t\t$lat = $results['results']['0']['geometry']['location']['lat'];\r\n\t\tarray_push($stack, $lat);\r\n\t\t$lng = $results['results']['0']['geometry']['location']['lng'];\r\n\t\tarray_push($stack, $lng);\r\n\t}\r\n\telse{\r\n\t\techo \"ERREUR DE GOOGLE GEOCODE API\";\r\n\t\t$incase = array();\r\n\t\tarray_push($stack, 48.853396);\r\n\t\tarray_push($stack, 2.348779);\r\n\t\treturn $incase;\r\n\t}\r\n\t\r\n\treturn $stack;\r\n}", "static public function getLatLonZip($address,$cityName,$stateName){\n\t\t\t$geoData=SavCo_Geocoder::callYahooApi(urlencode($address),urlencode($cityName),urlencode($stateName));\n\t\t\treturn \t$geoData;\t\t\n\t\t}", "private function convertAddressToGeodata($orga, $address) {\n $apiKey = $this->getContainer()->getParameter('googleMapsApiKey');\n $api = self::googleApiUrl . \"?key=$apiKey\";\n $geo = file_get_contents(\"$api&address=\".urlencode($address) . '&sensor=false');\n\n // Convert the JSON to an array\n $geo = json_decode($geo, true);\n //die(var_dump($geo['status']));\n if ($geo['status'] == 'OK') {\n // Get Lat & Long\n $latitude = $geo['results'][0]['geometry']['location']['lat'];\n $longitude = $geo['results'][0]['geometry']['location']['lng'];\n \n $orga->setGeolocation($latitude .','.$longitude);\n }\n }", "protected function geocode(Point $point)\n {\n return $this->geocoder->reverse($point->getLatitude(), $point->getLongitude());\n }", "protected function reverseGeocodingWithLatLng($lat, $lng)\n {\n\n // Build the endpoint\n $endpoint = sprintf('%s%s,%s', self::GOOGLE_REVERSE_GEOCODING, $lat, $lng);\n\n $response = wp_remote_get($endpoint);\n\n // Dead connection\n if (200 != wp_remote_retrieve_response_code($response)) {\n return [];\n }\n\n $body = wp_remote_retrieve_body($response);\n\n $result = (array) json_decode($body);\n\n return $result['results'];\n }", "public function geocoding($address) \n {\n $encodeAddress = urlencode($address);\n $url = \"http://maps.google.com/maps/geo?q=\".$encodeAddress.\"&output=csv&key=\".$this->googleMapKey;\n \n if(function_exists('curl_init')) {\n $data = $this->getContent($url);\n } else {\n $data = file_get_contents($url);\n }\n \n\t\t$csvSplit = preg_split(\"/,/\",$data);\n $status = $csvSplit[0];\n\n if (strcmp($status, \"200\") == 0) {\n $return = $csvSplit; // successful geocode, $precision = $csvSplit[1],$lat = $csvSplit[2],$lng = $csvSplit[3];\n } else {\n $return = null; // failure to geocode\n }\n\n return $return;\n }", "public function getAddress();", "public function getAddress();", "public static function getLocationFromCoordinate($lat, $long)\n {\n\n $data = self::getData($lat, $long);\n\n $country = \"\";\n $adminAreas = array();\n $topAdminArea = \"\";\n $locality = \"\";\n $sublocality = \"\";\n $postalCode = \"\";\n $route = \"\";\n $formattedAddress = \"\";\n\n if (count($data['results']) > 0) {\n \t\t \n \t\tforeach($data['results'][0]['address_components'] as $current_entry) {\n \t\t\t \n \t\t\tforeach($current_entry['types'] as $current_entry2) {\n \t\t\t\t \n \t\t\t\tif ($current_entry2 == 'route') {\n if ($route == \"\") { $route = $current_entry['long_name']; }\n \t\t\t\t}\n \t\t\t\telseif ($current_entry2 == 'sublocality') {\n if ($sublocality == \"\") { $sublocality = $current_entry['long_name']; }\n \t\t\t\t}\n \t\t\t\telseif ($current_entry2 == 'locality') {\n if ($locality == \"\") { $locality = $current_entry['long_name']; }\n \t\t\t\t}\n elseif ($current_entry2 == 'postal_code') {\n if ($postalCode == \"\") { $postalCode = $current_entry['long_name']; }\n }\n \t\t\t\telseif ($current_entry2 == 'country') {\n if ($country == \"\") { $country = $current_entry['short_name']; }\n \t\t\t\t}\n elseif (substr($current_entry2, 0, 25) == 'administrative_area_level') {\n \n $key = substr($current_entry2, -1);\n $adminAreas[$key] = $current_entry['long_name'];\n \n }\n \t\t\t}\n \t\t\t \n \t\t}\n \n if (array_key_exists('formatted_address', $data['results'][0])) {\n \n $formattedAddress = $data['results'][0]['formatted_address'];\n \n }\n \t\t \n \t}\n \n if (array_key_exists('1', $adminAreas)) {\n $topAdminArea = $adminAreas['1'];\n }\n else {\n \n if (array_key_exists('2', $adminAreas)) {\n $topAdminArea = $adminAreas['2'];\n }\n else {\n \n if (array_key_exists('3', $adminAreas)) {\n $topAdminArea = $adminAreas['3'];\n }\n else {\n \n if (array_key_exists('4', $adminAreas)) {\n $topAdminArea = $adminAreas['4'];\n }\n else {\n \n if (array_key_exists('5', $adminAreas)) {\n $topAdminArea = $adminAreas['5'];\n }\n\n }\n\n }\n\n }\n \n }\n \n $nickname = \"\";\n \n if($route != \"\") { $nickname = $route.\" \"; }\n if($locality != \"\") { $nickname = $nickname.$locality.\" \"; }\n if($sublocality != \"\") { $nickname = $nickname.\"- \".$sublocality.\" \"; }\n \t \n \tif (strlen($nickname) < 2) {\n \t\t$characters1 = 'aeiou';\n \t\t$characters2 = 'bcdfghjklmnpqrstvwxyz';\n \t\t$nickname = '';\n \t\tfor ($j = 0; $j < 3; $j++) {\n \t\t\t$nickname .= $characters1[rand(0, strlen($characters1) - 1)];\n \t\t\t$nickname .= $characters2[rand(0, strlen($characters2) - 1)];\n \t\t}\n \t\t$nickname .= \" \";\n \t\t$nickname = ucfirst($nickname);\n \t\t \n \t}\n \t \n if($country != \"\") { $nickname = $nickname.\"(\".$country.\")\"; }\n\n \t$locationObject = new SimpleLocation();\n \n $locationObject->latitude = $lat;\n $locationObject->longitude = $long;\n $locationObject->administrativeArea = $topAdminArea;\n $locationObject->city = $locality;\n $locationObject->countryCode = $country;\n $locationObject->postalCode = $postalCode;\n $locationObject->route = $route;\n $locationObject->nickname = $nickname;\n $locationObject->formattedAddress = $formattedAddress;\n \n return $locationObject;\n \n }", "function location_cmn($lat, $long, $usegeolocation, $customerno = null) {\n $address = NULL;\n $customerno = (!isset($customerno)) ? $_SESSION['customerno'] : $customerno;\n if (isset($lat) && isset($long)) {\n $GeoCoder_Obj = new GeoCoder($customerno);\n $address = $GeoCoder_Obj->get_location_bylatlong($lat, $long);\n }\n return $address;\n}", "function getLnt($zip){\r\n $url = \"http://maps.googleapis.com/maps/api/geocode/json?address=\r\n \".urlencode($zip).\"&sensor=false\";\r\n $result_string = file_get_contents($url);\r\n $result = json_decode($result_string, true);\r\n //print_r($result);die();\r\n return $result['results'][0]['geometry']['location'];\r\n }", "function ale_map_get_coordinates( $address, $force_refresh = false ) {\n\n $address_hash = md5( $address );\n\n $coordinates = get_transient( $address_hash );\n\n if ($force_refresh || $coordinates === false) {\n\n $args = array( 'address' => urlencode( $address ), 'sensor' => 'false' );\n $url = add_query_arg( $args, 'http://maps.googleapis.com/maps/api/geocode/json' );\n $response \t= wp_remote_get( $url );\n\n if( is_wp_error( $response ) )\n return;\n\n $data = wp_remote_retrieve_body( $response );\n\n if( is_wp_error( $data ) )\n return;\n\n if ( $response['response']['code'] == 200 ) {\n\n $data = json_decode( $data );\n\n if ( $data->status === 'OK' ) {\n\n $coordinates = $data->results[0]->geometry->location;\n\n $cache_value['lat'] \t= $coordinates->lat;\n $cache_value['lng'] \t= $coordinates->lng;\n $cache_value['address'] = (string) $data->results[0]->formatted_address;\n\n // cache coordinates for 3 months\n set_transient($address_hash, $cache_value, 3600*24*30*3);\n $data = $cache_value;\n\n } elseif ( $data->status === 'ZERO_RESULTS' ) {\n return __( 'No location for the address.', 'aletheme' );\n } elseif( $data->status === 'INVALID_REQUEST' ) {\n return __( 'Bad request. Did you enter an address name?', 'aletheme' );\n } else {\n return __( 'Error, please check if you have entered the shortcode correctly.', 'aletheme' );\n }\n\n } else {\n return __( 'Can\\'t connect Google API.', 'aletheme' );\n }\n\n } else {\n // return cached results\n $data = $coordinates;\n }\n\n return $data;\n }", "function getCoordinatesFromAddress( $sQuery)\n{\n\t$sURL = 'http://maps.googleapis.com/maps/api/geocode/json?address='.urlencode($sQuery).'&sensor=false';\n\t$sData = file_get_contents($sURL);\n\t\n\treturn json_decode($sData);\n}", "public function getaddress(){\n $address = $this->_run('getaddress');\n return $address;\n }", "public function reverse($lat, $lng, array $params = []) {\n\t\t$this->_buildGeocoder();\n\n\t\t/** @var \\Geocoder\\Model\\AddressCollection $result */\n\t\t$result = $this->geocoder->reverseQuery(ReverseQuery::fromCoordinates($lat, $lng));\n\t\tif (!$this->_config['allowInconclusive'] && !$this->isConclusive($result)) {\n\t\t\tthrow new InconclusiveException(sprintf('Inconclusive result (total of %s)', $result->count()));\n\t\t}\n\t\tif ($this->_config['minAccuracy'] && !$this->containsAccurateEnough($result)) {\n\t\t\tthrow new NotAccurateEnoughException('Result is not accurate enough');\n\t\t}\n\n\t\treturn $result;\n\t}", "function location($gps){\n\tglobal $api;\n\t$lat = $gps['lat'];\n\t$lon = $gps['lon'];\n\t$endpoint = \"https://us1.locationiq.com/v1/reverse.php?key=$api&lat=$lat&lon=$lon&format=json\";\n\techo \"https://www.google.com/maps/search/?q=$lat,$lon\\n\";\n\treturn file_get_contents($endpoint);\n}", "public function geocodeXml($address)\n\t{\n\t\t$address = trim($address);\n\n\t\t$gMapGeocodedAddress = new EGMapGeocodedAddress($address);\n\t\t$gMapGeocodedAddress->geocodeXml($this->getGMapClient());\n\n\t\treturn $gMapGeocodedAddress;\n\t}", "function lat_long_conversion_to_NE($sref) {\n //convert to string so we can manipulate the grid references\n $sref['lat'] = (string)$sref['lat'];\n $sref['long'] = (string)$sref['long'];\n //if the latitude sref is negative then it is south\n if ($sref['lat'][0]==='-') {\n $sref['lat'] = $sref['lat'].'S';\n $sref['lat'] = substr($sref['lat'], 1);\n } else {\n $sref['lat'] = $sref['lat'].'N';\n }\n //if the longitude sref is negative then it is west\n if ($sref['long'][0]==='-') {\n $sref['long'] = $sref['long'].'W';\n $sref['long'] = substr($sref['long'], 1);\n } else {\n $sref['long'] = $sref['long'].'E';\n }\n $convertedSref = $sref['lat'].' '.$sref['long'];\n return $convertedSref;\n }", "function getLatLong($address, $city, $postalCode) {\n $combinedAddress = $address . \", \" . $postalCode . \" \" . $city;\n\n $url = \"https://maps.googleapis.com/maps/api/geocode/json?address=\" . urlencode($combinedAddress) . \"&key=\" . Config::GOOGLE_API_KEY;\n $context = stream_context_create();\n $result = file_get_contents($url, false, $context);\n\n if (isset($result)) {\n $parsedResult = json_decode($result, true);\n\n if (isset($parsedResult[\"results\"])) {\n $results = $parsedResult[\"results\"];\n $firstLocation = $results[0];\n return $firstLocation[\"geometry\"][\"location\"];\n } else {\n echo($result);\n }\n } else {\n echo \"HELP\";\n }\n}", "public function getLocalFormatedAddress()\n\t{\n\t\treturn substr($this->formatedAddress, 0, strrpos($this->formatedAddress, ','));\n\t}", "abstract public function reverseQuery(GeoQueryInterface $query): Collection;", "function getAddress($latitude, $longitude){\n\t\t$data = [\n\t\t\t'latlng' => \"$latitude,$longitude\",\n\t\t\t'key' => $this->key\n\t\t];\t\t\n\t\t$address = $this->geoRequest($this->callurl, $data);\n\t\treturn (json_decode($address)->results[0]->formatted_address);\n\t}", "public function getLng();", "function google_map_get_coordinates( $address, $force_refresh = false ) {\n\t$address_hash = md5( $address );\n\t$coordinates = get_transient( $address_hash );\n\tif ($force_refresh || $coordinates === false) {\n\t\t$args = array( 'address' => urlencode( $address ), 'sensor' => 'false', 'key' => 'AIzaSyA4-ZxE3QqrSWpnwsjSke4Bs5DDN1LeFB0' );\n\t\t$url = add_query_arg( $args, 'https://maps.googleapis.com/maps/api/geocode/json' );\n\t\t// var_dump($url);\n\t\t$response \t= wp_remote_get( $url );\n\t\tif( is_wp_error( $response ) )\n\t\t\treturn;\n\t\t$data = wp_remote_retrieve_body( $response );\n\t\tif( is_wp_error( $data ) )\n\t\t\treturn;\n\t\tif ( $response['response']['code'] == 200 ) {\n\t\t\t// var_dump($data);\n\t\t\t$data = json_decode( $data );\n\t\t\tif ( $data->status === 'OK' ) {\n\t\t\t\t$coordinates = $data->results[0]->geometry->location;\n\t\t\t\t$cache_value['lat'] \t= $coordinates->lat;\n\t\t\t\t$cache_value['lng'] \t= $coordinates->lng;\n\t\t\t\t$cache_value['address'] = (string) $data->results[0]->formatted_address;\n\t\t\t\t// // cache coordinates for 3 months\n\t\t\t\t// set_transient($address_hash, $cache_value, 3600*24*30*3);\n\t\t\t\t// $data = $cache_value;\n\t\t\t\t// var_dump($data->status);\n\t\t\t} elseif ( $data->status === 'ZERO_RESULTS' ) {\n\t\t\t\treturn __( 'No location for the address.', 'aletheme' );\n\t\t\t} elseif( $data->status === 'INVALID_REQUEST' ) {\n\t\t\t\treturn __( 'Bad request. Did you enter an address name?', 'aletheme' );\n\t\t\t} else {\n\t\t\t\treturn ($data->status);\n\t\t\t\t// return __( 'Error, please check if you have entered the shortcode correctly.', 'aletheme' );\n\t\t\t}\n\t\t} else {\n\t\t\treturn __( 'Can\\'t connect Google API.', 'aletheme' );\n\t\t}\n\t} else {\n\t\t// return cached results\n\t\t$data = $coordinates;\n\t}\n\t// return (array) $data;\n\t$coords = array();\n\t// var_dump($data);\n\t// print(\"<pre>\".print_r($data,true).\"</pre>\");\n\t// var_dump($data->results[0]->geometry->location->lat);\n\t$coords['lat'] = $data->results[0]->geometry->location->lat;\n\t$coords['lng'] = $data->results[0]->geometry->location->lng;\n\t// var_dump($data->results[0]->geometry->location->lng);\n\treturn $coords;\n}", "function reverse_ip($ip)\n{\n\t$new_ip = array_reverse(explode('.', $ip));\n\t$new_ip = implode('.', $new_ip);\n\treturn $new_ip;\n}", "function get_lat_long($address)\r\n{\t\r\n\t//sleep(1);\r\n $address = str_replace(\" \", \"+\", $address);\r\n $json = file_get_contents(\"http://maps.google.com/maps/api/geocode/json?address=$address&sensor=false&region=$region\");\r\n $json = json_decode($json);\r\n\t// echo \"<pre>\"; print_r($json); \r\n\r\n $lat = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lat'};\r\n $long = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lng'};\r\n return $lat.','.$long;\r\n}", "public function GeoLocate($addr){\n $geoapi = \"http://maps.googleapis.com/maps/api/geocode/json\";\n $params = array(\"address\"=>$addr,\"sensor\"=>\"false\");\n $response = $this->GET($geoapi,$params);\n $json = json_decode($response);\n if ($json->status === \"ZERO_RESULTS\") {\n return NULL;\n } else {\n return array($json->results[0]->geometry->location->lat,$json->results[0]->geometry->location->lng);\n }\n }", "public function getAddress() {}", "public function getAccountAddress($account);", "function geolocate($address)\r\n\t{\r\n\t\t$lat = 0;\r\n\t\t$lng = 0;\r\n\t\t\r\n\t\t$data_location = \"http://maps.google.com/maps/api/geocode/json?address=\".str_replace(\" \", \"+\", $address).\"&sensor=false\";\r\n\t\t\r\n\t\tif ($this->region!=\"\" && strlen($this->region)==2) { $data_location .= \"&region=\".$this->region; }\r\n\t\t$data = file_get_contents($data_location);\r\n\t\tusleep(200000);\r\n\t\t\r\n\t\t// turn this on to see if we are being blocked\r\n\t\t// echo $data;\r\n\t\t\r\n\t\t$data = json_decode($data);\r\n\t\t\r\n\t\tif ($data->status==\"OK\") {\r\n\t\t\t$lat = $data->results[0]->geometry->location->lat;\r\n\t\t\t$lng = $data->results[0]->geometry->location->lng;\r\n\t\t}\r\n\t\t\r\n\t\t// concatenate lat/long coordinates\r\n\t\t$coords['lat'] = $lat;\r\n\t\t$coords['lng'] = $lng;\r\n\t\t\r\n\t\treturn $coords;\r\n\t}", "function venture_geo_get_location($city, $state, $country) {\n $location = \"$city, \";\n $location .= ($state ? $state : $country);\n return $location;\n}", "protected function _getDestinationAddress($address)\n {\n $street1 = $address->getStreet(1);\n $street2 = $address->getStreet(2);\n $city = (string)$address->getCity();\n $zip = $address->getPostcode();\n $state = Mage::getModel('directory/region')->load($address->getRegionId())->getCode();\n $country = $address->getCountry();\n $address = $this->_newAddress($street1, $street2, $city, $state, $zip, $country);\n\n return $address;\n }", "function venture_geo_process_geocodes() {\n $geocoded = false;\n \n $query = \"SELECT nid FROM {content_type_profile} WHERE LENGTH(IFNULL(field_location_value, '')) = 0\";\n $result = db_query($query);\n \n while ($row = db_fetch_object($result)) {\n $profile = node_load($row->nid);\n $city = $profile->field_city[0]['value'];\n $state = $profile->field_state[0]['value'];\n $country = $profile->field_country[0]['value'];\n \n $geo_location = $city . ',' . $state . ',' . $country;\n $geo_query = array('query' => $geo_location, 'maxRows' => 1);\n $geo_result = geonames_query('search', $geo_query);\n \n $location = 'invalid';\n \n if (!$geo_result) {\n watchdog('venture', \"Unable to geocode $location\");\n continue;\n }\n else if ($geo_result->results) {\n $geocode = $geo_result->results[0];\n $location = $geocode['name'] . '|' . $geocode['lat'] . '|' . $geocode['lng'];\n $geocoded = true;\n }\n \n $profile->field_location[0]['value'] = $location;\n node_save($profile);\n }\n \n return $geocoded;\n}", "function geocode($street_address,$city,$state){\n \n $street_address = str_replace(\" \", \"+\", $street_address); //google doesn't like spaces in urls, but who does?\n $city = str_replace(\" \", \"+\", $city);\n $state = str_replace(\" \", \"+\", $state);\n\n $url = \"http://maps.googleapis.com/maps/api/geocode/json?address=$street_address,+$city,+$state&sensor=false\"; \n $google_api_response = wp_remote_get( $url ); \n\n $results = json_decode( $google_api_response['body'] ); //grab our results from Google\n $results = (array) $results; //cast them to an array\n $status = $results[\"status\"]; //easily use our status\n $location_all_fields = (array) $results[\"results\"][0];\n $location_geometry = (array) $location_all_fields[\"geometry\"];\n $location_lat_long = (array) $location_geometry[\"location\"];\n\n // echo \"<!-- GEOCODE RESPONSE \" ;\n // var_dump( $location_lat_long );\n // echo \" -->\";\n\n if( $status == 'OK'){\n $latitude = $location_lat_long[\"lat\"];\n $longitude = $location_lat_long[\"lng\"];\n }else{\n $latitude = '';\n $longitude = '';\n }\n\n $return = array(\n 'latitude' => $latitude,\n 'longitude' => $longitude\n );\n return $return;\n}", "function get_longitude($address){\n\t\t$output = get_geocode($address);\n\t\tif($output->status==\"OK\" && (count($output->results) == 1)){\n\t\t\t$longitude = $output->results[0]->geometry->location->lng;\t\t\t\n\t\t\treturn $longitude;\t\t\t\n\t\t}\n\t\telse\n\t\t\treturn null;\n\t\t\n\t}", "public function getCoordinates( $street=NULL, $postal=NULL, $city=NULL, $country=NULL ) {\r\t\t$sQuery = sprintf(\r\t\t\t\"%s %s %s %s\"\r\t\t,\t$street\r\t\t,\t$postal\r\t\t,\t$city\r\t\t,\t$country\r\t\t);\r\t\t\r\t\t$sResponse = NULL;\r\t\t$sResponse = file_get_contents(\"http://maps.google.com/maps/geo?q=\".rawurlencode($sQuery).\"&output=json&oe=utf8&sensor=false&hl=de\");\r\t\t\r\t\tif( !empty($sResponse) ) {\r\t\t\r\t\t\t$aResponse = array();\r\t\t\t$aResponse = json_decode($sResponse,1);\r\r\t\t\tif( !empty($aResponse['Status']) && $aResponse['Status']['code'] == '200' ) {\r\t\t\t\r\t\t\t\t$coords = array();\r\t\t\t\t$coords['latitude'] = $aResponse['Placemark'][0]['Point']['coordinates'][1];\r\t\t\t\t$coords['longitude'] = $aResponse['Placemark'][0]['Point']['coordinates'][0];\r\t\t\t\t\r\t\t\t\treturn $coords;\r\r\t\t\t} else {\r\r\t\t\t\t$this->log('Could not find coordinates for adress \"'.$sQuery.'\"', 'tl_storelocator_stores fillCoordinates()', TL_ERROR);\r\t\t\t}\r\t\t} else {\r\t\t\t$this->log('Could not find coordinates for adress \"'.$sQuery.'\"', 'tl_storelocator_stores fillCoordinates()', TL_ERROR);\r\t\t}\r\t\t\r\t\treturn false;\r\t}", "function getCoordonnees($adresse){\n $apiKey = \"000824788445984525451:fkamkqgo6se\";//Indiquez ici votre clé Google maps !\n $url = \"http://maps.google.com/maps/geo?q=\".urlencode($adresse).\"&output=csv&key=\".$apiKey;\n\n $csv = file($url);\n $donnees = explode(\",\",$csv[0]); \n\t$t = array($donnees[2],$donnees[3]);\n\t\n return $t;\n\t}", "function getCoordonnees($adresse){\n $apiKey = \"000824788445984525451:fkamkqgo6se\";//Indiquez ici votre clé Google maps !\n $url = \"http://maps.google.com/maps/geo?q=\".urlencode($adresse).\"&output=csv&key=\".$apiKey;\n\n $csv = file($url);\n $donnees = explode(\",\",$csv[0]); \n\t$t = array($donnees[2],$donnees[3]);\n\t\n return $t;\n\t}", "protected function getLongLat($endereco){\n\n $end = str_replace(\" \", \"+\", $endereco);\n\n $url = \"http://maps.googleapis.com/maps/api/geocode/json?address=\".$end.\"&sensor=false\";\n\n $json = file_get_contents($url);\n $data = json_decode($json, TRUE);\n\n\n return json_encode($data['results'][0]['geometry']['location']);\n\n }", "public static function getCoordinates($address) {\n //Formatted address\n $formattedAddr = str_replace(' ', '+', $address);\n //Send request and receive json data by address\n $geocodeFromAddr = file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?address=' . $formattedAddr . '&sensor=true_or_false');\n $json = json_decode($geocodeFromAddr);\n if (isset($json->results)) {\n //Get latitude and longitute from json data\n $latitude = $json->results[0]->geometry->location->lat;\n $longitude = $json->results[0]->geometry->location->lng;\n return $latitude . \",\" . $longitude;\n }\n return false;\n }", "public function getAddress()\n {\n $address = null;\n if ($data = $this->getLocationData()) {\n $address = Address::create();\n $address->update($data);\n $address->ID = 0; //ensure not in db\n }\n\n return $address;\n }", "function get_lat_long($address){\r\n\t$API_KEY = 'AIzaSyC70LnMBiqyXcmpnQeryzq0VK12o6P5pnw';\r\n\t$address = str_replace(\" \", \"+\", $address);\r\n\t$url = \"https://maps.googleapis.com/maps/api/geocode/json?address=\".$address.\"&key=\".$API_KEY.\"\";\r\n\t$json = file_get_contents($url);\r\n\t$json = json_decode($json);\r\n\tif($json->status == 'ZERO_RESULTS'){\r\n\t\t$lat = 0;\r\n\t\t$long = 0; \t\r\n\t}else{\r\n\t\t$lat = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lat'};\r\n\t\t$long = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lng'};\t\r\n\t}\r\n\t\r\n\t$location = [$lat,$long];\r\n\treturn $location;\r\n}", "public function dmap_get_coordinates( $address, $force_refresh = false ) {\n\n\t $address_hash = md5( $address );\n\n\t $coordinates = get_transient( $address_hash );\n\n\t if ($force_refresh || $coordinates === false) {\n\n\t \t$args = array( 'address' => urlencode( $address ), 'sensor' => 'false' );\n\t \t$url = add_query_arg( $args, 'http://maps.googleapis.com/maps/api/geocode/json' );\n\t \t$response \t= wp_remote_get( $url );\n\n\t \tif( is_wp_error( $response ) )\n\t \t\treturn;\n\n\t \t$data = wp_remote_retrieve_body( $response );\n\n\t \tif( is_wp_error( $data ) )\n\t \t\treturn;\n\n\t\t\tif ( $response['response']['code'] == 200 ) {\n\n\t\t\t\t$data = json_decode( $data );\n\n\t\t\t\tif ( $data->status === 'OK' ) {\n\n\t\t\t\t \t$coordinates = $data->results[0]->geometry->location;\n\n\t\t\t\t \t$cache_value['lat'] \t= $coordinates->lat;\n\t\t\t\t \t$cache_value['lng'] \t= $coordinates->lng;\n\t\t\t\t \t$cache_value['address'] = (string) $data->results[0]->formatted_address;\n\n\t\t\t\t \tset_transient($address_hash, $cache_value, 3600*24*30*3);\n\t\t\t\t \t$data = $cache_value;\n\n\t\t\t\t} elseif ( $data->status === 'ZERO_RESULTS' ) {\n\n\t\t\t\t \treturn;\n\n\t\t\t\t} elseif( $data->status === 'INVALID_REQUEST' ) {\n\n\t\t\t\t \treturn;\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t \treturn;\n\n\t\t\t}\n\n\t } else {\n\n\t $data = $coordinates;\n\t }\n\n\t return $data;\n\n\t}", "public function getAddress2()\n {\n return parent::getValue('address2');\n }", "function cjpopups_geo_address_by_zipcode($zip, $only_zip = false){\n\t$url = \"http://maps.googleapis.com/maps/api/geocode/json?address=\".urlencode($zip).\"&sensor=false\";\n\t$json = @file_get_contents($url);\n\t$data = json_decode($json, true);\n\t$status = $data['status'];\n\tif($status==\"OK\"){\n\t\tif(count($data['results']) > 0){\n\t\t\tforeach ($data['results'] as $key => $result) {\n\t\t\t\t$location = $data['results'][$key]['geometry']['location'];\n\t\t\t\t$address = cjpopups_geo_address_by_latlng($location['lat'], $location['lng']);\n\t\t\t\tif(is_array($address)){\n\t\t\t\t\tforeach ($address as $key => $adval) {\n\t\t\t\t\t\tif($only_zip){\n\t\t\t\t\t\t\tif($adval['zipcode'] != ''){\n\t\t\t\t\t\t\t\t$return[] = $adval;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$return[] = $adval;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$return = is_array($return) ? array_values($return) : '';\n\t }else{\n\t \t$return = __('No locations found.', 'cjpopups');\n\t }\n\t}else{\n\t $return = __('No locations found.', 'cjpopups');\n\t}\n\treturn $return;\n}", "public function getReversePhone()\n\t{\n\t\t$this->_makeRequest(Wp_WhitePages_Model_Api::API_REQUEST_METHOD_REVERSEPHONE);\n\t\treturn $this->_result;\n\t}", "function getPlaceName($latitude, $longitude)\n\t{\n\n\t\t $geocode_stats = file_get_contents('https://maps.googleapis.com/maps/api/geocode/json?latlng='.$latitude.','.$longitude.'&sensor=false&key='.GOOGLE_API_KEY); \n\t\t$result='';\n\t\t$output_deals = json_decode($geocode_stats); \n\t\tif($output_deals->status=='OK'){\n\t\t $address_components=$output_deals->results[0]->address_components;\n\n\n\t\t for($i=0;$i<count($address_components);++$i){\n\t\t if(array(\"locality\", \"political\")==$address_components[$i]->types){\n\t\t $result=$address_components[$i]->short_name;\n\t\t break;\n\t\t }\n\t\t }\n\t\t// echo \"<pre>\";print_r($result);die;\n\t\t} else{\n\t\t $result=$output_deals->status;\n\t\t}\n\t\treturn $result; \n\t}", "private function getGeoCode($address){\n $address = urlencode($address);\n\n // google map geocode api url\n $url = \"https://maps.google.com/maps/api/geocode/json?sensor=false&key=AIzaSyDZl_p4GvElS5VstE8L3Z2Da3YntKFfYeg&address={$address}\";\n\n // get the json response\n $resp_json = file_get_contents($url);\n\n // decode the json\n $resp = json_decode($resp_json, true);\n\n // response status will be 'OK', if able to geocode given address\n if($resp['status']=='OK'){\n\n // get the important data\n $lat = $resp['results'][0]['geometry']['location']['lat'];\n $lng = $resp['results'][0]['geometry']['location']['lng'];\n $formatted_address = $resp['results'][0]['formatted_address'];\n\n // verify if data is complete\n if($lat && $lng && $formatted_address){\n\n // put the data in the array\n $data_arr = array();\n\n array_push(\n $data_arr,\n $lat,\n $lng,\n $formatted_address\n );\n\n return $data_arr;\n\n }else{\n return false;\n }\n\n }else{\n return false;\n }\n }", "public function get_address_2( $context = 'view' ) {\n\t\treturn $this->get_prop( 'address_2', $context );\n\t}", "function get_detailed_address($data) {\n return implode(\", \", $data);\n}", "public function fullAddress(){\n\n return ' '.$this->house. ' '. $this->address. ', '. $this->postcode;\n }", "public function getStreet();", "function bmlt_geocode (\t$in_address,\t///< The address, in a single string, to be sent to the geocoder.\n $in_isPublished ///< TRUE, if the meeting is published.\n )\n {\n global $region_bias;\n $ret = null;\n $status = null;\n $uri = 'https://maps.googleapis.com/maps/api/geocode/xml?key=' . $GLOBALS['gkey'] . '&address='.urlencode ( $in_address );\n if ( $region_bias )\n {\n $uri .= '&region='.strtolower(trim($region_bias));\n }\n\n $xml = simplexml_load_file ( $uri );\n \n if ( isset ( $xml ) )\n {\n if ( $xml->status == 'OK' )\n {\n $ret = array ( 'original' => $in_address, 'result' => bmlt_parse_gecode_result ( $xml->result, $in_isPublished ) );\n $retry = false;\n }\n elseif ( ( $xml->status == 'OVER_QUERY_LIMIT' ) || ($xml->status == 'OVER_DAILY_LIMIT') )\n {\n die ( 'Over Google Maps API Query Limit' . \". \" . $xml->error_message );\n }\n elseif ($xml->status == 'REQUEST_DENIED')\n {\n die ( 'Problem with API Key ('.htmlspecialchars ( $uri ).')' . \". \" . $xml->error_message );\n }\n elseif ($xml->status == 'INVALID_REQUEST')\n {\n die ( 'Invalid Geocode URL ('.htmlspecialchars ( $uri ).')' . \". \" . $xml->error_message );\n }\n }\n return $ret;\n }", "function getAddressComponentsFromLatLng($args){\r\n\t\t$requvired = [\t['latitude','latitude'] ,['longitude','longitude'] ];\t\r\n\t\tif(! $this->checkAruguments($requvired,$args)){ return $this->_getStatusMessage(1, 1); }\r\n\t\t$lat = $args['latitude'];\r\n\t\t$lng = $args['longitude'];\r\n\t\t$geocode = file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?latlng='.$lat.','.$lng.'&sensor=false');\r\n\t\t\r\n\t\t$api_response = array();\r\n\t\t$output= json_decode($geocode);\r\n\t\tfor($j=0;$j<count($output->results[0]->address_components);$j++){\r\n\t\t\t$api_response[$output->results[0]->address_components[$j]->types[0]] = $output->results[0]->address_components[$j]->long_name;\r\n\t\t}\r\n\t\t$response = array('errNum'=>200,'errFlag'=>0,'errMsg'=>'ok','data'=>$api_response);\r\n\t\t\r\n\t\treturn $response;\r\n\t}", "public function getAddress()\n {\n $cityName = '';\n $countryName = '';\n\n if (!empty($this->getCity())) {\n $cityName = $this->getCity()->getName();\n $countryName = $this->getCity()->getCountryName();\n }\n\n $address = array(\n $this->getStreet(),\n $this->getDistrict(),\n $this->getZipCode(),\n $cityName,\n $countryName\n );\n\n return implode(\", \", array_filter($address));\n }", "public function getCoordinatesByAddress($addressQuery) {\r\n\t\t$coordinate = NULL;\r\n\t\t$geocodeUrl = $this->getGeocodeUrl();\r\n\t\t$geocodeUrl .= '?sensor=false&address=' . urlencode(str_replace(LF, ', ', $addressQuery));\r\n\t\t$geocodeResult = t3lib_div::getURL($geocodeUrl);\r\n\t\t$geocodeResult = json_decode($geocodeResult);\r\n\t\tif ($geocodeResult !== NULL && strtolower($geocodeResult->status) === 'ok') {\r\n\t\t\t$coordinate = $geocodeResult->results[0]->geometry->location->lat . ',' . $geocodeResult->results[0]->geometry->location->lng;\r\n\t\t}\r\n\t\treturn $coordinate;\r\n\t}", "private function getAddresses()\n {\n $doctrine = $this->getDoctrine();\n\n /** @var \\Doctrine\\ORM\\QueryBuilder $qb */\n $qb = $doctrine\n ->getRepository('BadcowAddressBundle:BaseAddress')\n ->createQueryBuilder('a');\n\n $qb->add('where', $qb->expr()->orX(\n $qb->expr()->isNull('a.latitude'),\n $qb->expr()->isNull('a.longitude')\n ));\n\n return $qb->getQuery()->getResult();\n }", "function getAddresses()\r\n\t{\r\n\t\t// connect to the database\r\n\t\t//$this->dbsetup();\r\n\t\t\r\n\t\t$query = \"SELECT address FROM \" . $this->table . \" WHERE latitude = '0' AND longitude = '0'\";\r\n\t\t\r\n\t\t$result = mysql_query($query);\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "public function reverse();", "public function reverse();", "public function reverse();", "public function reverse();", "protected function _getOriginAddress($store = null)\n {\n $country = Mage::getStoreConfig('shipping/origin/country_id', $store);\n $zip = Mage::getStoreConfig('shipping/origin/postcode', $store);\n $regionId = Mage::getStoreConfig('shipping/origin/region_id', $store);\n $state = Mage::getModel('directory/region')->load($regionId)->getCode();\n $city = Mage::getStoreConfig('shipping/origin/city', $store);\n $street = Mage::getStoreConfig('shipping/origin/street', $store);\n $address = $this->_newAddress($street, '', $city, $state, $zip, $country);\n return $address;\n }", "private function doGeoQuery($city, $country ,$state = null, $address = null, $zip_code = null){\n\n\t\t$formatted_city = urlencode($city);\n\t\t$query = \"?components=locality:{$formatted_city}|country:{$country}\";\n\t\tif(!empty($state)){\n\t\t\t$formatted_state = urlencode($state);\n\t\t\t$query .= \"|administrative_area:{$formatted_state}\";\n\t\t}\n\t\tif(!empty($address)){\n\t\t\t$formatted_address = urlencode($address);\n\t\t\t$query .= \"|address:{$formatted_address}\";\n\t\t}\n\t\tif(!empty($zip_code)){\n\t\t\t$formatted_zip_code = urlencode($zip_code);\n\t\t\t$query .= \"&postal_code={$formatted_zip_code}\";\n\t\t}\n\t\t$query .= \"&sensor=false\";\n\n\t\t$url = self::ApiBaseUrl.$query;\n\t\tif($this->shouldUseKey()){\n\t\t\t$url .= \"&key={$this->api_key}\";\n\t\t}\n\t\telse if($this->shouldSignUrl()){\n\t\t\t$url = $this->signUrl($url);\n\t\t}\n\n\t\t$factory = $this->factory;\n\t\t$repository = $this->repository;\n\t\treturn $this->tx_manager->transaction(function() use($repository, $factory, $url, $query, $city, $country ,$state, $address , $zip_code){\n\n\t\t\t$res = $repository->getByGeoQuery($query);\n\t\t\tif($res) return array($res->getLat(),$res->getLng());\n\t\t\t$ch = curl_init();\n\t\t\tcurl_setopt($ch, CURLOPT_URL, GoogleGeoCodingService::ApiHost . $url);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t\tcurl_setopt($ch, CURLOPT_PROXYPORT, 3128);\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\t\t\t$response = curl_exec($ch);\n\t\t\tcurl_close($ch);\n\t\t\t$response_a = json_decode($response);\n\t\t\tif(is_null($response_a)){\n\t\t\t\tif(!empty($address))\n\t\t\t\t\tthrow new EntityValidationException(array( array('message' => sprintf('Address %s (%s) does not exist on City %s',$address,$zip_code,$city))));\n\t\t\t\telse\n\t\t\t\t\tthrow new EntityValidationException(array( array('message' => sprintf('City %s does not exist on Country %s',$city,$country))));\n\t\t\t}\n\t\t\tif($response_a->status!='OK'){\n\t\t\t\tif(!empty($address))\n\t\t\t\t\tthrow new EntityValidationException(array( array('message' => sprintf('Address %s (%s) does not exist on City %s - (STATUS: %s)',$address,$zip_code,$city,$response_a->status))));\n\t\t\t\telse\n\t\t\t\t\tthrow new EntityValidationException(array( array('message' => sprintf('City %s does not exist on Country %s (STATUS: %s)',$city,$country,$response_a->status))));\n\t\t\t}\n\t\t\t$repository->add($factory->buildGeoCodingQuery($query,$response_a->results[0]->geometry->location->lat, $response_a->results[0]->geometry->location->lng));\n\t\t\treturn array($response_a->results[0]->geometry->location->lat, $response_a->results[0]->geometry->location->lng);\n\t\t});\n\t}", "public static function geocodeAddress( $address, $city, $state, $zip ){\n /*\n Builds the URL and request to the Google Maps API\n */\n $url = 'https://maps.googleapis.com/maps/api/geocode/json?address='.urlencode( $address.' '.$city.', '.$state.' '.$zip ).'&key='.env( 'GOOGLE_MAPS_KEY' );\n\n /*\n\t\t\tCreates a Guzzle Client to make the Google Maps request.\n\t\t*/\n\t\t$client = new \\GuzzleHttp\\Client();\n\n\t\t/*\n\t\t\tSend a GET request to the Google Maps API and get the body of the\n\t\t\tresponse.\n\t\t*/\n\t\t$geocodeResponse = $client->get( $url )->getBody();\n\n\t\t/*\n\t\t\tJSON decodes the response\n\t\t*/\n\t\t$geocodeData = json_decode( $geocodeResponse );\n\n\t\t/*\n\t\t\tInitializes the response for the GeoCode Location\n\t\t*/\n\t\t$coordinates['lat'] = null;\n\t\t$coordinates['lng'] = null;\n\n\t\t/*\n\t\t\tIf the response is not empty (something returned),\n\t\t\twe extract the latitude and longitude from the\n\t\t\tdata.\n\t\t*/\n\t\tif( !empty( $geocodeData )\n && $geocodeData->status != 'ZERO_RESULTS'\n && isset( $geocodeData->results )\n && isset( $geocodeData->results[0] ) ){\n\t\t\t$coordinates['lat'] = $geocodeData->results[0]->geometry->location->lat;\n\t\t\t$coordinates['lng'] = $geocodeData->results[0]->geometry->location->lng;\n\t\t}\n\n\t\t/*\n\t\t\tReturn the found coordinates.\n\t\t*/\n\t\treturn $coordinates;\n\n }", "public function getAddressByZipCode($zip_code)\r\n\t{\r\n\t\t//echo \"Obtener direccion a partir del CP Model\"; exit;\r\n\r\n\t\t$sql = new Sql($this->dbAdapter);\r\n\t\t$select = $sql->select();\r\n\t\t$select->from(array('n' => 'neighborhood'));\r\n\t\t$select->columns(array('id_neighborhood' => 'id','colony','postal_code', 'district_id', 'state_id'));\r\n\t\r\n\t\t//$select->join(array('i_u'=>'users_details'),'users.id = i_u.id_user',array('id_user','name','surname', 'campus', 'phone', 'addres','image','pin','key_inventory'), 'Left');\r\n\t\t\r\n\t\t$select->where(array('n.postal_code' => $zip_code ));\r\n\r\n\t\t$selectString = $sql->getSqlStringForSqlObject($select);\r\n $execute = $this->dbAdapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\r\n $result=$execute->toArray(); \r\n\r\n\t\t//echo \"<pre>\";print_r($result);exit;\r\n\t\treturn $result;\r\n\t}", "function get_map_coordinates($address, $force_refresh = false) {\n\n $address_hash = md5( $address );\n\n $coordinates = get_transient( $address_hash );\n\n if ($force_refresh || $coordinates === false) {\n\n \t$args = array( 'address' => urlencode( $address ), 'sensor' => 'false' );\n \t$url = add_query_arg( $args, 'http://maps.googleapis.com/maps/api/geocode/json' );\n \t$response \t= wp_remote_get( $url );\n\n \tif( is_wp_error( $response ) )\n \t\treturn;\n\n \t$pmc_data = wp_remote_retrieve_body( $response );\n\n \tif( is_wp_error( $pmc_data ) )\n \t\treturn;\n\n\t\tif ( $response['response']['code'] == 200 ) {\n\n\t\t\t$pmc_data = json_decode( $pmc_data );\n\n\t\t\tif ( $pmc_data->status === 'OK' ) {\n\n\t\t\t \t$coordinates = $pmc_data->results[0]->geometry->location;\n\n\t\t\t \t$cache_value['lat'] \t= $coordinates->lat;\n\t\t\t \t$cache_value['lng'] \t= $coordinates->lng;\n\t\t\t \t$cache_value['address'] = (string) $pmc_data->results[0]->formatted_address;\n\n\t\t\t \t// cache coordinates for 3 months\n\t\t\t \tset_transient($address_hash, $cache_value, 3600*24*30*3);\n\t\t\t \t$pmc_data = $cache_value;\n\n\t\t\t} elseif ( $pmc_data->status === 'ZERO_RESULTS' ) {\n\t\t\t \treturn __( 'No location found for the entered address.', 'pw-maps' );\n\t\t\t} elseif( $pmc_data->status === 'INVALID_REQUEST' ) {\n\t\t\t \treturn __( 'Invalid request. Did you enter an address?', 'pw-maps' );\n\t\t\t} else {\n\t\t\t\treturn __( 'Something went wrong while retrieving your map, please ensure you have entered the short code correctly.', 'pw-maps' );\n\t\t\t}\n\n\t\t} else {\n\t\t \treturn __( 'Unable to contact Google API service.', 'pw-maps' );\n\t\t}\n\n } else {\n // return cached results\n $pmc_data = $coordinates;\n }\n\n return $pmc_data;\n}", "private function get_address()\n\t{\n\t\treturn $this->m_address;\n\t}", "public function getAddress2()\n\t{\n\t\treturn $this->address2;\n\t}", "abstract public function longitude();", "function get_postcode_location($zip, $country){\n\n\t\t$url = \"http://geo.localsearchmaps.com/?zip={zip}&country={country}\";\n\t\t$url = str_replace('{zip}', urlencode($zip), $url);\n\t\t$url = str_replace('{country}', urlencode($country), $url);\n\t\t\n\t\t$data = safe_scrape_cached($url);\n\t\t\n\t\treturn process_emag_geocoder($data);\n\t}", "private function resolveAddressData()\n {\n /** @var \\Magento\\Quote\\Model\\Quote $quote */\n $quote = $this->checkoutSession->getQuote();\n /** @var \\Magento\\Quote\\Model\\Quote\\Address $shippingAddress */\n $shippingAddress = $quote->getShippingAddress();\n\n $customerData = $this->geoIp->getCurrentLocation();\n if ($customerData->getCode() && $this->helper->isCountryAllowed($customerData->getCode())) {\n /** @var \\Magento\\Directory\\Model\\Country $currentCountry */\n $currentCountry = $shippingAddress\n ->getCountryModel()\n ->loadByCode($customerData->getCode());\n\n if (!$currentCountry) {\n return;\n }\n\n $shippingAddress->setCountryId($currentCountry->getId());\n $shippingAddress->setRegion($customerData->getRegion());\n $shippingAddress->setRegionCode($customerData->getRegionCode());\n $shippingAddress->setCity($customerData->getCity());\n $shippingAddress->setPostcode($customerData->getPosttalCode());\n\n $regionModel = $this->regionFactory->create();\n if ($customerData->getRegionCode() && $currentCountry->getId()) {\n $regionModel->loadByCode($customerData->getRegionCode(), $currentCountry->getId());\n $regionId = $regionModel->getRegionId();\n $shippingAddress->setRegionId($regionId);\n }\n }\n }" ]
[ "0.6951918", "0.6949223", "0.6816421", "0.62720865", "0.61952394", "0.60657483", "0.5906925", "0.5859497", "0.57537293", "0.572569", "0.57230216", "0.57113755", "0.5702485", "0.56994015", "0.566471", "0.5663677", "0.5651832", "0.5611745", "0.56050766", "0.5598703", "0.55593735", "0.55442536", "0.54733825", "0.54688746", "0.5455467", "0.5437797", "0.5422424", "0.54163206", "0.5408387", "0.5390728", "0.5383908", "0.53636605", "0.5354299", "0.5353288", "0.5353258", "0.5316338", "0.5316338", "0.5297002", "0.5296264", "0.5293262", "0.5276508", "0.52752435", "0.5273001", "0.52597034", "0.5248572", "0.5247899", "0.52476406", "0.5246293", "0.5224527", "0.5219686", "0.52187556", "0.5217553", "0.5209107", "0.52048385", "0.519809", "0.51977795", "0.5191392", "0.51834923", "0.5177486", "0.515599", "0.51515007", "0.5136739", "0.5131976", "0.5111162", "0.51066774", "0.51054424", "0.51054424", "0.51024526", "0.5093921", "0.5092019", "0.5071662", "0.5069671", "0.5060271", "0.5058975", "0.50251186", "0.50241005", "0.50235236", "0.5019169", "0.50068057", "0.5004953", "0.49965256", "0.49955726", "0.4993558", "0.4985996", "0.49823338", "0.49778044", "0.49777055", "0.49745733", "0.49745733", "0.49745733", "0.49745733", "0.4959965", "0.4957841", "0.49543175", "0.49517965", "0.49506158", "0.4941222", "0.49396718", "0.49382505", "0.4930199", "0.4930073" ]
0.0
-1
/ time in seconds
public function setStartTime( $time ) { if ( !is_numeric( $time ) ) { throw new \Exception( "Argument \"time\" must be a number" ); } $this->start_time = $time; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function time_seconds($time) {\n //Convert oanda time from microseconds to seconds\n\t\t\treturn floor($time/1000000);\n\t\t}", "public function toSeconds($time) {\n \treturn intval($time / 1000) % 60;\n }", "function getElapsedSeconds() {\n\t\treturn $this->time;\n\t}", "public function getSeconds(&$time_seconds){\n\t\t$time_seconds = round($this->disposeTime(),4);\n\t}", "public static function timeElapsedInSeconds($time){\n $date_time = date_create($time);\n return time() - $date_time->format('U');\n }", "private static function time()\n {\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n }", "function TimeToSec($time) {\n\t$dot2 = strpos($time, ':');\n\tif($dot2 > 0) {\n\t\t$min = substr($time, 0, $dot2);\n\t\t$time = substr($time, $dot2+1);\n\t}\n\t\t\n\t$time = ($min * 60) + $time;\n\treturn $time;\n}", "function second()\r\n {\r\n $value = $this->SecondsElapsed;\r\n\r\n $second = $value % 60;\r\n\r\n return $second;\r\n }", "public static function ms(): int\n {\n return round((static::elapsed() * 1000), 0);\n }", "public function getSeconds(): int\n {\n return $this->seconds;\n }", "function time_to_secs($time)\n{\n$timeArr = array_reverse(split(\":\", $time));\n$seconds = 0;\n$vals = Array(1, 60, 3600, 86400);\nforeach($timeArr as $key => $value)\n{\nif(!isset($vals[$key]))\nbreak;\n$seconds += $value * $vals[$key];\n}\nreturn $seconds;\n}", "public static function toSeconds ($time)\n\t\t{\n\t\t\t// 06:23:16.213\n\t\t\tpreg_match('/(\\d{2}):(\\d{2}):(\\d{2})[\\.:](\\d{3})/', $time, $match);\n\t\t\tif (count($match) == 5)\n\t\t\t{\n\t\t\t\tif ($match[ 4 ] > 499)\n\t\t\t\t\t$match[ 3 ] += 1;\n\n\t\t\t\treturn (int) ( $match[ 3 ] + $match[ 2 ] * 60 + $match[ 1 ] * 3600 );\n\t\t\t}\n\n\t\t\t// 06:23:16.21\n\t\t\tpreg_match('/(\\d{2}):(\\d{2}):(\\d{2})[\\.:](\\d{2})/', $time, $match);\n\t\t\tif (count($match) == 5)\n\t\t\t{\n\t\t\t\tif ($match[ 4 ] > self::$fps / 2)\n\t\t\t\t\t$match[ 3 ]++;\n\n\t\t\t\treturn $match[ 3 ] + $match[ 2 ] * 60 + $match[ 1 ] * 3600;\n\t\t\t}\n\n\t\t\t// 06:23:16\n\t\t\tpreg_match('/(\\d{2}):(\\d{2}):(\\d{2})/', $time, $match);\n\t\t\tif (count($match) == 4)\n\t\t\t\treturn $match[ 3 ] + $match[ 2 ] * 60 + $match[ 1 ] * 3600;\n\n\t\t\treturn null;\n\t\t}", "static function ts(){\r\n $dt = microtime(true) - self::$starttime;\r\n return self::mtformat($dt);\r\n }", "function getSecondsFromTime($time = '') {\n\t\tsscanf($time, \"%d:%d:%d\", $hours, $minutes, $seconds);\n\t\t$time_seconds = $hours * 3600 + $minutes * 60 + $seconds;\n\n\t\treturn $time_seconds;\n\t}", "public function time()\n\t{\n\t\treturn $this->endTimer-$this->startTimer;\n\t}", "function getTimeDuration();", "function Time($time){\r\n\r\n\t}", "function getAsSeconds()\n {\n return $this->seconds;\n }", "static public function get_time() {\n // By Zach Buller (zachbuller@gmail.com)\n $time1 = \\microtime();\n \\settype($time1, 'string'); //convert to string to keep trailing zeroes\n $time2 = explode(\" \", $time1);\n $sub_secs = \\preg_replace('/0./', '', $time2[0], 1);\n $time3 = ($time2[1].$sub_secs)/100;\n return $time3;\n }", "public function seconds(): int {\n\t\treturn $this->duration;\n\t}", "public function elapsedtime() {\n return fmod(floatval($this->servertime()),$this->waitingtime());\n\t}", "private function time_to_second($time) {\n\t\tlist($h, $m, $s) = explode(':', $time);\n\t\t$s += $h * 3600 + $m * 60;\n\t\treturn $s;\n\t}", "function getTime() {\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n}", "public static function milliseconds() {}", "public function time() {\n return $this->info['total_time'];\n }", "protected function time()\n {\n $time = microtime();\n $time = explode(' ', $time);\n $time = $time[1] + $time[0];\n return $time;\n }", "protected function getTime()\n {\n return microtime(true);\n }", "protected function getTime() {\n return microtime(true);\n }", "public function getElapsedTime();", "public function getTime()\n {\n return (float)sprintf(\"%.1f\", 1000*(microtime(true) - $this->startTime));\n }", "function GetuTime()\n{\n\tlist($uSec, $Sec)=explode(\" \", microtime()); \n\treturn((float)$uSec+(float)$Sec); \n}", "function Now($seconds_to_add=0);", "protected static function _timeToStopwatch()\n {\n return self::$_startupTime - $_SERVER['REQUEST_TIME_FLOAT'];\n }", "public static function get_elapsed_time()\n {\n return microtime( true ) - $_SESSION['time']['script_start_time'];\n }", "public static function timeSinceStart(): float\n {\n return \\microtime(true) - self::getRequestTime();\n }", "public function getSeconds() : string\n {\n return date('s', $this->getUnixTimestamp());\n }", "public function getTotalTime()\n {\n return $this->info->total_time * 1000;\n }", "function mstime ()\r\n{\r\n\t$t = explode (' ', microtime ());\r\n\treturn (int) (($t[0] + $t[1]) * 1000);\r\n}", "protected static function _timeToCake()\n {\n return TIME_START - $_SERVER['REQUEST_TIME_FLOAT'];\n }", "public function microtime();", "public static function time() {\n if (is_null(self::$_time)) {\n self::$_time = microtime(true);\n } else {\n echo 'Time-Consumed:- ' . (microtime(true) - self::$_time) . PHP_EOL;\n }\n }", "public function getSeconds() {\n $seconds = 0;\n foreach ($this->steps ?? [] as $step):\n $parser = explode(':', $step->getDuration());\n $seconds += (($parser[0] ?? 0) * 60 * 60) + (($parser[1] ?? 0) * 60) + $parser[2] ?? 0;\n endforeach;\n $this->seconds = $seconds;\n return $this->seconds;\n }", "function getTime(){\n\t\t$mtime = microtime();//print(\"\\n time : \" . $mtime);\n\t\t$mtime = explode(' ', $mtime);\n\t\t$mtime = $mtime[1] + $mtime[0];\n\t\treturn $mtime;\n\t}", "function timeElapsed($sec){\n\n if( $sec <= 1 ) 'Agora mesmo';\n\n $date = [ 'ano' => 31536000,\n 'mes' => 2592000,\n 'dia' => 86400,\n 'hora' => 3600,\n 'minuto' => 60,\n 'segundo' => 1];\n \n foreach( $date as $name => $time ){\n $qtde = $sec / $time;\n if( $qtde >= 1 ) return 'há ' . floor( $qtde ) . ' ' . $name . ($qtde > 2 ? 's' : '');\n }\n\n }", "public function getTotalSeconds(): float\n {\n return $this->getTotalMilliseconds() / 1000;\n }", "public static function getTimer()\n {\n return microtime(true) - $_SERVER[\"REQUEST_TIME_FLOAT\"];\n }", "function now() {\n return microtime(true)*1000;\n}", "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 timestamp()\n {\n return microtime(true);\n }", "function secondsElapsed()\r\n {\r\n return $this->SecondsElapsed;\r\n }", "protected function nowInMilliseconds(): int\n {\n $mt = explode(' ', microtime());\n return ((int) $mt[1]) * 1000 + ((int) round((int) $mt[0] * 1000));\n }", "protected static function _time()\n\t{\n\t\treturn time();\n\t}", "protected static function _timeFromCakeToStopwatch(): float\n {\n return self::$_startupTime - TIME_START;\n }", "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}", "public function getTotalSeconds()\n\t{\n\t\treturn ($this->s)\n\t\t+ ($this->i * 60)\n\t\t+ ($this->h * 60 * 60)\n\t\t+ ($this->d * 60 * 60 * 24)\n\t\t+ ($this->m * 60 * 60 * 24 * 30) \t// Month - usually days count 30\n\t\t+ ($this->y * 60 * 60 * 24 * 365);\t// Year - usually days count 365\n\t}", "public function getTime(): int {\n return $this->time;\n }", "static public function getSessionTime(){\n if (!isset($_SESSION['start_time'])){\n return 0;\n } else {\n return time() - $_SESSION['start_time'];\n }\n }", "public function getTime(): float\n {\n return $this->time;\n }", "function time2sec($time){\n\t// Parameters: \t$time\n\t//\t\t\t\tType: string\n\t//\t\t\t\tFormat: dd:hh:mm:ss\n\t// Returns:\t\tinteger\n\n\t$day = 86400;\n\t$hour = 3600;\n\t$minute = 60;\n\n\t$tc = explode(\":\", $time, 4);\n\tif(!is_array($tc)) return false;\n\tif(sizeof($tc)== 2){\n\t\t\n\t\t// This time has only minutes and seconds\n\t\t$seconds = (intval($tc[0]) * $minute) + (intval($tc[1]));\n\t}elseif(sizeof($tc) == 3){\n\t\n\t\t// This time has hours minutes and seconds\n\t\t$seconds = (intval($tc[0]) * $hour) + (intval($tc[1]) * $minute) + intval($tc[2]);\n\t}elseif(sizeof($tc) == 4){\n\t\t\n\t\t// This time has days, hours, and minutes\n\t\t$seconds = (intval($tc[0]) * $day) + (intval($tc[1]) * $hour) + (intval($tc[2]) * $minute) + intval($tc[3]);\n\t}else{\n\t\t// Something is wrong\n\t\treturn false;\n\t}\n\t\n\treturn $seconds;\n}", "public function getTime() : int;", "public function getTime(): int {\n\t\treturn $this->time;\n\t}", "public static function currentTimeMillis()\n {\n return microtime(true) * 10000;\n }", "function _get_time()\n{\n $_mtime = microtime();\n $_mtime = explode(\" \", $_mtime);\n\n return (double) ($_mtime[1]) + (double) ($_mtime[0]);\n}", "function elapsedSeconds() {\n if (null === $this->startMicrotime) {\n throw new InvalidArgumentException(\"Start time was not marked\");\n }\n if (null === $this->endMicrotime) {\n // Not stopped so return time from start to now\n return microtime(true) - $this->startMicrotime;\n }\n // Stopped so show total elapsed time between start and stop\n return $this->endMicrotime - $this->startMicrotime;\n }", "protected function startTime()\n {\n return microtime(true);\n }", "static function getTimeInMs() {\n\t\treturn round(microtime(true) * 1000);\n\t}", "public function ntc_seconds($input) {\n $this->seconds_input = substr(-5, 2);\n return $this->seconds_output = date('s') - $this->seconds_input;\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 timer()\n {\n return hrtime(true);\n }", "function process_time(){\n $time = number_format( microtime(true) - LIM_START_MICROTIME, 6);\n return($time);\n}", "protected function getElapsedTimeInMs()\n {\n return (microtime(true) - $this->start) * 1000;\n }", "public function getTime()\n {\n $time = 0;\n foreach ($this->data['calls'] as $call) {\n $time += $call['time'];\n }\n\n return $time;\n }", "public function secondsRemaining(): int\n {\n return $this->getTimeRemaining() / 1000;\n }", "public function getUseSeconds()\n {\n return $this->use_seconds;\n }", "public function getTime();", "public function getTime();", "public function getTotalTime()\n {\n return 0; //@todo\n }", "public function lockSeconds()\n {\n return $this->type->lock_seconds;\n }", "function convTimeToSeconds($Time){\n#DEBUG\tvar_dump($Time);\n\t$rc = strpos($Time, \".\");\n\tif ($rc == false){\n\t\t$newstring = $Time;\n\t}else{\n\t\t$newstring = substr($Time, 0, $rc);\n\t}\n\t$tarray = explode(\":\", $newstring);\n\tif(count($tarray) > 3 || count($tarray) < 2){\n\t\tprint \"Error on string conversion: \".$newstring.\"\\n\";\n\t\treturn -1;\n\t}\n\tif(count($tarray) == 3){\n\t\t$seconds = $tarray[0]*3600 + $tarray[1]*60 + $tarray[2];\n\t\treturn $seconds;\n\t}\n\tif(count($tarray) == 2){\n\t\t$seconds = $tarray[0]*60 + $tarray[1];\n\t\treturn $seconds;\n\t}\n}", "public function getTime() : int\n {\n $eventTime = $this->getTimeStamp();\n $eventStartTime = static::getStartTime();\n \n return number_format((($eventTime - $eventStartTime) * 1000), 0, '', '');\n \n }", "function humanTiming ($time){\n $time = (time()- 2*60*60)- $time; // to get the time since that moment\n $time = ($time<1)? 1 : $time;\n $tokens = array (\n 31536000 => 'year',\n 2592000 => 'month',\n 604800 => 'week',\n 86400 => 'day',\n 3600 => 'hour',\n 60 => 'minute',\n 1 => 'second'\n );\n\n foreach ($tokens as $unit => $text) {\n if ($time < $unit) continue;\n $numberOfUnits = floor($time / $unit);\n return $numberOfUnits.' '.$text.(($numberOfUnits>1)?'s':'');\n }\n }", "private function getCurrentTime()\n {\n return microtime(true);\n }", "function stop_timing() {\n $this->time = number_format(microtime(true) - $this->start_time, 3);\n }", "private function _upTime() \n {\n return microtime(true) - $this->_startTime;\n }", "function time_millis(): int\n {\n return (int)round(microtime(true) * 1000);\n }", "public function getElapsedTimeInSeconds()\n {\n if(!$this->_timeStartInMicroSeconds)\n {\n return 0;\n }\n\n $microSecsStart = $this->_timeStartInMicroSeconds;\n $microSecsStop = $this->_timeStopInMicroSeconds;\n\n if($microSecsStop == 0)\n {\n // The function stopTimer was not called.\n $microSecsStop = microtime(true);\n }\n\n $seconds = $microSecsStop - $microSecsStart;\n\n return round($seconds, 4);\n }", "private function getCurrentTime() {\n return microtime( true );\n }", "public static function totalDuration()\n {\n return microtime(true) - static::initialTime();\n }", "function milisecond_to_time($time) {\n $hours = gmdate(\"H\", $time / 1000);\n $mins = gmdate(\"i\", $time / 1000);\n $seconds = gmdate(\"s\", $time / 1000);\n if($hours > 24) {\n $tags = Math.floor($hours/24);\n $hours = $hours % 24;\n }\n $res = \"$hours:$mins:$seconds\";\n return $res;\n }", "public function getStartTime() {\n\t\t$gentime = explode(' ',microtime());\n\t\t$gentime = $gentime[1] + $gentime[0];\n\t\treturn $gentime;\n\t}", "public function currentTime();", "function timer_stop(){\n\t\t$mtime = explode(' ', microtime());\n\t\t$time_end = $mtime[1] + $mtime[0];\n\t\t$time_total = $time_end - $this->time_start;\n\t\treturn $time_total;\n\t}", "protected function convertToSeconds($time)\n {\n $hours = $minutes = $seconds = [];\n preg_match(\"/(\\d+)(?=h)/\", $time, $hours);\n preg_match(\"/(\\d+)(?=m)/\", $time, $minutes);\n preg_match(\"/(\\d+)(?=s)/\", $time, $seconds);\n\n $timeSpent = 0;\n if (!empty($seconds[1])) {\n $timeSpent += $seconds[1];\n }\n if (!empty($minutes[1])) {\n $timeSpent += $minutes[1] * 60;\n }\n if (!empty($hours[1])) {\n $timeSpent += $hours[1] * 60 * 60;\n }\n\n return $timeSpent;\n }", "public function get_duration();", "public function startTime() {\n return intval($this['started']);\n }", "function hms2sec ($hms) {\n\tlist($h, $m, $s) = explode (\":\", $hms);\n\t$seconds = 0;\n\t$seconds += (intval($h) * 3600);\n\t$seconds += (intval($m) * 60);\n\t$seconds += (intval($s));\n\treturn $seconds;\n}", "function getTimeProccess(){\n\t\treturn round($this->timeProccess,5);\n\t}", "public function getTotalTime(){\n return $this->totalTime;\n }", "function humanTiming ($time)\n {\n\n $time = time() - $time; // to get the time since that moment\n $time = ($time<1)? 1 : $time;\n $tokens = array (\n 31536000 => 'tahun',\n 2592000 => 'bulan',\n 604800 => 'minggu',\n 86400 => 'hari',\n 3600 => 'jam',\n 60 => 'menit',\n 1 => 'detik'\n );\n\n foreach ($tokens as $unit => $text) {\n if ($time < $unit) continue;\n $numberOfUnits = floor($time / $unit);\n return $numberOfUnits.' '.$text.(($numberOfUnits>1)?'s':'');\n }\n\n }", "function setSecond( $value )\r\n {\r\n $value = min( $value, 59 );\r\n $this->SecondsElapsed = ( ( $this->hour() * 3600 ) + ( $this->minute() * 60 ) + $value );\r\n }", "public function getUserIdleSeconds()\n {\n try\n {\n $luats = $this->getInstanceUserActionTimestamp();\n $now = time();\n $diff = $now - $luats;\n return $diff;\n } catch (\\Exception $ex) {\n throw $ex;\n }\n }" ]
[ "0.78189534", "0.73285294", "0.7259209", "0.72310925", "0.71272033", "0.69883496", "0.68861526", "0.68740344", "0.68660873", "0.6864612", "0.68554425", "0.68518794", "0.6835165", "0.68146384", "0.6797688", "0.6743643", "0.6728188", "0.6713151", "0.67122394", "0.67092484", "0.66635686", "0.6661986", "0.66451097", "0.66425127", "0.66423726", "0.662536", "0.6608631", "0.6589622", "0.6589354", "0.65774775", "0.6569439", "0.6561094", "0.6545101", "0.6541214", "0.65374815", "0.65270776", "0.6521115", "0.65195966", "0.650653", "0.6504848", "0.6496063", "0.6473936", "0.6469155", "0.6464605", "0.64610904", "0.6455135", "0.64268774", "0.6423955", "0.6409527", "0.6408385", "0.64079005", "0.63942796", "0.63937664", "0.6383416", "0.6373502", "0.6353827", "0.63494253", "0.63422525", "0.6330471", "0.63275504", "0.6322577", "0.631183", "0.630317", "0.63002217", "0.6288141", "0.62836444", "0.6276841", "0.6273901", "0.62705326", "0.6260487", "0.6257069", "0.6256091", "0.6249921", "0.6246795", "0.6238071", "0.6238071", "0.6235751", "0.6232185", "0.621643", "0.62108886", "0.62100816", "0.62087905", "0.6201107", "0.6195766", "0.61919093", "0.619114", "0.61901665", "0.61900926", "0.61900777", "0.6181085", "0.61790156", "0.617649", "0.6172328", "0.6155779", "0.6149841", "0.61464775", "0.61436534", "0.61422116", "0.6137286", "0.6134989", "0.6132196" ]
0.0
-1
/ offset in seconds
public function setTimeZoneOffset( $offset ) { $this->timezone_offset = $offset; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOffset(){\r\n $t=time()+microtime()-$this->api->start_time;\r\n $res=$t-$this->offset;\r\n $this->offset=$t;\r\n return $res;\r\n }", "private function get_offset() {\n\t\treturn ( (time() - $this->skew) % ($this->lifetime + $this->skew) );\n\t}", "protected function interval_offset() {\n\t\t// Run two minutes later.\n\t\treturn 120;\n\t}", "function get_time_offset()\n {\n \t$r = 0;\n \t\n \t$r = ( (isset($this->member['time_offset']) AND $this->member['time_offset'] != \"\") ? $this->member['time_offset'] : $this->vars['time_offset'] ) * 3600;\n\t\t\t\n\t\tif ( $this->vars['time_adjust'] )\n\t\t{\n\t\t\t$r += ($this->vars['time_adjust'] * 60);\n\t\t}\n\t\t\n\t\tif ( isset($this->member['dst_in_use']) AND $this->member['dst_in_use'] )\n\t\t{\n\t\t\t$r += 3600;\n\t\t}\n \t\n \treturn $r;\n }", "function getOffset() {\n\t\treturn ((float) $this->_offset) / 3600.0;\n\t}", "public static function setTimeCorrectionOffset($offset = 0)\n\t{\n\t\tif ($offset == 0)\n\t\t{\n\t\t\t$rest = new S3Request('HEAD');\n\t\t\t$rest = $rest->getResponse();\n\t\t\t$awstime = $rest->headers['date'];\n\t\t\t$systime = time();\n\t\t\t$offset = $systime > $awstime ? -($systime - $awstime) : ($awstime - $systime);\n\t\t}\n\t\tself::$__timeOffset = $offset;\n\t}", "function getTimeOffset()\n {\n return $this->_props['TimeOffset'];\n }", "function get_offset_time($offset_str, $factor=1)\n {\n if (preg_match('/^([0-9]+)\\s*([smhdw])/i', $offset_str, $regs))\n {\n $amount = (int)$regs[1];\n $unit = strtolower($regs[2]);\n }\n else\n {\n $amount = (int)$offset_str;\n $unit = 's';\n }\n \n $ts = mktime();\n switch ($unit)\n {\n case 'w':\n $amount *= 7;\n case 'd':\n $amount *= 24;\n case 'h':\n $amount *= 60;\n case 'm':\n $amount *= 60;\n case 's':\n $ts += $amount * $factor;\n }\n\n return $ts;\n}", "public function offset()\n {\n if ($this->timezone) {\n return (new DateTime(Chronos::now()->format('Y-m-d H:i:s'), new DateTimeZone($this->timezone)))->getOffset() / 60 / 60;\n }\n\n return 0;\n }", "protected static function _offset( $ts, $dir=1 ) { return $ts + ( $dir * get_option( 'gmt_offset', 0 ) * HOUR_IN_SECONDS ); }", "function getTime($offset = 0, $format = 'H:i:s')\n {\n return date($format, strtotime($offset.' minutes'));\n }", "function getTime($offset){\n $hours = date('h');\n $minutes = (date('i') > 30) ? '30' : '00';\n $minutes = $minutes + $offset;\n if($minutes >= 60){\n $hours = $hours + (int)($minutes / 60);\n if($hours > 12)\n $hours -= 12;\n $minutes = $minutes % 60;\n }\n $minutes = ($minutes==0) ? '00' : $minutes;\n return \"$hours:$minutes\" . date('A');\n}", "function COM_NOW() {\r\n\t$now = new DateTime();\r\n\t$offset = $_SESSION[\"org_TZO\"] - $_SESSION[\"_SITE_CONF\"][\"TZO\"]; //offset from server to organization\r\n\tif ($offset == 0) return $now;\r\n\t$invert = 0;\r\n\tif ($offset < 0) {\r\n\t\t$offset = abs($offset);\r\n\t\t$invert = 1;\r\n\t}\r\n\t$format = \"PT\".$offset.\"H\";\r\n\t$interval = new DateInterval($format);\r\n\t$interval->invert = $invert;\r\n\t$now->add($interval);\r\n\treturn $now;\r\n}", "protected static function _timeToCake()\n {\n return TIME_START - $_SERVER['REQUEST_TIME_FLOAT'];\n }", "private function calculate_time_slot($offset) {\n\t\t$timeslot = floor( (time() - $offset) / ($this->lifetime + $this->skew) );\n\t\treturn $timeslot;\n\t}", "protected static function TimeDifference()\n\t{\n\t\t$ts=0;\n\t\t$ts -= date ( \"Z\" ) * 1;\n\t\t$daylight = date ( \"I\" );\n\t\t$daylight *= 1;\n\t\t$daylight *= 3600;\n\t\t$ts += $daylight; //12600 seconds 3:30+ GMT Tehran\n\t\t$ts += self::$GMTdelta;\n\t\treturn $ts;\n\t\t\n\t}", "function getUTCOffset($value, $timestamp = null)\n {\n if ($value === null) {\n return 0;\n } else {\n list($sign, $hours, $minutes) = sscanf($value, '%1s%2d%2d');\n return ($sign == '+' ? 1 : -1) * ($hours * 60 * 60) + ($minutes * 60);\n }\n }", "public function getDelayTime() {}", "public function timeMid();", "public function getUtcOffset(){\n $datetime = new DateTime('now', 'UTC');\n return parent::getOffset($datetime);\n }", "public static function normalizedTime() {\n\t\t$offset = 0;\n\t\ttry {\n\t\t\t$offset = wfWAF::getInstance()->getStorageEngine()->getConfig('timeoffset_ntp', false);\n\t\t\tif ($offset === false) {\n\t\t\t\t$offset = wfWAF::getInstance()->getStorageEngine()->getConfig('timeoffset_wf', false);\n\t\t\t\tif ($offset === false) { $offset = 0; }\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\t//Ignore\n\t\t}\n\t\treturn time() + $offset;\n\t}", "function setOffset($offset) {\n\t\t$this->_offset = 3600 * $offset;\n\t}", "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}", "public static function timeSinceStart(): float\n {\n return \\microtime(true) - self::getRequestTime();\n }", "public function getSeekTime() : int {\r\n\r\n return (int) $this->getMain()->getDatabase()->get(\"seek_time\", [\"table\" => \"Games\", \"name\" => $this->getName()])->fetchArray()[0];\r\n\r\n }", "function Now($seconds_to_add=0);", "public static function getTimestampOffset()\n {\n return self::$settings[1];\n }", "public static function timestamp() {}", "public static function setTimeCorrectionOffset($offset = 0)\n\t{\n\t\t// TODO: Implement setTimeCorrectionOffset() method.\n\t}", "public function getRelativeTime() : float\n {\n return ($this->timeStamp - static::$startTime);\n \n }", "protected static function _timeFromCakeToStopwatch(): float\n {\n return self::$_startupTime - TIME_START;\n }", "public function getTimezoneOffset()\n\t{\n\t\t$user_tz = date_default_timezone_get();\n\t\t$viewer = Engine_Api::_() -> user() -> getViewer();\n\t\tif ($viewer -> getIdentity())\n\t\t{\n\t\t\t$user_tz = $viewer -> timezone;\n\t\t}\n\t\t//user time zone\n\t\tdate_default_timezone_set($user_tz);\n\n\t\t$t1 = strtotime('2010-10-10 00:00:00');\n\t\tdate_default_timezone_set('UTC');\n\t\t$t2 = strtotime('2010-10-10 00:00:00');\n\t\treturn (int)(($t2 - $t1) / 3600);\n\t}", "public function currentTime();", "private function _upTime() \n {\n return microtime(true) - $this->_startTime;\n }", "function iabstract_time() {\n $gmt_offset_in_hours = +1; // for GMT-+1 (EDIT this value) \n return time() + $gmt_offset_in_hours * HOUR_IN_SECONDS; \n}", "public static function time_offset($t, $f = 'h:ma M. j Y T'){\n\t$o = time() - $t;\n\tswitch($o){\n\t\tcase($o <= 1): return \"just now\"; break;\n\t\tcase($o < 20): return $o . \" seconds ago\"; break;\n\t\tcase($o < 40): return \"half a minute ago\"; break;\n\t\tcase($o < 60): return \"less than a minute ago\"; break;\n\t\tcase($o <= 90): return \"1 minute ago\"; break;\n\t\tcase($o <= 59*60): return round($o / 60) . \" minutes ago\"; break;\n\t\tcase($o <= 60*60*1.5): return \"1 hour ago\"; break;\n\t\tcase($o <= 60*60*24): return round($o / 60 / 60) . \" hours ago\"; break;\n\t\tcase($o <= 60*60*24*1.5): return \"1 day ago\"; break;\n\t\tcase($o < 60*60*24*7): return round($o / 60 / 60 / 24) . \" days ago\"; break;\n\t\tcase($o <= 60*60*24*9): return \"1 week ago\"; break;\n\t\tdefault: return date($f, $t);\n\t}\n }", "function getOffset() ;", "function getTimezoneOffset() {\n\t\tglobal $wpdb;\n\t\t//calculate mysql timezone offset by converting MySQL's \n\t\t// NOW() to a timestamp and subtracting UTC current time\n\t\t// from it. Note: conversion to timestamp is affected by\n\t\t// PHP TZ setting, so remove that offset from calculation\n\t\t$tzoffset=false;\n\t\t$mysql_now = $wpdb->get_var(\"SELECT NOW() AS mysql_now\");\n\t\t$now = ((int)(time()/1800))*1800; //truncate to 1/2 hour\n\t\tif ($mysql_now!=\"\") {\n\t\t\tif (function_exists('date_timestamp_get')) {\n\t\t\t\t$mysql_dt = new DateTime($mysql_now);\n\t\t\t\t$mysql_time = $mysql_dt->getTimestamp();\n\t\t\t\t$adjust = $mysql_dt->getOffset();\n\t\t\t} else {\n\t\t\t\t$mysql_time = strtotime($mysql_now);\n\t\t\t\t$adjust = (int)date('Z');\n\t\t\t}\n\t\t\t$tzoffset = ((int)($mysql_time/1800))*1800 - $now;\n\t\t\tif (is_numeric($adjust)) $tzoffset += $adjust;\n\t\t}\n\t\treturn $tzoffset;\n\t}", "public function getDelay(): int;", "public function timeLowLow();", "protected function datetime($time, $utcOffset) {\n\t\treturn floor($time / 1000);// - floor($utcOffset / 1000); // - This is a wtf...\n\t}", "public function getGMTOffset();", "public function action_getTimeStamp()\n\t{\n\t\t$offset_sec = date(\"Z\"); // offset in seconds depends on timezone\n\t\t$curtime = time() + $offset_sec; // current time depends on timezone\n\t\t$this->response->body(json_encode(array(\"unix_timestamp\" => time(),\"offset\" => $offset_sec,\"curtime\" => $curtime)));\n\t}", "public function getCurrentTimeDifference($time_record, $unit = 'm');", "public function getCurrentTimeDifference($time_record, $unit = 'm');", "public static function milliseconds() {}", "function wp_timezone_override_offset()\n {\n }", "public function get_start_offset()\n {\n }", "protected static function _timeToStopwatch()\n {\n return self::$_startupTime - $_SERVER['REQUEST_TIME_FLOAT'];\n }", "public function getLapTime()\n {\n \n }", "function get_system_gmt_offset() {\n static $offset = null;\n\n if($offset === null) {\n $timezone_offset = ConfigOptions::getValue('time_timezone');\n $dst = ConfigOptions::getValue('time_dst');\n\n $offset = $dst ? $timezone_offset + 3600 : $timezone_offset;\n } // if\n\n return $offset;\n }", "public function getPresentationTimestamp() {}", "function getElapsedSeconds() {\n\t\treturn $this->time;\n\t}", "function date_tz_offset($timestamp, $from_tz, $to_tz='') {\n\tif($to_tz == '') $to_tz = $GLOBALS['env']['timezone'];\n\n\tif(function_exists('date_offset_get')) {\n\t\t$from_dtz = new DateTimeZone($from_tz);\n\t\t$to_dtz = new DateTimeZone($to_tz);\n\t\t$from_dt = new DateTime(app_date('Y-m-d H:i', $timestamp), $from_dtz);\n\t\t$to_dt = new DateTime('now', $to_dtz);\n\t\t$offset = $from_dtz->getOffset($from_dt) - $to_dtz->getOffset($to_dt);\n\t} else { // PHP version 4\n\t\t$timezone_offsets = array (\n\t\t\t'-43200' => ' Etc/GMT+12',\n\t\t\t'-39600' => ' Etc/GMT+11, MIT, Pacific/Apia, Pacific/Midway, Pacific/Niue, Pacific/Pago Pago, Pacific/Samoa, US/Samoa',\n\t\t\t'-36000' => ' -America/Adak, -America/Atka, Etc/GMT+10, HST, Pacific/Fakaofo, Pacific/Honolulu, Pacific/Johnston, Pacific/Rarotonga, Pacific/Tahiti, SystemV/HST10, -US/Aleutian, US/Hawaii',\n\t\t\t'-34200' => ' Pacific/Marquesas',\n\t\t\t'-32400' => ' -AST, -America/Anchorage, -America/Juneau, -America/Nome, -America/Yakutat, Etc/GMT+9, Pacific/Gambier, SystemV/YST9, -SystemV/YST9YDT, -US/Alaska',\n\t\t\t'-28800' => ' -America/Dawson, -America/Ensenada, -America/Los Angeles, -America/Tijuana, -America/Vancouver, -America/Whitehorse, -Canada/Pacific, -Canada/Yukon, Etc/GMT+8, -Mexico/BajaNorte, -PST, -PST8PDT, Pacific/Pitcairn, SystemV/PST8, -SystemV/PST8PDT, -US/Pacific, -US/Pacific-New',\n\t\t\t'-25200' => ' -America/Boise, -America/Cambridge Bay, -America/Chihuahua, America/Dawson Creek, -America/Denver, -America/Edmonton, America/Hermosillo, -America/Inuvik, -America/Mazatlan, America/Phoenix, -America/Shiprock, -America/Yellowknife, -Canada/Mountain, Etc/GMT+7, -MST, -MST7MDT, -Mexico/BajaSur, -Navajo, PNT, SystemV/MST7, -SystemV/MST7MDT, US/Arizona, -US/Mountain',\n\t\t\t'-21600' => ' America/Belize, -America/Cancun, -America/Chicago, America/Costa Rica, America/El Salvador, America/Guatemala, America/Managua, -America/Menominee, -America/Merida, America/Mexico City, -America/Monterrey, -America/North Dakota/Center, -America/Rainy River, -America/Rankin Inlet, America/Regina, America/Swift Current, America/Tegucigalpa, -America/Winnipeg, -CST, -CST6CDT, -Canada/Central, Canada/East-Saskatchewan, Canada/Saskatchewan, -Chile/EasterIsland, Etc/GMT+6, Mexico/General, -Pacific/Easter, Pacific/Galapagos, SystemV/CST6, -SystemV/CST6CDT, -US/Central',\n\t\t\t'-18000' => ' America/Bogota, America/Cayman, -America/Detroit, America/Eirunepe, America/Fort Wayne, -America/Grand Turk, America/Guayaquil, -America/Havana, America/Indiana/Indianapolis, America/Indiana/Knox, America/Indiana/Marengo, America/Indiana/Vevay, America/Indianapolis, -America/Iqaluit, America/Jamaica, -America/Kentucky/Louisville, -America/Kentucky/Monticello, America/Knox IN, America/Lima, -America/Louisville, -America/Montreal, -America/Nassau, -America/New York, -America/Nipigon, America/Panama, -America/Pangnirtung, America/Port-au-Prince, America/Porto Acre, America/Rio Branco, -America/Thunder Bay, Brazil/Acre, -Canada/Eastern, -Cuba, -EST, -EST5EDT, Etc/GMT+5, IET, Jamaica, SystemV/EST5, -SystemV/EST5EDT, US/East-Indiana, -US/Eastern, US/Indiana-Starke, -US/Michigan',\n\t\t\t'-14400' => ' America/Anguilla, America/Antigua, America/Aruba, -America/Asuncion, America/Barbados, America/Boa Vista, America/Caracas, -America/Cuiaba, America/Curacao, America/Dominica, -America/Glace Bay, -America/Goose Bay, America/Grenada, America/Guadeloupe, America/Guyana, -America/Halifax, America/La Paz, America/Manaus, America/Martinique, America/Montserrat, America/Port of Spain, America/Porto Velho, America/Puerto Rico, -America/Santiago, America/Santo Domingo, America/St Kitts, America/St Lucia, America/St Thomas, America/St Vincent, America/Thule, America/Tortola, America/Virgin, -Antarctica/Palmer, -Atlantic/Bermuda, -Atlantic/Stanley, Brazil/West, -Canada/Atlantic, -Chile/Continental, Etc/GMT+4, PRT, SystemV/AST4, -SystemV/AST4ADT',\n\t\t\t'-12600' => ' -America/St Johns, -CNT, -Canada/Newfoundland',\n\t\t\t'-10800' => ' AGT, -America/Araguaina, America/Belem, America/Buenos Aires, America/Catamarca, America/Cayenne, America/Cordoba, -America/Fortaleza, -America/Godthab, America/Jujuy, -America/Maceio, America/Mendoza, -America/Miquelon, America/Montevideo, America/Paramaribo, -America/Recife, America/Rosario, -America/Sao Paulo, -BET, -Brazil/East, Etc/GMT+3',\n\t\t\t '-7200' => ' America/Noronha, Atlantic/South Georgia, Brazil/DeNoronha, Etc/GMT+2',\n\t\t\t '-3600' => ' -America/Scoresbysund, -Atlantic/Azores, Atlantic/Cape Verde, Etc/GMT+1',\n\t\t\t '0' => ' Africa/Abidjan, Africa/Accra, Africa/Bamako, Africa/Banjul, Africa/Bissau, Africa/Casablanca, Africa/Conakry, Africa/Dakar, Africa/El Aaiun, Africa/Freetown, Africa/Lome, Africa/Monrovia, Africa/Nouakchott, Africa/Ouagadougou, Africa/Sao Tome, Africa/Timbuktu, America/Danmarkshavn, -Atlantic/Canary, -Atlantic/Faeroe, -Atlantic/Madeira, Atlantic/Reykjavik, Atlantic/St Helena, -Eire, Etc/GMT, Etc/GMT+0, Etc/GMT-0, Etc/GMT0, Etc/Greenwich, Etc/UCT, Etc/UTC, Etc/Universal, Etc/Zulu, -Europe/Belfast, -Europe/Dublin, -Europe/Lisbon, -Europe/London, -GB, -GB-Eire, GMT, GMT0, Greenwich, Iceland, -Portugal, UCT, UTC, Universal, -WET, Zulu',\n\t\t\t '3600' => ' Africa/Algiers, Africa/Bangui, Africa/Brazzaville, -Africa/Ceuta, Africa/Douala, Africa/Kinshasa, Africa/Lagos, Africa/Libreville, Africa/Luanda, Africa/Malabo, Africa/Ndjamena, Africa/Niamey, Africa/Porto-Novo, Africa/Tunis, -Africa/Windhoek, -Arctic/Longyearbyen, -Atlantic/Jan Mayen, -CET, -ECT, Etc/GMT-1, -Europe/Amsterdam, -Europe/Andorra, -Europe/Belgrade, -Europe/Berlin, -Europe/Bratislava, -Europe/Brussels, -Europe/Budapest, -Europe/Copenhagen, -Europe/Gibraltar, -Europe/Ljubljana, -Europe/Luxembourg, -Europe/Madrid, -Europe/Malta, -Europe/Monaco, -Europe/Oslo, -Europe/Paris, -Europe/Prague, -Europe/Rome, -Europe/San Marino, -Europe/Sarajevo, -Europe/Skopje, -Europe/Stockholm, -Europe/Tirane, -Europe/Vaduz, -Europe/Vatican, -Europe/Vienna, -Europe/Warsaw, -Europe/Zagreb, -Europe/Zurich, -MET, -Poland',\n\t\t\t '7200' => ' -ART, Africa/Blantyre, Africa/Bujumbura, -Africa/Cairo, Africa/Gaborone, Africa/Harare, Africa/Johannesburg, Africa/Kigali, Africa/Lubumbashi, Africa/Lusaka, Africa/Maputo, Africa/Maseru, Africa/Mbabane, Africa/Tripoli, -Asia/Amman, -Asia/Beirut, -Asia/Damascus, -Asia/Gaza, -Asia/Istanbul, -Asia/Jerusalem, -Asia/Nicosia, -Asia/Tel Aviv, CAT, -EET, -Egypt, Etc/GMT-2, -Europe/Athens, -Europe/Bucharest, -Europe/Chisinau, -Europe/Helsinki, -Europe/Istanbul, -Europe/Kaliningrad, -Europe/Kiev, -Europe/Minsk, -Europe/Nicosia, -Europe/Riga, -Europe/Simferopol, -Europe/Sofia, Europe/Tallinn, -Europe/Tiraspol, -Europe/Uzhgorod, Europe/Vilnius, -Europe/Zaporozhye, -Israel, Libya, -Turkey',\n\t\t\t '10800' => ' Africa/Addis Ababa, Africa/Asmera, Africa/Dar es Salaam, Africa/Djibouti, Africa/Kampala, Africa/Khartoum, Africa/Mogadishu, Africa/Nairobi, Antarctica/Syowa, Asia/Aden, -Asia/Baghdad, Asia/Bahrain, Asia/Kuwait, Asia/Qatar, Asia/Riyadh, EAT, Etc/GMT-3, -Europe/Moscow, Indian/Antananarivo, Indian/Comoro, Indian/Mayotte, -W-SU',\n\t\t\t '11224' => ' Asia/Riyadh87, Asia/Riyadh88, Asia/Riyadh89, Mideast/Riyadh87, Mideast/Riyadh88, Mideast/Riyadh89',\n\t\t\t '12600' => ' -Asia/Tehran, -Iran',\n\t\t\t '14400' => ' -Asia/Aqtau, -Asia/Baku, Asia/Dubai, Asia/Muscat, -Asia/Tbilisi, -Asia/Yerevan, Etc/GMT-4, -Europe/Samara, Indian/Mahe, Indian/Mauritius, Indian/Reunion, -NET',\n\t\t\t '16200' => ' Asia/Kabul',\n\t\t\t '18000' => ' -Asia/Aqtobe, Asia/Ashgabat, Asia/Ashkhabad, -Asia/Bishkek, Asia/Dushanbe, Asia/Karachi, Asia/Samarkand, Asia/Tashkent, -Asia/Yekaterinburg, Etc/GMT-5, Indian/Kerguelen, Indian/Maldives, PLT',\n\t\t\t '19800' => ' Asia/Calcutta, IST',\n\t\t\t '20700' => ' Asia/Katmandu',\n\t\t\t '21600' => ' Antarctica/Mawson, Antarctica/Vostok, -Asia/Almaty, Asia/Colombo, Asia/Dacca, Asia/Dhaka, -Asia/Novosibirsk, -Asia/Omsk, Asia/Thimbu, Asia/Thimphu, BST, Etc/GMT-6, Indian/Chagos',\n\t\t\t '23400' => ' Asia/Rangoon, Indian/Cocos',\n\t\t\t '25200' => ' Antarctica/Davis, Asia/Bangkok, Asia/Hovd, Asia/Jakarta, -Asia/Krasnoyarsk, Asia/Phnom Penh, Asia/Pontianak, Asia/Saigon, Asia/Vientiane, Etc/GMT-7, Indian/Christmas, VST',\n\t\t\t '28800' => ' Antarctica/Casey, Asia/Brunei, Asia/Chongqing, Asia/Chungking, Asia/Harbin, Asia/Hong Kong, -Asia/Irkutsk, Asia/Kashgar, Asia/Kuala Lumpur, Asia/Kuching, Asia/Macao, Asia/Manila, Asia/Shanghai, Asia/Singapore, Asia/Taipei, Asia/Ujung Pandang, Asia/Ulaanbaatar, Asia/Ulan Bator, Asia/Urumqi, Australia/Perth, Australia/West, CTT, Etc/GMT-8, Hongkong, PRC, Singapore',\n\t\t\t '32400' => ' Asia/Choibalsan, Asia/Dili, Asia/Jayapura, Asia/Pyongyang, Asia/Seoul, Asia/Tokyo, -Asia/Yakutsk, Etc/GMT-9, JST, Japan, Pacific/Palau, ROK',\n\t\t\t '34200' => ' ACT, -Australia/Adelaide, -Australia/Broken Hill, Australia/Darwin, Australia/North, -Australia/South, -Australia/Yancowinna',\n\t\t\t '36000' => ' -AET, Antarctica/DumontDUrville, -Asia/Sakhalin, -Asia/Vladivostok, -Australia/ACT, Australia/Brisbane, -Australia/Canberra, -Australia/Hobart, Australia/Lindeman, -Australia/Melbourne, -Australia/NSW, Australia/Queensland, -Australia/Sydney, -Australia/Tasmania, -Australia/Victoria, Etc/GMT-10, Pacific/Guam, Pacific/Port Moresby, Pacific/Saipan, Pacific/Truk, Pacific/Yap',\n\t\t\t '37800' => ' -Australia/LHI, -Australia/Lord Howe',\n\t\t\t '39600' => ' -Asia/Magadan, Etc/GMT-11, Pacific/Efate, Pacific/Guadalcanal, Pacific/Kosrae, Pacific/Noumea, Pacific/Ponape, SST',\n\t\t\t '41400' => ' Pacific/Norfolk',\n\t\t\t '43200' => ' -Antarctica/McMurdo, -Antarctica/South Pole, -Asia/Anadyr, -Asia/Kamchatka, Etc/GMT-12, Kwajalein, -NST, -NZ, -Pacific/Auckland, Pacific/Fiji, Pacific/Funafuti, Pacific/Kwajalein, Pacific/Majuro, Pacific/Nauru, Pacific/Tarawa, Pacific/Wake, Pacific/Wallis',\n\t\t\t '45900' => ' -NZ-CHAT, -Pacific/Chatham',\n\t\t\t '46800' => ' Etc/GMT-13, Pacific/Enderbury, Pacific/Tongatapu',\n\t\t\t '50400' => ' Etc/GMT-14, Pacific/Kiritimati, null, localize/timezone'\n\t\t);\n\n\t\t$from_offset = 0;\n\t\t$to_offset = 0;\n\t\tforeach($timezone_offsets as $offset => $zones) {\n\n\t\t\tif($from_tz != '') {\n\t\t\t\tif(strpos(strtolower($zones), strtolower($from_tz)) !== false) $from_offset = $offset;\n\t\t\t}\n\n\t\t\tif($to_tz != '') {\n\t\t\t\tif(strpos(strtolower($zones), strtolower($to_tz)) !== false) $to_offset = $offset;\n\t\t\t}\n\t\t}\n\n\t\t$old_tz = @ini_get('date.timezone');\n\t\tif($old_tz == '') $old_tz = $GLOBALS['env']['timezone'];\n\t\t@ini_set('date.timezone', $from_tz);\n\t\t@putenv('TZ='.$from_tz);\n\n\t\tif(app_date('I', $timestamp)) $from_offset += 3600;\n\n\t\t@ini_set('date.timezone', $old_tz);\n\t\t@putenv('TZ='.$old_tz);\n\n\t\t$offset = ($from_offset - $to_offset);\n\t}\n\n\treturn $offset;\n}", "public function aim_onlinetime()\r\n\t{\r\n\t\t$s = time() - $this->core->user['timer'];\r\n\t\t$d = intval($s / 86400);\r\n\t\t$s -= $d * 86400;\r\n\t\t$h = intval($s / 3600);\r\n\t\t$s -= $h * 3600;\r\n\t\t$m = intval($s / 60);\r\n\t\t$s -= $m * 60;\r\n\t\treturn array('days' => $d, 'hours' => $h, 'mins' => $m, 'secs' => $s);\r\n\t}", "public function pretransfertime() {\n return $this->info['pretransfer_time'];\n }", "function getStartMicrotime();", "function timestamp()\n {\n return microtime(true);\n }", "function process_time(){\n $time = number_format( microtime(true) - LIM_START_MICROTIME, 6);\n return($time);\n}", "public function getElapsedTime();", "public function getTime($name) {\n $start = $this->marks[$name]['start'];\n $end = $this->marks[$name]['end'];\n return $end - $start;\n }", "public function getPace() {\n\t\t$distance = $this->_distance;\n\t\t$time = $this->_time;\n\n\t\t$segments = explode(':',$time);\n\t\t$length = count($segments);\n\t\tswitch ($length) {\n\t\t\tcase 3:\n\t\t\t\t$seconds = $segments[0] * 3600 + $segments[1] * 60 + $segments[2];\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$seconds = $segments[0] * 60 + $segments[1];\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$seconds = 0;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ($seconds != 0) {\n\t\t\t$minutes = floor($seconds / $distance / 60);\n\t\t\t$seconds = sprintf('%02d',round(($seconds / $distance / 60 - $minutes) * 60));\n\t\t\t$pace = $minutes.\":\".$seconds;\n\t\t} else {\n\t\t\t$pace = \"--\";\n\t\t}\t\t\n\t\t\n\t\treturn $pace;\n\t}", "private function getGMTOffset() {\n $utcOffset = get_option('gmt_offset', null);\n return $utcOffset != null ? ($utcOffset * 60 * 60) : 0;\n }", "function getTimeDuration();", "private function getTimeCorrection(): int\n\t{\n\t\treturn config('curl-connection.' . $this->service . '.time_correction');\n\t}", "static function ts(){\r\n $dt = microtime(true) - self::$starttime;\r\n return self::mtformat($dt);\r\n }", "function gmt_time() {\r\n\t\t$now = time ();\r\n\t\t$tz = $this->gmt_timezone ();\r\n\t\t$seconds = 3600 * $tz;\r\n\t\treturn $now - $seconds;\r\n\t}", "function setTimeOffset($value)\n {\n $this->_props['TimeOffset'] = $value;\n }", "function getTime(){\n\t\t$mtime = microtime();//print(\"\\n time : \" . $mtime);\n\t\t$mtime = explode(' ', $mtime);\n\t\t$mtime = $mtime[1] + $mtime[0];\n\t\treturn $mtime;\n\t}", "function GetuTime()\n{\n\tlist($uSec, $Sec)=explode(\" \", microtime()); \n\treturn((float)$uSec+(float)$Sec); \n}", "public function getYoungVClock() {}", "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}", "public function time()\n\t{\n\t\treturn $this->endTimer-$this->startTimer;\n\t}", "function now() {\n return microtime(true)*1000;\n}", "public function getUserIdleSeconds()\n {\n try\n {\n $luats = $this->getInstanceUserActionTimestamp();\n $now = time();\n $diff = $now - $luats;\n return $diff;\n } catch (\\Exception $ex) {\n throw $ex;\n }\n }", "function getLifeTime();", "public function getStartTimeOffset()\n {\n return $this->start_time_offset;\n }", "public function getTimeout(): float\n {\n }", "function elapsed($event) {\n $endTime = Timer::getMicroTime();\n if (Timer::isStopped($event)) {\n $endTime = Timer::getEndTime($event);\n }\n return round($endTime - Timer::getStartTime($event), 4);\n }", "public static function setTimestampOffset($value)\n {\n self::$settings[1] = +$value;\n }", "public function time_delta($in, $out)\n\t\t{\n\t\t\t$in = new DateTime($in);\n\t\t\t$out = new DateTime($out);\n\n\t\t\tif($in > $out) return -1;\n\n\t\t\t$delta = $in->diff($out);\n\n\t\t\t$seconds = $delta->days * 86400;\n\t\t\t$seconds += $delta->h * 3600;\n\t\t\t$seconds += $delta->i * 60;\n\t\t\t$seconds += $delta->s;\n\n\t\t\treturn $seconds;\n\t\t}", "public function get_duration();", "function mOFFSET(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$OFFSET;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:191:3: ( 'offset' ) \n // Tokenizer11.g:192:3: 'offset' \n {\n $this->matchString(\"offset\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public function howLongToCacheInSeconds(){\n return(12000); //200 minutes\n }", "public function tsDelta() { return $this->_m_tsDelta; }", "public function timestamp();", "function setTimezoneOffset($offset=null){\r\n\t\tif(!empty($offset)){\r\n\t\t\t$this->timezone_offset = $offset;\r\n\t\t}\r\n\t\telse if(!empty($_SESSION['timezone_offset'])){\r\n\t\t\t$this->timezone_offset = $_SESSION['timezone_offset'];\r\n\t\t}\r\n\t\telse{\r\n\t\t\t// don't set any offset \r\n\t\t\t// default is server time\r\n\t\t}\r\n\t}", "public function getUseSeconds()\n {\n return $this->use_seconds;\n }", "function _get_time()\n{\n $_mtime = microtime();\n $_mtime = explode(\" \", $_mtime);\n\n return (double) ($_mtime[1]) + (double) ($_mtime[0]);\n}", "function getQueryTime($time_start,$time_end) {\n\t\treturn round($time_end - $time_start,4).'sec';\n\t}", "function timeSince ( $timestamp ) {\r\n\r\n\t$diff = time() - $timestamp;\r\n\r\n\tif ( $diff < 4000 ) {\r\n\t\t$diff = ceil ( $diff / 60 );\r\n\t\t$unit = \"minute\";\r\n\r\n\t} elseif ( $diff < 100000 ) {\r\n\t\t$diff = ceil ( $diff / 3600 );\r\n\t\t$unit = \"hour\";\r\n\r\n\t} else {\r\n\t\t$diff = ceil ( $diff / 86400 );\r\n\t\t$unit = \"day\";\r\n\t}\r\n\r\n\t$end = ( $diff <= 1 ) ? NULL : \"s\";\r\n\r\n\treturn \"$diff $unit$end ago\";\r\n\r\n}", "public function getUseTime() \n \t{\n \t\treturn $this->use_time;\n \t}", "function elapsedSeconds() {\n if (null === $this->startMicrotime) {\n throw new InvalidArgumentException(\"Start time was not marked\");\n }\n if (null === $this->endMicrotime) {\n // Not stopped so return time from start to now\n return microtime(true) - $this->startMicrotime;\n }\n // Stopped so show total elapsed time between start and stop\n return $this->endMicrotime - $this->startMicrotime;\n }", "function formatTimezoneOffset($offset=false) {\n\t\t$tzoffset = false;\n\t\tif (preg_match('/^[\\-+]?[0-9\\.]+$/',$offset)>0) { //must be a number\n\t\t\t//convert seconds to hours:min\n\t\t\t$n=false;\n\t\t\tif ($offset > 12 || $offset < -12) {\n\t\t\t\t$noffset = $offset/3600;\n\t\t\t} else {\n\t\t\t\t$noffset = $offset;\n\t\t\t}\n\t\t\t$n = strpos($noffset,'.');\n\t\t\tif ($n !== false) {\n\t\t\t\t$offset_hrs = substr($noffset,0,$n);\n\t\t\t\t$offset_min = (int)substr($noffset,$n+1)*6;\n\t\t\t} else {\n\t\t\t\t$offset_hrs = $noffset;\n\t\t\t\t$offset_min = 0;\n\t\t\t}\n\t\t\tif ($offset < 0) {\n\t\t\t\t$tzoffset = sprintf(\"%d:%02d\",$offset_hrs, $offset_min);\n\t\t\t} else {\n\t\t\t\t$tzoffset = \"+\".sprintf(\"%d:%02d\",$offset_hrs, $offset_min);\n\t\t\t}\n\t\t} elseif (preg_match('/^([\\-+])?(\\d{1,2})?\\:(\\d{2})/',$offset,$match)>0) {\n\t\t\tif (empty($match[2])) $match[2] = \"0\";\n\t\t\tif (!empty($match[1]) && $match[1]==\"-\") {\n\t\t\t\t$tzoffset = \"-\".sprintf(\"%d:%02d\",$match[2], $match[3]);\n\t\t\t} else {\n\t\t\t\t$tzoffset = \"+\".sprintf(\"%d:%02d\",$match[2], $match[3]);\n\t\t\t}\n\t\t}\n\t\treturn $tzoffset;\n\t}", "public static function getTimer()\n {\n return microtime(true) - $_SERVER[\"REQUEST_TIME_FLOAT\"];\n }", "protected function nowInMilliseconds(): int\n {\n $mt = explode(' ', microtime());\n return ((int) $mt[1]) * 1000 + ((int) round((int) $mt[0] * 1000));\n }", "public function getDuration() {}", "public function timeLowHi();", "public function getAttributes_price_factor_onetime_offset() {\n\t\treturn $this->attributes_price_factor_onetime_offset;\n\t}", "private function tick() {\r\n\t\treturn ceil( time() / 43200 );\r\n\t}", "function secondsAfterNow($time, $timezone) {\n if (empty($time)) {\n\t return null;\n }\n\n // save old timezone\n\t$oldtimezone = date_default_timezone_get();\n\tdate_default_timezone_set($timezone);\n\t$result = strtotime($time) - time();\n\n\t// reset to old timezone\n\tdate_default_timezone_set($oldtimezone);\n\n\treturn $result;\n }" ]
[ "0.72530854", "0.69455636", "0.6932639", "0.69000256", "0.68429065", "0.663119", "0.6627468", "0.6375547", "0.63315636", "0.63138664", "0.61983657", "0.6099405", "0.60966396", "0.60865575", "0.60449415", "0.60341126", "0.60165346", "0.5903255", "0.58942294", "0.58442086", "0.58400404", "0.58111984", "0.5801304", "0.57957476", "0.57944906", "0.5788449", "0.5773687", "0.57278246", "0.57264566", "0.5687984", "0.5686572", "0.5683917", "0.5667631", "0.5647878", "0.56420887", "0.563861", "0.56269544", "0.5624428", "0.56121886", "0.56107503", "0.56030405", "0.5583922", "0.5577124", "0.557112", "0.557112", "0.5564501", "0.5535404", "0.5531489", "0.55291146", "0.5527709", "0.5522048", "0.5515563", "0.54979223", "0.5469034", "0.5463636", "0.54576486", "0.5457494", "0.5440861", "0.5437938", "0.5437853", "0.54366255", "0.5433592", "0.5430036", "0.54264134", "0.54252046", "0.541871", "0.54122144", "0.5409642", "0.54048514", "0.54028153", "0.5402145", "0.5394253", "0.53894496", "0.53842765", "0.53676146", "0.53641367", "0.53601503", "0.53572184", "0.53484833", "0.53476024", "0.5340927", "0.53127414", "0.529964", "0.52968717", "0.52932864", "0.5291445", "0.52884144", "0.5286064", "0.5283511", "0.5281656", "0.5278892", "0.52769583", "0.5269248", "0.526276", "0.52624625", "0.5261191", "0.52546054", "0.524561", "0.52397954", "0.5238115", "0.5237792" ]
0.0
-1
Add and edit function in one method
public function save($id = null) { if(empty($id)){ if ($this->request->is('post')) { $this->Supplier->create(); if ($this->Supplier->saveAssociated($this->request->data)) { //Magic saveAssociated function $this->Flash->success(__('Service Supplier has been saved.')); return $this->redirect(array('action' => 'index')); } else { $this->Flash->error(__(' could not be saved.')); } }else{ $this->request->data['Article']['unit_id'] = 12; $this->request->data['Article']['type_id'] = 11; } // Fetch Types from table $types = $this->Supplier->Article->Type->find('list'); $this->set(compact('types')); } // Edit if(!empty($id)){ if (!$this->Supplier->exists($id)) { throw new NotFoundException(__('Invalid ')); } $this->Supplier->id = $id; //key for updating refers to id ! if ($this->request->is(array('post', 'put'))) { if ($this->Supplier->Article->save($this->request->data) && $this->Supplier->save($this->request->data)) { $this->Flash->success(__(' Service Supplier has been edited.')); return $this->redirect(array('action' => 'index')); } else { $this->Flash->error(__('This could not be saved.')); } } else { $options = array('conditions' => array('Supplier.' . $this->Supplier->primaryKey => $id)); $this->request->data = $this->Supplier->find('first', $options); } } // Set status and rating $this->set('status', $this->Supplier->status); $this->set('rating', $this->Supplier->rating); //Set type and Unit $listTypes = $this->Supplier->Article->Type->find('list'); $this->set('listTypes', $listTypes); $listUnits = $this->Supplier->Article->Unit->find('list'); $this->set('listUnits',$listUnits); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add(){\n $this->edit();\n }", "public function edit() {\n\t\t\t\n\t\t}", "public function edit()\n\t{\n\t\t//\n\t}", "public function edit()\n\t{\n\t\t\n\t}", "public function edit( )\r\n {\r\n //\r\n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit()\n {\n \n }", "protected function editar()\n {\n }", "public function editar()\n {\n }", "public function edit()\n {\n }", "public function edit()\n {\n }", "public function edit()\n {\n }", "public function edit() {\n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit()\n {\n //\n }", "public function edit()\n { \n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n \n \n }", "public function edit()\n { }", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function edit() {\n\n }", "public function Edit()\n\t{\n\t\t\n\t}", "public function editAction() {}", "public function showEdit()\n {\n\n }", "public function edit_toko(){\n\t}", "public function getEdit()\n\t{\n\t}", "public function editAction()\r\n {\r\n }", "public function modify();", "abstract function allowEditAction();", "function add()\n\t{\n\t\t$this->_updatedata();\n\t}", "function account_edit()\n {\n }", "abstract protected function renderEdit();", "public function annimalEditAction()\n {\n }", "function insert()\n\t{\n\t\t$this->edit(true);\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}", "public function edit(FunFacts $funFacts)\n {\n //\n }", "public function edit(fonctions $fonctions)\n {\n //\n }", "function add() {\n }", "public function _addOrEdit() {\n\t\tif($this->getRequest()->getParam('id')) { return true; } else { return false; }\n\t}", "public function add_edit_form(){\n\n $_id = $_GET['id']; \n $tblName = $this->get_tbl_name();\n\n $source = DB::table($tblName)->where('id',$_id)->get();\n\n $source_first = $source[0];\n\n // mhtml::dump($source_first);\n\n\n $struct = $this->struct;\n\n mhtml::startForm(\"edit\",\"backend_edit.php\");\n\n // loop througth fields\n foreach ($this->edit as $key => $field) {\n\n $kind = $struct[$field] ;\n if($kind == 'string') {$kind = 'text' ;} \n $value = $source_first[$field];\n\n mhtml::field($this->virtual_names[$field],$field,$kind,$value);\n\n }\n\n // add secret field for password\n if(isset($this->edit_secret)){\n if($this->edit_secret == true ){\n\n Logger::warn(\"we use one secret only on secret[0] in secret array in model\");\n $virtual_pass = $this->virtual_names[$this->secret[0]];\n mhtml::field($virtual_pass,$this->secret[0],'password');\n\n }\n }\n\n \n\n\n\n\n // mhtml::field('user name ','user_name','text',\"mohammed\");\n // mhtml::field('passwording','password','password');\n // mhtml::field('age','age','number');\n\n mhtml::field_id_model();\n\n mhtml::submitForm();\n\n mhtml::endForm();\n\n }", "public function edit($id)\n\t{\t\t\n\n\t}", "public function edit($obj) {\n\t}", "public function edit(Python $python)\n {\n //\n }", "public function add()\n\t{\n\t\t$fake_id = $this->_get_id_cur();\n\t\t$form = array();\n\t\t$form['view'] = 'form';\n\t\t$form['validation']['params'] = $this->_get_params();\n\t\t$form['submit'] = function()use ($fake_id)\n\t\t{\n\t\t\t$data = $this->_get_inputs();\n\t\t\t$data['sort_order'] = $this->_model()->get_total() + 1;\n\t\t\t$id = 0;\n\t\t\t$this->_model()->create($data,$id);\n\t\t\t// Cap nhat lai table_id table file\n\t\t\tmodel('file')->update_table_id_of_mod($this->_get_mod(), $fake_id, $id);\n\t\t\tfake_id_del($this->_get_mod());\n\n\t\t\tset_message(lang('notice_add_success'));\n\t\t\t\n\t\t\treturn admin_url($this->_get_mod());\n\t\t};\n\t\t$form['form'] = function() use ($fake_id)\n\t\t{\n\t\t\t$this->_create_view_data($fake_id);\n\n\t\t\t$this->_display('form');\n\t\t};\n\t\t$this->_form($form);\n\t}", "protected function canEdit() {}", "public function edit($id) {\n\t\t\n\t}", "public function hook_after_edit($id) {\n\t //Your code here \n\n\t }", "public function hook_after_edit($id) {\n\t //Your code here \n\n\t }", "public function edit(Studentadd $studentadd)\n {\n //\n }", "public function editar()\n {\n\t\tif($this->_Method == \"POST\")\n\t\t{\n\t\t\t$this->editar_post();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->editar_get();\n\t\t}\n }", "public function hook_after_edit($id) {\n\n }", "function add()\n\t{\n\t\t$data[\"title\"] = _e(\"Permission Modify\");\t\n\t\t$CFG = $this->config->item('permission_modify_configure');\n\t\t## for check admin or not\t##\t\n\t\t$data[\"response\"] = addPermissionMsg( $CFG[\"sector\"][\"add\"] );\n\t\t\t\t\t\n\t\t## Other auxilary variable ##\n\t\t$data['var'] = array();\t\t\t\t\n\t\t$data[\"top\"] = $this->template->admin_view(\"top\", $data, true, \"permission_modify\");\t\n\t\t$data[\"content\"] = $this->template->admin_view(\"permission_modify_add\", $data, true, \"permission_modify\");\n\t\t$this->template->build_admin_output($data);\n\t}", "public function edit($id)\n\t{\n\t\t\n\t}", "public function edit($id)\n\t{\n\t\t\n\t}", "public function edit($id){\n\t\t//\n\t}", "public function edit($id){\n\t\t//\n\t}", "public function edit($id)\n {\n\t\t\n \n }", "public function edit($id)\t{\n\t\t//\n\t}", "public function edit($id)\n\t{\n\n\t}", "public function edit($id)\n\t{\n\n\t}", "public function edit($id)\n\t{\n\n\t}", "public function edit($id)\n\t{\n\n\t}", "public function edit($id)\n\t{\n\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public function edit($id) {\n\t\t//\n\t}", "public\n function edit($id)\n {\n //\n }", "public\n function edit($id)\n {\n //\n }", "public\n function edit($id)\n {\n //\n }", "public\n function edit($id)\n {\n //\n }", "function OnAfterEdit(){\n }", "public function Editar(){\n \n // Istancia a classe \"Funcionario\" do arquivo \"funcionario_class\".\n $funcionario = new Funcionario();\n $endereco = new Endereco();\n \n // Pega o id do registro e os demais dados para fazer uma atualização do mesmo.\n // Variáevis do funcionário.\n $funcionario->idFuncionario = $_GET['id'];\n $funcionario->nome = $_POST['txt_nome'];\n $funcionario->sobrenome = $_POST['txt_sobrenome'];\n $funcionario->rg = $_POST['txt_rg'];\n $funcionario->cpf = $_POST['txt_cpf'];\n $funcionario->usuario = $_POST['txt_usuario'];\n $funcionario->senha = $_POST['txt_senha'];\n $funcionario->idNivelFuncionario = $_POST['cbx_nivelFuncionario'];\n $funcionario->idEndereco = $_GET['idEnd'];\n // Variáveis do endereço do funcionário.\n $endereco->bairro = $_POST['txt_bairro'];\n $endereco->logradouro = $_POST['txt_logradouro'];\n $endereco->cep = $_POST['txt_cep'];\n $endereco->cidade = $_POST['cbx_cidade'];\n $endereco->idEndereco = $_GET['idEnd'];\n \n // Chama o metodo para atualizar o endereço do funcionário.\n $sucess = $endereco::Update($endereco);\n \n // Chama o metodo para atualizar o funcionário apenas se a atualização do endereço dele foi bem sucedida.\n if($sucess == 1){\n $funcionario::Update($funcionario);\n }\n \n }", "public function edit($id)\n\t {\n\t //\n\t }", "protected function _save_add_edit() {\n\t\t\t$this->Dossierpcg66->begin();\n\n\t\t\tif ( !Hash::get($this->request->data, 'Dossierpcg66.etatdossierpcg') ) {\n\t\t\t\t$this->request->data['Dossierpcg66']['etatdossierpcg'] = 'attaffect';\n\t\t\t}\n\n\t\t\t$saved = $this->Dossierpcg66->saveAll( $this->request->data, array( 'validate' => 'first', 'atomic' => false ) );\n\t\t\t$etatdossierpcg = Hash::get($this->viewVars, 'dossierpcg66.Dossierpcg66.etatdossierpcg');\n\t\t\t$etatFinal = in_array( $etatdossierpcg, array( 'annule', 'traite', 'decisionvalid', 'transmisop' ) );\n\t\t\t$id = $saved ? $this->Dossierpcg66->id : Hash::get($this->viewVars, 'dossierpcg66.Dossierpcg66.id');\n\t\t\t$decisiondefautinsertionep66_id = Hash::get(\n\t\t\t\t$this->viewVars, 'dossierpcg66.Dossierpcg66.decisiondefautinsertionep66_id'\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * INFO : Passe l'etat d'une EP Audition transformé en EP Parcours\n\t\t\t * en \"traité\" si EP Parcours n'est pas traité alors que le Dossierpcg est validé.\n\t\t\t * En pratique ça n'arrive jamais et je ne comprend pas l'utilité de ce processus...\n\t\t\t * Ne semble pas avoir de conséquences.\n\t\t\t */\n\t\t\tif ( $saved && $etatFinal && $decisiondefautinsertionep66_id ) {\n\t\t\t\t$saved = $this->Dossierpcg66->WebrsaDossierpcg66->updateEtatPassagecommissionep( $decisiondefautinsertionep66_id );\n\t\t\t}\n\n\t\t\tif( $saved && $this->_saveFichiers($id) ) {\n\t\t\t\t$this->Dossierpcg66->commit();\n\t\t\t\t$this->Jetons2->release( $this->viewVars['dossier_id'] );\n\t\t\t\t$this->Session->setFlash( 'Enregistrement effectué', 'flash/success' );\n\t\t\t\t$this->redirect( array( 'controller' => 'dossierspcgs66','action' => 'index', $this->viewVars['foyer_id'] ) );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$id && $this->set('fichiers', $this->Fileuploader->fichiers( $id ));\n\t\t\t\t$this->Dossierpcg66->rollback();\n\t\t\t\t$this->Session->setFlash( 'Erreur lors de l\\'enregistrement', 'flash/error' );\n\t\t\t}\n\t\t}", "protected function add() {\n\t}", "public function modify(){\n //la route FormulaireModify\n }", "public function edit($id) //修改\n {\n\t\t//\n }" ]
[ "0.76721567", "0.7498406", "0.73867285", "0.73668563", "0.7321171", "0.7305307", "0.7305307", "0.72514564", "0.7241225", "0.7174917", "0.7166391", "0.7166391", "0.7166391", "0.71651834", "0.7154125", "0.7154125", "0.7154125", "0.7153819", "0.71444356", "0.713599", "0.713599", "0.713599", "0.713599", "0.713599", "0.713599", "0.713599", "0.713599", "0.713599", "0.713599", "0.713599", "0.713599", "0.70877904", "0.7069361", "0.70624685", "0.70624685", "0.70624685", "0.70624685", "0.70438695", "0.6987289", "0.67424995", "0.6651959", "0.6623519", "0.6495522", "0.64590573", "0.64452654", "0.6431557", "0.6373869", "0.6373745", "0.6365816", "0.6355356", "0.63403785", "0.6314779", "0.63048786", "0.6288958", "0.6239808", "0.6234988", "0.62186295", "0.61978775", "0.6173668", "0.61679167", "0.6147916", "0.6142267", "0.61378115", "0.61185944", "0.61185944", "0.61142856", "0.6110527", "0.6103951", "0.61030775", "0.60939026", "0.60939026", "0.60926574", "0.60926574", "0.6092169", "0.60915416", "0.6065614", "0.6065614", "0.6065614", "0.6065614", "0.6065614", "0.60568076", "0.60568076", "0.60568076", "0.60568076", "0.60568076", "0.60568076", "0.60568076", "0.60568076", "0.60568076", "0.60568076", "0.6052659", "0.6052659", "0.6052659", "0.6052659", "0.60465086", "0.60436887", "0.60427254", "0.6027869", "0.6026621", "0.60216963", "0.60176814" ]
0.0
-1
Example middleware invokable class
public function __invoke(Request $request, Response $response, $next) { $route = $request->getAttribute('route'); $session = $this->container->session; $user_id = $session->getVar('userid', 0); if (!$this->hasAccess($route, $user_id)) { $router = $this->container->router; //return $response->withStatus(403); return $response->withRedirect($router->pathFor('front-index')); } $response = $next($request, $response); return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get(): Middleware;", "public function getMiddleware();", "public function middleware()\n {\n // TODO: Implement middleware() method.\n }", "private static function middleware()\n {\n $files = ['Filters', 'Middleware'];\n $folder = static::$root.'Http/Middleware'.'/';\n\n self::call($files, $folder);\n\n $files = ['MiddlewareNotFoundException', 'MiddlewareWallException'];\n $folder = static::$root.'Http/Middleware/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function middleware($middleware, array $options = []);", "public function middlewares()\n {\n }", "public function handle(Request $request, Closure $next);", "public function middleware($middlewareDefinition): self;", "public function __construct() {\n\t\t$this->middleware(function ($request, $next) {\n\t\t\t$route = $request->route()->getName();\n\t\t\t$action = @explode('.', $route)[1];\n\n\t\t\t$actions = ['index', 'show', 'edit', 'update', 'destroy', 'grant-rights'];\n\t\t\t$forbidd = [];\n\n\t\t\t$user = \\Auth::user();\n\t\t\tswitch (true) {\n\t\t\t\tcase !$user: {\n\t\t\t\t\t$forbidd = array_diff($actions, ['show']);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase !$user->isModerator(): {\n\t\t\t\t\t$forbidd = array_diff($actions, ['show', 'edit', 'update']);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (in_array($action, $forbidd)) {\n\t\t\t\treturn $this->forbiddenResponse();\n\t\t\t}\n\n\t\t\treturn $next($request);\n\t\t});\n\t}", "public function handle($request, $next);", "public function __construct()\n {\n $middlewareGroup = new MiddlewareGroup();\n $middlewareGroup->user();\n $middlewareGroup->handle();\n }", "public function middleware($name){\n\n $middlewares = [\n 'auth' => 'Middleware\\Authentication'\n ];\n\n $middleware = new $middlewares[$name]();\n $middleware->handle();\n }", "private function setupMiddleware()\n {\n $this->getSlim()->add(new Model\\Middleware( $this ));\n }", "public function invoke()\n {\n $privateKey = md5(microtime(true));\n $publicKey = md5(microtime());\n $nonce = rand();\n $time = time();\n $signature = md5(\"{$privateKey}{$nonce}{$time}{$publicKey}\");\n\n $token = new Token($publicKey, $signature, $nonce, $time);\n\n $provider = $this->getMockBuilder('\\\\Chadicus\\\\Psr\\\\Http\\\\ServerMiddleware\\\\KeyProviderInterface')->getMock();\n $provider->method('findPrivateKey')->willReturn($privateKey);\n\n $extractor = $this->getMockBuilder(\n '\\\\Chadicus\\\\Psr\\\\Http\\\\ServerMiddleware\\\\TokenExtractorInterface'\n )->getMock();\n $extractor->method('extract')->willReturn($token);\n\n $validator = $this->getMockBuilder(\n '\\\\Chadicus\\\\Psr\\\\Http\\\\ServerMiddleware\\\\TokenValidatorInterface'\n )->getMock();\n $validator->method('validate')->willReturn(true);\n\n $container = new ArrayObject();\n\n $middleware = new Middleware($provider, $extractor, $validator, $container);\n\n $headers = [\n 'X-Hmac-Auth' => [\"{$publicKey}:{$signature}:{$nonce}:{$time}\"],\n ];\n\n $next = function ($request, $response) {\n return $response;\n };\n\n $psr7Request = new ServerRequest([], [], 'http://localhost', 'GET', 'php://input', $headers);\n\n $middleware($psr7Request, new Response(), $next);\n\n $this->assertSame($privateKey, $container['privateKey']);\n }", "protected function callMiddleware()\n {\n if (count($this->middleware) > 0) {\n foreach ($this->middleware as $middleware) {\n $controller = new $middleware;\n call_user_func_array([$controller, 'handle'], []);\n }\n }\n }", "public function express()\n {\n }", "abstract function __invoke(RequestInterface $request, ResponseInterface $response, callable $next);", "public function __invoke(Request $request): Response;", "public function __construct()\n {\n $this->middleware('auth:api');\n $this->middleware(\"VerifyRankToken:$this->USER_LEVEL_3\", [\n 'only' => ['permanentDestroy','batchPermanentDestroy']\n ]);\n }", "public function testRouteMiddleware()\n {\n $callable1 = function () {};\n $callable2 = function () {};\n //Case A\n $r1 = new \\Slim\\Route('/foo', function () {});\n $r1->setMiddleware($callable1);\n $mw = $r1->getMiddleware();\n $this->assertInternalType('array', $mw);\n $this->assertEquals(1, count($mw));\n //Case B\n $r1->setMiddleware($callable2);\n $mw = $r1->getMiddleware();\n $this->assertEquals(2, count($mw));\n //Case C\n $r2 = new \\Slim\\Route('/foo', function () {});\n $r2->setMiddleware(array($callable1, $callable2));\n $mw = $r2->getMiddleware();\n $this->assertInternalType('array', $mw);\n $this->assertEquals(2, count($mw));\n //Case D\n $r3 = new \\Slim\\Route('/foo', function () {});\n $r3->setMiddleware(array($this, 'callableTestFunction'));\n $mw = $r3->getMiddleware();\n $this->assertInternalType('array', $mw);\n $this->assertEquals(1, count($mw));\n //Case E\n try {\n $r3->setMiddleware('sdjfsoi788');\n $this->fail('Did not catch InvalidArgumentException when setting invalid route middleware');\n } catch ( \\InvalidArgumentException $e ) {}\n //Case F\n try {\n $r3->setMiddleware(array($callable1, $callable2, 'sdjfsoi788'));\n $this->fail('Did not catch InvalidArgumentException when setting an array with one invalid route middleware');\n } catch ( \\InvalidArgumentException $e ) {}\n }", "abstract public function apply(Request $request, Response $response, Closure $next);", "public function __construct()\n {\n $this->middleware(\"acl:admin|moderator\");\n }", "public function __construct()\n {\t \n\t $this->middleware('admin'); \n }", "public function __construct()\n {\n $this -> middleware('auth');\n $this -> middleware('check_block');\n }", "public function __invoke($request)\n {\n $next = $this->middleware->get($this->index);\n\n if ($next)\n {\n $name = ($next['n']) ?? '';\n $mParams = explode(',',($next['p']) ?? '');\n\n // check if the middleware class actually exist,\n // otherwise we will need to close out this.\n if (!class_exists($name)) return false;\n\n // increment the middelware we instantiate\n $this->index++;\n\n // begin our middleware instance\n $middleware = new $name();\n\n // load our middelware handle instance for the request\n if (method_exists($middleware, 'handle'))\n {\n $this->middlewareInstances[] = $middleware;\n\n return $middleware->handle($request, $this, ...$mParams);\n }\n else\n {\n // if the middleware does not have a handle, we will need to end the script.\n // All middlewares must have a handle.\n return false;\n }\n }\n\n // return the updated response\n return $this->response;\n }", "public function testMiddlewarePasses()\n {\n $authorizationLine = 'Basic ' . base64_encode('foo:bar');\n\n $request = new Request();\n $request->headers->add([\n 'Authorization' => $authorizationLine,\n ]);\n\n $middleware = new WebhookAuthenticationMiddleware('foo', 'bar');\n $this->assertTrue($middleware->handle($request, function () {\n return true;\n }));\n }", "public function handle($request,Closure $next,$var=null)\n {\n if ($var==\"bb\")\n {\n echo \"<br> MyMiddleware\";\n\n }\n else\n {\n return $next($request);\n }\n\n }", "public function __construct()\n {\n $this->middleware('doccumethome');\n\n }", "public function RouteRequest ();", "public function __construct(){\n $this-> middleware('auth:admin');\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "public function __invoke(Request $request)\n {\n //\n }", "function serve(array $routes, string $reqmethod, string $reqpath, ...$args): callable {\n\n $action = null;\n $params = null;\n $mwares = null;\n\n # test method + path against action method + expression\n foreach ($routes as [$actmethod, $regexp, $handlers]) {\n if ($reqmethod === $actmethod && preg_match($regexp, $reqpath, $caps)) {\n # action is last in the handlers chain\n $action = array_pop($handlers);\n $params = array_slice($caps, 1);\n $mwares = $handlers;\n break;\n }\n }\n\n # no matching route, 404\n if (empty($action)) {\n return call_user_func(_404(), ...$args);\n }\n\n # if we have params, run them through bindings\n $bindings = stash(DISPATCH_BINDINGS_KEY) ?? [];\n if (count($params) && count($bindings)) {\n foreach ($params as $key => $val) {\n $params[$key] = isset($bindings[$key])\n ? call_user_func($bindings[$key], $params[$key], ...$args)\n : $params[$key];\n }\n }\n\n # wrap action as last midware chain link\n $next = function () use ($action, $params, $args) {\n return empty($params)\n ? $action(...$args)\n : $action($params, ...$args);\n };\n\n # prepend matching global middleware into middleware chain\n $globalmwares = array_reverse(stash(DISPATCH_MIDDLEWARE_KEY) ?? []);\n foreach ($globalmwares as $middleware) {\n $pattern = array_shift($middleware);\n if (preg_match($pattern, $reqpath)) {\n array_unshift($mwares, ...$middleware);\n }\n }\n\n # build midware chain, from last to first, if any\n foreach (array_reverse($mwares) as $middleware) {\n $next = function () use ($middleware, $next, $params, $args) {\n return empty($params)\n ? $middleware($next, ...$args)\n : $middleware($next, $params, ...$args);\n };\n }\n\n # trigger middleware chain + handlers\n return $next();\n}", "public function __invoke(Request $request)\n {\n \n }", "public function handle($request, Closure $next, ...$level)\n {\n\n if (Auth::check()) {\n\n if (!empty($level)) {\n\n $whoIs = $this->meWithRole(Auth::user()->id,$level);\n\n if (!$whoIs) {\n\n return response()->json([\"code\"=>401,\"msg\"=>\"Unauthorized\"],401);\n\n }\n\n\n }else {\n\n return response()->json([\"code\"=>500,\"msg\"=>\"Wrong Route Configuration\"],500);\n\n }\n\n $response = $next($request);\n\n return $response;\n\n }else {\n return response()->json([\"code\"=>401,\"msg\"=>\"Unauthorized\"],401);\n }\n\n\n // Post-Middleware Action\n\n }", "public function __construct()\n {\n \t$this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('ifadmin');\n }", "public function __construct()\n { \n $this->middleware('admin');\n }", "public function __construct() {\n\t\t$this -> middleware('inventory');\n\t}", "public function handle($request, Closure $next)\n {\n return parent::handle($request, $next); // defer to the right stuff\n }", "public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next);", "public function call()\n {\n // Get the reference to the application\n $app = $this->app;\n\n // Get the application request without trailing slashes \n $requesturi = ltrim($app->request->getPathInfo(), '/');\n\n if($requesturi != 'unauthorized') {\n // Check if the user is authorized to execute this request\n if(!Security::isUserAuthorized($requesturi)) {\n $app->redirect('/unauthorized');\n }\n }\n\n // Run the inner middleware and application\n $this->next->call();\n }", "protected function handler ($SVC) {}", "public function __construct() {\n $this->middleware('admin');\n $this->middleware('acl:privilege_add', ['only' => ['create', 'store']]);\n $this->middleware('acl:privilege_edit', ['only' => ['edit', 'update']]);\n $this->middleware('acl:privilege_delete', ['only' => ['destroy']]);\n $this->middleware('acl:privilege_list', ['only' => ['index']]);\n }", "public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface\n\t{\n\t\tif ($this->isWhitelisted($request)) {\n\t\t\treturn $next($request, $response);\n\t\t}\n\n\t\t$user = $this->authenticator->authenticate($request);\n\n\t\t// If we have a identity, then go to next middlewares,\n\t\t// otherwise stop and return current response\n\t\tif ($user === null) {\n\t\t\treturn $this->denied($request, $response);\n\t\t}\n\n\t\t// Add info about current logged user to request attributes\n\t\t$request = $request->withAttribute(RequestAttributes::APP_LOGGED_USER, $user);\n\n\t\t// Pass to next middleware\n\t\treturn $next($request, $response);\n\t}", "public function handle($request, Closure $next)\n {\n\n// if(!$this->checkSignature($request)){\n// return response('Unauthorized.', 401);\n// }\n return $next($request);\n }", "public function __construct(){\n\n $this->middleware('admin');\n \n }", "public function __construct(){\n // $this->middleware('admin', ['except' => ['delete','trash','restore','permanentDelete']]);\n\n $this->middleware('author', ['only' => ['create','store','edit','update']]);\n $this->middleware('admin', ['only' => ['delete','trash','restore','permanentDelete']]);\n }", "public function __construct()\n {\n $this->middleware(Authenticate::class);\n }", "public function __construct()\n {\n $this->middleware('role:api');\n }", "public function __construct() {\n $this->middleware('admin');\n $this->middleware('acl:user_add', ['only' => ['create', 'store']]);\n $this->middleware('acl:user_edit', ['only' => ['edit', 'update']]);\n $this->middleware('acl:user_delete', ['only' => ['destroy']]);\n $this->middleware('acl:user_list', ['only' => ['index']]);\n }", "public function handle($request, Closure $next, $guard = null)\n {\n\n $company = (new Temp())->getCompanyDefault();\n $slug = ($company->exists) ? $company->metaWithQuery->slug : '';\n\n $user = Auth::user();\n $this->controller = strtolower(Utility::controllerName(true));\n $this->model = $company->getOnlyActiveWithSandboxesBySlugAndUser($slug, $user->getKey());\n $this->editableModel = new Model();\n $this->policy = Member::class;\n $this->slug = $slug;\n $this->module = Utility::module();\n $this->route = Utility::routeName();\n $this->rights = Utility::rightsDefault();\n\n $struc = $this->getStruc();\n\n if(!$this->model->exists){\n return Utility::httpExceptionHandler(404);\n }\n\n $request->member_module_controller = $this->controller;\n $request->member_module_module = $this->module;\n $request->member_module_policy = $this->policy;\n $request->member_module_slug = $this->slug;\n $request->member_module_model = $this->model;\n $request->member_module_model_editable = $this->editableModel;\n\n if(method_exists($this, $this->module)){\n\n $struc = array_merge($struc, call_user_func(array($this, $this->module), $request, $guard));\n\n if($struc['model'] instanceof Model || $struc['model'] instanceof MongoDB){\n if(!$struc['model']->exists){\n return Utility::httpExceptionHandler(404);\n }\n $this->editableModel = $struc['model'];\n $request->member_module_model_editable = $this->editableModel;\n }\n\n if(!$struc['flag']){\n return Utility::httpExceptionHandler(403);\n }\n \n }else{\n\n return Utility::httpExceptionHandler(404);\n\n }\n\n return $next($request);\n\n }", "public function getExceptionHandler(): MiddlewareInterface;", "public function __construct(){\n $this->middleware('role:super-admin|moderator')->only('index');\n }", "public function __invoke(RequestInterface $request, ResponseInterface $response, Callable $next)\n {\n $headers = getallheaders();\n // getServerParams();\n $headersFromSlim = $request->getHeader('Authorization');\n\n $jwt = $request->getHeaders();\n echo $jwt['HTTP_AUTHORIZATION'][0];\n //$token = JWT::decode(['HTTP_AUTHORIZATION'][0], getenv('SECRET_KEY_JWT'), array('HS256'));\n//echo '<br>';\n//var_dump($token);\ndie();\n // return $next($request, $response);\n }", "public function __construct()\n {\n $this->middleware('auth:api', ['only' => ['store', 'like', 'dislike']]);\n }", "public function getThrowableHandler(): MiddlewareInterface;", "public static function middleware($middleware,$callback){\n $parent_middleware = static::$middleware;\n static::$middleware .= '|' .trim($middleware,'|');\n if(is_callable($callback)){\n call_user_func($callback);\n }else {\n throw new BadFunctionCallException(\"provide valid callback\");\n\n }\n static::$middleware = $parent_middleware;\n }", "public function __construct()\n {\n //$this->middleware('auth');\n $this->middleware('auth-admin');\n $this->middleware('signed')->only('verify');\n $this->middleware('throttle:6,1')->only('verify', 'resend');\n }", "public function handle(Request $request);", "public function __construct() {\n\t\t$this->middleware('admin');\n\t}", "public function __construct()\n {\n $this->middleware(\n ['auth:api','admin'],\n ['except' => ['index','show']]\n );\n }", "public function __construct()\n {\n $this->middlewere('api.auth', ['except'=>['index','show']]);\n }", "function __invoke(Request $req, Response $res): Response {\n //\n // api/users[/{user_id}]\n //\n // where the part in square brackets is\n // optional.\n if( null !== $req->getAttribute('user_id') ) {\n // api/users/{user_id}\n return $this->userHandler($req,$res);\n } else {\n // api/users\n return $this->userCollectionHandler($req,$res);\n }\n }", "public function __construct() {\n $this->middleware(function ($request, $next) {\n $adminUser = Auth::guard('admin')->user();\n if(is_object($adminUser)){\n if($adminUser->hasRole('admin')){\n return $next($request);\n }\n }\n return Redirect::to('admin/home');\n });\n }", "public function __construct() {\n $this->middleware(function ($request, $next) {\n $adminUser = Auth::guard('admin')->user();\n if(is_object($adminUser)){\n if($adminUser->hasRole('admin')){\n return $next($request);\n }\n }\n return Redirect::to('admin/home');\n });\n }", "public function __construct() {\n $this->middleware(function ($request, $next) {\n $adminUser = Auth::guard('admin')->user();\n if(is_object($adminUser)){\n if($adminUser->hasRole('admin')){\n return $next($request);\n }\n }\n return Redirect::to('admin/home');\n });\n }", "public function testSuccessfulMiddleware()\n {\n $model = factory(Server::class)->make();\n $subuser = factory(Subuser::class)->make([\n 'server_id' => $model->id,\n ]);\n $this->setRequestAttribute('server', $model);\n\n $this->request->shouldReceive('route->parameter')->with('subuser', 0)->once()->andReturn('abc123');\n $this->hashids->shouldReceive('decodeFirst')->with('abc123', 0)->once()->andReturn($subuser->id);\n $this->repository->shouldReceive('find')->with($subuser->id)->once()->andReturn($subuser);\n\n $this->request->shouldReceive('method')->withNoArgs()->once()->andReturn('GET');\n\n $this->getMiddleware()->handle($this->request, $this->getClosureAssertions());\n $this->assertRequestHasAttribute('subuser');\n $this->assertRequestAttributeEquals($subuser, 'subuser');\n }", "public function __construct()\n {\n $this->middleware(\"login\");\n }", "public function __construct()\n {\n $this->middleware('App\\Http\\Middleware\\StaffMiddleware');\n }", "public function __construct()\n {\n $this->middleware('checkauth', ['only' => ['getUser', 'setname', 'setemail', 'setpassword']]);\n// $this->middleware('checkuser', ['only' => ['setname', 'setemail', 'setpassword']]);\n }", "public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('role');\n // $this->middleware('log')->only('index');\n // $this->middleware('subscribed')->except('store'); \n }", "public function handle($request, Closure $next)\n {\n\n\n echo \"<h4>\" . \"touched the moddle ware\" .\"</h4>\";\n\n // if(1){\n // // return \"interupted\";\n // return view('test.index');\n // }\n\n return $next($request);\n }", "function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next)\n {\n \n if ($auth_line = $request->getHeaderLine('Authorization')) {\n if (preg_match(\"#^Bearer (.+)$#\", $auth_line, $p)) {\n $token = $p[1];\n \n // is it a valid token?\n $jwt = new JWT();\n $id = $jwt->parseToken($token);\n \n container()->set('authenticated_user_identity', $id); // authenticate user\n \n }\n }\n \n if (is_null(current_authenticated_user_id())) {\n $response = $response->withStatus(403);\n \n return $response;\n }\n \n $response = $next($request, $response);\n \n return $response;\n }", "public function __construct()\n{\n $this->middleware('auth'); //only the authenticated user have access to the methods below. unauthenticated users will not have any access to these methods.\n $this->middleware('role:doctor'); //can add more authorisation to view the page e.g doctor\n}", "public function initMiddleware(App $app);", "public function handle($request);", "public function handle(Request $request, Closure $next)\n {\n echo 'the middle ware called';\n if($request->all()) {\n echo 'Message from middleware:You have something in request';\n }\n else {\n echo 'Message from middleware:your request is empty';\n }\n return $next($request);\n }", "public function sampleMiddleware($request, $response, $next)\n {\n return $response;\n }", "public function __construct()\n {\n $this->middleware('auth:api')->only('resend');\n $this->middleware('signed')->only('verify');\n $this->middleware('throttle:6,1')->only('verify', 'resend');\n }", "public function handle($request, Closure $next)\n {\n //znaci 1. napravimo midleware preko php artisan make:midleware\n //2. napravimo ovaj uslov ovde\n // 3. registrujemo midleware u Kernel.php fajlu\n //4. odemo u web.php i vezemo middleware('admin'); metod za user/admin rutu na kraju - bolje ne (ne radi u oba pravca)\n // ili!: u UsersControleru napravimo konstruktor i stavimo middleware u njega\n // public function __construct(){ \n // $this->middleware('admin');\n // }\n\n // ! Proverimo da li autentifikovani user ima access za odredjenu rutu\n //ako nema, vratimo ga odakle je dosao\n if(Auth::user()->admin){\n \n return $next($request);\n\n } else{\n \n Session::flash('info', 'You do not have permissions to acces!');\n\n return redirect()->back();\n }\n\n \n }", "function __invoke(Request $request, Response $response, callable $next)\n {\n if (isset($_SESSION['errors'])) {\n $this->view->getEnvironment()->addGlobal('errors', $_SESSION['errors']);\n unset($_SESSION['errors']);\n }\n\n // Next Middleware\n $response = $next($request, $response);\n return $response;\n }", "public function handle($request, Closure $next){\n\t\t//get users from the requested token\n\t\ttry {\n if (! $user = JWTAuth::parseToken()->authenticate()) {\n return response()->json(['user_not_found'], 404);\n }\n }\n\t\tcatch (Tymon\\JWTAuth\\Exceptions\\TokenExpiredException $e) {\n return response()->json(['token_expired'], $e->getStatusCode());\n }\n\t\tcatch (Tymon\\JWTAuth\\Exceptions\\TokenInvalidException $e) {\n return response()->json(['token_invalid'], $e->getStatusCode());\n }\n\t\tcatch (Tymon\\JWTAuth\\Exceptions\\JWTException $e) {\n return response()->json(['token_absent'], $e->getStatusCode());\n }\n\t\t\n\t\t//get controller from route\n\t\t$currentAction = \\Route::currentRouteAction();\n\t\t\n\t\t//explode the route above into method and controller\n\t\tlist($controller, $method) = explode('@', $currentAction);\n\n\t\t//replace the redundant information\n\t\t$controller = preg_replace('/.*\\\\\\/', '', $controller);\t\n\t\t\n\t\t//check if the requested controller and user's group id are matched\n\t\t$permissionID\t=\tDB::select(\"select permissions.id from permissions, controllers \n\t\t\t\t\t\t\t\t\t\twhere permissions.groupid = ?\n\t\t\t\t\t\t\t\t\t\tand permissions.controllerid = controllers.id\n\t\t\t\t\t\t\t\t\t\tand controllers.name = ?\" \n\t\t\t\t\t\t\t\t\t\t,\t[(int)$user->groupid , $controller]\n\t\t\t\t\t\t\t\t\t); \n\t\t//if nothing found, terminate the request\n\t\tif($permissionID == NULL){\n\t\t\t$returnArray\t=\tarray(\t\"result\"\t=>\tfalse,\n\t\t\t\t\t\t\t\t\t\t\"reason\"\t=>\t\"Permission denied\"\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\treturn response()->json($returnArray , 400);\t\t\t\n\t\t}\n\t\t\n return $next($request);\n }", "protected static function middleware()\n {\n foreach (self::fetch('http/middleware') as $file) {\n Bus::need($file);\n }\n\n Middleware::ini();\n }", "function run() {\n global $url;\n session_start();\n\n if (class_exists('AppHelper')) {\n $url = AppHelper::validate_and_authorize($url);\n } else {\n error_log ('this app has no AppHandler defined, hence no secutiy ');\n }\n\n # Parse our 3 part URL\n # Format: controller[/action[.type][/query_string]] \n # Example: login/get/3\n # Example: login/listall.json\n list($controller, $action, $content_type, $query_string) = parse_rest_url($url);\n\n $controller = ucwords($controller).'Controller';\n $dispatch = new $controller($action, $content_type);\n\n if ((int)method_exists($controller, $action)) {\n call_user_func_array(array($dispatch,$action),array($query_string));\n } else {\n AppHelper::not_found($dispatch, $url); \n }\n}", "public function __construct()\n {\n $this->middleware('permisos:GET.496E646963|POST.369646E694|PUT.369646E694|DELETE.369646E694');\n }", "public function __construct()\n {\n $this->middleware(backpack_middleware());\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function getMiddlewares();", "public function __construct() \n {\n $this->middleware('auth', ['only' => [\n 'sendmessage',\n 'reportuser',\n 'reportcorporate',\n 'reportcar',\n 'reportpart',\n 'addcorporate',\n 'pusherauthenticate',\n 'iscorpuser',\n 'hascorpuserrole',\n 'addcorporateform',\n 'addcorporate',\n ]]);\n\n $this->middleware('corpuser', ['only' => [\n 'corporatedashboard',\n 'corporatemembers',\n 'corporatesettings',\n ]]);\n }", "public function __construct() {\n $this->middleware(function ($request, $next) {\n $adminUser = Auth::guard('admin')->user();\n if(is_object($adminUser)){\n if($adminUser->hasRole('admin') || $adminUser->hasRole('sub-admin')){\n return $next($request);\n }\n }\n return Redirect::to('admin/home');\n });\n }" ]
[ "0.72244614", "0.71935344", "0.70709306", "0.6746728", "0.66919494", "0.6510601", "0.6387525", "0.63849556", "0.63401264", "0.6336634", "0.6306557", "0.6207183", "0.619368", "0.6193426", "0.61835295", "0.6145894", "0.6142988", "0.6067079", "0.6032965", "0.5985332", "0.5973016", "0.59547204", "0.59539187", "0.5938541", "0.59066564", "0.58991486", "0.589546", "0.5879869", "0.58707243", "0.58643365", "0.5858843", "0.5858843", "0.5858843", "0.5858843", "0.5858843", "0.5858843", "0.5858843", "0.5858843", "0.5858843", "0.5858843", "0.5858843", "0.5858843", "0.58520395", "0.58347005", "0.58259684", "0.5814249", "0.58013755", "0.57950574", "0.5781578", "0.5778038", "0.5771951", "0.57709116", "0.57557523", "0.57544583", "0.5747593", "0.574292", "0.57402134", "0.57307744", "0.57302177", "0.5726061", "0.5710801", "0.57098496", "0.57059175", "0.57032526", "0.5698907", "0.5697927", "0.56956065", "0.5693719", "0.5692601", "0.56918186", "0.5690646", "0.568532", "0.5675317", "0.5673458", "0.56671524", "0.56671524", "0.56671524", "0.56643236", "0.5651285", "0.56504655", "0.56500226", "0.5649687", "0.56478447", "0.564422", "0.5641653", "0.5640773", "0.56398845", "0.56389666", "0.56384075", "0.56350386", "0.56349325", "0.563249", "0.56293696", "0.56238294", "0.56206405", "0.5615671", "0.5613487", "0.56087667", "0.56086046", "0.56072515", "0.56021" ]
0.0
-1
Display a listing of the users.
public function index() { //Não vai existir }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list()\n {\n $listUsers = AppUser::findAll();\n $this->show('back/user/list', [\"users\" => $listUsers]);\n }", "public function userList() {\n /** @var User[] $users */\n $users = $this->entityManager->getRepository(\"Entity\\\\User\")->findAll(); // Retrieve all User objects registered in database\n echo $this->twig->render('admin/lists/users.html.twig', ['users' => $users]);\n }", "public function showListAction() {\n $users = $this->getDoctrine()\n ->getRepository(User::class)\n ->findAll();\n return $this->render(':Security\\User:users.html.twig', [\n 'users' => $users\n ]);\n }", "public function index()\n {\n $this->user_list();\n }", "public function showUsers()\n {\n $userRepo = $this->getDoctrine()->getRepository(User::class);\n $users = $userRepo->getUsersOrderByAsc();\n\n return $this->render('admin/list-of-users.html.twig', [\n 'users' => $users\n ]);\n }", "public function index()\n {\n $this->userlist();\n }", "public function _list()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\t\t$tUsers = model_user::getInstance()->findAll();\n\n\t\t$oView = new _view('users::list');\n\t\t$oView->tUsers = $tUsers;\n\t\t$oView->showGroup = true;\n\t\t$oView->title = 'Tous les utilisateurs';\n\n\t\t$this->oLayout->add('work', $oView);\n\t}", "public function index()\n {\n $users = $this->userService->getUserWithPaginate();\n return view('admin.user.list', compact('users'));\n }", "public function userlist()\n {\n $filter = Param::get('filter');\n\n $current_page = max(Param::get('page'), SimplePagination::MIN_PAGE_NUM);\n $pagination = new SimplePagination($current_page, MAX_ITEM_DISPLAY);\n $users = User::filter($filter);\n $other_users = array_slice($users, $pagination->start_index + SimplePagination::MIN_PAGE_NUM);\n $pagination->checkLastPage($other_users);\n $page_links = createPageLinks(count($users), $current_page, $pagination->count, 'filter=' . $filter);\n $users = array_slice($users, $pagination->start_index -1, $pagination->count);\n \n $this->set(get_defined_vars());\n }", "public function index() {\n $rows = AdminUser::paginate(10);\n return View::make(\"CoreCms::user.listing\")->with(\"models\", $rows);\n }", "public function index() {\n\t\t$this->accessible();\n\t\t$users = User::paginate(5);\n\n\t\treturn view('users.list', compact('users'));\n\t}", "public function indexAction()\n {\n // Get a query of listing all users from user service\n $pages = $this->get('app.user.service')->getUsers();\n \n // Get pagination\n $pagination = $this->get('app.service')->paginate($pages);\n \n // Render and return the view\n return $this->render(\n '::admin/user/users.html.twig',\n array(\n 'pagination' => $pagination\n )\n );\n }", "public function userlistAction()\n\t{\n\t\t$users = $this->userService->getUserList(array(), false);\n\n\t\t$this->view->roles = za()->getUser()->getAvailableRoles();\n\t\t$this->view->users = $users;\n\t\t$this->renderView('admin/user-list.php');\n\t}", "public function index() \n {\n $users = $this->userRepo->listUser();\n return view('backend.pages.user.list', compact('users'));\n }", "public function index()\n {\n return view('admin.users.index', ['users' => $this->repository->getSortableListViaPagination()]);\n }", "public function index()\n {\n $count = \\App\\User::count();\n $users = \\App\\User::orderBy('id', 'desc')->paginate(10);\n\n return view('webcontrol.user.list', compact('count', 'users'));\n }", "public function index()\n {\n $users = $this->repository->all($columns = ['*']);\n return $this->success($users, trans('messages.users.getListSuccess'));\n }", "public function userlist()\n\t{\n\t\t$data['page']='Userlist';\n\t\t$data['users_list']=$this->users->get_many_by('userlevel_id',2);\n\t\t$view = 'admin/userlist/admin_userlist_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}", "public function index()\n {\n // show list user\n }", "public function indexAction()\n {\n $listing = $this->listing( 'Panel\\Listing\\Users');\n\n return array( 'listing' => $listing );\n }", "public function user_list()\n\t\t{\n\t\t\t$this->is_login();\n\t\t\t$this->load->model('User_Profiles', 'up');\n\t\t\t$data['users'] = $this->up->get_all_users();\n\t\t\t$this->load->view('user_list-admin',$data);\n\t\t}", "public function list ()\n {\n if (User::isLoggedIn() && User::getLoggedInUser()->is_admin === true) {\n\n // Alle User aus der DB laden\n $users = User::all();\n\n // Passenden View laden und User übergeben\n View::load('admin/users', [\n 'users' => $users\n ]);\n } else {\n \n // Wenn kein User eingeloggt ist, dann leider wir auf die Login Seite \n header(\"Location: login\");\n }\n }", "public function userlist()\n {\n $users = array('users' => UserModel::getPublicProfilesOfAllUsers(),'dynatable'=>'userlist');\n $this->View->render('user/userlist',$users);\n }", "public function admin_user_list() {\n $this->paginate = array(\n 'limit' => 10,\n 'order' => array('User.created' => 'desc' ),\n 'conditions' => array('User.status' => 1),\n );\n $data = $this->paginate('User');\n $this->set('user', $data);\n $this->render('/Users/user_list');\n }", "public function index()\n {\n $users = User::order('created_at')->get();\n\n return view('users.list', compact('users'))->with(['mainmenu' => $this->mainmenu, 'submenu' => $this->submenu]);\n }", "public function listUsers() {\n \t$data['users'] = User::all();\n \treturn view('backend.users.index', $data);\n }", "public function index()\n\t{\n\t\t$users = $this->user->active()->paginate(10);\n\n\t\treturn $this->view->make('users.index', compact('users'));\n\t}", "public function index()\n\t{\n\t\t$searchKeyword = Input::get('q', '');\n\t\t$searchRoles = Input::get('roles', array());\n\n\t\t// Get Users (with roles) and limit it to only 30 results for\n\t\t// pagination. Don't you just love it when pagination simply works.\n\t\t$eloquent = App::make('orchestra.user')->search($searchKeyword, $searchRoles)->paginate();\n\t\t$roles = App::make('orchestra.role')->lists('name', 'id');\n\n\t\t// Build users table HTML using a schema liked code structure.\n\t\t$table = $this->presenter->table($eloquent);\n\n\t\tEvent::fire('orchestra.list: users', array($eloquent, $table));\n\n\t\t// Once all event listening to `orchestra.list: users` is executed,\n\t\t// we can add we can now add the final column, edit and delete \n\t\t// action for users.\n\t\t$this->presenter->actions($table);\n\n\t\tSite::set('title', trans('orchestra/foundation::title.users.list'));\n\n\t\treturn View::make('orchestra/foundation::users.index', array(\n\t\t\t'eloquent' => $eloquent,\n\t\t\t'roles' => $roles, \n\t\t\t'searchKeyword' => $searchKeyword,\n\t\t\t'searchRoles' => $searchRoles,\n\t\t\t'table' => $table, \n\t\t));\n\t}", "public function index()\n {\n return view('backend.user.list_user');\n }", "public function index()\n {\n $data['users'] = $this->user->all();\n return view('backend.user.list')->with($data);\n }", "public function index()\n {\n\n $users = $this->user->paginate(10);\n\n return view('admin.users.index', compact('users'));\n }", "public function index()\n {\n $users = $this->userService::getAll();\n\n return view('admin.pages.users')->with(compact('users'));\n }", "public function index()\n {\n $users = (new User)->findAll();\n $title = 'Liste des membres';\n\n $data = compact('title', 'users');\n\n return $this->view('user/list', $data);\n\t}", "public function index()\n {\n $users = User::paginate(15);\n return view('user.list', ['users' => $users]);\n }", "public function index()\n {\n $users = $this->userRepository->getPaginate();\n \n return view('admin.users.index', compact('users'));\n }", "public function index()\n {\n $users = User::all();\n return view('users.userslist')->withUsers($users);\n }", "public function showUsers()\r\n\t{\r\n\t\t$users = User::paginate(10);\r\n\r\n\t\treturn view('admin/users', compact('users'));\r\n\t}", "public function indexAction(){\n $page = isset($_GET['page']) ? $_GET['page'] : 1;\n $perpage = 2;\n $count = \\R::count('user');\n $pagination = new Pagination($page, $perpage, $count);\n $start = $pagination->getStart();\n $users = \\R::findAll('user', \"LIMIT $start, $perpage\");\n\n $this->setMeta('All users');\n $this->setData(compact('users', 'pagination', 'count'));\n }", "public function index() {\n $users = User::select(\"users.*\")->paginate(10);\n return view('layouts.user-list', ['data' => $users]);\n }", "public function index()\n {\n // user search\n\n $name = $this->request->name;\n $email = $this->request->email;\n\n $users = new User;\n\n if (!empty($name)) {\n \t$users = $users->name($name);\n }\n\n if (!empty($email)) {\n \t$users = $users->email($email);\n }\n\n $users = $users->paginate(5);\n\n return view('admin.users.index',compact('users'));\n }", "public function index()\n\t{\n\t\tLog::info('Ingreso al Index');\n\t\t$page = Input::get('page', 1);\n\n\t\t$data = $this->user->getByPage($page, 15);\n\n\t\t$users = Paginator::make($data->items, $data->totalItems, 15);\n\t\t$users = $this->presenter->paginator($users, new UserPresenter);\n\n\t\treturn View::make(\"users.index\", compact(\"users\"));\n\t}", "public function index()\n {\n $users = Base::user()->paginate();\n\n return view('admin::auth.users.index')->with(compact('users'));\n }", "public function index()\n {\n $users = $this->userRepository->getAllWithPaginate();\n\n return view('admin.users.index', compact('users'));\n }", "public function index()\n {\n $this->checkPermission();\n\n $this->title = trans('admin.users');\n $users = User::with('roles')->paginate(10);\n\n $this->content = view('admin.users.index')->with(compact('users'))->render();\n return $this->renderOutput();\n }", "public function index()\n {\n $users = User::all();\n return view('backend.user.list', compact(['users']));\n }", "public function index()\n {\n $users = \\App\\User::paginate(20);\n\n return view('admin.users', ['users' => $users]);\n }", "public function index()\n {\n\n $usersList = User::all();\n\n return view('dash.users')->with( compact('usersList') );\n }", "public function index()\n {\n $users = User::all();\n //show the users list, mostly advanced users\n return view('users.index')->with('users', $users);\n }", "public function index()\n {\n $pagintaionEnabled = true;\n if ($pagintaionEnabled) {\n $users = User::paginate(config('usersmanagement.paginateListSize'));\n } else {\n $users = User::all();\n }\n $roles = Role::all();\n\n return View('pages.admin.users.show-users', compact('users', 'roles'));\n }", "public function index()\n {\n //\n $_users = User::all();\n return view('admin.users.list', ['users' => $_users ]);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $users = $em->getRepository('AppBundle:User')->findAll();\n\n return $this->render('users_list.html.twig', array('users' => $users));\n }", "public function listUsers()\n {\n $users = User::all();\n\n return view('listUsers', ['users' => User::all()]);\n\n }", "public function index()\n {\n $users = $this->userRepository->paginate(10);\n return view('users.index')->with(['users' => $users]);\n }", "public function index()\n {\n $users = $this->userRepo->getDataPaginate($this->limit);\n\n return view('admin.user.index', compact('users'));\n }", "public function index()\n {\n // Retrieve Users from the database\n\n $userList = User::all();\n \n // Return that to the list view\n return View::make('user.index')->with('users', $userList); \n \n }", "public function index()\n {\n $users = User::paginate(10);\n\n return view('backend.users.index')->withUsers($users);\n }", "public function index()\n {\n $users = $this->usersRepo->paginate();\n return view('CMS::users.index', compact('users'));\n }", "public function listUsers()\n {\n $users = $this->apiHeaderNav();\n return view('user.userListAll',['data'=>$users]);\n }", "public function actionIndex()\n {\n $request = Yii::$app->request;\n\n $params = ArrayHelper::merge($request->get(), [\n 'perPage' => $request->get('perPage', Yii::$app->params['per_pages'][0]),\n 'orderCol' => $request->get('orderCol', 'id'),\n 'orderDir' => $request->get('orderDir', 'asc')\n ]);\n\n $pageTitle = Yii::t('app', 'List of users');\n\n $breadcrumbs = [\n ['url' => ['/admin'], 'label' => Yii::t('app', 'Admin panel'), ],\n ['url' => ['/admin/user/list'], 'label' => $pageTitle, 'class' => 'active']\n ];\n\n $data = User::getList($params);\n\n return $this->render('/admin/user/list.twig', [\n 'params' => $params,\n 'pages' => $data['pages'],\n 'users' => $data['models'],\n 'pageTitle' => $pageTitle,\n 'breadcrumbs' => $breadcrumbs,\n ]);\n }", "function user_list()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '运营人员列表';\n $this->global['pageName'] = 'userlist';\n\n $data['searchType'] = '0';\n $data['searchName'] = '';\n\n $this->loadViews(\"user_manage/users\", $this->global, $data, NULL);\n }\n }", "public function list() {\n $users = User::orderBy('name')->paginate(10);\n $repository = new Repository(compact('users'));\n \n $layout = Layout::blank([\n Layout::view('vendor.platform.users.list')\n ]);\n \n return $layout->build($repository);\n }", "public function index()\n {\n $users = $this->users->sortable(['created_at' => 'desc'])->paginate(10);\n\n return view('admin.users.index', ['users' => $users]);\n }", "public function index()\n {\n $users = $this->users->sortable(['created_at' => 'desc'])->paginate(10);\n\n return view('admin.users.index', ['users' => $users]);\n }", "public function index()\n {\n $users = User::paginate(10);\n\n return view('admin.users.index', compact('users'));\n }", "public function index()\n\t{\n\t\t//list all users with db facade\n\t\t\n\t\t$list = \\DB::table('users')->get();\n\t\treturn view('users.index')->with( 'list', $list);\n\t}", "public function index()\n {\n \n return view('users.users_list');\n }", "function userListing()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n else\n { \n $searchText = $this->security->xss_clean($this->input->post('searchText'));\n $data['searchText'] = $searchText;\n \n $this->load->library('pagination');\n \n $count = $this->user_model->userListingCount($searchText);\n\n\t\t\t$returns = $this->paginationCompress ( \"userListing/\", $count, 5 );\n \n $data['userRecords'] = $this->user_model->userListing($searchText, $returns[\"page\"], $returns[\"segment\"]);\n \n $this->global['pageTitle'] = 'Garuda Informatics : User Listing';\n \n $this->loadViews($this->view.\"users\", $this->global, $data, NULL);\n }\n }", "public function index()\n {\n $data = [];\n $users = User::paginate(10);\n $data['users'] = $users;\n return view('admin.user.user-list',['data' => $data]);\n }", "public function allUsers()\n\t{\n\t\t$data['users'] = $this->MainModel->selectAll('users', 'first_name');\n\t\t$this->load->view('layout/header');\n\t\t$this->load->view('layout/sidebar');\n\t\t$this->load->view('template/all-users', $data);\n\t\t$this->load->view('layout/footer');\n\t}", "public function allUsers()\n {\n $users = $this->user->findAll();\n $this->show('admin/allusers', ['users' => $users]);\n }", "public function index() {\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\t$this->User->recursive = 0;\n\t\t$this->set('users', $this->paginate());\n\t\t$this->set('userId', $user['User']['id']);\n\t\t$this->set('userType', $user['User']['type']);\n\t}", "public function index() {\n $this->view->users = $this->model->getAllUsers();\n $this->view->errors = $this->model->errors;\n $this->view->render('users/index');\n }", "public function index()\n {\n $client = new Client($this->data);\n\n $response = $client->get('user');\n\n $body = $response->getBody();\n\n $users = json_decode($body);\n\n return view('user.list')->with(compact('users'));\n }", "public function index()\n {\n $users = User::all();\n return view('users.usersList', compact('users'));\n\n }", "public function listUser()\n {\n $user = User::where('id', '=', 1)->first();\n return view('listUser', [\n 'user' => $user\n ]);\n }", "public function index()\n {\n $users = $this->model->paginate();\n return view('menu-maker::users.index', compact('users'));\n }", "public function index()\n {\n $users = User::paginate(10);\n return view(\"users.index\", compact(\"users\"));\n }", "public function index()\n {\n $data['users'] = User::paginate(10);\n return view('admin.users.index', $data);\n }", "public function user_list()\n {\n \n \t$users = User::all();\n\n $data = array('users' => $users);\n\n return view('manage.user_list')->with($data);;\n }", "public function index(){\n\t\treturn view(Config::get('boxtar.viewUsers'))->with('users', User::latest()->get());\n\t}", "public function index()\n {\n $this->authorize('viewAny', User::class);\n $users = User::paginate(40);\n return view('admin.users.index', compact('users'));\n }", "public function listofUser()\n {\n return view('Admin.ShowallUser');\n }", "public function index()\n {\n $client = new Client($this->data);\n\n $response = $client->get('users');\n\n $body = $response->getBody();\n\n $users = json_decode($body);\n\n return view('users.list')->with(compact('users'));\n }", "public function index()\n {\n $users = $this->users->with('roles')->get();\n return \\View::make('admin.users.index', [\n 'users' => $users,\n 'title' => 'list',\n ]);\n }", "public function listAction()\n {\n $users = $this->container->get( 'wg.openid.user_manager' )->findUsers();\n return $this->container->get('templating')->renderResponse(\n 'WGOpenIdUserBundle:Profile:list.html.twig', array(\n 'users' => $users,\n ));\n }", "public function index()\n {\n $users = User::all();\n \n\n return view('admin.user.listar')->with(compact('users'));\n }", "public function index()\n {\n return view('administration::user.index')\n ->withUsers($this->user->all());\n }", "public function index()\n {\n $users = User::paginate();\n return view('manage.users.index')->withUsers($users);\n }", "public function index()\n {\n $users = User::paginate(10);\n return view('admin.user.index', ['users' => $users]);\n }", "public function index()\n {\n $users = User::paginate(10);\n return view('user.users.index', compact('users'));\n }", "public function indexAction()\n {\n $users = (new UserCollectionModel())->getUsers();\n echo (new View('userIndex'))\n ->addData('users', $users)\n ->render();\n }", "public function index()\n {\n $users = User::paginate();\n return view('admin.users.index')->with('users', $users);\n }", "public function index()\n {\n $users = User::sortable()->orderBy('created_at', 'desc')->paginate(config('paginate.number_users'));\n return view('admin.pages.users.index', compact('users'));\n }", "public function index()\n {\n $this->authorize('access_users_list', User::class);\n $users = User::orderBy('created_at', 'desc')->paginate(10);\n return view('users.index', [ 'users' => $users ]);\n }", "public function getUsers()\n {\n $title = \"Users\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n\n // Get all the users from db\n $users = $this->di->get(\"user\")->getAllUsers();\n\n $data = [\n //\"items\" => $book->findAll(),\n \"users\" => $users,\n ];\n\n $view->add(\"pages/users\", $data);\n //$view->add(\"blocks/footer\", $data);\n\n $pageRender->renderPage([\"title\" => $title]);\n }", "public function index()\n {\n $users = User::latest()->paginate(10);\n $i = 1;\n return view('user_management.user', compact(['users', 'i']));\n }", "public function index()\n {\n $users = User::paginate(5);\n return view('admin.users.index', compact('users'));\n }", "public function index()\n {\n return $this->showCollectionResponse(User::all(), 200);\n }", "public function index()\n {\n $users = User::All();\n return $this->showAll($users);\n }", "public function index()\n {\n $users = User::all();\n return $this->showAll($users);\n }", "function index() {\n $url = base_url() . \"index.php/users\";\n $total_records = count($this->musers->get_users());\n $config = $this->paginate($url, $total_records);\n $this->pagination->initialize($config);\n $data = $this->get_videos();\n $data['sys_users'] = $this->musers->get_users($config['per_page'], $this->uri->segment(3));\n $this->template->load('default', 'listUsers', $data);\n }" ]
[ "0.84978604", "0.8424922", "0.8382446", "0.8369435", "0.8355932", "0.8318713", "0.82194597", "0.8214937", "0.82096994", "0.8201803", "0.819085", "0.8157125", "0.8146758", "0.8082202", "0.8064668", "0.80488336", "0.80327445", "0.8001808", "0.7992122", "0.79866624", "0.79777277", "0.79748666", "0.7972105", "0.7965773", "0.79649985", "0.79589325", "0.79574144", "0.7941708", "0.7930711", "0.79300094", "0.79170513", "0.79111564", "0.79052323", "0.7901045", "0.78987795", "0.78954506", "0.789471", "0.7889721", "0.788415", "0.7883151", "0.7882849", "0.78806204", "0.78802806", "0.7871622", "0.78617394", "0.78602785", "0.7859169", "0.7857565", "0.7854317", "0.7851339", "0.7845786", "0.78429794", "0.7840327", "0.7835743", "0.7827544", "0.7821724", "0.78214544", "0.7820365", "0.78148204", "0.7813938", "0.78136295", "0.7806315", "0.7806315", "0.7802682", "0.780204", "0.7797057", "0.7791283", "0.779123", "0.7788472", "0.77880824", "0.77876616", "0.7786779", "0.77865714", "0.7783547", "0.7782735", "0.77761203", "0.77746135", "0.7772063", "0.7765391", "0.77639127", "0.77634335", "0.77585065", "0.7756155", "0.7754606", "0.7754204", "0.7753791", "0.7752868", "0.7751363", "0.77434534", "0.7741031", "0.7734504", "0.7732709", "0.7727271", "0.7722712", "0.77191293", "0.771818", "0.7717765", "0.77141243", "0.7710379", "0.770591", "0.7705842" ]
0.0
-1
Show the form for creating a new user.
public function create() { if(Auth::user()) { return redirect('/'); } $locations = Location::all(); //busca todos os países na base de dados locations return view('users.create', compact('locations', $locations)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newUserAction()\n {\n $user = new User();\n\n $form = $this->createForm(UserType::class, $user);\n\n return $this->render('GrtResBundle:User:form.html.twig', array(\n 'form' => $form->createView()\n ));\n }", "public function showUserCreationForm()\n {\n return view('admin.user_create');\n }", "public function create()\n {\n // show form create user \n return view('user.create');\n }", "public function create()\n {\n return view(\"users.usersform\");\n }", "public function create()\n {\n return view('users.form', ['user' => new User]);\n }", "public function create()\n {\n return view('webcontrol.user.add');\n }", "public function newAction()\n {\n $entity = new User();\n $form = $this->createCreateForm($entity)\n ->add('create', 'submit', array('label' => 'c'));\n\n return $this->render(\n 'VipaAdminBundle:AdminUser:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n )\n );\n }", "public function create()\n\t{\n\t\t$eloquent = App::make('orchestra.user');\n\t\t$form = $this->presenter->form($eloquent, 'create');\n\n\t\t$this->fireEvent('form', array($eloquent, $form));\n\t\tSite::set('title', trans('orchestra/foundation::title.users.create'));\n\n\t\treturn View::make('orchestra/foundation::users.edit', compact('eloquent', 'form'));\n\t}", "public function create()\n {\n return view('admin.adminuser.userForm', [\n\t\t\t'bdb'\t=> [['name'=>'后台用户管理'], ['name'=>'添加用户'],], \n\t\t\t'roles'\t=> Role::all(),\n\t\t\t]);\n }", "public function create()\n {\n $this->generateParams();\n return view('backend.pages.user._form', compact('gender', 'type', 'city'));\n }", "public function create()\n {\n $this->authorize('create', User::class);\n return view('user.form')->with('user', new User())->with('roles', UserRole::getRoleList());\n }", "public function create() // abre un formulario de creacion\n {\n \n return view('user.create');\n }", "public function create()\n\t{\n\t\treturn view('admin.createuser');\n\t}", "public function create()\n {\n return view('administration::user.create');\n }", "public function create()\n {\n return view('Admin.user.useradd');\n }", "public function create()\n {\n return view('backend.pages.user.create-user');\n }", "public function create()\n {\n return view('users.newUser');\n }", "public function create()\n {\n return view('users.form');\n }", "public function create()\n {\n return view('users.form');\n }", "public function create()\n {\n return view(\"Admin/user_add\");\n }", "public function create() {\n $this->title = \"Add New User\";\n $arr = array('controller' => $this->controller, 'action' => $this->action, 'title' => $this->title);\n return view('user.add', $arr);\n }", "public function create()\n {\n return view(\"backend.user.create\");\n }", "public function create() {\n // TODO: Admin Policy\n return view('auth.user_add');\n }", "public function create()\n {\n return view('admin.user.user-add');\n }", "public function newUserAction()\n {\n $user = (new UserModel())->createUser();\n echo (new View('userCreated'))\n ->addData('user', $user)\n ->render();\n }", "public function createAction()\n {\n echo (new View('userCreate'))->render();\n }", "public function newAction()\n {\n $entity = new User();\n $form = $this->createCreateForm($entity);\n\n return $this->render('SpaBackendBundle:User:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"user.create\");\n }", "public function create()\n\t{\n\t\treturn view('admin.user.create');\n\t}", "public function create()\n {\n return view('add_user');\n //\n }", "public function create()\n {\n \t $this->pass_data['page_heading'] = \"Add User\";\n return view('backend.user.create', $this->pass_data);\n }", "public function create()\n\t{\n\t\treturn view('kagi::users.create');\n\t}", "public function create()\n {\n return view(\"admin.addUser\");\n }", "public function create()\n {\n //Create User Page\n return view('admin.user.create');\n }", "public function create()\n {\n return view(\"admin/useradd\");\n }", "function create() {\n return view('admin.user.create');\n }", "public function create()\n {\n return view('admin.user.add');\n }", "public function create()\n {\n return view('admin.user.add');\n }", "public function create()\n {\n return view('admin.user.add');\n }", "public function create()\n {\n return view('sys_user.create');\n }", "public function create()//mostra formulário de criação de usuários\n {\n $form = \\FormBuilder::create(UserForm::class,[\n 'url' => route('admin.users.store'),\n 'method' => 'POST'\n ]); //classe de formulario, url de ação do formulario e método http\n\n return view('admin.users.create', compact('form'));\n }", "public function create()\n {\n //return view ('admin.user-table.new-user-form');\n }", "public function create()\n {\n return view('admin.user.add',[\n 'title'=>'添加管理员页面',\n ]);\n }", "public function actionCreate()\n {\n $model = new UserForm();\n $model->setScenario('create');\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n }\n if (Yii::$app->request->isGet) {\n $model->status = User::STATUS_ACTIVE;\n $model->roles = User::ROLE_USER;\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'roles' => ArrayHelper::map(Yii::$app->authManager->getRoles(), 'name', 'name')\n ]);\n }", "public function newAction()\n {\n $user = new User();\n $form = $this->createForm(UserType::class, $user, array(\n 'adminRequired' => true,\n ));\n\n return $this->render('AdminBundle:admin:new.html.twig', array(\n 'user' => $user,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n\treturn view('user.createuser');\n }", "public function create()\n {\n Gate::authorize('app.users.create');\n\n $roles = Role::getForSelect();\n return view('layouts.backend.users.form', [\n 'roles'=> $roles,\n ]);\n }", "public function create()\n {\n return view('backend.user.create');\n }", "public function create()\n {\n return view('backend.user.create');\n }", "public function create()\n {\n return view('backend.user.create');\n }", "public function create()\n {\n return view('backend.user.create');\n }", "public function create()\n {\n \treturn View::make(\"admin.UserAdd\");\n }", "public function create()\n {\n return view('admin.create-user');\n }", "public function create()\n {\n //添加用户页面\n return view('admin.user.add');\n }", "public function create()\r\n {\r\n return view('admin.user.create');\r\n }", "public function create()\n {\n return view('admin.user.create');\n }", "public function create()\n {\n return view('admin.page.user.create');\n }", "public function create()\n\t{\n\t\treturn view('backend.users.create');\n\t}", "public function create()\n {\n return view(\"backend.users.create\");\n }", "public function create () {\n return view('backend.user.create');\n }", "public function create()\n {\n return view('codeeduuser::users.create');\n }", "public function create()\n {\n\n // Load the page for adding users\n return view('users.create');\n }", "public function create()\n {\n $user = null;\n\n $title = 'Cadastrar Novo Usuário';\n\n return view('panel.users.create', compact('title', 'user'));\n }", "public function create()\n {\n MetaTag::setTags(['title' => 'Добавление пользователя']);\n\n return view('blog.admin.user.add');\n }", "public function create()\n\t{\n\t\t\n\t\t\treturn view('user/create');\n\t}", "public function create()\n {\n return view('user.create');\n }", "public function create()\n {\n return view('user_create');\n }", "public function create()\n {\n return view('admin.user.create');\n }", "public function create()\n {\n return view('admin.user.create');\n }", "public function create()\n {\n return view('admin.user.create');\n }", "public function create()\n {\n return view('admin.user.create');\n }", "public function create()\n {\n return view('admin.user.create');\n }", "public function create() {\n return view('admin.user.create');\n }", "public function newAction()\n {\n $user = new User();\n $form = $this->createCreateForm($user);\n\n return $this->render('BackendBundle:User:new.html.twig', array(\n 'entity' => $user,\n 'form' => $form->createView(),\n ));\n }", "public function create() {\n\t\treturn View::make('users.create')->with('user', new User());\n\t}", "public function create()\n {\n return view('manager.users.create');\n }", "public function create()\n {\n return view('pages.admin.user.create');\n }", "public function create()\n {\n return view('pages.admin.user.create');\n }", "public function create()\n {\n return view('pages.admin.user.create');\n }", "public function create()\n\t{\n\t\treturn view('admin.users.create');\n\t}", "public function create()\n {\n $form = $this->userForm->form();\n $organizationIdentifier = auth()->user()->organization->user_identifier;\n\n return view('lite.users.create', compact('form', 'organizationIdentifier'));\n }", "public function create()\n {\n return view('users.create_user');\n }", "public function create()\n {\n return view('customer.adduser');\n }", "public function create()\n {\n if ( Gate::denies('criar-user')){\n abort(403, 'Não tem Permissão para criar um utilizador');\n }\n return view('users.create');\n }", "public function create()\n {\n return view('backend::users.create');\n }", "public function create()\n\t{\n return View::make('user.create');\n\t}", "public function create()\n {\n return view('user::create');\n }", "public function create()\n {\n return view('user::create');\n }", "public function create()\n {\n return view('user::create');\n }", "public function create()\n {\n return view('admin::auth.users.create');\n }", "public function create()\n {\n $User = User::get();\n view()->share('elements', $User);\n\n $UserRoles = UserRoles::get();\n view()->share('UserRoles', $UserRoles);\n\n return view('users.form');\n }", "public function newAction() {\n $this->buildAssets();\n\n $this->persistent->conditions = null;\n\n\n if ($this->request->isPost()) {\n $this->createNew();\n } else {\n $view = $this->view;\n $this->ctx->pickView($view, 'users/new');\n \n $userForm = new UsersForm();\n $this->view->form = $userForm;\n }\n }", "public function create()\n {\n return view('CMS::users.create');\n }", "public function create()\n {\n return view('create_new_user');\n }", "public function create()\n {\n $roles = Role::all();\n\n $title = __('Crear Usuario');\n $user = new User;\n return view('user.form', compact('user', 'title','roles'));\n }", "public function create()\n {\n return view('user.create');\n }", "public function create()\n {\n return view('user.create');\n }", "public function create()\n {\n return view('user.create');\n }", "public function create()\n {\n return view('user.create');\n }", "public function create()\n {\n return view('user.create');\n }", "public function create()\n {\n return view('user.create');\n }" ]
[ "0.8325336", "0.8320299", "0.8224984", "0.8186878", "0.81729275", "0.8164761", "0.8090949", "0.80711204", "0.80502844", "0.80146444", "0.8013211", "0.8011888", "0.8008955", "0.800888", "0.79978997", "0.79958636", "0.7989843", "0.7989178", "0.7989178", "0.79677856", "0.79656", "0.7965076", "0.7962862", "0.7957229", "0.79565614", "0.79391885", "0.79326886", "0.7931051", "0.7924697", "0.7920319", "0.7907222", "0.78954846", "0.78904045", "0.78903794", "0.7889391", "0.7886818", "0.7884881", "0.7884881", "0.7884881", "0.78502715", "0.7848417", "0.7845521", "0.78400475", "0.78366345", "0.7830168", "0.7826756", "0.7823253", "0.78218377", "0.78218377", "0.78218377", "0.78218377", "0.7819821", "0.7815329", "0.7811454", "0.78101045", "0.7808489", "0.7803429", "0.7792207", "0.7791231", "0.7787943", "0.7786534", "0.7782983", "0.77747583", "0.7765579", "0.7761437", "0.7760664", "0.77552056", "0.77489173", "0.77489173", "0.77489173", "0.77489173", "0.77489173", "0.7745731", "0.7743941", "0.7739387", "0.7736926", "0.773443", "0.773443", "0.773443", "0.7731148", "0.7730341", "0.7726578", "0.77264154", "0.7726073", "0.77258444", "0.7720193", "0.77160656", "0.77160656", "0.77160656", "0.7713385", "0.7712508", "0.7710636", "0.7708313", "0.7704324", "0.77032477", "0.7698452", "0.7698452", "0.7698452", "0.7698452", "0.7698452", "0.7698452" ]
0.0
-1
Show the form for receiving an email and reset password.
public function indexForgotten(Request $request) { return view('users.forgotten-password'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showPasswordResetForm()\n\t{\n\t\t# if we get here then forget the redirect value as the user will presumably always want to go back to \n\t\t# the log-in screen after requesting a password reset\n\t\tSession::put('ignoreRedirect', true);\n\n\t\t# the reset request succeeded\n\t\tif(Session::has('success')) \n\t\t{\n\t\t\t# set some success vars\n\t\t\t$message = Session::get('success')['public'];\n\t\t\t$messageClass = \"success\";\n\t\t}\n\n\t\t# error vars, something went wrong!\n\t\tif(Session::has('reset-errors')) \n\t\t{\t\n\t\t\t# some error responses come back without a validation errors array\n\t\t\tif(isset(Session::get('reset-errors')['errors'])) {\n\t\t\t\t$errors = reformatErrors(Session::get('reset-errors')['errors']);\n\t\t\t}\n\t\t\t\n\t\t\t$message = Session::get('reset-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$pageTitle = \"Forgotten password\";\n\n\t\treturn View::make('auth.password-reset', compact('errors', 'message', 'messageClass', 'input', 'pageTitle'));\n\t}", "public function showResetForm()\n {\n // if user is logged in, do not let him access this page\n if( Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $userID = SCMUtility::cleanText($_GET['userID']);\n $token = SCMUtility::stripTags($_GET['token']);\n\n if( ! $this->isOnResetPasswordSession($token) )\n {\n $this->resetPasswordSessionDeactivate();\n\n SCMUtility::setFlashMessage('Invalid Token or token has expired!');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $this->resetPasswordSessionDeactivate();\n\n View::make('templates/front/reset-password-form.php',compact('userID'));\n }", "public function ShowForm()\n\t\t{\n\t\t\tif (!$this->HasPermission()) {\n\t\t\t\t$this->NoPermission();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$GLOBALS['AddonId'] = $this->GetId();\n\t\t\t$GLOBALS['Message'] = GetFlashMessageBoxes();\n\t\t\t$this->ParseTemplate('emailchange.form');\n\t\t}", "public function showSendResetTokenForm(string $email = ''): void\n {\n $this->render('Authentification/RequestResetPassword', 'Demande de reinitialisation de mot de passe', ['email' => $email]);\n }", "public function showLinkRequestForm()\n {\n return view('pages.admin.auth.passwords.email');\n }", "public function showLinkRequestForm()\n {\n return view('auth.passwords.email');\n }", "public function showLinkRequestForm()\n {\n return view('auth.passwords.email');\n }", "protected function showForgot() {}", "public function passwordEmailForm()\n {\n return view('turtle::auth.password.email');\n }", "public function showLinkRequestForm()\n {\n return view('auth.forgotpass');\n }", "public function showLinkRequestForm()\n {\n return view('auth.organizer.passwords.email');\n }", "public function showResetPasswordForm(){\n return view('auth.passwords.reset');\n }", "public function showLinkRequestForm()\n {\n return view('auth.affiliate.passwords.email');\n }", "public function showForgotPassword() {\n\t\treturn view(\"pages.passwordreset.forgotpassword\");\n\t}", "public function forgotpassword() {\n\n\t\t$login_box_visiblity = '';\n\t\t$forgot_box_visiblity = 'visible';\n\n\t\t$this->JQValidator->addValidation('User', $this->User->validate, 'UserLoginForm');\n\t\t$this->JQValidator->addValidation('ForgotPasswordForm', $this->ForgotPasswordForm->validate, 'ForgotPasswordForm');\n\n\t\t$this->set(compact('login_box_visiblity', 'forgot_box_visiblity'));\n\n\t\tif (array_key_exists('ForgotPasswordForm', $this->data)) {\n\t\t\t$flag = $this->ForgotPassword->sendMail($this->data['ForgotPasswordForm'], 'admin');\n\n\t\t\tif ($flag) {\n\t\t\t\t$this->redirect('login');\n\t\t\t}\n\t\t} else {\n\t\t\t$this->login();\n\t\t}\n\t}", "public function showLinkRequestForm(): View\n {\n return view('admin::auth.passwords.email');\n }", "public function displayForgotPassword()\n {\n $this->render('forgot-password', ['head'=>['title'=>'Mot de passe oublié', 'meta_description'=>'']]);\n }", "public function form()\n\t{\n\t\tglobal $L;\n\t\t$sentEmails = $this->getSentEmailsArray();\n\n\t\t$html = '<div class=\"alert alert-primary\" role=\"alert\">';\n\t\t$html .= $this->description();\n\t\t$html .= '</div>';\n\n\t\t$html .= '<div>';\n\t\t// API key\n\t\t$html .= '<label><strong>Buttondown API Key</strong></label>';\n\t\t$html .= '<input id=\"apiKey\" name=\"apiKey\" type=\"text\" value=\"'.$this->getValue('apiKey').'\">';\n\t\t$html .= '<span class=\"tip\">Copy your API key on https://buttondown.email/settings/programming </span>';\n\t\t// Sending paused\n\t\t$html .= '<label>'.$L->get('paused').'</label>';\n\t\t$html .= '<select id=\"paused\" name=\"paused\" type=\"text\">';\n\t\t$html .= '<option value=\"true\" '.($this->getValue('paused')===true?'selected':'').'>'.$L->get('is-paused').'</option>';\n\t\t$html .= '<option value=\"false\" '.($this->getValue('paused')===false?'selected':'').'>'.$L->get('is-active').'</option>';\n\t\t$html .= '</select>';\n\t\t$html .= '<span class=\"tip\">'.$L->get('paused-tip').'</span>';\n\n\t\t// Start date\n\t\t$html .= '<label>'.$L->get('send-after').'</label>';\n\t\t$html .= '<input id=\"startDate\" name=\"startDate\" type=\"text\" value=\"'.$this->getValue('startDate').'\">';\n\t\t$html .= '<span class=\"tip\">'.$L->get('send-after-tip').'</span>';\n\t\t// Subject Prefix\n\t\t$html .= '<label>'.$L->get('subject-prefix').'</label>';\n\t\t$html .= '<input id=\"subjectPrefix\" name=\"subjectPrefix\" type=\"text\" value=\"'.$this->getValue('subjectPrefix').'\">';\n\t\t$html .= '<span class=\"tip\">'.$L->get('subject-prefix-tip').'</span>';\n\t\t\t\t// Sending paused\n\t\t$html .= '<label>'.$L->get('include-cover').'</label>';\n\t\t$html .= '<select id=\"includeCover\" name=\"includeCover\" type=\"text\">';\n\t\t$html .= '<option value=\"true\" '.($this->getValue('includeCover')===true?'selected':'').'>'.$L->get('yes').'</option>';\n\t\t$html .= '<option value=\"false\" '.($this->getValue('includeCover')===false?'selected':'').'>'.$L->get('no').'</option>';\n\t\t$html .= '</select>';\n\t\t$html .= '<span class=\"tip\">'.$L->get('include-cover-tip').'</span>';\n\t\t$html .= '</div><hr>';\n\t\t// List of page keys for which mail was sent \n\t\t$html .= '<h4>'.$L->get('sent-list').'</h4>';\n\t\t$html .= '<span class=\"tip\">'.$L->get('sent-list-tip').'</span>';\n\t\t$html .= '<div style=\"overflow-y: scroll; height:400px;\"><ul>';\n\t\tforeach ($sentEmails as $sentKey):\n\t\t\t$html .= '<li>'.$sentKey.'</li>';\n\t\tendforeach;\n\t\t$html .= '</ul></div>';\n\t\t$html .= '<div><a target=\"_blank\" rel=\"noopener\" href=\"https://buttondown.email/archive\">Buttondown Archive</a></div>';\n\t\treturn $html;\n\t}", "public function actionForgot()\n {\n $model = new UserForgotForm();\n\n /* if form is submitted */\n if ($model->load(request()->post())) {\n if($model->sendEmail()) {\n notify()->addSuccess(t('app', 'Please check your email for confirmation!'));\n }\n return $this->redirect(['admin/index']);\n }\n\n /* view params */\n $this->setViewParams([\n 'pageTitle' => view_param('pageTitle') . ' | ' . t('app', 'Forgot password'),\n ]);\n\n app()->view->title = t('app', 'Forgot Password') . ' - ' . options()->get('app.settings.common.siteName', 'EasyAds');\n\n /* custom body class */\n $this->view->params['bodyClasses'] .= ' login-page';\n\n /* render the view */\n return $this->render('forgot', [\n 'model' => $model,\n ]);\n }", "public function showLinkRequestForm()\n {\n if (property_exists($this, 'linkRequestView')) {\n return view($this->linkRequestView);\n }\n return $this->load_theme('auth.password.email');\n }", "public function emailform()\n {\n return view('auth.recordar_correo');\n }", "public function requestPasswordReset()\n {\n $this->View->render('user/requestPasswordReset');\n }", "public function forgotPassword(){\n\t\t// Set the Page Title ('pageName', 'pageSection', 'areaName')\n\t\t$this->_view->pageTitle = array('Forgot Your Password', 'Login');\n\t\t// Set Page Description\n\t\t$this->_view->pageDescription = 'You can reset your password.';\n\t\t// Set Page Section\n\t\t$this->_view->pageSection = 'Login';\n\n\t\t// Define expected and required\n\t\t$this->_view->expected = array('email');\n\t\t$this->_view->required = array('email');\n\n\t\t// Set default variables\n\t\t$this->_view->missing = array();\n\t\t$this->_view->error = array();\n\t\t$this->_view->postData = array();\n\n // If Form has been submitted process it\n\t\tif(!empty($_POST)){\t\t\t\n\t\t\t// Send $_POST to validate function\n\t\t\t$post = Form::ValidatePost($_POST, $this->_view->expected, $this->_view->required);\n\n\t\t\t// If true return array of formatted $_POST data\n\t\t\tif($post[0] == true){\n\t\t\t\t$this->_view->postData = $post[1];\n\t\t\t}\n\t\t\t// else return array of missing required fields\n\t\t\telse{\n\t\t\t\t$this->_view->missing = $post[1];\n\t\t\t}\n\n\t\t\tif(empty($this->_view->missing)){\n\n\t\t\t\t$email = $this->_view->postData['email'];\n\t\t\t\t\n\t\t\t\t// Fetch array of user details\n//\t\t\t\t$userDetails = $this->_model->getUserByEmail($email);\n//\t\t\t\t$this->_view->userDetails = $userDetails[0];\n\n\t\t\t\t// Validate Email\n\t\t\t\t$validateEmail = Form::ValidateEmail($email);\n\t\t\t\t// If true do nothing\n\t\t\t\tif($validateEmail[0] == true){}\n\t\t\t\t// else return error message\n\t\t\t\telse{\n\t\t\t\t\t$this->_view->error[] = $validateEmail[1];\n\t\t\t\t}\n\n\t\t\t\t// If no errors yet continue\n\t\t\t\tif(empty($this->_view->error)){\n\n\t\t\t\t\t// Get User ID for given Email Address\n\t\t\t\t\t$checkUser = $this->_model->checkUserLogin($email);\n\n\t\t\t\t\tif(!empty($checkUser)){\n\t\t\t\t\t\t$userID = $checkUser[0]['id'];\n\n\t\t\t\t\t\t// Create Unique string\n\t\t\t\t\t\t$security_key = hash('sha256', $email.time());\n\t\t\t\t\t\t$exp_date = date(\"Y-m-d H:i:s\", strtotime('+2 hours'));\n\n\t\t\t\t\t\t// Create array of data to post to the model\n\t\t\t\t\t\t$data = array();\n\t\t\t\t\t\t$data['user_id'] = $userID;\n\t\t\t\t\t\t$data['security_key'] = $security_key;\n\t\t\t\t\t\t$data['exp_date'] = $exp_date;\n\n\t\t\t\t\t\t// Send the Data to the Model\n\t\t\t\t\t\t$insertPasswordRecovery = $this->_model->insertPasswordRecovery($data);\n\t\t\t\t\t\tif($insertPasswordRecovery > 0){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Send confirmation email\n\t\t\t\t\t\t\t$to = $checkUser[0]['email'];\n\t\t\t\t\t\t\t$this->_view->email_name = $checkUser[0]['firstname'];\n\t\t\t\t\t\t\t$this->_view->email_message = \"We have received a request to reset your account password. If you wish to reset your password click the button below and follow the steps listed. If you have not requested a password reset then ignore this email.\";\n $this->_view->email_button_link = $_SERVER['REDIRECT_proto'].'://'.$_SERVER['SERVER_NAME'].'/users/reset-password/'.$userID.'/'.$security_key.'/';\n\t\t\t\t\t\t\t$this->_view->email_button_text = \"Reset Password\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$subject = \"Reset account email\";\n $message = $this->_view->renderToString('email-templates/general-message-with-button', 'blank-layout');\n\n\t\t\t\t\t\t\t$sendEmail = Html::sendEmail($to, $subject, SITE_EMAIL, $message);\n\n\t\t\t\t\t\t\t$this->_view->success[] = \"We have sent you a link to reset your password. Please check your inbox for further instructions.\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t// Error Message\n\t\t\t\t\t\t\t$this->_view->error[] = 'There was a problem trying to create new reset password.';\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->_view->error[] = 'No user found with this email. Please try different email.';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\t// Error Message\n\t\t\t\t$this->_view->error[] = 'Please complete the missing required fields.';\n\t\t\t}\n\t\t}\n\n\t\t// Render the view ($renderBody, $layout, $area)\n\t\t$this->_view->render('users/forgot-password', 'login-layout');\n\t}", "public function passwordformAction(){\n\t\t/*if($this->_request->getParam('error')){\n\t\t\t$this->view->assign('messages',$this->_messages->getMessages());\n\t\t}*/\n\t\t\t\t\n\t\t$form = new Bel_Forms_Builder('passreset_form','/usermanagement/profile/savepassword');\n\t\t$this->view->assign('form',$form);\n\t\t$this->view->display('forms/ajax.tpl');\t\t\n\t}", "public function new_password_form()\n {\n $markers = array();\n $markers['errors'] = $this->Register['Validate']->getErrors();\n if (isset($_SESSION['FpsForm'])) unset($_SESSION['FpsForm']);\n\n\n $markers['action'] = get_url('/users/send_new_password/');\n $source = $this->render('newpasswordform.html', array('context' => $markers));\n\n\n // Navigation PAnel\n $nav = array();\n $nav['navigation'] = get_link(__('Home'), '/') . __('Separator')\n . get_link(h($this->module_title), '/users/') . __('Separator') . __('Password repair');\n $this->_globalize($nav);\n\n\n return $this->_view($source);\n }", "public function passwordForgotAction()\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( 'authPasswordForgot' );\n }", "public function showResetPassword() {\n\t\treturn view(\"pages.passwordreset.resetpassword\");\n\t}", "public function reset_password_form()\n\t{\n\t\t$code = Input::get('code');\n\t\tif($user = $this->repo->checkResetCode($code))\n\t\t\treturn View::make('authentication.reset_password')->with('user',$user)->with('code',$code);\n\t\treturn Redirect::to('forgot_password');\n\t}", "public function forgotPasswordAction()\n {\n $form = new ForgotPasswordForm();\n\n if ($this->request->isPost())\n {\n if($this->security->checkToken())\n {\n // Send emails only is config value is set to true\n if ($this->getDI()->get('config')->useMail) {\n\n if ($form->isValid($this->request->getPost()) == false) {\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $user = Users::findFirstByEmail($this->request->getPost('email'));\n if (!$user) {\n $this->flash->success('There is no account associated to this email');\n } else {\n\n $resetPassword = new ResetPasswords();\n $resetPassword->usersId = $user->id;\n if ($resetPassword->save()) {\n // $this->flash->success('Success! Please check your messages for an email reset password');\n $this->flashSess->success(\"Success! Please check your messages for an email reset password\");\n $this->view->disable();\n return $this->response->redirect('');\n } else {\n foreach ($resetPassword->getMessages() as $message) {\n $this->flash->error($message);\n }\n }\n }\n }\n } else {\n $this->flash->warning('Emails are currently disabled. Change config key \"useMail\" to true to enable emails.');\n }\n }\n else {\n $this->flash->error('CSRF Validation is Failed');\n }\n }\n $this->view->form = $form;\n }", "public function displayResetPassword()\n {\n $this->render('reset-password', ['head'=>['title'=>'Réinitialisation de votre mot de passe', 'meta_description'=>'']]);\n }", "public function getPasswordResetForm();", "public function forgot_password()\n {\n return View::make(Config::get('confide::forgot_password_form'));\n }", "public function admin_forgot_password_form() {\n if ($this->checkLogin('A') == '') {\n\t\t\t\t$this->load->view(ADMIN_ENC_URL.'/templates/forgot_password.php', $this->data);\n } else {\n redirect(ADMIN_ENC_URL.'/dashboard');\n }\n }", "public function showLinkRequestForm()\n {\n if (property_exists($this, 'linkRequestView')) {\n return view($this->linkRequestView);\n }\n\n if (view()->exists('non-auth.password_reset.askemailform')) {\n return view('non-auth.password_reset.askemailform');\n }\n\n return view('non-auth.password_reset.askemailform');\n }", "public function requestPassReset()\n {\n $this->form->addText('email', 'Email')\n ->setRequired('Email field is required')\n ->addRule(Form::EMAIL, 'Please write a valid email address')\n ->addRule(callback($this, 'checkEmailExists'), 'Sorry, the email %value does not exists on our registry', 'email');\n\n $this->form->addSubmit('send', 'Reset Password');\n\n $this->form->onSuccess[] = callback($this, 'requestPassResetProcess');\n return $this->form;\n }", "public function showForgetPasswordForm()\n { \n \n if(request()->isPost()) {\n \n $inputs = request()->get();\n\n $validator = new ForgetpassValidator;\n $validation = $validator->validate($inputs);\n\n if (count($validation)) {\n session()->set('input', $inputs);\n\n return redirect()->to(url()->previous())\n ->withError(ForgetpassValidator::toHtml($validation));\n }\n\n try {\n $token = bin2hex(random_bytes(100));\n\n $user = $this->userService->getFirstByEmail( $inputs['email']);\n $params = $this->userService->resetPassword($user, $token);\n\n queue(\n // 'Components\\Queue\\Email@registeredSender',\n \\Components\\Queue\\Email::class,\n [\n 'function' => 'registeredSender',\n 'template' => 'emails.forgetpass',\n 'to' => $inputs['email'],\n 'url' => route('showResetPasswordForm', ['token' => $token , 'id' => $user->getId() ]),\n 'subject' => 'You tried to reset your password.',\n ]\n );\n \n } catch (EntityException $e) {\n return redirect()->to(url()->previous())\n ->withError(lang()->get('responses/forgetpass.wait_more', ['time' => $e->getMessage() ]));\n\n \n } catch (EntityNotFoundException $e) {\n return redirect()->to(url()->previous())\n ->withError(lang()->get('responses/forgetpass.no_email'));\n }\n\n return redirect()->to(route('showLoginForm'))\n ->withSuccess(lang()->get('responses/forgetpass.creation_success'));\n\n }\n \n # find session if it has an 'input'\n if (session()->has('input')) {\n\n # get the session 'input' then remove it\n $input = session()->get('input');\n session()->remove('input');\n\n # set the tag 'email' to rollback the value inputted\n tag()->setDefault('email', $input['email']);\n }\n\n return view('auth.showForgetPasswordForm');\n }", "public function showPasswordForm()\n {\n return view('parameters.users.change_password');\n }", "public function admin_reset_password_form() {\n if ($this->checkLogin('A') == '') {\n\t\t\t$reset_id = $this->uri->segment(4);\t\t\t\n\t\t\t$condition = array('reset_id' => $reset_id);\n $check_admin = $this->admin_model->get_selected_fields(ADMIN, $condition, array('email'));\n\t\t\t$this->data['admin_type']='';\n if ($check_admin->num_rows() == 0) {\n\t\t\t\t$check_admin = $this->admin_model->get_selected_fields(SUBADMIN, $condition, array('email'));\n\t\t\t\tif ($check_admin->num_rows() == 0) {\n\t\t\t\t\t$this->setErrorMessage('error', 'This link has been removed.','admin_adminlogin_link_has_removed');\n\t\t\t\t}else{\n\t\t\t\t\t$this->data['admin_type'] = SUBADMIN;\n\t\t\t\t}\n }else{\n\t\t\t\t$this->data['admin_type'] = ADMIN;\n\t\t\t}\n\t\t\tif($this->data['admin_type']==''){\n\t\t\t\tredirect(ADMIN_ENC_URL);\n\t\t\t}else{\n\t\t\t\t$this->data['reset_id'] = $reset_id;\n\t\t\t\t$this->load->view(ADMIN_ENC_URL.'/templates/reset_password.php', $this->data);\n\t\t\t}\n } else {\n redirect(ADMIN_ENC_URL.'/dashboard');\n }\n }", "public function getForgot()\n {\n return View::make(Config::get('confide::forgot_password_form'));\n }", "public function forgotPassword()\r\n {\r\n return View::make(Config::get('confide::forgot_password_form'));\r\n }", "public function forgot_password()\n\t{\n\t\t$email = Input::get('email');\n\n\t\t//Get reset code and send email\n\t\tif($resetCode = $this->repo->getResetCode($email))\n\t\t{\n\t\t\treturn View::make('authentication.confirm_reset_code_sent')->with('email',$email)->with('resetCode',$resetCode);\n\t\t}\n\t\treturn View::make('authentication.forgot_password')->withInput(Input::all()); \n\t}", "public function forgot_password()\n\t{\n\t\t$this->load->view('admin/forgot_password/forgot_password_form');\n\t}", "public function admin_password_reset_page(){\n return view('singin&singup.forget.enter_email');\n \n }", "private function displayForm()\n {\n // Preparation des paramètres du mail.\n $data['headerTitle'] = 'Contact';\n $data['headerDescription'] = 'Page de contact';\n $data['title'] = 'Contact';\n\n // Affichage du formulaire.\n $this->load->view('templates/header', $data);\n $this->load->view('templates/alert', $data);\n $this->load->view('contact/index', $data);\n $this->load->view('templates/footer', $data);\n }", "public function forgotPasswordAction()\n {\n $form = new ForgotPasswordForm();\n\n if ($this->request->isPost()) {\n\n if ($form->isValid($this->request->getPost()) == false) {\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $user = Users::findFirstByEmail($this->request->getPost('email'));\n if (!$user) {\n $this->flash->success('There is no account associated to this email');\n } else {\n\n $resetPassword = new ResetPasswords();\n $resetPassword->usersId = $user->id;\n if ($resetPassword->save()) {\n $this->flash->success('Success! Please check your messages for an email reset password');\n } else {\n foreach ($resetPassword->getMessages() as $message) {\n $this->flash->error($message);\n }\n }\n }\n }\n }\n\n $this->view->form = $form;\n }", "public function forgotPasswordAction()\n {\n $form = new ForgotPasswordForm();\n\n if ($this->request->isPost()) {\n\n if ($form->isValid($this->request->getPost()) == false) {\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $user = Users::findFirstByEmail($this->request->getPost('email'));\n if (!$user) {\n $this->flash->success('There is no account associated to this email');\n } else {\n\n $resetPassword = new ResetPasswords();\n $resetPassword->usersId = $user->id;\n if ($resetPassword->save()) {\n $this->flash->success('Success! Please check your messages for an email reset password');\n } else {\n foreach ($resetPassword->getMessages() as $message) {\n $this->flash->error($message);\n }\n }\n }\n }\n }\n\n $this->view->form = $form;\n }", "public function actionRequestPasswordReset()\n {\n $model = new PasswordResetRequestForm();\n\n if (!$model->load(Yii::$app->request->post()) || !$model->validate()) {\n return $this->render('requestPasswordResetToken', ['model' => $model]);\n }\n\n if (!$model->sendEmail()) {\n Yii::$app->session->setFlash('error', Yii::t('app', \n 'Sorry, we are unable to reset password for email provided.'));\n return $this->refresh();\n }\n\n Yii::$app->session->setFlash('success', Yii::t('app', 'Check your email for further instructions.'));\n\n return $this->goHome();\n }", "function requestpasswordreset()\n {\n $this->view->render('login/requestpasswordreset');\n }", "public function showForgetPassword(){\n $input = Input::all();\n\n //check email, token\n if(!empty($input) && !empty($input['email']) && !empty($input['token'])){\n $user = User::where('email', '=', $input['email'])\n ->where('account_token', '=', $input['token'])\n ->first();\n\n if(!empty($user)) {\n // Check expire account token\n\t\t if(User::checkExpiredTime($user) == true){\n\t return View::make('user.reset_password')->with(array('email'=>$input['email'], 'account_token'=>$user->account_token));\n\t\t } else {\n\t\t \treturn Redirect::to('/')->with('forgetPassword', 1);\n\t\t }\n } else {\n \treturn Redirect::to('/')->with('forgetPassword', 1);\n\n }\n }\n return View::make('user.forgot_password');\n }", "public function actionForgot()\n {\n $this->render('forgot');\n }", "public function showForm()\n\t{\n echo view($this->config->views['login']);\n\t}", "public function actionForgottenPassword() {\n\n $model = new ForgottenPasswordForm();\n\n if (isset($_POST['ForgottenPasswordForm'])) {\n\n $model->attributes = $_POST['ForgottenPasswordForm'];\n\n if ($model->validate()) {\n\n $person = DBServices::getPerson($model->email);\n\n if ($person != null) {\n\n $newPassword = DBServices::resetPassword($person);\n\n if (Emails::sendPerson_ResetPasswordEmail($person, $newPassword)) {\n\n Yii::app()->user->setFlash('success', Yii::t('texts', 'FLASH_EMAIL_SUCCESSFULLY_SENT'));\n } else {\n Yii::app()->user->setFlash('error', Yii::t('texts', 'FLASH_ERROR_SENDING_EMAIL'));\n }\n } else {\n Yii::app()->user->setFlash('error', Yii::t('texts', 'FLASH_ERROR_EMAIL_DOES_NOT_EXIST'));\n }\n }\n }\n\n $this->render('forgottenPassword', array('model' => $model));\n }", "public function actionIndex()\n {\n $this->layout = '//layouts/forgot';\n\n $email = '';\n if (r()->isPostRequest) {\n $email = $_POST['email'];\n // $captcha = app()->getController()->createAction(\"captcha\");\n\n // $code = $captcha->verifyCode;\n\n //check email\n if ($_POST['email'] != '') {\n\n $email = $_POST['email'];\n // check the email from parse is correct\n $query = new parseQuery('_User');\n $query->where('email', $email);\n $result = $query->find();\n\n if (count($result->results) == 0) {\n //no user exists\n user()->setFlash('error', 'Invalid email!');\n } else {\n // the email is valid and we send the email reset password for him\n $user = new parseUser();\n $user->requestPasswordReset($email);\n\n user()->setFlash('success', 'An email has sent to your email');\n\n $this->refresh();\n\n }\n } else {\n user()->setFlash('error', 'Username or Email is required');\n }\n\n }\n $this->render('index', array(\n 'email' => $email\n ));\n }", "function _UserDisplayLostRegEmailForm( &$module, $id, &$params, $returnid )\n {\n $feusers = $module->GetModuleInstance('FrontEndUsers');\n if( !$feusers )\n {\n\t$module->_DisplayErrorPage($id, $params, $returnid,\n\t\t\t\t $module->Lang('error_nofeusersmodule'));\n\treturn;\n }\n\n if( isset( $params['error'] ) )\n {\n\t$module->smarty->assign('error', $params['error']);\n }\n if( isset( $params['message'] ) )\n {\n\t$module->smarty->assign('message', $params['message']);\n }\n\n $inline = $module->GetPreference('inline_forms',true);\n if( isset($params['noinline']) )\n {\n\t$inline = false;\n }\n $module->smarty->assign('startform',\n\t\t\t $module->CreateFormStart( $id, 'sendanotheremail', $returnid, 'post', '', $inline));\n $module->smarty->assign ('endform', $module->CreateFormEnd ());\n $module->smarty->assign ('input_username',\n\t\t\t $module->CreateInputText($id, 'input_username',\n\t\t\t\t\t\t $val, 20,\n\t\t\t\t\t\t $feusers->GetPreference('max_usernamelength')));\n $module->smarty->assign('submit',$module->CreateInputSubmit($id,'submit',\n\t\t\t\t\t\t\t $module->Lang('submit')));\n echo $module->ProcessTemplateFromDatabase('selfreg_sendanotheremail_template');\n }", "public function showChangePasswordForm()\n {\n return view('auth.changepassword');\n }", "public function output_setup_form() {\n\t\t$related_api = Thrive_Dash_List_Manager::connection_instance( 'mandrill' );\n\t\tif ( $related_api->is_connected() ) {\n\t\t\t$credentials = $related_api->get_credentials();\n\t\t\t$this->set_param( 'email', $credentials['email'] );\n\t\t\t$this->set_param( 'mandrill-key', $credentials['key'] );\n\t\t}\n\n\t\t$this->output_controls_html( 'mailchimp' );\n\t}", "public function forgot_password(){\n\n $this->data[\"title_tag\"]=\"Lobster | Accounts | Forgot Password\";\n\n $this->view(\"accounts/forgot_password\",$this->data);\n }", "public function showChangePasswordForm()\n {\n return view('dashboard.change-password');\n }", "public function forgotPassword()\n {\n if ($this->issetPostSperglobal('email') && !empty($this->getPostSuperglobal('email'))) {\n if ($this->users_manager->resetToken($this->getPostSuperglobal('email'))) {\n $this->session->writeFlash('success', \"Les instructions pour réinitialiser votre mot de passe vous ont été envoyées par email, vous avez 30 minutes pour le faire.\");\n } else {\n $this->session->writeFlash('danger', \"Aucun compte ne correspond à cet adresse mail : {$this->getPostSuperglobal('email')}.\");\n }\n } else {\n $this->session->writeFlash('danger', \"L'adresse mail n'est pas ou est mal renseignée.\");\n }\n $this->render('forgot-password', ['head'=>['title'=>'Mot de passe oublié', 'meta_description'=>'']]);\n }", "public function actionRequestpasswordreset() {\n\t\treturn $this->render('requestpasswordreset');\n\t}", "public function email_form()\r\n\t{\r\n\t\t$ambil_akun = $this->m_login->ambil_user($this->session->userdata('uname'));\r\n\t\t$data = array(\r\n\t\t\t'user'\t=> $ambil_akun,\r\n\t\t\t);\r\n\r\n\t\t$stat = $this->session->userdata('lvl');\r\n if($stat==1){//admin\r\n $data['content'] = 'superAdmin-modul/gsm/email';\r\n $this->load->view('superAdmin-modul/template', $data);\r\n }elseif($stat==2){ //user\r\n $data['content'] = 'admin-modul/gsm/email';\r\n $this->load->view('admin-modul/template',$data);\r\n }elseif($stat==3){\r\n $data['content'] = 'user-modul/gsm/email';\r\n $this->load->view('user-modul/template',$data);\r\n }else{ //user\r\n\t\t\t$this->session->sess_destroy();\r\n\t\t\tredirect('login','refresh');\r\n\t\t}\r\n\t}", "public function showChangePasswordForm(){\n return view('admin.change-password');\n }", "public function getForgotPassword()\n {\n \treturn view('layouts.forgotPassword');\n }", "public function showResetForm($token = null)\n {\n $email = PasswordReset::where('token',explode('=', $token)[1])->first()->email;\n return view('auth.passwords.reset', compact('email'));\n }", "public function forgotPassword()\n {\n return \\View::make('pageblok::users.forgotPasswordForm');\n }", "function requestpasswordreset_action()\n {\n $login_model = $this->loadModel('Login');\n // set token (= a random hash string and a timestamp) into database\n // to see that THIS user really requested a password reset\n if ($login_model->setPasswordResetDatabaseToken() == true) {\n // send a mail to the user, containing a link with that token hash string\n $login_model->sendPasswordResetMail();\n }\n $this->view->render('login/requestpasswordreset');\n }", "public function showPasswordResetForm(string $token): void\n {\n /** Si le token passer en paramètre n'est pas de la longueur attendu */\n if (strlen($token) !== 100)\n {\n FlashMessageService::addErrorMessage('Le lien de reinitialisation n\\'est pas valide.');\n $this->redirectWithAltoRouter('home');\n }\n else\n {\n /** Récupérer l'utilisateur correspondant au token */\n $userInfo = (new Users())->setPasswordResetToken($token)->getUserByPasswordResetToken();\n /** Si on ne trouve pas d'utilisateur correspondant */\n if ($userInfo === false)\n {\n FlashMessageService::addErrorMessage('Le lien demander n\\'est pas reconnu.');\n $this->redirectWithAltoRouter('login');\n }\n }\n $this->render('Authentification/ResetPasswordForm', 'Reinitialisation du mot de passe.');\n }", "protected function form()\n {\n return $this->view\n ->template('Moss:Sample:login')\n ->set('method', __METHOD__)\n ->set('flash', $this->app->get('flash'))\n ->render();\n }", "public function forgotPasswordAction()\n {\n $form = $this->createForm(new LoginType());\n\n return $this->render(\n 'iFlairLetsBonusFrontBundle:Homepage:forgot_password.html.twig',\n [\n 'login_form' => $form->createView(),\n ]\n );\n }", "public function dialogResetPassword(Application $app)\n {\n // get the form values\n $form = $app['request']->get('form');\n // validate the email\n $errors = $app['validator']->validateValue($form['email'], new Assert\\Email());\n if (count($errors) > 0) {\n // invalid email\n $message = '';\n foreach ($errors as $error) {\n $message .= sprintf('%s< br />', $error->getMessage());\n }\n return $this->dialogForgottenPassword($app, $message);\n }\n $Users = new Users($app);\n if (false === ($user = $Users->selectUser($form['email']))) {\n $message = 'There exists no user with the submitted email address.';\n $app['monolog']->addDebug(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $message));\n return $this->dialogForgottenPassword($app, $message);\n }\n // email address is valid, so we can create a new GUID and send a mail\n if (false === ($guid = $Users->createNewGUID($form['email']))) {\n $message = 'Can\\'t create a new GUID as long the last GUID is not expired. You must wait 24 hours between the creation of new passwords.';\n $app['monolog']->addDebug(sprintf('[%s - %s] %s', __METHOD__, __LINE__, 'No GUID created, last creation within the last 24 hours.'));\n return $this->dialogForgottenPassword($app, $message);\n }\n\n // create the email body\n $body = $app['twig']->render($app['utils']->getTemplateFile(\n '@phpManufaktur/Basic/Template',\n 'framework/mail/password.create.twig'),\n array('name' => $user['displayname'], 'server' => FRAMEWORK_URL,\n 'reset_password_url' => FRAMEWORK_URL.'/password/create/'.$guid['guid']\n ));\n // create the message\n $message = \\Swift_Message::newInstance()\n ->setSubject($app['translator']->trans('kitFramework password reset'))\n ->setFrom(array(SERVER_EMAIL_ADDRESS))\n ->setTo(array($form['email']))\n ->setBody($body)\n ->setContentType('text/html');\n // send the message\n $app['mailer']->send($message);\n\n // show a response dialog\n return $app['twig']->render($app['utils']->getTemplateFile(\n '@phpManufaktur/Basic/Template',\n 'framework/password.create.twig'),\n array('email' => $form['email']));\n }", "public function actionForgotPassword() {\n\t\tif (!\\Yii::$app->user->isGuest) {\n\t\t\treturn $this->redirect( Url::to(['users/myprofile']) );\n\t\t}\n\t\t$model = new PasswordResetRequestForm();\n\t\tif ($model->load(Yii::$app->request->post()) && $model->validate()) {\n if ($model->sendEmail()) {\n Yii::$app->session->setFlash('item', Yii::t('yii','Password reset link has been sent to your email address.'));\n\t\t\t\treturn $this->redirect( Url::to(['site/login']) );\n } else {\n Yii::$app->session->setFlash('item', Yii::t('yii','Sorry, We are unable to reset the password for the email provided.'));\n return $this->redirect( Url::to(['site/login']) );\n }\n }\n return $this->render('requestPasswordResetToken', [\n 'model' => $model,\n ]);\n }", "public function passwordChangeForm()\n {\n return view('turtle::auth.password.change');\n }", "function show_email_form($email)\n\t{\n\t\techo \"<br /><form id = 'form3' onsubmit=\\\"return submitInfo(document.getElementById('form3'),'ticket.php');\\\" ><textarea name = 'message' cols=40 rows=6>Enter your message here...</textarea><br /><input type = 'submit' name = 'email' value = 'Email:$email' onclick='document.pressed=this.value' ><input type = 'reset' name = 'reset' value = 'Reset' ></form>\";\n\t}", "function onForgotPassword($info){\n\t\t$this->_bookframe(\"frmForgotPassword\");\n\t}", "public function formAction()\n {\n $form = $this->createForm(new UserForgotPassType());\n return array('form' => $form->createView());\n }", "public function forgotPassword(){\r\n\r\n fn_logged_in();\r\n\r\n $view = \"forgot_password\";\r\n $data = array(\r\n \"page_title\" => \"Forgot Password\"\r\n );\r\n $this->render_page($view, $data);\r\n }", "public function showResetRequestPage()\n {\n $form = $this->container->get('form.factory')\n ->create(new ResettingRequestForm());\n return $this->render('TracktusUserBundle:Resetting:resetting_request.html.twig', \n array('form' => $form->createView()));\n }", "function display_forgot_form()\r\n{\r\n?>\r\n <br>\r\n <form action=\"forgot_passwd.php\" method=post>\r\n <table width=250 cellpadding=2 cellspacing=0 bgcolor=#cccccc>\r\n <tr><td>Escribe tu nombre de usuario</td>\r\n <td><input type=text name=username size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td colspan=2 align=center><input type=submit value=\"Change password\">\r\n </td></tr>\r\n </table>\r\n <br>\r\n<?\r\n}", "public function showForm()\n {\n return view('auth.register-step2');\n }", "public function forgetpassword()\n \t{\n \t\t$this->data['title'] = 'Forgot Password';\n\t\t$this->show_viewFrontInner('forget-password', $this->data);\n \t}", "Public Function resetPassword()\n\t{\n\t\t$Code = $this->generateResetCode();\n\t\t$Email = $this->email;\n\t\t$Subject = 'Reset Password Request from ' . $_SERVER['HTTP_HOST'];\n\t\t$Body = <<<END\nThis is an automatically generated email from $_SERVER[HTTP_HOST] regarding a password reset.<br/>\nIf you did not request a password reset then please disregard this email.<br/>\n<br/>\nOtherwise, follow this link to reset your password:<br/>\n<a href=\"http://$_SERVER[HTTP_HOST]/BevoMedia/Index/ResetPassword.html?EmailCode=$Code&Email=$Email\">http://$_SERVER[HTTP_HOST]/BevoMedia/Index/ResetPassword.html?EmailCode=$Code&Email=$Email</a>\nEND;\n\t\t\n\t\t$this->ClearResetCode();\n\t\t$this->InsertResetCode($Code);\n\t\t$this->SendEmail($Email, $Subject, $Body);\n\t}", "public function forgotPasswordAction ()\n {\n $this->view->setRenderLevel (View::LEVEL_ACTION_VIEW);\n }", "public function showResetPassword()\n {\n return view('users.password_reset');\n }", "public function changePasswordForm()\n {\n\n return view('changePassword');\n }", "public function getForgot(){\n $this->layout->content = View::make('admin.forgot');\n }", "public function display_account_forgot_password( ){\n\t\tif( $this->is_page_visible( \"forgot_password\" ) ){\n\t\t\tif( file_exists( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_forgot_password.php' ) )\t\n\t\t\t\tinclude( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_forgot_password.php' );\n\t\t\telse\n\t\t\t\tinclude( WP_PLUGIN_DIR . \"/\" . EC_PLUGIN_DIRECTORY . '/design/layout/' . get_option( 'ec_option_latest_layout' ) . '/ec_account_forgot_password.php' );\n\t\t}\n\t}", "public function showRegistrationForm()\n {\n $askForAccount = false;\n return view('client.auth.register',compact(\"askForAccount\"));\n }", "public function email()\n\t{\n\t\treturn View::make('email');\n\t}", "public function requestPasswordReset_action()\n {\n PasswordResetModel::requestPasswordReset(Request::post('user_name_or_email'));\n Redirect::to('index');\n }", "public function forgotpasswordAction()\n {\n\t\t// get adapter\n\t\t$dbAdapter = $this->dbAdapter;\n\t\t$users = new Application_Model_Users();\n\t\t$form = new Application_Form_IndexForgot();\n\t\t\n\t\t$errorMessage = \"\"; \n\t\t\n\t\t$this->view->form = $form;\n\t\tif($this->getRequest()->isPost()){\n\t\t\tif($form->isValid($_POST)){\n\t\t\t\t$data = $form->getValues();\n\t\t\t\t$phone = $data['phone']; \n\t\t\t\t$result = $users->getAllUserDetailsByPhone($phone);\n\t\t\t\tif($result){\n\t\t\t\t\t$StaffName = $result['StaffName'];\n\t\t\t\t\t$EMail = trim($result['EMail']);\n\t\t\t\t\t$LoginID = $result['LoginID'];\n\t\t\t\t\t$role = $result['role'];\n\t\t\t\t\t$from_email = $StaffName.\"@acme.com\";\n\t\t\t\t\t\n if($role==\"national_head\")\n {\n\t\t\t\t\t $roletype_name = \"National head\";\n }\n else if($role==\"zone_head\")\n {\n\t\t\t\t\t $roletype_name = \"Zone head\";\n }\n else if($role==\"regional_head\")\n {\n\t\t\t\t\t $roletype_name = \"Regional head\";\n }\t\n else if($role==\"circle_head\")\n {\n\t\t\t\t\t $roletype_name = \"Circle head\";\n }\t\n else if($role==\"service_manager\")\n { \n\t\t\t\t\t $roletype_name = \"Service manager\";\n }\t\n else if($role==\"cluster_incharge\")\n {\n\t\t\t\t\t $roletype_name = \"Cluster incharge\";\n }\t\t\t\t\t\t\n \t\t\t\t\t$subject = \"$roletype_name forgot password email\";\n\t\t\t\t\t$message .= \"Here is your $roletype_name login details:<br><br>\";\n\t\t\t\t\t$message .= \"Email: $EMail <br>\";\n\t\t\t\t\t$message .= \"Username: $StaffName <br>\";\n\t\t\t\t\t$message .= \"Login ID: $LoginID <br><br>\";\n\t\t\t\t\t$message .= \"Thanks,<br>\";\n\t\t\t\t\t$message .= \"ACME Team\";\n\t\t\t\n\t\t\t\t\t$confobj = new Application_Model_Fsr();\n\t\t\t\t\t\n\t\t\t\t\t$confArr = $confobj->getSmtpMailServerSettings();\n\t\t\t\t\t\n\t\t\t\t\t$config = $confArr['config'];\n\t\t\t\t\t$server = $confArr['server'];\n\t\t\t\t\t$fromemailconf = $confArr['fromemailconf'];\n\t\t\t\t\t\n\t\n\t\t\t\t\t$transport = new Zend_Mail_Transport_Smtp($server, $config);\n\t\t\t\t\tZend_Mail::setDefaultTransport($transport);\n\t\t\t\t\t//echo $EMail;die;\n\t\t\t\t\ttry{\n\t\t\t\t\t\t$mail = new Zend_Mail();\n\t\t\t\t\t\t$mail->setSubject($subject);\n\t\t\t\t\t\t$mail->setFrom($fromemailconf['fromemail'], $fromemailconf['fromname']);\n\t\t\t\t\t\t$mail->addTo($EMail, $StaffName);\n\t\t\t\t\t\t$mail->setBodyHtml($message);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$mail->send($transport);\n\t\t\t\t\t\t$this->view->errorMessage = \"Email has been sent successfully.\";\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception $e)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->view->errorMessage = \"Error in sending email.\";\n\t\t\t\t\t//\techo '<pre>';\n\t\t\t\t\t//echo $e->getMessage();die;\n\t\t\t\t\t\t//print_r($e);\n\t\t\t\t\t}\t\t\n\t\t\t\t\t//echo 'dsfds';die;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$this->view->errorMessage = \"Invalid mobile number. Please try again.\";\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}", "public function get_forgot_password() {\n return View::make('login.forgot-password');\n }", "public function actionPasswordReset()\n\t{\n\t\t$this->render('passwordReset');\n\t}", "public function passwordEmail()\n {\n $this->shellshock(request(), [\n 'email' => 'required|email',\n 'g-recaptcha-response' => 'sometimes|recaptcha',\n ]);\n\n if (($user = app(config('turtle.models.user'))->where('email', request()->input('email'))->first())) {\n $token = Password::getRepository()->create($user);\n\n Mail::send(['text' => 'turtle::emails.password'], ['token' => $token], function (Message $message) use ($user) {\n $message->subject(config('app.name') . ' Password Reset Link');\n $message->to($user->email);\n });\n\n flash('success', 'Password reset link emailed!');\n\n return response()->json(['reload_page' => true]);\n }\n else {\n return response()->json(['errors' => ['email' => [trans('auth.failed')]]], 422);\n }\n }", "public function showResetForm(Request $request)\n {\n $token = $request->token;\n\n if (!$token) {\n return redirect()->route('crm.password.email');\n }\n\n $user = $this->user->findByPasswordResetToken($token);\n\n if ($user && app()->make('auth.password.broker')->tokenExists($user, $token)) {\n return view('core.auth.passwords.reset')\n ->withToken($token)->withForm(['route' => 'crm.password.reset', 'class' => 'form-horizontal'])\n ->withEmail($user->email);\n }\n\n // return redirect()->route('frontend.auth.password.email')\n // ->withFlashDanger(trans('exceptions.frontend.auth.password.reset_problem'));\n }", "function forgotten_password_reset()\n {\t\n $data['heading'] = $this->lang->line('FAL_forgotten_password_label');\n $data['fal'] = $this->fal_front->forgotten_password_reset();\n\t $this->load->view($this->_container, $data); \n }", "public function index() {\n\t\treturn View::make('reset_password');\n\t}", "public function getChangePasswordForm()\n {\n $this->data['title'] = trans('backpack::base.my_account');\n $this->data['user'] = $this->guard()->user();\n\n return view('backpack::auth.account.change_password', $this->data);\n }", "public static function lost_password() {\n\t\t/**\n\t\t * After sending the reset link, don't show the form again.\n\t\t */\n\t\tif ( ! empty( $_GET['reset-link-sent'] ) ) {\n\t\t\treturn ur_get_template( 'myaccount/lost-password-confirmation.php' );\n\n\t\t\t/**\n\t\t\t * Process reset key / login from email confirmation link\n\t\t\t */\n\t\t} elseif ( ! empty( $_GET['show-reset-form'] ) ) {\n\n\t\t\tif ( isset( $_COOKIE[ 'wp-resetpass-' . COOKIEHASH ] ) && 0 < strpos( $_COOKIE[ 'wp-resetpass-' . COOKIEHASH ], ':' ) ) {\n\t\t\t\tlist( $rp_login, $rp_key ) = array_map( 'ur_clean', explode( ':', wp_unslash( $_COOKIE[ 'wp-resetpass-' . COOKIEHASH ] ), 2 ) );\n\t\t\t\t$user = self::check_password_reset_key( $rp_key, $rp_login );\n\n\t\t\t\tif ( ! empty( $user ) ) {\n\t\t\t\t\t$form_id = ur_get_form_id_by_userid( $user->ID );\n\t\t\t\t\t$enable_strong_password = ur_get_single_post_meta( $form_id, 'user_registration_form_setting_enable_strong_password' );\n\t\t\t\t\t$minimum_password_strength = ur_get_single_post_meta( $form_id, 'user_registration_form_setting_minimum_password_strength' );\n\n\t\t\t\t\tif ( 'yes' === $enable_strong_password || '1' === $enable_strong_password ) {\n\n\t\t\t\t\t\t// Enqueue script.\n\t\t\t\t\t\twp_enqueue_script( 'ur-password-strength-meter' );\n\t\t\t\t\t\twp_localize_script( 'ur-password-strength-meter', 'enable_strong_password', $enable_strong_password );\n\t\t\t\t\t}\n\n\t\t\t\t\t// reset key / login is correct, display reset password form with hidden key / login values.\n\t\t\t\t\tif ( is_object( $user ) ) {\n\t\t\t\t\t\treturn ur_get_template(\n\t\t\t\t\t\t\t'myaccount/form-reset-password.php',\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'key' => $rp_key,\n\t\t\t\t\t\t\t\t'login' => $rp_login,\n\t\t\t\t\t\t\t\t'enable_strong_password' => $enable_strong_password,\n\t\t\t\t\t\t\t\t'minimum_password_strength' => $minimum_password_strength,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself::set_reset_password_cookie();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Show lost password form by default.\n\t\tur_get_template(\n\t\t\t'myaccount/form-lost-password.php',\n\t\t\tarray(\n\t\t\t\t'form' => 'lost_password',\n\t\t\t)\n\t\t);\n\t}", "public function getForgot()\n {\n return view('password.forgot');\n }", "public function forgotPassword()\n\t{\n\t\t$this->layout->content = View::make('login.password');\n\t}", "public function emailpassword($error = NULL) {\n \n $this->template->content3=View::instance('v_users_emailpassword'); \n $this->template->title= APP_NAME. \" :: Login\";\n // add required js and css files to be used in the form\n $client_files_head=Array('/js/languages/jquery.validationEngine-en.js',\n '/js/jquery.validationEngine.js',\n '/css/validationEngine.jquery.css'\n );\n $this->template->client_files_head=Utils::load_client_files($client_files_head); \n # Pass data to the view\n $this->template->content3->error = $error;\n\n echo $this->template;\n\n\n }" ]
[ "0.770645", "0.7644647", "0.7390729", "0.7374672", "0.7365633", "0.73515415", "0.73515415", "0.722683", "0.72263473", "0.7149228", "0.70756054", "0.70602167", "0.70522314", "0.7044608", "0.7043371", "0.7042462", "0.6995902", "0.6953199", "0.69472796", "0.6892269", "0.68674254", "0.68584555", "0.6847451", "0.6822038", "0.6810876", "0.6804471", "0.68032616", "0.6791392", "0.67460686", "0.6735766", "0.6735174", "0.67164147", "0.67062265", "0.67055887", "0.6702394", "0.6685123", "0.6672661", "0.66679096", "0.6664178", "0.6655837", "0.66370314", "0.6623084", "0.66130555", "0.6599451", "0.65933836", "0.65933836", "0.6586252", "0.6576849", "0.6560698", "0.6546136", "0.65393704", "0.6536671", "0.6531454", "0.65113133", "0.65077025", "0.65015775", "0.6500722", "0.64930433", "0.6473094", "0.6454251", "0.64463574", "0.6428941", "0.641564", "0.6406167", "0.64010555", "0.639576", "0.6394039", "0.639064", "0.6387346", "0.6384527", "0.6381197", "0.6377709", "0.6372704", "0.6359551", "0.6351635", "0.6345122", "0.6344027", "0.6341668", "0.6332254", "0.6311009", "0.63047266", "0.63041246", "0.62952507", "0.6293689", "0.62880903", "0.6287008", "0.6284719", "0.62840664", "0.62765723", "0.62758505", "0.62687486", "0.6267273", "0.6259906", "0.625598", "0.62327915", "0.6231255", "0.6228388", "0.62280655", "0.6226385", "0.6226309", "0.6224698" ]
0.0
-1
TODO: falta ajustar Show the form for creating a new password.
public function createNewPassword(Request $request) { return view('users.reset-password'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function new_password_form()\n {\n $markers = array();\n $markers['errors'] = $this->Register['Validate']->getErrors();\n if (isset($_SESSION['FpsForm'])) unset($_SESSION['FpsForm']);\n\n\n $markers['action'] = get_url('/users/send_new_password/');\n $source = $this->render('newpasswordform.html', array('context' => $markers));\n\n\n // Navigation PAnel\n $nav = array();\n $nav['navigation'] = get_link(__('Home'), '/') . __('Separator')\n . get_link(h($this->module_title), '/users/') . __('Separator') . __('Password repair');\n $this->_globalize($nav);\n\n\n return $this->_view($source);\n }", "public function showPasswordForm()\n {\n return view('parameters.users.change_password');\n }", "private function password()\n {\n $element = new Password('password');\n $element->setLabel('Password');\n $element->setAttribute('class', 'form-control');\n $element->setAttribute('placeholder', 'Password');\n $element->addValidators(array(\n new PresenceOf(array('message' => 'Password is required'))\n ));\n $this->add($element);\n }", "public function new () : void\n {\n // add a user\n $ResetUserPassword = new ResetUserPassword($this->session, $this->router);\n $ResetUserPassword->new();\n\n // form\n $form = new ForgetForm($_POST, $ResetUserPassword->getErrors());\n\n // url of the current page\n $url = $this->router->url(\"password_new\");\n\n // flash message\n $flash = $this->session->generateFlash();\n\n $title = App::getInstance()->setTitle(\"Forget\")->getTitle();\n $bodyClass = strtolower($title);\n\n\n $this->render('security/password/new', $this->router, $this->session, compact('form', 'url', 'title', 'bodyClass', 'flash'));\n }", "public function passwordChangeForm()\n {\n return view('turtle::auth.password.change');\n }", "public function getNewPassword()\n\t{\n\n\t\treturn View::make('user.newpassword');\t\n\t}", "public function create()\n {\n return view(\"users.change_password\")->with([\"title\"=>\"Set a new password\"]);\n\n }", "protected function actionNewPassword() {\n\t\t$this->content = $this->parser->parseTemplate(CMT_TEMPLATE.'app_welcome/cmt_new_password.tpl');\n\t}", "public function new_password($id)\n {\n $data['id'] = $id;\n return view(\"fronts.recovery-password\", $data);\n }", "public function create()\n {\n return view('client.changePassword');\n }", "public function getPasswordChangeForm();", "public function create()\n {\n return view('auth.change-password');\n }", "public function passwordformAction(){\n\t\t/*if($this->_request->getParam('error')){\n\t\t\t$this->view->assign('messages',$this->_messages->getMessages());\n\t\t}*/\n\t\t\t\t\n\t\t$form = new Bel_Forms_Builder('passreset_form','/usermanagement/profile/savepassword');\n\t\t$this->view->assign('form',$form);\n\t\t$this->view->display('forms/ajax.tpl');\t\t\n\t}", "public function getPasswordSetForm();", "function create_new_password(){\n $user_id = $this->encrypt_decrypt('decrypt', $_GET['puk']);\n \n $view = array(\n 'user_id' => $user_id,\n 'content' => 'new_password_view'\n ); \n\n $this->load->view('includes/content', $view);\n }", "protected function password($options) {\n $element = new Password('passwordTxt');\n $element->setLabel('Password');\n $element->setAttribute('class', 'form-control');\n if($options['action'] == 'create' || ($options['action'] != 'create' && $this->request->getPost('passwordTxt')))\n {\n $validators = array( new PresenceOf(array('message' => 'Password is required')) );\n if($this->request->isPost() && $this->request->getPost('passwordTxt')){\n $validators[] = new StringLength(array(\n \"min\" => 8,\n \"max\" => 16,\n \"messageMaximum\" => \"Password must not be greater than 16 characters\",\n \"messageMinimum\" => \"Password must be between 8-16 characters\",\n ));\n }\n $element->addValidators($validators);\n $element->setUserOption('lblRequired', true);\n }\n $this->add($element); \n }", "public function create(){\n\n return view('adminchangepass');\n }", "public function changePasswordForm()\n {\n\n return view('changePassword');\n }", "function password( \n\t $name, $title = null, $value = null, \n\t $required = false, \n\t $attributes = null\n\t){\n return $this->input(\n\t $name, \n\t Form::TYPE_PASSWORD,\n\t $title, \n\t $value, \n\t $required, \n\t $attributes,\n\t null,\n\t Form::DATA_STRING\n );\n\t}", "function thb_password_form() {\n\t\t global $post;\n\t $label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );\n\t $o = '<p class=\"thb-password-protected-message\">' . __( \"This content is password protected\", 'thb_text_domain') . '<span>' . __(\"to view it please enter your password below\", 'thb_text_domain') . '</span></p>\n\t <form action=\"' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '\" method=\"post\">\n\t\t\t<label class=\"hidden\" for=\"' . $label . '\">' . __( \"Password:\",'thb_text_domain' ) . ' </label>\n\t\t\t<input name=\"post_password\" placeholder=\"Password\" id=\"' . $label . '\" type=\"password\" size=\"20\" maxlength=\"20\" />\n\t\t\t<input id=\"submit\" type=\"submit\" name=\"Submit\" value=\"' . esc_attr__( \"Submit\" ) . '\" />\n\t\t</form>\n\t ';\n\t return $o;\n\t}", "public function passwordPage() {\n return view('admin.account.change_password');\n }", "public function showChangePasswordForm(){\n return view('admin.change-password');\n }", "public function newPassword(){\n\t\t// Load helpers and libraries\n helper(['form', 'url']);\n $M_User = new M_User();\n\n\t\t// Default return\n\t\t$ret = redirect()->to(base_url());\n\n $options = [\n\t\t\t'action' => ROUTE_NEW_PWD_ACCOUNT, // Route\n\t\t\t'script' => self::ENCRYPTION_URL // Script URL for SHA256 encryption\n ];\n\n $request = $this->request;\n\n\t\t$token = $request->getGetPost('token');\n\t\t// Checking if a corresponding token exists in the DB\n\t\tif ($token != null){\n\t\t\t$options['token'] = $token;\n\t\t\tif ($M_User->findOneBy('securityToken', $token) != null) {\n\t\t\t\t// Displaying password creation form\n\t\t\t\t$ret = render(FORM_NEW_PWD, $options);\n }\n }\n\t\telseif (session()->has('logged_in')){\n\t\t\t$options['token'] = null;\n\t\t\t$ret = render(FORM_NEW_PWD, $options);\n\t\t}\n\n\t\t$postData = $request->getPostGet('newPwd');\n\t\t// Second step of the process (processing form data)\n\t\tif (is_array($postData)){\n\t\t\t// Something went wrong : displaying an alert\n\t\t\tif ($M_User->resetPassword($postData['token'],$postData['password']) != SC_SUCCESS){\n\t\t\t\t$options['token'] = $postData['token'];\n\t\t\t\t$options['alert'] = 'Une erreur interne est survenue';\n $options['type'] = 'danger';\n\t\t\t\t$ret = render(FORM_NEW_PWD, $options);\n }\n\t\t\t// Everything went well : redirecting to base url\n\t\t\telse{\n\t\t\t\t$ret = redirect()->to(base_url());\n\t\t\t\t// TODO - Display an alert to notify the user that everything is OK\n }\n }\n\n return $ret;\n\t}", "public function showChangePasswordForm()\n {\n return view('auth.changepassword');\n }", "public function password()\n {\n return view('account.account.change-password');\n }", "public function create()\n {\n return view('auth.passwords.salesrep_forgot-password');\n }", "public function form()\n {\n $this->text('old_password', '原密码')->rules('required');\n $this->text('new_password', '新密码')->rules('required');\n $this->text('confirm_password', '重复新密码')->rules('required');\n }", "public function passwordChangeForm()\n {\n return view('student.change');\n }", "public function getChangePasswordForm()\n {\n $this->data['title'] = trans('backpack::base.my_account');\n $this->data['user'] = $this->guard()->user();\n\n return view('backpack::auth.account.change_password', $this->data);\n }", "public function showChangePasswordForm()\n {\n return view('dashboard.change-password');\n }", "public function password()\n {\n $this->isUser();\n\n $this->data['noCabinetOrAdmin'] = true;\n\n if ($_POST) {\n\n if (!$_POST['old-password'] && !$_POST['new-password']) {\n\n $userModel = new UserModel();\n\n $validateResult = $userModel->validate($_POST);\n\n if ($validateResult === true) {\n\n $checkPassword = $userModel->checkOldPassword($_POST['old-password']);\n\n if ($checkPassword) {\n\n if ($userModel->refreshPassword($_POST)) {\n\n $this->data['success'] = 'Пароль успешно изменен';\n\n } else {\n\n $this->data['warning'] = 'Произошла ошибка';\n }\n\n } else {\n\n $this->data['warning'] = 'Старый пароль введен не правильно';\n }\n\n } else {\n\n $this->data['warning'] = $validateResult;\n }\n\n } else {\n\n $this->data['warning'] = 'Все поля должны быть заполнены';\n }\n }\n\n $this->render('password');\n }", "private function AddPasswordField()\n {\n $name = 'Password';\n \n $this->AddField(Input::Password($name));\n //Password needs contain lower case letter, upper case letter, and a digit\n //$validator = new RegExp('/((?=.*\\d)(?=.*[a-z])(?=.*[A-Z]))/');\n //$this->AddValidator($name, $validator);\n $this->AddValidator($name, new StringLength(6, 20));\n if (Request::PostData('PasswordRepeat') || !$this->user->Exists())\n {\n $this->SetRequired($name);\n }\n }", "public function editPassword(){\n return view(editPassword);\n }", "public function passwordEmailForm()\n {\n return view('turtle::auth.password.email');\n }", "public function get_password()\n\t{\n\t\t$user = Auth::user();\n\t\t$form = AccountPresenter::form_password($user);\n\t\t$data = array(\n\t\t\t'eloquent' => $user,\n\t\t\t'form' => $form,\n\t\t);\n\n\t\tSite::set('title', __(\"orchestra::title.account.password\"));\n\n\t\treturn View::make('orchestra::account.password', $data);\n\t}", "public static function renderPassword();", "function password()\n{\n $view = new View('visiteur/password');\n $view->generate();\n}", "public function editPassword(){\n \treturn view('auth.passwords.changePass');\n }", "public function changePassowrdShow(){\n return view(\"pages.changepassword\");\n }", "public function create()\n\t{\n return View::make('passwordresets.create');\n\t}", "public function passwordAction(){\r\n $this->view->password = '';\r\n }", "public function create()\n {\n return view('auth.forgot-password');\n }", "public function create()\n {\n return view('auth.forgot-password');\n }", "public function formAction()\n {\n $form = $this->createForm(new UserForgotPassType());\n return array('form' => $form->createView());\n }", "public function create()\n\t{\n\t\t//creating the view to allow users to reset their password\n\t\treturn View::make('password_resets.create');\n\t}", "public function custom_post_password_form() {\n\n\t\tglobal $post;\n\t\t$label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );\n\t\t$o = '<div class=\"clearfix\"><form action=\"' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '\" method=\"post\">\n\t\t' . __( \"<p>This post is password protected. To view it please enter your password below:</p>\" ) . '\n\t\t<div class=\"row collapse\">\n\t <div class=\"large-12 columns\"><label for=\"' . $label . '\">' . __( \"Password:\" ) . ' </label></div>\n\t <div class=\"large-8 columns\">\n\t <input name=\"post_password\" id=\"' . $label . '\" type=\"password\" size=\"20\" class=\"input-text\" />\n\t </div>\n\t <div class=\"large-4 columns\">\n\t <input type=\"submit\" name=\"Submit\" class=\"postfix button nice blue radius\" value=\"' . esc_attr__( \"Submit\" ) . '\" />\n\t </div>\n\t\t</div>\n\t </form></div>\n\t\t';\n\t\treturn $o;\n\n\t}", "public function forgotPasswordAction()\n {\n $form = $this->createForm(new LoginType());\n\n return $this->render(\n 'iFlairLetsBonusFrontBundle:Homepage:forgot_password.html.twig',\n [\n 'login_form' => $form->createView(),\n ]\n );\n }", "public function create_password() {\n\t\tif(!empty($this->request->params['named']['email'])){\n\t\t\t$email = $this->request->params['named']['email'];\n\t\t}\n\t\t\n\t\t$authUserData = $this->Auth->user();\n\t\tif(empty($authUserData)){\n\t\t\t$this->Session->setFlash(__('There was an error logging you in and setting up a password. Your temporary password has been sent to your email address.', true));\n\t\t\t//Send the temporary password to the user's email address\n\t\t\t$options = array(\n\t\t\t\t\t\t\t\t'layout'=>'temporary_password',\n\t\t\t\t\t\t\t\t'subject'=>'Your Temporary Password',\n\t\t\t\t\t\t\t\t'view'=>'default'\n\t\t\t\t\t\t\t\t);\n\t\t\t$viewVars = array('temp_password'=>$authUserData['User']['email'],'user'=>$user);\n\n\t\t\t//Send the email\n\t\t\t$this->_sendEmail($email,$options,$viewVars);\n\t\t\t$this->redirect(array('controller'=>'users','action'=>'login'));\n\t\t}\n\t\t\n\t\t$user = $this->User->find('first',array('conditions'=>array('email'=>$authUserData['User']['email'])));\n\t\tif (!empty($this->request->data)) {\n\t\t\t$this->request->data['User']['id'] = $user['User']['id']; //Get the logged in user's id\n\t\t\tif ($this->User->verifyNewPassword($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('Password created.', true));\n\t\t\t\t$this->redirect(array('controller'=>'uploads','action'=>'index'));\n\t\t\t}\n\t\t}\n\t}", "public function actionProfiepassword()\n {\n $model = new PasswortVerandern();\n \n if ($model->load(Yii::$app->request->post())) {\n \n if($model->passwortZurucksetzen(\\Yii::$app->user->getId()))\n {\n return $this->redirect(['index']);\n }\n }\n \n return $this->render('profiepassword',[\n 'model'=>$model\n \n ]);\n }", "public function password($name, $value = NULL, array $attributes = NULL) {\n $attributes = Appform::add_class($attributes, 'password');\n $this->load_values($name, $value, $attributes);\n $result = '<li>'.Kohana_Form::password($name, $value, $attributes);\n // add error span\n if (isset($this->errors[$name])) {\n $result .= '<span class=\"error\">'.ucfirst($this->errors[$name]).'</span>';\n } else if (isset($attributes['info'])) {\n // else add info span\n $result .= '<span class=\"info\">'.$attributes['info'].'</span>';\n }\n $result .= '</li>';\n return $result;\n\t}", "public static function convert_password_field() {\n\n\t\t// Create a new Password field.\n\t\tself::$field = new GF_Field_Password();\n\n\t\t// Add standard properties.\n\t\tself::add_standard_properties();\n\n\t\t// Add Password specific properties.\n\t\tself::$field->inputs = array(\n\t\t\tarray(\n\t\t\t\t'id' => '1',\n\t\t\t\t'label' => esc_html__( 'Enter Password', 'gravityforms' ),\n\t\t\t\t'name' => '',\n\t\t\t\t'customLabel' => self::$nf_field['label'],\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id' => '1.2',\n\t\t\t\t'label' => esc_html__( 'Confirm Password', 'gravityforms' ),\n\t\t\t\t'name' => '',\n\t\t\t\t'customLabel' => self::$nf_field['re_pass'],\n\t\t\t),\n\t\t);\n\n\t}", "public function password()\n {\n }", "public function newPassword() {\n $this->form_validation->set_rules('email', 'Email', 'required');\n $this->form_validation->set_rules('temp_code', 'Temporärer Code', 'required');\n $this->form_validation->set_rules('password', 'Passwort', '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 \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, 'Provided code not valid anymore');\n }\n \n $this->user_model->setValue(\n \t'hashed_password',\n \tpassword_hash($this->input->post('password'), PASSWORD_DEFAULT));\n \t\n if (! $this->user_model->updatePassword()) {\n \t$this->error(400, 'Error wail updating password');\n }\n \n $data['new password'] = 'set';\n $this->response($data);\n }", "public function showpassword()\n\t\t{\n\t\t\tif(Auth::check()) {\n\t\t\t\treturn View::make('updatepassword');\n\t\t\t} else {\n\t\t\t\tApp::abort(403);\n\t\t\t}\n\t\t}", "public function create()\n {\n return Inertia::render('Auth/ForgotPassword');\n }", "function forgot_password() {\n $datos['titulo'] = \"Restablecer Contraseña\";\n $this->render_page('usuarios/forgot_password', $datos);\n }", "protected function repeatPassword($options) {\n $element = new Password('repeatPassword');\n $element->setLabel('Repeat Password');\n $element->setAttribute('class', 'form-control');\n if($options['action'] == 'create' || ($options['action'] != 'create' && $this->request->getPost('passwordTxt')))\n {\n $validators = array( new PresenceOf(array('message' => 'Confirmation Password is required')) );\n if($this->request->isPost() && $this->request->getPost('passwordTxt') && $this->request->getPost('repeatPassword')){\n $validators[] = new Confirmation(array('message' => \"Password doesn't match\", 'with' => \"passwordTxt\"));\n }\n $element->addValidators($validators);\n $element->setUserOption('lblRequired', true);\n }\n $this->add($element); \n }", "function getFieldPassword(){\n\t\t$form_ret = '';\n\t\t$dataField = get_option('axceleratelink_srms_opt_password');\n\t\t$dataTitle = get_option('axceleratelink_srms_opt_tit_password');\n\t\t$tooltip = setToolTipNotification('password');\t\t\n\t\tif ($dataField == 'true'){\n\t\t\t$form_ret .= \"</br><label>\".$dataTitle.\"<span class='red'>*</span>\".$tooltip.\"</label><br><input type='password' name='newpassword' value='' class='' id='password'></br><div id='password_err_con'></div>\";\t\t\n\t\t}\n\t\treturn $form_ret;\n\t}", "public function setPasswordField($password = true) {}", "public function viewChangePassword()\n {\n // header and module properties\n\t\t$this->data['page_module'] = MY_ACCOUNT_MODULE;\n\t\t$this->data['page_title'] = CHANGE_PASSWORD_TITLE;\n\t\t\n // to preserve previous url, check if the validation failed\n if (!Session::has('danger')) {\n $this->setPreviousListURL(strtolower(CHANGE_PASSWORD_TITLE)); \n \n // also remove the user_photo session\n Session::forget('user_photo');\n }\n\n // load the show form\n return View::make('my_account.change_password')->with('data', $this->data);\n }", "function zen_draw_password_field($name, $value = '', $parameters = 'maxlength=\"40\"') {\n return zen_draw_input_field($name, $value, $parameters, 'password', true);\n }", "public function render()\n {\n return view('components.password-input');\n }", "public function showEditPassword()\n {\n return view('pages.settings.password.index');\n }", "public function forgot_password()\n {\n return View::make(Config::get('confide::forgot_password_form'));\n }", "public function actionPassword()\n {\n $id = Yii::$app->user->id;\n\t\t$model = $this->findModel($id);\n\t\t$model->scenario = 'password';\n if ($model->load(Yii::$app->request->post())) {\t\n\t\t\tif(!Yii::$app->security->validatePassword($model->old_password, Yii::$app->user->identity->password_hash)){\n\t\t\t\tYii::$app->getSession()->setFlash('error', 'Old password not match with current password');\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$model->password = $model->new_password;\n\t\t\t\tif($model->save()) {\n\t\t\t\t\tYii::$app->getSession()->setFlash('success', 'Password have changed.');\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tYii::$app->getSession()->setFlash('error', 'Password is not change.');\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $this->redirect(['password']);\n } else {\n return $this->render('password', [\n 'model' => $model,\n ]);\n }\n }", "function form_password($field, $options) {\n $defaults = array(\n 'wrap' => true,\n 'label' => true,\n 'class' => array('input', 'password')\n );\n\n $options = array_merge($defaults, $options);\n\n $field = strtolower($field);\n\n $output = '<input type=\"password\" name=\"' . $field . '\" id=\"' . form__field_id($field) . '\"';\n\n $output .= ' />';\n\n if($options['wrap']) {\n $options['field'] = $field;\n $output = form__wrap($output, $options);\n }\n\n $error = form_error_message($field);\n if(!empty($error)) {\n $output .= $error;\n }\n\n return html__output($output);\n}", "public function actionPassword() {\n\t\t$content = ModelBase::factory('Setting')->handlePassword($this->data);\n\n\t\tif ($content->get('updated')) $this->setAlert('info', 'Password terupdate!');\n\n\t\t// Template configuration\n\t\t$this->layout = 'modules/setting/index.tpl';\n\t\t$data = ModelBase::factory('Template')->getSettingData(compact('content'));\n\n\t\t// Render\n\t\treturn $this->render($data);\n\t}", "public function password($text){\n\t\t$text['label'] = isset($text['label']) ? $text['label'] : 'Enter Text Here: ';\n\t\t$text['value'] = isset($text['value']) ? $text['value'] : '';\n\t\t$text['name'] = isset($text['name']) ? $text['name'] : '';\n\t\t$text['class'] = isset($text['class']) ? 'input_text '.trim($text['class']) : 'input_text';\n $text['onlyField'] = isset($text['onlyField']) ? $text['onlyField'] : false;\n $text['extraAtt'] = isset($text['extraAtt']) ? $text['extraAtt'] : '';\n\t\tif($text[\"onlyField\"]==true){\n return '<input type=\"password\" class=\"'.$text['class'].'\" name=\"'.$text['name'].'\" id=\"'.$text['name'].'\" value=\"'.$text['value'].'\" '.$text['extraAtt'].' />';\n }\n else{\n return '<div class=\"flclear clearfix\"></div>\n\t\t\t\t<label for=\"'.$text['name'].'\">'.$text['label'].'&nbsp;</label>\n \t<input type=\"password\" class=\"'.$text['class'].'\" name=\"'.$text['name'].'\" id=\"'.$text['name'].'\" value=\"'.$text['value'].'\" '.$text['extraAtt'].' />';\n }\n\n\t}", "public function change_password()\n {\n return view('backend.profile.change-password');\n }", "public function create()\n\t{\n\t\t$password = \"ml2.0\";\n\t\treturn View::make('gear.create')->with('password', $password);\n\t}", "public function setNewPassword()\n {\n PasswordResetModel::setNewPassword(\n Request::post('user_name'), Request::post('user_password_reset_hash'),\n Request::post('user_password_new'), Request::post('user_password_repeat')\n );\n Redirect::to('index');\n }", "public function get_change_password() {\n return View::make('login.change-password');\n }", "public function changePasswordAction()\r\n\t{\r\n\t\t$this->_view->_title = 'Thay đổi mật khẩu';\r\n\r\n\t\tif ($this->_arrParam['form']['token'] > 0) {\r\n\r\n\t\t\t$new = $this->_arrParam['form']['new-password'];\r\n\t\t\t$enter = $this->_arrParam['form']['enter-password'];\r\n\r\n\t\t\tif ($new != $enter) {\r\n\t\t\t\t$this->_view->error = 'Mật khẩu không khớp. Xin kiểm tra lại';\r\n\t\t\t} else {\r\n\r\n\t\t\t\t$this->_model->changePassword($this->_arrParam);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// URL::redirect($this->_arrParam['module'], $this->_controller, 'index');\r\n\r\n\r\n\r\n\t\t$this->_view->render(\"{$this->_controller}/change_password\");\r\n\t}", "public function changePasswordAction()\n {\n $form = new Form\\Password();\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n $userModel = new Model\\Users();\n $identity = $this->_auth ->getIdentity();\n $userId = $identity->getId();\n $user = $userModel->getUser($userId);\n $result = $userModel->savePassword($user, $form->getValue('new_password'), $form->getValue('password'));\n\n if ($result) {\n $this->_helper->getHelper('FlashMessenger')->addMessage('Your password was changed.'); \n } else {\n $this->_helper->getHelper('FlashMessenger')->addMessage('Your password was NOT changed.');\n }\n $this->_redirect($this->getRequest()->getRequestUri());\n }\n $this->view->passwordForm = $form;\n }", "public function olvidoPassword(){\n\t}", "public static function option_neopress_password() {\n printf(\n '<input type=\"password\" id=\"neopress_password\" name=\"neopress_password\" value=\"%s\" />',\n get_option('neopress_password')\n );\n }", "public function editPasswordAdmin()\n {\t\n \treturn view('setting.edit-password-admin');\n }", "public function cngpassword()\n {\n return view('scout.CngPassword');\n }", "public function generateRandomPassword(){\n\t\t$new_password = htmlspecialchars(Password::strong_random_password());\n\t\tif(!empty($new_password)){\n\t\t\techo '<input id=\"new_pw\" value=\"'.$new_password.'\" class=\"form-control\" readonly/>';\n\t\t}\n\t}", "public function generateRandomPassword(){\n\t\t$new_password = htmlspecialchars(Password::strong_random_password());\n\t\tif(!empty($new_password)){\n\t\t\techo '<input id=\"new_pw\" value=\"'.$new_password.'\" class=\"form-control\" readonly/>';\n\t\t}\n\t}", "public function actionCreate()\n {\n $model = new RegisterForm();\n $model->type = User::TYPE_USER;\n $model->status = User::STATUS_ACTIVE;\n $model->loadDefaultValues();\n\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n $model->password_hash = (new Security())->generatePasswordHash($model->password);\n if ($model->save()) {\n return $this->redirect(['index']);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionNewPass($id){\n \n if(empty($id)){\n $this->goHome();\n }\n \n $this->isLoggedLogoutUser();\n \n $name = $this->userManager->newPasswordCheck($id);\n \n if(!$name){\n $this->goHome('Tento odkaz je starý, prosím požádejte o heslo znovu.', 'Log:lostPass', [], 'waring');\n }\n \n $this->template->name = $name;\n }", "public function getChangePassword(){\n return view('pages.change_password');\n }", "public function showForm()\n {\n return view('auth.register-step2');\n }", "protected function _password()\n {\n $element = new Zend_Form_Element_Text('password');\n $element->setLabel('Password')\n ->addDecorators($this->_inputDecorators)\n ->setRequired(true)\n ->addValidator(\n 'StringLength',\n false,\n array('min' => Users_Model_User::MIN_PASSWORD_LENGTH)\n );\n\n return $element;\n }", "public function cngpassword()\n {\n return view('user.CngPassword');\n }", "protected function maybe_show_password_form() {\n\t\tif ( $this->password_required() ) {\n\t\t\t$show_pw = false;\n\t\t\t$show_pw = apply_filters('timber/post/content/show_password_form_for_protected', $show_pw);\n\t\t\tif ( $show_pw ) {\n\t\t\t\treturn apply_filters('timber/post/content/password_form', get_the_password_form($this->ID), $this);\n\t\t\t}\n\t\t}\n\t}", "public function create()\n {\n $dashboard = new Dashboard();\n\n $dashboard->custom('\n <style>\n .password-generator-btn{\n border:none;\n border-radius: 3px;\n padding: 10px; \n }.pass{\n display: none;\n padding: 20px 20px 0 0;\n font-size: 16px;\n margin: 0;\n }.pass:hover{\n cursor:pointer;\n }.copied{\n z-index: 10000;\n display: none;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n border-radius: 2px;\n padding: 20px 25px;\n }\n </style>\n \n <div class=\"col-sm-12\">\n <div class=\"white-box\" style=\"margin-bottom: 0;\">\n <div class=\"password-generator-container\">\n <button class=\"password-generator-btn bg-danger text-white\">'. trans('workflow::admin.generate_access_key') .'</button>\n <p class=\"pass\"></p>\n </div>\n <div class=\"copied text-muted\"><h2>'. trans('workflow::admin.copied') .'</h2></div>\n </div>\n </div>\n \n <script>\n let pass = document.querySelector(\\'.pass\\');\n let btn = document.querySelector(\\'.password-generator-btn\\');\n btn.addEventListener(\\'click\\', function(){\n let length = 30,\n charset = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_/!&\",\n retVal = \"\";\n for (let i = 0, n = charset.length; i < length; ++i) {\n retVal += charset.charAt(Math.floor(Math.random() * n));\n }\n pass.style.display = \"block\";\n pass.innerHTML = retVal;\n });\n pass.onclick = function() {\n document.execCommand(\"copy\");\n };\n pass.addEventListener(\"copy\", function(event) {\n event.preventDefault();\n if (event.clipboardData) {\n event.clipboardData.setData(\"text/plain\", pass.textContent);\n $(\".copied\").slideDown(200);\n setTimeout(function(){\n $(\".copied\").slideUp(300);\n }, 3000);\n }\n });\n </script>\n ');\n\n $dashboard->generate();\n\n $form = new AdministrationForm();\n $form->route(Administration::route('workflow.store'));\n $form->form(WorkflowForm::class);\n\n Breadcrumbs::register('administration', function ($breadcrumbs) {\n $breadcrumbs->parent('base');\n $breadcrumbs->push(trans('workflow::admin.module_name'), Administration::route('workflow.index'));\n $breadcrumbs->push(trans('administration::admin.create'));\n });\n\n Administration::setTitle(trans('workflow::admin.module_name') . ' - ' . trans('administration::admin.create'));\n\n return $form->generate();\n }", "public function change_password() {\n\t\treturn view( 'provider.profile.change_password' );\n\t}", "public function necesitaCambiarPassword();", "function format_password($p_id, $p_name, $p_class = 'input-xs', $p_style = '', $p_prop = ''){\n\treturn '<input type=\"password\" id=\"' . $p_id . '\" name=\"' . $p_name . '\" class=\"' . $p_class . '\" style=\"' . $p_style . '\" ' . $p_prop . '/>';\n}", "public function create()\n {\n return View::make(Config::get('confide::signup_form'))\n \t\t\t->with('errors', true);\n }", "public function get_forgot_password() {\n return View::make('login.forgot-password');\n }", "public function getPassword() {}", "protected function _toHtml()\n {\n if (!$this->_authorization->isAllowed('Actiview_SetCustomerPassword::set_password')) {\n return;\n }\n\n return parent::_toHtml();\n }", "public function admin_forgot_password_form() {\n if ($this->checkLogin('A') == '') {\n\t\t\t\t$this->load->view(ADMIN_ENC_URL.'/templates/forgot_password.php', $this->data);\n } else {\n redirect(ADMIN_ENC_URL.'/dashboard');\n }\n }", "public function callback_password( $args ) {\n\n $name_id = $args['name_id'];\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n }else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';\n\n $html = sprintf( '<input type=\"password\" class=\"%1$s-text\" id=\"%2$s\" name=\"%2$s\" value=\"%3$s\"/>', $size, $name_id, $value );\n $html .= $this->get_field_description( $args );\n\n echo $html;\n }", "public function changeFormAction(): Response\n {\n $user = $this->getUser();\n\n $form = $this->createForm('AppBundle\\Form\\User\\PasswordChangeType', $user);\n\n // Password blacklist to be used by zxcvbn.\n $passwordBlacklist = [\n $user->getUsername(),\n $user->getEmail()\n ];\n\n return $this->render(':Form/User:password-change.html.twig', [\n 'form' => $form->createView(),\n 'passwordBlacklist' => json_encode($passwordBlacklist)\n ]);\n }", "public function forgotPassword()\r\n {\r\n return View::make(Config::get('confide::forgot_password_form'));\r\n }", "public function setPassword(){\n\t}", "public static function inputPassword($model,$attribute,$properties=array()) {\n// $attr = self::getNameValueID($model, $attribute);\n// $input_attributes = self::getInputAttributes($attr,$properties);\n// return '<input type=\"password\" ' . $input_attributes . ' />';\n return self::inputTag('password', $model, $attribute,$properties); \n }" ]
[ "0.80616045", "0.7684239", "0.7646801", "0.75258684", "0.75046504", "0.74696034", "0.74666655", "0.74477726", "0.7429513", "0.7419797", "0.73968446", "0.7364836", "0.73550475", "0.73549026", "0.7352263", "0.7333145", "0.72306854", "0.7224862", "0.71950847", "0.7187927", "0.7187068", "0.7143752", "0.71200097", "0.7107416", "0.706922", "0.7060494", "0.7057625", "0.70546246", "0.70533913", "0.7051913", "0.702061", "0.69884443", "0.69882333", "0.6965506", "0.6932847", "0.6920873", "0.69046396", "0.68919754", "0.68653744", "0.68633705", "0.68598855", "0.68597245", "0.68597245", "0.68353224", "0.68255454", "0.67849", "0.6744626", "0.67224866", "0.671535", "0.6713719", "0.6712589", "0.66924137", "0.6688292", "0.66830724", "0.6672391", "0.6641129", "0.6639826", "0.6639025", "0.6633308", "0.6619952", "0.66179144", "0.6613499", "0.6604224", "0.66007125", "0.659746", "0.65828586", "0.65775967", "0.65754277", "0.6571125", "0.65711075", "0.65678316", "0.655332", "0.6547701", "0.65472937", "0.65430814", "0.65407705", "0.6539021", "0.6536749", "0.6521688", "0.6521688", "0.64924294", "0.64924073", "0.6470893", "0.64625025", "0.645887", "0.64588577", "0.645746", "0.64455736", "0.6433705", "0.6432745", "0.6431114", "0.6431021", "0.6430758", "0.6429177", "0.6427941", "0.64155036", "0.64142317", "0.6411579", "0.6406649", "0.6405545", "0.6405354" ]
0.0
-1
Store a newly created user in storage.
public function store(ValidatingUserRegisterForm $request) { $data = $request->except('_token'); $data['password'] = Hash::make($data['password']); $data['img'] = 'no-photo-icon.png'; //configura imagem default para novo usuário $user = User::create($data); $role = Role::select('id')->where('name', 'user')->first(); $user->roles()->attach($role); Auth::login($user); return redirect('/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store()\n\t{\n\t\t$user = $this->user->store( Input::all() );\n\t}", "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 store()\n {\n // Save post data in $user var\n $user = $_POST;\n \n // Create a password, set created_by ID and set the date of creation\n $user['password'] = password_hash('Gorilla1!', PASSWORD_DEFAULT);\n $user['created_by'] = Helper::getUserIdFromSession();\n $user['created'] = date('Y-m-d H:i:s');\n\n // Save the record to the database\n UserModel::load()->store($user);\n }", "public function store()\n {\n request()->validate([\n 'first_name' => 'required|string|max:255',\n 'last_name' => 'required|string|max:255',\n 'email' => 'required|string|email|max:255|unique:users',\n 'phone' => 'required|numeric|digits:10|unique:users',\n 'password' => 'required|string|min:8|confirmed',\n ]);\n\n User::create(request()->only('first_name', 'last_name', 'email', 'phone') + [\n 'type' => 'user',\n 'password' => Hash::make(request()->password),\n ]);\n\n return redirect('users')->with('status', 'User created.');\n }", "public function store(CreateUserRequest $request)\n {\n $user = $this->usersRepo->storeNew($request->all());\n\n // Upload avatar\n $this->uploadAvatar($request, $user);\n\n \\Alert::success('CMS::users.msg_user_created');\n return redirect()->route('CMS::users.edit', $user->id);\n }", "public function store()\n\t{\n\t\t// Validate the form input\n\t\t$this->userUpdateForm->validate(Input::all());\n\n\t\textract(Input::only('username', 'email', 'password', 'first_name', 'last_name'));\n\n\t\t$user = $this->execute(\n\t\t\tnew RegisterUserCommand($username, $email, $password, $first_name, $last_name)\n\t\t);\n\n\t\tFlash::success($user->username . ' was successfully created');\n\t\treturn Redirect::back();\n\t}", "public function store()\n\t{\n\t\t// save the new user\n\t\t// TODO : limit the admin to 3 accounts only\n\t\t$this->user->create(array(\n\t\t\t\t\t\t\t\t\t'user_username' =>\tInput::get('user_username'),\n\t\t\t\t\t\t\t\t\t'user_password_md5' => \tmd5(Input::get('user_password')),\n\t\t\t\t\t\t\t\t\t'password' => \tHash::make(Input::get('user_password')),\n\t\t\t\t\t\t\t\t\t'user_role' \t=>\tInput::get('user_role')\n\t\t\t\t\t\t\t));\n\n\t\t$users = $this->user->all();\n\t\treturn Redirect::to('settings/system-users')\n\t\t\t\t\t\t->with('users',$users)\n\t\t\t\t\t\t->with('flash_msg','User has been successfully created !');\n\t}", "public function store(StoreUserRequest $request) {\n\t\t$data = $request->only([\n\t\t\t\"name\",\n\t\t\t\"email\",\n\t\t]);\n\n\t\tif($request->has('password')) {\n\t\t $data['password'] = bcrypt($request->input('password'));\n }\n $user = User::create($data);\n\n if($request->has(\"images\")) {\n $user->files()->sync($request->input(\"images\"));\n }\n\n return $this->item($user, $this->transformer);\n }", "public function store()\n {\n $this->authorize('create', User::class);\n\n $validated = request()->validate([\n 'name' => 'required|string|max:255',\n 'username' => 'required|string|max:255|min:5|unique:users',\n 'email' => 'nullable|string|max:255|email|unique:users',\n 'password' => 'required|string|min:8',\n 'roles' => 'required|array',\n 'roles.*' => 'exists:roles,id',\n 'projects' => 'required|array|min:1',\n 'projects.*' => 'nullable|exists:projects,id',\n 'timezone' => 'required|timezone',\n 'phone' => 'nullable|string',\n ]);\n\n $user = User::make($validated);\n\n $user->password = Hash::make($validated['password']);\n $user->save();\n\n $user->roles()->sync($validated['roles']);\n $user->projects()->sync($validated['projects']);\n\n return redirect()->route('users.index')->with('message', 'Новый пользователь успешно создан!');\n }", "public function store(\n\t\tUserCreateRequest $request\n\t\t)\n\t{\n//dd($request);\n\t\t$this->user->store($request->all());\n\t\tFlash::success( trans('kotoba::account.success.create') );\n\t\treturn redirect('admin/users');\n\t}", "public function store(Requests\\CreateUserRequest $request)\n {\n $user = \\App\\User::create([\n 'name' => $request->name,\n 'email' => $request->email,\n 'bio' => $request->bio,\n 'password' => bcrypt($request->password)\n ])->attachRole($request->role);\n\n /**\n * Notifying user that he's account was created and that he can start using it\n */\n Notification::send([$user], new \\App\\Notifications\\AccountCreated());\n\n return redirect()->route('users.index')->with('success', 'User created successfully.');\n }", "public function store()\n {\n $input = Input::only('first_name', 'last_name', 'email', 'password');\n $command = new CreateNewUserCommand($input['email'], $input['first_name'], $input['last_name'], $input['password']);\n $this->commandBus->execute($command);\n return Redirect::to('/profile');\n }", "public function store(Requests\\StoreUserRequest $request)\n {\n $input = $request->all();\n\n $input['profile_photo'] = 'default.jpg';\n\n if ($request->hasFile('profile_photo') && $request->file('profile_photo')->isValid()) {\n $input['profile_photo'] = $this->photoUpload($request);\n }\n\n $input['password'] = bcrypt($request['password']);\n\n $user = User::create($input);\n\n if ($input['profile_photo'] != 'default.jpg') {\n $photo = new Photo(['file_name' => $input['profile_photo']]);\n $user->photos()->save($photo);\n }\n\n return redirect('admin/users')->with('message', 'User successfully created!');\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 }", "public function store()\n\t{\n\t\tif (!$this->userService->create(Input::all()))\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($this->userService->errors())->withInput();\n\t\t}\n\n\t\tAlert::success('User successfully created!')->flash();\n\n\t\treturn Redirect::route('dashboard.users.index');\n\t}", "public function store(UserCreateRequest $request)\n {\n $this->checkAdmin();\n\n $this->userRepository->store($request->all());\n\n return redirect()->route('users.index')->withOk(\"L'utilisateur a été créer.\");\n }", "public function store()\n\t{\n\t\t$activate_data = array(\n\t\t\t\"activate\" => 1,\n\t\t\t\"activated_at\" => $this->datetime->format(\"Y-m-d H:i:s\")\n\t\t);\n\n\t\t$user = $this->user->create(array_merge(Input::all(), $activate_data));\n\n\t\tif($user)\n\t\t{\n\t\t\treturn Redirect::route(\"users.index\");\n\t\t}\n\n\t\treturn Redirect::back()->withInput()->withErrors($this->user->errors());\n\t}", "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 store(UserCreateRequest $request)\n {\n $user = $this->repository->create($request->all());\n return $this->success($user, trans('messages.users.storeSuccess'), ['code' => Response::HTTP_CREATED]);\n }", "public function store()\n\t {\n $newUserInfo = Input::all();\n\n $newUserInfo['username'] = $newUserInfo['name'];\n $newUserInfo['email'] = $newUserInfo['email'];\n $newUserInfo['password'] = Hash::make(\"password\");\n\n $user = User::create($newUserInfo);\n\n return Response::json(array(\n \"id\" => $user->id\n ));\n }", "public function store(UserCreateRequest $request)\n {\n $user = User::make($request->all());\n\n $user->password = config('custom.default_user_pass');\n $user->save();\n\n return $this->storeResponse(new UserResource($user));\n }", "public function store(CreateUserRequest $request)\n {\n $data = $request->only('name', 'email', 'password');\n $data['password'] = Hash::make($data['password']);\n $data['user_type'] = $request->get('is_admin') ? User::$ADMIN : User::$DATAENTRANT;\n User::create($data);\n return redirect()->to('users')->withSuccess('User Account Created');\n }", "public function store(UserCreateRequest $request)\n {\n try {\n $this->userService->store($request->all());\n Session::flash('message', 'Користувач успішно створений!');\n return redirect()->route('users.index');\n } catch (\\Throwable $e) {\n throw $e;\n }\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 static function store()\n {\n $user = User::getUser(Authentication::$user_email);\n Tutor::create_tutor($user->getEmail(), '', 0);\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 }", "public function store(UserRequest $request) {\n $user = $this->service()->create($request->all());\n return $this->created($user);\n }", "public function store(CreateRequest $request, User $user)\n {\n $login_user = auth()->user();\n\n // if( in_array( $login_user->role, [ 'super-admin', 'institute' ] ) ) {\n // $request->setOffset('institute_id', $login_user->institute_id );\n // }\n \n $user = $user->createUser( $request->except( '_token') );\n\n return redirect()->route('admin.users.edit', $user->id )\n ->withMessage('User Created Successfully');\n\n }", "public function store(UserRequest $request)\n {\n $this->authorize('create', User::class);\n\n $input = $request->all();\n\n $person = Person::create($input);\n $input['person_id'] = $person->id;\n\n $user = User::create($input);\n\n if ($request->has('center')) {\n $center = Center::abbreviation($request->get('center'))->first();\n if ($center) {\n $user->setCenter($center);\n }\n }\n if ($request->has('role')) {\n $role = Role::find($request->get('role'));\n if ($role) {\n $user->roleId = $role->id;\n }\n }\n if ($request->has('active')) {\n $user->active = $request->get('active') == true;\n }\n if ($request->has('require_password_reset')) {\n $user->requirePasswordReset = $request->get('require_password_reset') == true;\n }\n $user->save();\n\n return redirect('admin/users');\n }", "public function store(UserRequest $request User $user)\n {\n $user->create($request->all());\n return redirect()->route('admin.users.index');\n }", "public function store(Request $request, User $user)\n\t{\t\n\t\t$user->create($request->all());\n\t\t$user->save();\n\t\t$user->attachRole($request->input('role'));\n\t}", "public function store()\n\t{\n $user = new User();\n $user->name = Input::get('name');\n $user->email = Input::get('email');\n $user->mobile = Input::get('mobile');\n $user->save();\n echo json_encode(array('msg' => 'success', 'id' => $user->id));\n\t}", "public function store()\n {\n $user = request()->validate(User::$validationRules);\n\n request()->merge(array_map(\"trim\", array_map(\"strip_tags\", $user)));\n\n User::forceCreate($user);\n \n return redirect()->route('users.index')->with('form_success', 'You have successfully created new user entry.');\n }", "public function store(CreateUserRequest $request)\n {\n $request->storeUser();\n toastr()->success('User successfully created.');\n\n return redirect()->route('users.index');\n }", "public function store(CreateUserRequest $request)\n {\n $input = $request->all();\n\n $input['password'] = bcrypt('password');\n $input['api_token'] = str_random(60);\n\n $profile = $input['profile'];\n $profile['driver_id'] = strtoupper(uniqid());\n unset($input['profile']);\n\n if ($request->hasFile('file')) {\n $file = $request->file('file');\n $path = $file->store('documents');\n\n $profile['document_file'] = $path;\n }\n\n\n if ($request->hasFile('picture')) {\n $file = $request->file('picture');\n $path = $file->store('documents');\n\n $profile['profile_picture'] = $path;\n }\n unset($input['file']);\n unset($input['picture']);\n\n $user = User::create($input);\n $user->profile()->create($profile);\n\n return redirect('/users');\n }", "public function store(UserCreateRequest $request)\n {\n try {\n\n DB::beginTransaction();\n\n $data = $request->all();\n\n $birthday_date = Carbon::parse($data['birthday_date']);\n $data['birthday_date']=$birthday_date->format('Y-m-d');\n\n $data['full_name'] = $data['name'] . ' ' . $data['last_name'];\n\n $people = People::create($data);\n\n $user = User::create([\n 'name' => $data['full_name'],\n 'email' => $data['email'],\n 'people_id' => $people->id,\n 'password' => Hash::make($data['password']),\n 'email_verified_at' => date('Y-m-d H:i:s'),\n ]);\n\n $role = Role::findOrFail($data['role_id']);\n\n $user->assignRole($role->name);\n\n $this->saveUserLog($user);\n\n DB::commit();\n\n return $this->successResponse(new UserResource($user), Response::HTTP_CREATED);\n } catch (\\Exception $e) {\n DB::rollBack();\n return $this->errorResponse(\"Couldn't store data\", Response::HTTP_BAD_REQUEST);\n }\n }", "public function store()\n\t{\n\t\t$rules = array(\n\t\t\t'name'\t\t\t\t=>\t'required|min:3|regex:/^[a-zA-Z][a-zA-Z ]*$/',\n\t\t\t'username'\t\t\t=>\t'required|min:3|unique:users|regex:/^[A-Za-z0-9_]{1,15}$/',\n\t\t\t'password'\t\t\t=>\t'required|min:6',\n\t\t\t'retype-password'\t=> \t'required|min:6|same:password',\n\t\t\t'email'\t\t\t\t=>\t'required|email|unique:users'\n\t\t);\n\n\t\t$validator = Validator::make(Request::all(), $rules);\n\n\t\tif ($validator->fails()) {\n\t\t\treturn Redirect::back()\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput(Request::except('password'));\n\t\t} else {\n\n\t\t\t$user = new User;\n\n\t\t\t$user->name = Request::get('name');\n\t\t\t$user->username = Request::get('username');\n\t\t\t$user->password = Hash::make(Request::get('password'));\n\t\t\t$user->email = Request::get('email');\n\n\t\t\t$user->save();\n\n\t\t\t// Redirect\n\t\t\tSession::flash('message', 'Account created!');\n\t\t\treturn Redirect::to('auth/login');\n\t\t}\n\t}", "public function store(UserRequest $request)\n {\n $user = User::create($request->allWithHashedPassword());\n\n $user->setType($request->input('type'));\n\n flash(trans('users.messages.created'));\n\n return redirect()->route('dashboard.users.show', $user);\n }", "public function store(UserRequest $request)\n {\n $this->user = new User;\n return $this->props($request)\n ->save()\n ->redirect($request,'Created');\n }", "public function store(UserStoreRequest $request)\n {\n $user = new User();\n $user->fill($request->except([\n 'avatar',\n 'roles',\n ]));\n\n if ($request->hasFile('avatar')) {\n // if upload avatar\n $user = $user->uploadAvatar($request->file('avatar'));\n }\n\n $user->save();\n\n // sync roles\n $user->roles()->sync($request->get('roles'));\n\n $request->session()->flash('success', 'Пользователь успешно добавлен');\n\n return redirect(route('admin.users.index'));\n }", "public function store()\n\t{\n\t\t$rules = array(\n\t\t\t'username' => 'required|between:3,20',\n\t\t\t'email' => 'required|email|confirmed|unique:users,email',\n\t\t\t'password' => 'required|min:6|alpha_num|confirmed'\n\t\t);\n\n\t\t$validation = Validator::make(Input::all(), $rules);\n\n\t\tif($validation->fails()) {\n\t\t\treturn Redirect::back()->withErrors($validation);\n\t\t}\n\n\t\t$user = new User;\n\t\t$user->username = Input::get('username');\n\t\t$user->email = Input::get('email');\n\t\t$user->password = Hash::make(Input::get('password'));\n\n\t\tif($user->save()){\n\t\t\tAuth::login($user);\n\t\t\tif(Auth::check()) {\n\t\t\t\treturn Redirect::to('user/'.$user->id);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn Redirect::back()->with('flash_error', \"Impossible de connecter l'utilisateur\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn Redirect::back()->with('flash_error', \"Impossible d'enregistrer l'utilisateur\");\n\t\t}\n\t}", "public function store(StoreRequest $request)\n {\n $user = $this->userService->new($request->merge([\n 'is_verified' => 1,\n 'password' => bcrypt($request->get('password')),\n 'image' => $request->has('photo') ? $this->uploadImage($request->file('photo'), $this->folder) : null,\n ])->all());\n\n if ($user) {\n $user->roles()->sync((array)$request->get('roles'));\n }\n\n flash('success', 'User successfully created.');\n return $this->redirect($request);\n }", "public function store(UserCreateRequest $request)\n {\n $user = $this->userRepository->store($request->all());\n\n return redirect('user')->withOk(\"L'utilisateur \" . $user->name . \" a été créé.\");\n }", "public function store(UserRequest $request)\n {\n $user = new User();\n $user->name = $request->input(\"name\");\n $user->email = $request->input(\"email\");\n $user->current_password = $request->input(\"password\");\n $user->password = Hash::make($request->input(\"password\"));\n $user->phone_number = $request->input(\"phone_number\");\n $user->job_title = $request->input(\"job_title\");\n $user->day_off = $request->input(\"day_off\");\n $user->section = $request->input(\"section\");\n $user->nationality_id = $request->input(\"nationality_id\");\n\n if (isset($request->photo) && $request->photo != \"\") {\n $user->photo = UploadImageService::uploadImage($_FILES['photo'], 'uploads/users');\n }\n if (isset($request->active)) {\n $user->active = $request->input(\"active\");\n }\n\n $user->save();\n\n // attach role\n RoleService::attachNewUserRole($user, $request->role_id);\n\n\n return redirect()->route('users.index')->with('message', 'user created successfully.');\n }", "public function store(UserCreateRequest $request)\n {\n $data = $request->toArray();\n $data['password'] = Hash::make($data['password']);\n User::create($data);\n\n return redirect()->route('users.index')->with('success', 'User successfully added!');\n }", "public function store(Request $request, StoreUserPost $user) {\n $this->model->addUser($request->all());\n Controller::FlashMessages('The user has been added', 'success');\n return redirect('/users');\n }", "public function store(Requests\\CreateUserRequest $request)\n {\n $request->permission_id = $this->userRepository->getPermissionRepository()->getAll()->get(1)->id;\n $created = $this->userRepository\n ->create($request);\n\n if(!$created){\n return redirect('/users/systemusers')->withErrors('User creation failed.');\n }\n\n return redirect('/users/systemusers')->withMessage('New user has been created successfully.');\n }", "public function store()\n {\n $data = $this->request->all();\n $validator = $this->validateRequest($data);\n \n if ($validator->fails()) {\n return redirect()->back()->withErrors($validator)->withInput();\n } else {\n $user = User::create($data);\n return redirect('/')->with('success', 'Account has been created successfully');\n }\n }", "public function store()\n\t{\n\t\t$user = new User;\n\n\t\t$user->name = Request::input('user.name');\n\t\t\n\t\t$user->email = Request::input('user.email');\n\n\t\t$user->password = bcrypt(Request::input('user.password'));\n\n\t\t$user->save();\n\n\t\treturn ['user'=>$user];\n\t}", "public function store(UserStoreRequest $request) {\n $user = new User;\n $user->name = $request->name;\n $user->email = $request->email;\n if ($user->save()) {\n \\Session::flash('flash_message_success', 'User added.');\n return redirect()->back();\n } else {\n \\Session::flash('flash_message_error', 'User not added');\n return redirect()->back();\n }\n }", "public function store(UserStoreRequest $request)\n {\n if (User::create([\n 'name' => $request->name,\n 'first_name' => $request->first_name,\n 'email' => $request->email,\n 'password' => Hash::make($request->password),\n 'api_token' => Str::random(100)\n ])) {\n return response()->json([\n 'success' => \"User has been created with success\"\n ], 200);\n }\n }", "public function store(StoreUser $request)\n {\n // Create new user and save it\n $user = User::create([\n 'name' => request('name'),\n 'email' => request('email'),\n 'password' => bcrypt(request('password')),\n ]);\n\n // Attach the role to user\n $user->attachRole(request('role'));\n\n return redirect()->route('users');\n }", "public function store(FormUserCreateRequest $request)\n {\n $user = new User();\n $user->name = $request->name;\n $user->surname = $request->surname;\n $user->email = $request->email;\n $user->role = $request->role;\n $user->department_id = $request->department;\n $user->active = $request->active;\n $user->password = Hash::make($request->password);\n $saved = $user->save();\n if($saved)\n return response()->json(['success' => true, 'message' => 'Usuario registrado exitosamente.'], 200);\n }", "public function store()\n\t{\n\t\t$userdata = Input::all();\n\n $rules = array(\n 'first_name' => 'required|alpha',\n 'last_name' => 'required|alpha',\n 'email' => 'required|email|unique:users',\n 'password' => 'confirmed',\n 'password_confirmation' => ''\n );\n\n $validator = Validator::make($userdata, $rules);\n\n if ($validator->fails())\n {\n $response = array(\n\t\t\t\t'message' \t\t=> 'The user could not need added',\n\t\t\t\t'data'\t\t\t=> $validator->messages()->toArray(),\n\t\t\t\t'status' \t \t=> 400 \n\t\t\t);\n\t\t\treturn Response::make($response, 400);\n\t\t}\n\n $user = new User();\n $user->fill(Input::except('_token', 'password_confirmation'));\n $userdata['password'] = (isset($userdata['password']))?$userdata['password']:\"password\";\n $user->password = Hash::make($userdata['password']);\n $user->save();\n\n /* Audit Log */ \n Log::info('New user: ' . $userdata['email']);\n \n $response = array(\n\t\t\t'message' \t\t=> 'The user has successfully been added..',\n\t\t\t'data'\t\t\t=> $user->toArray(),\n\t\t\t'status' \t \t=> 200 \n\t\t);\n\t\treturn Response::make($response, 200);\n \t\n\t}", "public function store(UserCreateRequest $request)\n {\n $user = User::create(array_merge($request->all(), [\n 'password' => Hash::make($request->password),\n 'user_id' => $request->user()->id,\n ]));\n\n return (new UserResource($user))->additional(['message' => 'User was created']);\n }", "public function store(CreateUserRequest $request)\n {\n $input = $request->all();\n\n $user = $this->userRepository->create($input);\n\n Flash::success('User saved successfully.');\n\n return redirect(route('users.index'));\n }", "private static function create()\n {\n getDb()->putUser(1, self::getDefaultAttributes());\n }", "public function store(CreateUserRequest $request)\n {\n $input = $request->all();\n\n $this->userRepository->create($input + ['admin' => 0]);\n\n Flash::success('User saved successfully.');\n\n return redirect(route('users.index'));\n }", "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 }", "public function store()\n {\n $valid = User::isValid(Input::all());\n \n if($valid === true) {\n // Ensure that password is set\n if(Input::get('password') == null) {\n return $this->respondConflict(\"password must be set\");\n }\n \n // Check for if user has already been created\n try {\n User::create(array(\n \"firstname\" => Input::get(\"first\"),\n \"lastname\" => Input::get(\"last\"),\n \"email\" => Input::get(\"email\"),\n \"password\" => Hash::make(Input::get(\"password\"))\n ));\n } catch (Exception $e) {\n return $this->respondConflict(\"User already exists\");\n }\n \n return $this->respond(array(\"message\" => \"User Created\"));\n \n } else {\n return $this->respondConflict($valid);\n }\n }", "public function store(UserCreateRequest $request)\n {\n $user=$request['nombre'];\n $u=strtoupper($user[0]).strtolower($request['apellido']);\n User::create([\n 'nombre' => trim(strtoupper($request['nombre'])),\n 'apellido' => trim(strtoupper($request['apellido'])),\n 'ci' => $request['ci'],\n 'telef1' => $request['telef1'],\n 'telef2' => $request['telef2'],\n 'direccion' => trim(strtoupper($request['direccion'])),\n 'email' => trim(strtoupper($request['email'])),\n 'password' => bcrypt($u),\n 'name_user' => $u,\n 'rol' => $request['rol'],\n ]);\n Session::flash('message', 'Los datos se guardaron exitosamente');\n return Redirect::to('/usuario');\n }", "public function store(UserCreateRequest $request)\n {\n $name = $request->name;\n $email = $request->email;\n $createFail = $this->user->createNewUser($name, $email);\n if ($createFail[0]) {\n $error = 'Add duplicate user ' . $createFail[1] . '!';\n return $this->serverResponse($error, null);\n } else {\n $success = 'Add user \\'' . $name . '\\' success';\n return $this->serverResponse(null, $success);\n }\n }", "public function store(StoreUserRequest $request)\n {\n try {\n return $this->respondSuccess([\n 'message' => 'User created successfully',\n 'data' => $this->transformer->transform($this->repository->create($request->all()))\n ]);\n } catch (\\Exception $exception) {\n return $this->respondError(['message' => $exception->getMessage()]);\n }\n }", "public function store(StoreUserRequest $request)\n {\n $password = Str::upper(Str::random(6));\n\n $user = User::create([\n 'email' => ($request->validated()['email']),\n 'title' => ($request->validated()['title']),\n 'firstname' => ucwords($request->validated()['firstname']),\n \n 'middlename' => ucwords($request->validated()['middlename']),\n 'lastname' => ucwords($request->validated()['lastname']),\n 'nickname' => ucwords($request->validated()['nickname']),\n\n 'certificate_name' => ucwords($request->validated()['certificate_name']),\n 'contactno' => ($request->validated()['contactno']),\n 'address' => ucwords($request->validated()['address']),\n\n 'occupation' => ucwords($request->validated()['occupation']),\n 'sex' => $request->validated()['sex'],\n 'birthday' => ($request->validated()['birthday']),\n\n 'department_id' => ($request->validated()['department']),\n 'course_id' => ($request->validated()['course']),\n 'section_id' => ($request->validated()['section']),\n 'year' => ($request->validated()['year']),\n\n 'institution' => ucwords($request->validated()['institution']),\n 'username' => $request->validated()['username'],\n 'temppassword' => $password,\n 'password' => Hash::make($password),\n 'role' => $request->validated()['role'],\n ]);\n \n if($user){\n $name = $user->firstname.\" \".$user->lastname;\n\n session()->flash('success', $name.':Created Successfully');\n\n return response()->json([\n 'success' => true,\n 'message' => $name.': Created Successfully'\n ]);\n }\n\n }", "public function store(CreateUserRequest $request)\n {\n $input = $request->all();\n\n $user = $this->userRepository->create($input);\n \n Flash::success('Usuario creado con &eacute;xito.');\n\n return redirect(route('users.index'));\n }", "public function store(UserCreateRequest $request)\n {\n try {\n\n $user = User::create($request->all());\n $user->roles()->sync($request->roles);\n\n return redirect()->route('admin.users.show', ['id' => $user->id])->with(['type' => 'success', 'message' => __('messages.success.store')]);\n } catch (\\Exception $e) {\n\n return redirect()->back()->with(['type' => 'danger', 'message' => __('messages.danger.create')])->withInput();\n }\n }", "public function store(UserRequest $request)\n {\n\n $data = $request->all();\n\n if (isset($request->status)) {\n $data['status'] = 1;\n }\n\n $data['password'] = Hash::make($request->password);\n\n $this->user->create($data);\n\n flash('Usuário criado com sucesso!')->success();\n\t return redirect()->route('admin.users.index');\n\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 store(CreateUserRequest $request)\n {\n return $this->respondCreated(\n User::create(request()->all())\n );\n }", "public function store(UsersCreateRequest $request)\n {\n $user = User::create($request->all());\n $user->generalPassword($request->get('password'));\n $user->uploadAvatar($request->file('avatar'));\n $user->toggleAdmin($request->get('is_admin'));\n\n return redirect()->route('users.index');\n }", "public function store(CreateUserRequest $request, NewUser $newUser)\n {\n $this->authorize('create_users');\n $newUser->save();\n return redirect()->route('admin.user.index');\n }", "public function store(UserRequest $request)\n { \n $user = User::register([\n 'first_name' => $request->first_name, \n 'last_name' => $request->last_name, \n 'email' => $request->email, \n 'password' => bcrypt(str_random(20)),\n 'address' => $request->address,\n 'address2' => $request->address2,\n 'city' => $request->city,\n 'state' => $request->state,\n 'zip' => $request->zip,\n 'image' => $request->file('image')->store('avatars'),\n 'phone' => $request->phone,\n 'phone2' => $request->phone2,\n 'url' => $request->url,\n 'activate_token' => strtolower(str_random(64)),\n ]);\n\n Auth::user()->subscription('main')->incrementQuantity();\n \n flash('You added a user! Your new user was sent an email with their email and password. Your billing will now be updated.','success');\n return redirect()->route('users.index');\n }", "public function store(UserRequest $request)\n {\n $user = User::create(array_merge($request->only('email', 'name'), [\n 'password' => bcrypt($request->get('new_password')),\n 'password_expired_at' => $request->has('password_expired') ? now() : null,\n ]));\n\n //權限\n $user->roles()->sync($request->input('role'));\n\n return redirect()->route('user.index')->with('success', '會員已建立');\n }", "public function store(UserCreateRequest $request)\n {\n User::Create([\n 'name' => $request['name']\n , 'email' => $request['email']\n , 'password' => $request['password']\n ]);\n\n Session::flash('message', 'Usuario creado correctamente');\n return Redirect::to('/user');\n }", "public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$validation = Validator::make($input, User::$rules);\n\n\t\tif ($validation->passes())\n\t\t{\n\t\t\t$this->user->create($input);\n\n\t\t\treturn Redirect::route('users.index');\n\t\t}\n\n\t\treturn Redirect::route('users.create')\n\t\t\t->withInput()\n\t\t\t->withErrors($validation)\n\t\t\t->with('message', 'There were validation errors.');\n\t}", "public function store()\n {\n $data = request()->validate([\n 'name' => ['bail', 'required', 'between:2,100'],\n 'surname' => ['bail', 'required', 'between:2,100'],\n 'id_card' => ['bail', 'required', 'numeric', 'integer', 'digits_between:1,8', Rule::unique('users')],\n 'email' => ['bail', 'required', 'email', Rule::unique('users')],\n 'password' => ['bail', 'required', 'alpha_dash', 'between:6,16'],\n 'phone_number' => ['bail', 'required', 'numeric', 'digits:11'],\n 'address' => ['bail', 'required', 'between:5,200'],\n 'toAdmin' => '',\n ]);\n\n $user = User::create([\n 'name' => $data['name'],\n 'surname' => $data['surname'],\n 'id_card' => $data['id_card'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'phone_number' => $data['phone_number'],\n 'address' => $data['address'],\n ]);\n if (isset($data['toAdmin']) && $data['toAdmin']) {\n $user->is_admin = 1;\n $user->update();\n }\n return redirect(route('admin.users'));\n }", "public function store(CreateUserRequest $request)\n {\n //\n $input = $request->all();\n\n $input['password'] = bcrypt($request->password);\n\n User::create($input);\n\n return redirect('/dashboard/users');\n }", "public function store()\n\t{\n\t\t$request = Request::input();\t\n\t\t$user = new User;\n\t\t$user->username = $request['username'];\n\t\t$user->password = Hash::make($request['password']);\n\t\t$user->email = $request['email'];\n\n\t\t$user->save();\n\n\t\treturn Redirect::to('/user');\n\n\t}", "public function store(StoreUser $request)\n {\n $this->authorize('create', User::class);\n\n $data = $request->validated();\n $data['password'] = \\Hash::make($data['password']);\n $user = User::create($data);\n\n if ($user) {\n return redirect()->route('user.edit', compact('user'))->with('notice', [\n 'type' => 'success',\n 'dismissible' => true,\n 'content' => __('Berhasil membuat pengguna baru.'),\n ]);\n } else {\n return redirect()->back()->with('notice', [\n 'type' => 'danger',\n 'dismissible' => true,\n 'content' => __('Gagal membuat pengguna baru.'),\n ]);\n }\n }", "public function store(UserRequest $request)\n {\n $user = new User($request->all());\n $user->password = bcrypt($request->password);\n $user->deleted = 0;\n $user->save();\n $user->roles()->attach(Role::where('name', $request->role)->first());\n //Flash::success('Se ha registrado de manera exitosa!'); \n return redirect()->route('users.index');\n }", "public function store(UserRequest $request)\n {\n $user = new User();\n $user->first_name = trim($request->input('first_name'));\n $user->last_name = trim($request->input('last_name'));\n $user->username = trim($request->input('username'));\n $user->active = ($request->input('active') == \"on\") ? 1 : 0;\n $user->password = bcrypt(trim($request->input('password')));\n $user->email = trim($request->input('email'));\n $user->mobile = trim($request->input('mobile'));\n if ($user->save()) {\n createSessionFlash('User Create', 'SUCCESS', 'User create successfully');\n } else {\n createSessionFlash('User Create', 'FAIL', 'Error in User create');\n }\n return redirect('admin/users');\n }", "public function store(UserStoreRequest $request)\n {\n $user = User::create([\n 'name' => $request->name,\n 'email' => $request->email,\n 'password' => $request->password,\n ]);\n \n //$user->roles()->sync($request->input('roles', []));\n\n if($request->file('image')){\n $url = Storage::put('images', $request->file('image'));\n $user->image()->create([\n 'url' => $url\n ]);\n }\n if($request->roles){\n $user->roles()->attach($request->roles);\n }\n if($user){\n return redirect('usuario')->with('success', 'Nuevo usuario creado con exito');\n }\n else{\n return redirect('usuario/crear')->with('error', 'Error al crear al usuario');\n }\n }", "public function store(UserRequest $request)\n {\n $firstName = $request->input('first-name');\n $lastName = $request->input('last-name');\n\n $newItem = new User();\n $newItem->first_name = $firstName;\n $newItem->last_name = $lastName;\n $newItem->name = $firstName . ' ' . $lastName;\n $newItem->email = $request->email;\n $newItem->mobile = $request->mobile;\n $newItem->password = bcrypt($request->password);\n $newItem->active = (isset($request->active)) ? $request->active : 0;\n\n if ($newItem->save()) {\n return redirect()->route('admin.user.index')->with(['success' => 'Success in saving item.']);\n }\n return redirect()->back()->withErrors(['Error when saving, please try again.'])->withInput();\n }", "public function store()\n\t{\n\t\tif (Auth::user()->role == 'Admin') {\n\t\t\t$input = Input::all();\n\t\t\t$validation = Validator::make($input, User::$rules);\n\n\t\t\tif ($validation->passes()){\n\t\t\t\t$user = new User();\n\t\t\t\t$user->username = Input::get('username');\n\t\t\t\t$user->email = Input::get('email');\n\t\t\t\t$user->password = Hash::make(Input::get('password'));\n\t\t\t\t$user->role = Input::get('role');\n\t\t\t\t$user->save();\n\t\t\t\t\n\t\t\t\tFlash::success('User Created');\n\t\t\t\treturn Redirect::route('users.index');\n\t\t\t}\n\t\t\t\t\n\t\t\treturn Redirect::route('users.create')\n\t\t\t\t->withInput()\n\t\t\t\t->withErrors($validation);\n\t\t}\n\t\tFlash::error('Your account is not authorized to view this page');\n\t\treturn Redirect::to('home');\t\n\t}", "private function create()\n {\n return $this->db->putUser($this->getDefaultAttributes());\n }", "public function store(Request $request, User $user)\n {\n \tif(Auth::user()->type == 1){\n $user->create($request->merge(['password' => Hash::make($request->get('password'))])->all());\n \tsession()->flash('mensagem', 'Usuário inserido com sucesso!');\n \t\n return redirect()->route('users.index');\n \t}\n else\n return redirect()->route('login'); \n }", "public function store()\n {\n $validator = Validator::make(Input::all(), User::rules(), [], User::attributes());\n\n if ($validator->fails()) {\n return Redirect::action('Admin\\UserController@create')->withErrors($validator)->withInput();\n }\n\n $model = new User;\n $model->title = Input::get('title');\n $model->content = Input::get('content');\n $model->audit = Input::get('audit');\n if($model->save()){\n Request::session()->flash('info', '系统用户创建成功!');\n }\n return Redirect::action('Admin\\UserController@index');\n }", "public function store(NewUserRequest $request)\n {\n $attribute = [\n 'name' => $request->name,\n 'email' => $request->email,\n 'password' => $request->password,\n 'address' => '',\n 'phone' => '',\n 'is_admin' => true,\n ];\n $users = $this->userRepository->create($attribute);\n\n Session::flash('success', @trans('message.success.user.create_user'));\n\n return redirect()->route('admin.user.index');\n }", "public function store(UserRequest $request)\n {\n return $this->userService->save($request->validated());\n }", "public function store(UserRequest $request)\n {\n $uuid = Str::uuid()->toString();\n $request['uuid'] = $uuid;\n $request['password'] = Hash::make($request->password);\n $user = new User();\n $user = $user->create($request->all());\n $user->assignRole(config('fanbox.roles.admin'));\n\n return redirect()->route('admin.admins.edit', $user->id)->with('success', trans('admin/messages.admin_add'));\n }", "public function store()\n {\n $attributes = request()->validate([\n 'name' => [\n 'required',\n 'max:255',\n ],\n 'username' => [\n 'required',\n 'max:255',\n 'min:3',\n 'unique:users,username',\n ],\n 'email' => [\n 'required',\n 'email',\n 'max:255',\n 'unique:users,username',\n ],\n 'password' => [\n 'required',\n 'min:7',\n 'max:255',\n ],\n ]);\n\n /**\n * bcrypt()\n *\n * We must pass through the user's password through the bcrypt function to\n * hash it.\n */\n $attributes['password'] = bcrypt($attributes['password']);\n\n /**\n * create($attributes)\n *\n * You can pass the $attributes variable which will pass the POST array into\n * the create method.\n */\n $user = User::create($attributes);\n\n /**\n * Registration successful message\n *\n * We can create a quick message to inform user registration was successful.\n * session()->flash()\n * The session flash method saves a key/value that will only be stored for 1\n * request.\n *\n * This statement can be shorthanded using the redirect()->with() method.\n *\n * session()->flash(\"success\", \"Your registration was successful!\");\n */\n\n /**\n * User login\n *\n * Once a user has been created, we can create a session for them and sign\n * them in immediately. We call the auth() function which extends the\n * Auth::class that contains session related methods.\n */\n auth()->login($user);\n\n return redirect('/')->with(\"success\", \"Your registration was successful!\");\n\n }", "public function store(CreateUserRequest $request)\n {\n $request['birthday'] = Carbon::parse($request['birthday'])->format('Y-m-d');\n $request['password'] = bcrypt($request->password);\n User::create($request->all());\n return redirect()->route('admin.users.index')->with('message', __('user.admin.create.create_success'));\n }", "public function store(Request $request)\n {\n return $this->user->create($request->all());\n }", "public function store(UserRequest $request)\n {\n $user = User::create($request->getValues());\n\n $user->roles()->sync($request->getRoles());\n\n flash('Uživatel úspěšně vytvořen.', 'success');\n return redirect()->route('admin.users');\n }", "public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$input['password']=Hash::make($input['password']);\n\n\t\t$validation = Validator::make($input, User::$rules);\n\n\t\tif ($validation->passes())\n\t\t{\n\t\t\t$user = new User();\t\t\t\n\t\t\t$user->username = Input::get('username');\n\t\t\t$user->desusuario = Input::get('desusuario');\t\t\n\t\t\t$user->rolusuario = Input::get('rolusuario');\t\t\n\t\t\t$user->estado = 'ACT';\t\t\n\t\t\t$user->password = Hash::make(Input::get('password'));\t\t\n\t\t\t//$user->usuario_id = Input::get('usuario_id');\n\t\t\t$user->usuario_id = 1;\n\t\t\t$user->save();\n\n\t\t\t//$this->user->create($input); obviar el modo automatico\n\n\t\t\treturn Redirect::route('users.index');\n\t\t}\n\n\t\treturn Redirect::route('users.create')\n\t\t\t->withInput()\n\t\t\t->withErrors($validation)\n\t\t\t->with('message', 'There were validation errors.');\n\t}", "public function store(StoreRequestNewUser $request)\n {\n // dd($request);\n $user = new User();\n $user->name = $request->name;\n $user->lastname = $request->lastname;\n // 'password' => Hash::make($data['password']),\n $user->password = Hash::make($request->password);\n $user->email = $request->email;\n $user->save();\n Mail::to($request->email)->send(new CreateNewUser($user, $request->password));\n Session::flash('status_add_utilisateur', 'Employé créé avec succès.');\n return redirect()->route('admin');\n }", "public function store(UserRequest $request)\n {\n User::query()->create($request->validated());\n return redirect(route('users.index'));\n }", "public function store(UsersCreateRequest $request)\n {\n $user = new User();\n $user->name = trim($request->name);\n $user->email = trim($request->email);\n $user->role_id = trim($request->role_id);\n $user->password = trim(bcrypt($request->password));\n $user->phone = trim($request->phone);\n $saveAll = $user->save();\n if($saveAll){\n Session::flash('user_inserted', 'User Successfully Registered');\n return redirect('/user/create');\n }else{\n Session::flash('user_not_inserted', 'User Could not Registered');\n return redirect('/user/create');\n }\n }", "public function store(SaveUserRequest $request): Response\n {\n $this->authorize(Abilities::CREATE, new User());\n\n $user = $this->userService->store($request->getUserData());\n\n return $this->response->item($user, $this->transformer);\n }", "public function store(CreateUserRequest $request)\n {\n DB::beginTransaction();\n try{\n $user = new User($request->only('full_name','dni','phone','user','bank_account_number','role','group_id','sponsor_id'));\n $user->password= bcrypt($request->password);\n\n if(env('APP_DEBUG')){\n $user->created_at = session('day');\n }\n if(Auth::user()->role == 'admin'){\n $user->admin_id = Auth::user()->id;\n }\n if(Auth::user()->role == 'sponsored'){\n $user->admin_id = Auth::user()->admin_id;\n }\n $user->save();\n DB::commit();\n return response(['message' => 'Se ha creado el usuario corrrectamente','redirect'=>route('user.index')]);\n }catch(QueryException $e){\n DB::rollBack();\n return response(['message'=> 'QueryException :'.$e->getMessage(),'type' => 'error']);\n }catch(Exception $e){\n DB::rollBack();\n return response(['message'=> 'Exception :'.$e->getMessage(),'type' => 'error']);\n }\n }", "public function store(CreateUserRequest $request)\n {\n\n $user = new User;\n $user->name = $request->name;\n $user->username = $request->username;\n $user->email = $request->email;\n $user->roles = json_encode($request->roles);\n $user->password = Hash::make($request->password);\n if($request->file('avatar')){\n $file = $request->file('avatar')->store(\n 'avatars','public'\n );\n $user->avatar = $file;\n }\n $user->save();\n return redirect(route('user.index'))->with('status','User berhasil Ditambahkan !');\n }" ]
[ "0.7977994", "0.7891813", "0.75408196", "0.73961365", "0.73023385", "0.72862226", "0.725491", "0.72042626", "0.7187874", "0.71762484", "0.715708", "0.7143125", "0.7140137", "0.7129351", "0.71151006", "0.71122867", "0.70378095", "0.70330864", "0.70203406", "0.6998708", "0.6986336", "0.69826025", "0.696795", "0.69573945", "0.6949567", "0.69420743", "0.69330376", "0.6926637", "0.6923272", "0.6921459", "0.69133955", "0.69043887", "0.6896846", "0.6890393", "0.6876293", "0.68675524", "0.6857795", "0.68500614", "0.6847546", "0.68455255", "0.684494", "0.6843983", "0.6834691", "0.6832862", "0.6831292", "0.6828865", "0.6821628", "0.6821288", "0.6818301", "0.6796384", "0.6795317", "0.6793664", "0.67894775", "0.67887026", "0.67832136", "0.67806536", "0.67785025", "0.67754287", "0.67744523", "0.6773595", "0.6768819", "0.67687637", "0.67591286", "0.67579967", "0.6757342", "0.6753023", "0.6747766", "0.67469627", "0.6742769", "0.6733625", "0.67325705", "0.6730437", "0.67250174", "0.6719383", "0.67158467", "0.67129683", "0.6710405", "0.67087555", "0.670783", "0.67070776", "0.66955787", "0.668734", "0.6686785", "0.6685192", "0.66814274", "0.66805744", "0.6677144", "0.66713804", "0.66691315", "0.6668693", "0.66675574", "0.66648746", "0.6653562", "0.6652863", "0.6652541", "0.6651735", "0.66507316", "0.6647763", "0.66475564", "0.66466534", "0.66446906" ]
0.0
-1
Display the specified resource.
public function show($id, Request $request) { $user = User::find($id); $userName = explode(' ', $user->name); $message = $request->session()->get('message'); if (Auth::user()->email == $user->email) { // VAGAS // busca todas as vagas do usuário $vacancies_table = DB::table('user_vacancy')->where('user_id', $id)->select('vacancy_id')->get(); // transforma em array $vacancies = array(); foreach($vacancies_table as $v) { array_push($vacancies, $v->vacancy_id); } //busca vagas abertas e fechadas $vacancies_opened = Vacancy::findMany($vacancies)->where('status', 'aberta'); $vacancies_closed = Vacancy::findMany($vacancies)->where('status', 'fechada'); // CURSOS // busca todos os cursos do usuário $courses_table = DB::table('user_courses')->where('user_id', $id)->select('course_id')->get(); // transforma em array $courses = array(); foreach($courses_table as $c) { array_push($courses, $c->course_id); } //busca cursos abertos e fechados $courses_opened = Course::findMany($courses)->where('status', 'disponível'); $courses_closed = Course::findMany($courses)->where('status', 'indisponível'); return view('users.show', compact('user', 'vacancies_opened', 'vacancies_closed', 'courses_opened', 'courses_closed', 'message', 'userName')); } return redirect('/'); }
{ "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(User $user, Request $request) { if (Auth::user()->email == $user->email) { $locations = Location::all(); //busca todos os países na base de dados locations $message = $request->session()->get('message'); return view('users.edit', compact('user','locations','message')); } return redirect('/'); }
{ "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(ValidatingUserEditForm $request, User $user) { $user->name = $request->userFullName; $user->email = $request->userEmail; $user->location_id = $request->userCountry; $user->phone = $request->userPhone; $user->address = $request->userAddressStr; $user->address_number = $request->userAddressNo; $user->complement = $request->userAddressComp; $user->zip = $request->userAddressPC; if ($request->hasFile('userImage')) { $img = $request->file('userImage'); $name = bin2hex(random_bytes(5)) . '.' . $img->getClientOriginalExtension(); $user->img = $name; $img->move(public_path('img/users'), $name); } $user->save(); $request->session()->flash('message', 'Cadastro alterado com sucesso!'); return redirect('users/'.$user->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(User $user) { //TODO: montar excluir usuário }
{ "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
update model and only pass in the fillable fields
public function update(Request $request) { $this->model->update($request->only($this->model->getModel()->fillable), $request->id); return response()->json($this->model->show($request->id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function updateModel();", "protected function _updatefields() {}", "public function testUpdateExtraFields(): void { }", "function update(){\n\t\t$this->model->update();\n\t}", "public function testUpdateModelSet()\n {\n }", "function update($field, $value, $model)\n {\n }", "public function update($model) :bool;", "public function update() {\r\n try {\r\n $type = get_object_vars($this->model);\r\n\r\n foreach ($type as $key => $value) {\r\n if (in_array($key, $this->validColumns)) {\r\n if(is_bool($value)) {\r\n $value = (int)$value;\r\n }\r\n $data[$key] = $value;\r\n }\r\n }\r\n\r\n $this->db->update(\"assets_permissions\", $data, $this->db->quoteInto(\"id = ?\", $this->model->getId()));\r\n }\r\n catch (Exception $e) {\r\n throw $e;\r\n }\r\n }", "public function processUpdate()\n {\n // Validate Request\n $validationRules = $this->getValidationRules();\n // Hook Filter updateModifyValidationRules\n $validationRules = $this->doFilter(\"updateModifyValidationRules\", $validationRules);\n $validationMessages = array();\n // Hook Filter updateModifyValidationMessages\n $validationMessages = $this->doFilter(\"updateModifyValidationMessages\", $validationMessages);\n $validator = Validator::make($this->Request->all(), $validationRules, $validationMessages);\n if ($validator->fails()) {\n $Response = back()->withErrors($validator)->withInput();\n $this->redirect($Response);\n }\n // Record is valid\n $Model = $this->isValidRecord();\n if ($Model instanceof \\Illuminate\\Http\\RedirectResponse) {\n $this->redirect($Model);\n }\n // Set value for BIT columns\n $this->setValueBitColumns();\n // Set initial configuration\n $Model->build($this->Model->getTable());\n $requestParameters = $this->Request->all();\n $requestParameters = $this->setValueBlobColumns($requestParameters);\n // Hook Filter updateModifyRequest\n $this->Model = clone $Model;\n $parameters = $this->doFilter(\"updateModifyRequest\", $requestParameters);\n // Update record\n if ($this->getIsTransaction()) {\n DB::transaction(function ($db) use ($Model, $parameters) {\n $Model->update($parameters);\n // Hook Action updateAfterUpdate\n $this->doHooks(\"updateAfterUpdate\", array($Model));\n });\n } else {\n $Model->update($parameters);\n // Hook Action updateAfterUpdate\n $this->doHooks(\"updateAfterUpdate\", array($Model));\n }\n // Set response redirect to list page and set session flash\n $Response = redirect($this->getFormAction())\n ->with('dk_' . $this->getIdentifier() . '_info_success', trans('dkscaffolding.notification.update.success'));\n // Hook Filter updateModifyResponse\n $Response = $this->doFilter(\"updateModifyResponse\", $Response);\n $this->redirect($Response);\n }", "public function updated($model)\n {\n }", "public function updating($model)\n\t{\n\t}", "private function _updateModel($model, $data) {\n\t\t\n\t\t$changeAttributes = array();\n\t\t\n\t\tforeach($data as $attr=>$value){\n\t\t\tif($value['value'] || $value['replace']) {\n\t\t\t\t\t$changeAttributes[$value['name']] = $value['value'];\n\t\t\t}\n\t\t}\n\n\t\t$model->setAttributes($changeAttributes);\n\t\t\n\t\treturn $model->save();\n\t}", "public function update(Request $request, object $model): bool;", "public function testUpdateFieldsWrongType(): void { }", "public function fillModelAttributes($model, $request, $fields)\n {\n }", "public function update(Model $model, array $attributes);", "public function update(){\n\t\t$this->beforeSave();\n\t\t$tableName = $this->tableName();\n\t\t$fields = $this->fields();\n\t\t// Remove fields set as ignored by rules validation.\n\t\t$fields = $this->removeIgnored($fields);\n\t\t// Create PDO placeholders.\n\t\t$params = implode(', ', array_map(fn($name) => $name . ' = :' . $name, $fields));\n\t\t$primaryKey = $this->getPrimaryKey();\n\t\t$where = $primaryKey . ' = :' . $primaryKey;\n\t\t$statement = $this->db->prepare('UPDATE ' . $tableName . ' SET ' . $params . ' WHERE ' . $where);\n\t\t// Bind values to placeholders.\n\t\tforeach($fields as $field){\n\t\t\t$this->binder($statement, ':' . $field, $this->{$field});\n\t\t}\n\t\t$statement->bindValue(':' . $primaryKey, $this->{$primaryKey});\n\t\tif($statement->execute()){\n\t\t\t$this->afterSave();\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function update()\n\t{\n\t\t$this->getModel()->update($this);\n\t}", "function update($unique_id, $model)\n {\n }", "public function before_update(Model $obj) {\n\t\t$this->validate ( $obj );\n\t}", "protected function saveUpdate()\n {\n }", "public function fillable();", "function updateField() {\n DATABASE::INIT_TABLE($this->database, $this->table);\n $fname = $this->urlParam('fname');\n $fvalue = $this->urlParam('fvalue');\n $id = $this->urlParam('id');\n DATABASE::UPDATE($this->table, [$fname], [$fvalue], $id);\n }", "public function isUpdateRequired();", "public function update( One_Model $model )\n\t{\n\t\treturn null;\n\t}", "function before_validation_on_update() {}", "public function updatedModel(Model &$model)\n {\n }", "function _set_editable_fields()\n\t{\n\t\tif (empty($this->fields))\n\t\t{\n\t\t\t// pull the fields dynamically from the database\n\t\t\t$this->db->cache_on();\n\t\t\t$this->fields = $this->db->list_fields($this->primary_table);\n\t\t\t$this->db->cache_off();\n\t\t}\n\t}", "public function _set_model_fields(){\n // set fields only when they have not been set for this object\n if($this->_fields_loaded===FALSE){\n\n foreach ($this->_meta() as $meta) {\n\n $this->{$meta->name} = '';\n }\n }\n }", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "public function clean()\n\t{\n\t\tforeach ($this->dirtyFields AS $field)\n\t\t\t$this->cleanField($field);\n\t}", "public function actionUpdate() //update value from default page to DB\n {\n\n\n $model = $this->findModel($_POST['ExamRoomDetail']['rooms_detail_date'],\n $_POST['ExamRoomDetail']['rooms_detail_time'],\n $_POST['ExamRoomDetail']['rooms_id']\n );\n if(isset($_POST)) {\n $model->load(Yii::$app->request->post());\n $update = $model;\n $update->exam_room_status = $_POST['ExamRoomDetail']['exam_room_status'];\n $update->save();\n }\n\n }", "public function updateEditableFields() {\n\t\t$allowedFields = $this->config()->allowed_field_types;\n\t\tif ($allowedFields) {\n\t\t\t$fieldClasses = singleton('EditableFormField')->getEditableFieldClasses();\n\t\t\tforeach($fieldClasses as $fieldClass => $fieldTitle) {\n\t\t\t\tif (!in_array($fieldClass, $allowedFields)) {\n\t\t\t\t\tConfig::inst()->update($fieldClass, 'hidden', true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Explicitely allow fields, so subclasses show up\n\t\t\tforeach($allowedFields as $fieldClass) {\n\t\t\t\tConfig::inst()->update($fieldClass, 'hidden', false);\n\t\t\t}\n\t\t}\n\t}", "public function updateModel(Model &$model)\n {\n }", "public function handleEdit(Request $request){\n $this->validate($request, Field::$create_field_validation_rules);\n $data = $request->only('id','field_key','field_value');\n \t\\DB::table('fields')->where('field_id','=',$data['id'])\n \t ->update(['field_key'=>$data['field_key'],'field_value' => $data['field_value']]); \n \t\\Session::flash('message','Field updated successfully.');\n \treturn redirect()->route('viewfields');\n }", "protected function _update()\n\t{\n\t}", "public function updated($field)\n {\n $this->validateOnly($field);\n }", "public function validateUpdate($obj);", "public function update(User $model);", "public function actionUpdate() {\n Yii::import('bootstrap.widgets.TbEditableSaver'); //or you can add import 'ext.editable.*' to config\n $es = new TbEditableSaver('Donneur'); // 'User' is classname of model to be updated\n $es->update();\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n /*if (isset($_POST['pk'])) {\n $model = $this->loadModel($_POST['pk']);\n $model->first_name = $_POST['first_name'];\n $model->save();\n // $this->redirect(array('view', 'id' => $model->id));\n }\n\n /* $this->render('update', array(\n 'model' => $model,\n ));*/\n }", "protected function beforeUpdating()\n {\n }", "public function update($id, Model $model);", "public function update(Request $request, FormModel $formModel)\n {\n //\n }", "public function testUpdateReplenishmentCustomFields()\n {\n }", "public function update(Identifiable $model, array $newAttributes);", "function update(){\n\n // Check the required fields to see if each required field exists.\n forEach($requiredFields as $field){\n if(!$this->bean->contains($field)){\n throw new Exception(\"Required field $field does not exists.\");\n }\n }\n\n // Check to see if there are any fields that are not specified as a possible field.\n forEach($this->bean as $key => $value){\n if(!$possibleFields->contains($key)){\n throw new Exception(\"Invalid field $key passed to model.\");\n }\n }\n \n // Validate bean. \n if(!validate($this->bean)){\n throw new Exception(\"Bean is not valid. For a more detailed message throw a custom exception in validation function.\");\n }\n }", "public function update(Model $model, Request $request): ?Model;", "public function update(){\n if(empty($this->attributes)){\n return;\n }\n if ($this->isAutoInc) {\n $fieldsList = \" SET \";\n foreach ($this->attributes as $column => $value) {\n $fieldsList.=$column.\"=\".'\\''.$value.'\\''.\", \";\n }\n $fieldsList = str_last_replace(\", \", \"\", $fieldsList);\n $sqlQuery = \"UPDATE \".$this->table.$fieldsList.\" WHERE \".$this->idName.\"=\".$this->attributes[$this->idName];\n\n Db::instance()->execute($sqlQuery,$this->attributes);\n }\n }", "protected function setupUpdateOperation()\n {\n CRUD::setValidation(SettingRequest::class);\n\n $readonly = [];\n if (User::min('id') !== backpack_user()->id) {\n $readonly = ['readonly' => 'readonly'];\n }\n\n CRUD::field('key')->type('text')->label('ID key')->attributes($readonly);\n CRUD::field('name')->type('text')->label('Nom');\n CRUD::field('value')->type(CRUD::getCurrentEntry()->type)->label('Contenu');\n }", "private function _update() {\n\n $this->db->replace(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->attributes->save();\n\n }", "protected function update() {}", "public function updateRelationship(Request $request, object $model, string $fieldName): bool;", "public function update(int $id, array $attributes): Model;", "public function actionUpdate() {}", "public function actionUpdate() {}", "public function update () {\n reset($this->__fields);\n $pk = key($this->__fields);\n $form = $this->getForm();\n $updates = array();\n\n foreach ($form as $k => $v) {\n $updates[] = sprintf('%s = :%s', $k, $k);\n }\n\n $sql = sprintf(\n 'UPDATE %s SET %s WHERE %s = :%s'\n , $this->getTableName()\n , implode(',', $updates)\n , $pk\n , $pk\n );\n\n $stmt = $this->__db->prepare($sql);\n $stmt->bindValue($pk, $this->__get($pk));\n\n foreach ($form as $k => $v) {\n if (is_object($v->getData()) && get_class($v->getData()) == 'DateTime') {\n $stmt->bindValue($k, $v->getData(), $this->__fields[$k]['type']);\n } else {\n $stmt->bindValue($k, $v->getData());\n }\n }\n\n $stmt->execute();\n\n return $this;\n }", "public function setModelDefaults() \n {\n if (!empty($this->model->defaultFieldValues())) {\n \n foreach($this->model->defaultFieldValues() as $field => $defaultValue) {\n\n $this->model->$field = $defaultValue;\n }\n } \n }", "private function internalUpdate()\n {\n $param = array();\n\n // Run before update methods and stop here if the return bool false\n if ($this->runBefore('update') === false)\n return false;\n\n // Define fieldlist array\n $fieldlist = array();\n\n // Build updatefields\n foreach ( $this->data as $fld => $val )\n {\n // Skip datafields not in definition\n if (!$this->isField($fld))\n continue;\n\n $val = $this->checkFieldvalue($fld, $val);\n $type = $val == 'NULL' ? 'raw' : $this->getFieldtype($fld);\n\n $fieldlist[] = $this->alias . '.' . $fld . '={' . $type . ':' . $fld . '}';\n $param[$fld] = $val;\n }\n\n // Create filter\n $filter = ' WHERE ' . $this->alias . '.' . $this->pk . '={' . $this->getFieldtype($this->pk) . ':' . $this->pk . '}';\n\n // Even if the pk value is present in data, we set this param manually to prevent errors\n $param[$this->pk] = $this->data->{$this->pk};\n\n // Build fieldlist\n $fieldlist = implode(', ', $fieldlist);\n\n // Create complete sql string\n $sql = \"UPDATE {db_prefix}{$this->tbl} AS {$this->alias} SET {$fieldlist}{$filter}\";\n\n // Run query\n $this->db->query($sql, $param);\n\n // Run after update event methods\n if ($this->runAfter('update') === false)\n return false;\n }", "private function updateModel(){\n $id = trim(filter_input(INPUT_GET, 'info'));\n $fname = trim(filter_input(INPUT_POST, 'fname'));\n $lname = trim(filter_input(INPUT_POST, 'lname'));\n $nick = trim(filter_input(INPUT_POST, 'nick'));\n $about = trim(filter_input(INPUT_POST, 'about'));\n $eyes = trim(filter_input(INPUT_POST, 'eyes'));\n $height = trim(filter_input(INPUT_POST, 'height'));\n $biust = trim(filter_input(INPUT_POST, 'biust'));\n $waist = trim(filter_input(INPUT_POST, 'waist'));\n $hips = trim(filter_input(INPUT_POST, 'hips'));\n $shoes = trim(filter_input(INPUT_POST, 'shoes'));\n $type = trim(filter_input(INPUT_POST, 'type'));\n \n $email = trim(filter_input(INPUT_POST, 'email'));\n $phone = trim(filter_input(INPUT_POST, 'phone'));\n $address = trim(filter_input(INPUT_POST, 'address'));\n \n $fb = trim(filter_input(INPUT_POST, 'fb'));\n $tw = trim(filter_input(INPUT_POST, 'tw'));\n $gp = trim(filter_input(INPUT_POST, 'gp'));\n $ln = trim(filter_input(INPUT_POST, 'ln'));\n $pin = trim(filter_input(INPUT_POST, 'pin'));\n \n\t $name = $_FILES['photo']['name'];\n\t if(!empty($name)){\n\t $filename = stripslashes($_FILES['photo']['name']);\n $uploadDir = 'uploads/';\n $ext = Utils::getExtension($filename);\n $validFormats = ['jpg', 'png', 'jpeg', 'JPG'];\n if(in_array($ext, $validFormats)){\n $photo = time() . '-' . $filename; //Save this to the DB\n $targetPath = $uploadDir . $photo;\n $upload = @move_uploaded_file($_FILES['photo']['tmp_name'], $targetPath);\n if($upload){\n $update = $this->changeModelWithPic($id, $fname, $lname, $nick, $about, $eyes, $height, $biust, $waist, $hips, $shoes, $email, $phone, $address, $fb, $tw, $gp, $ln, $pin, $photo, $type);\n if($update){\n header('Location: /model');\n }\n else die('Error inserting image into the product table');\n }\n else die('Error uploading image');\n }\n else die('Invalid image format');\n\t }\n\t else{\n\t $update = $this->changeModel($id, $fname, $lname, $nick, $about, $eyes, $height, $biust, $waist, $hips, $shoes, $email, $phone, $address, $fb, $tw, $gp, $ln, $pin, $type);\n\t if($update > 0){\n \t header('Location: /model');\n exit;\n \t }\n \t else{\n \t echo 'Error updating model profile details';\n \t }\n\t }\n }", "public function testUpdate()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $newModel = $this->makeFactory();\n\n $this->json('PUT', static::ROUTE . '/' . $model->id, $newModel->toArray(), [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_OK) \n ->seeJson($newModel->toArray());\n }", "public function update(Request $request, $id)\n {\n //\n $user = brand::findOrfail($id);\n\n$this->validate($request,[\n 'brandname' => 'required |max:191'\n \n\n ]);\n\n \n \n$user->update($request->all());\n }", "public function actionUpdate()\n {\n $model = $this->findModel(Yii::$app->request->post('id'));\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $model;\n }\n return $model->errors;\n }", "public function prepAttributesForSave()\n\t{\n\t\t$attributes = $this->defineAttributes();\n\t\t$attributes['dateUpdated'] = array('0' => AttributeType::DateTime, 'required' => true);\n\t\t$attributes['dateCreated'] = array('0' => AttributeType::DateTime, 'required' => true);\n\n\t\tforeach ($attributes as $name => $config)\n\t\t{\n\t\t\t$config = ModelHelper::normalizeAttributeConfig($config);\n\t\t\t$value = $this->getAttribute($name);\n\n\t\t\t$this->setAttribute($name, ModelHelper::packageAttributeValue($config, $value, true));\n\t\t}\n\n\t\t// Populate dateCreated and uid if this is a new record\n\t\tif ($this->isNewRecord())\n\t\t{\n\t\t\t$this->dateCreated = DateTimeHelper::currentTimeForDb();\n\t\t\t$this->uid = StringHelper::UUID();\n\t\t}\n\n\t\t// Update the dateUpdated\n\t\t$this->dateUpdated = DateTimeHelper::currentTimeForDb();\n\t}", "public function actionUpdate() {\n $json = file_get_contents('php://input'); //$GLOBALS['HTTP_RAW_POST_DATA'] is not preferred: http://www.php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data\n $put_vars = CJSON::decode($json, true); //true means use associative array\n switch ($_GET['model']) {\n // Find respective model\n case 'Order':\n $model = Order::model()->findByPk($_GET['id']);\n break;\n case 'Users':\n $model = Users::model()->findByPk($_GET['id']);\n break;\n case 'Product':\n $model = Product::model()->findByPk($_GET['id']);\n break;\n case 'Vendor':\n $model = Vendor::model()->findByPk($_GET['id']);\n break;\n case 'FavoriteProduct':\n $model = FavoriteProduct::model()->findByPk($_GET['id']);\n break;\n case 'Rating':\n $model = Rating::model()->findByPk($_GET['id']);\n break;\n case 'Review':\n $model = Review::model()->findByPk($_GET['id']);\n break;\n case 'UserAddress':\n $model = UserAddress::model()->findByPk($_GET['id']);\n break;\n case 'OrderDetail':\n $model = OrderDetail::model()->findByPk($_GET['id']);\n break;\n default:\n $this->_sendResponse(0, sprintf('Error: Mode update is not implemented for model ', $_GET['model']));\n Yii::app()->end();\n }\n // Did we find the requested model? If not, raise an error\n if ($model === null)\n $this->_sendResponse(0, sprintf(\"Error: Didn't find any model with ID .\", $_GET['model'], $_GET['id']));\n\n // Try to assign PUT parameters to attributes\n unset($_POST['id']);\n foreach ($_POST as $var => $value) {\n // Does model have this attribute? If not, raise an error\n if ($model->hasAttribute($var))\n $model->$var = $value;\n else {\n $this->_sendResponse(0, sprintf('Parameter %s is not allowed for model ', $var, $_GET['model']));\n }\n }\n // Try to save the model\n if ($model->update())\n $this->_sendResponse(1, '', $model);\n else\n $this->_sendResponse(0, $msg);\n // prepare the error $msg\n // see actionCreate\n // ...\n }", "public function updateMyInfo()\n {\n // validate the info, create rules for the inputs\n $rules = array(\n 'user_firstname' => 'required',\n 'user_gender' => 'required',\n 'user_civil_status' => 'required',\n 'user_birth_date' => 'required|date_format:\"'.DATE_FORMAT_1,\n 'user_joined_date' => 'required|date_format:\"'.DATE_FORMAT_2,\n 'user_email' => 'required|email|unique:user,user_email,' . Auth::user()->user_key . ',user_key,deleted_at,NULL',\n 'country_key1' => 'required',\n 'user_contact_phone_number1' => 'required',\n 'user_hometown_address' => 'required',\n );\n\n // run the validation rules on the inputs from the form\n $validator = Validator::make(Input::all(), $rules);\n\n // if the validator fails, redirect back to the form\n if ($validator->fails()) {\n // redirect to list page\n Session::flash('danger', UNABLE_TO_SAVE);\n return Redirect::back()\n ->withErrors($validator)\n ->withInput();\n\n } else {\n // where condition\n $user = Auth::user();\n \n // check if the record can be updated\n if (empty($user->id)) {\n // redirect to list page\n Session::flash('danger', SOMETHING_WENT_WRONG);\n return Redirect::to(strtolower(USER_TITLE));\n }\n\t\t\t\n // fields to be updated\n $user->user_firstname = $this->getInput('user_firstname', '');\n $user->user_middlename = $this->getInput('user_middlename', '');\n $user->user_lastname = $this->getInput('user_lastname', '');\n $user->user_alias = $this->getInput('user_alias', '');\n $user->user_gender = $this->getInput('user_gender', '');\n $user->user_civil_status = $this->getInput('user_civil_status', '');\n $user->user_birth_date = \\Carbon\\Carbon::createFromFormat(DATE_FORMAT_1, $this->getInput('user_birth_date', DEFAULT_DATE))->format(DB_DATE_FORMAT);\n $user->user_joined_date = $this->getInput('user_joined_date', '');\n $user->user_email = $this->getInput('user_email', '');\n $user->user_hometown_address = $this->getInput('user_hometown_address', '');\n $user->user_overseas_address = $this->getInput('user_overseas_address', '');\n if (Session::has('user_photo')) {\n $user->user_photo = Session::get('user_photo');\n Session::forget('user_photo');\n }\n $user->updated_by = Auth::user()->id;\n \n // update record\n $user->save();\n \n for ($cnt = 1; $cnt <= $this->getInput('hdn_increment', ''); $cnt++) {\n if ($this->getInput('hdn_index' . $cnt, '') == YES && $this->getInput('country_key' . $cnt, '') != EMPTY_STRING && $this->getInput('user_contact_phone_number' . $cnt, '') != EMPTY_STRING) {\n if ($this->getInput('user_contact_key' . $cnt, '') == EMPTY_STRING) {\n $data = array();\n $data['user_contact_key'] = generateRandomID();\n $data['user_id'] = $user->id;\n $data['country_id'] = Country::countryKey($this->getInput('country_key' . $cnt, ''))->pluck('id');\n $data['user_contact_phone_number'] = $this->getInput('user_contact_phone_number' . $cnt, '');\n $data['created_by'] = Auth::user()->id;\n \n // create record\n UserContact::create($data);\n } else {\n // where condition\n $user_contact = UserContact::UserContactKey($this->getInput('user_contact_key' . $cnt, ''))->first();\n \n // check if the record can be updated\n if (isset($user_contact->id)) {\n $user_contact->country_id = Country::countryKey($this->getInput('country_key' . $cnt, ''))->pluck('id');\n $user_contact->user_contact_phone_number = $this->getInput('user_contact_phone_number' . $cnt, '');\n $user_contact->updated_by = Auth::user()->id;\n \n // update record\n $user_contact->save();\n }\n }\n }\n }\n \n // where condition\n $user_emergency = UserEmergency::userId($user->id)->first();\n \n // check if the record can be updated\n if (!empty($user_emergency->id)) {\n // fields to be updated\n $user_emergency->user_emergency_name = $this->getInput('user_emergency_name', '');\n $user_emergency->user_emergency_relation = $this->getInput('user_emergency_relation', '');\n $user_emergency->user_emergency_address = $this->getInput('user_emergency_address', '');\n $user_emergency->country_id = Country::countryKey($this->getInput('emergency_country_key', ''))->pluck('id');\n $user_emergency->user_emergency_phone = $this->getInput('user_emergency_phone', '');\n $user_emergency->updated_by = Auth::user()->id;\n \n // update record\n $user_emergency->save();\n }\n \n // redirect to list page\n Session::flash('success', SUCCESS_UPDATE);\n return Redirect::to('my_account/info');\n }\n }", "public function updated($field)\n {\n // Solo validamos el campo que genera el update\n $validatedData = $this->validateOnly($field, [\n 'usuario' => 'required',\n 'mensaje' => 'required',\n ]);\n }", "public function update($data,$model=false){\n\n if(is_array($data)){\n $data=(array_key_exists(0,$data)) ? $data[0] : $data;\n return $this->allMethodProcess(function() use($data,$model){\n return $this->querySqlFormatter->getUpdateQueryFormatter($data,['where'=>$this->where,'execute'=>$this->execute,\n 'model'=>$this->subClassOf,'bool'=>$this->bool,'detail'=>$model]);\n },\"no--autoscope\");\n\n }\n\n }", "function after_validation_on_update() {}", "public function ApplyChanges()\n {\n parent::ApplyChanges();\n\n // Update data\n $this->Update();\n }", "public function update(Request $request, _modelName_ $_modelEntry_)\n {\n $_modelEntry_->update($request->all());\n return [\n \"status\" => 1,\n \"data\" => $_modelEntry_->makeHidden($this->hidden),\n \"msg\" => \"_modelName_ updated successfully\"\n ];\n }", "abstract public function updateFromRequest(Request $request = null, array $otherAttributes = array());", "public function update(Request $request, $id)\n {\n $data = $request->only($this->modelRepo->getModel()->fillable);\n\n $this->modelRepo->createUpdate($data, $id);\n }", "public function onUpdateField()\n {\n //TODO Validate input\n\n $post = post();\n\n $flags = FieldManager::makeFlags(\n in_array('enabled', $post['flags']),\n in_array('registerable', $post['flags']),\n in_array('editable', $post['flags']),\n in_array('encrypt', $post['flags'])\n );\n\n $validation = $this->makeValidationArray($post);\n\n $data = $this->makeDataArray($post);\n\n $feedback = FieldManager::updateField(\n $post['name'],\n $post['code'],\n $post['description'],\n $post['type'],\n $validation,\n $flags,\n $data\n );\n\n FieldFeedback::with($feedback, true)->flash();\n\n return Redirect::to(Backend::url('clake/userextended/fields/manage'));\n }", "public function updating(Model $model)\n {\n if(Schema::hasColumn($model->getTable(), \"updated_by\")) {\n $model->updated_by = Auth::user()->id;\n }\n if(Schema::hasColumn($model->getTable(), \"updated_at\")) {\n $model->updated_at = date('Y-m-d h:i:s');\n }\n }", "private function validateUpdate() {\n\t\t$this->context->checkPermission(\\Scrivo\\AccessController::WRITE_ACCESS);\n\t}", "public function saveUpdate($request)\n {\n $old_record = $this->model->__toString();\n $action = $this->action;\n //check if the data is object of request\n if ($request instanceof Request) {\n $formData = $request->all();\n } elseif (is_array($request)) {\n $formData = $request;\n } else {\n throw new \\Exception(\"undefined data\");\n }\n\n foreach ($formData as $key => $value):\n if ($key != \"formData\" && $key != 'undefined') {\n $this->model->$key = $value;\n }\n endforeach;\n\n $this->model->$action = auth()->check() ? auth()->id() : 0;\n\n $user_id = 0;\n\n // $this->updateHeadersAlpha();\n\n //if action is set to useru_id that means it's update so we need to push data in audit table\n if ($this->action == \"useru_id\") {\n $this->audit($this->model->id, $old_record, $this->model->__toString(), auth()->check() ? auth()->id() : $user_id);\n }\n $this->model->save();\n return $this->model;\n }", "public function actionUpdate($id) {\n\n $put_var = array();\n parse_str(file_get_contents('php://input'), $put_var);\n\n foreach ($put_var as $data) {\n $json = CJSON::decode($data, true);\n }\n\n $model = $this->loadModel($id);\n\n foreach ($json as $var => $value) {\n // Does model have this attribute? If not, raise an error\n if ($model->hasAttribute($var)) {\n $model->$var = $value;\n }\n }\n\n if ($model->save()){\n echo json_encode(array(\n \"success\" => true,\n \"data\" => array(\n \"id\" => $model->id,\n )\n ));\n }\n\t}", "public function db_update() {}", "public function changeAllStatus()\n\t{\n\t\t$model_name=$this->input->post('type',TRUE);\n\t\t$pk_id=$this->input->post('pk_id',TRUE);\n\t\t$status=$this->input->post('is_active',TRUE);\n\t\t$this->$model_name->update($pk_id, array( 'is_active' => $status));\n\t}", "public function changeAllStatus()\n\t{\n\t\t$model_name=$this->input->post('type',TRUE);\n\t\t$pk_id=$this->input->post('pk_id',TRUE);\n\t\t$status=$this->input->post('is_active',TRUE);\n\t\t$this->$model_name->update($pk_id, array( 'is_active' => $status));\n\t}", "public function updateWithoutData(Model $entity){\n $entity->save();\n return $entity;\n }", "static function updateWith($fields) {\r\n return static::make($fields)->update();\r\n }", "public function update()\n {\n// $this->crud->request = $this->crud->validateRequest();\n// $this->crud->request = $this->handlePasswordInput($this->crud->request);\n $this->crud->setRequest($this->crud->validateRequest());\n $this->crud->setRequest($this->handlePasswordInput($this->crud->getRequest()));\n $this->crud->unsetValidation(); // validation has already been run\n\n return $this->traitUpdate();\n }", "public function update(Request $request, $id)\n {\n //\n $class = Diskon::find($id);\n $edit = $this->edit;\n foreach ($this->field as $field =>$val) {\n $name = $edit[$field];\n\n $class->$val = $request->$name;\n\n// echo $val;\n }\n\n $class->save();\n\n return redirect('admin/Diskon')->with('info','Success');\n\n\n }", "public function actionUpdate($id = null, $data = null) {\n if (!empty($data)) {\n $id = Yii::$app->EncryptDecrypt->Encrypt('decrypt', $data);\n }\n\n $model = $this->findModel($id);\n\n $model->setScenario('update');\n $other_info = StaffOtherInfo::findOne(['staff_id' => $model->id]);\n $staff_edu = StaffInfoEducation::findOne(['staff_id' => $model->id]);\n $staff_previous_employer = StaffPerviousEmployer::findAll(['staff_id' => $model->id]);\n $staff_interview_first = StaffEnquiryInterviewFirst::findOne(['staff_id' => $model->id]);\n $staff_interview_second = StaffEnquiryInterviewSecond::findOne(['staff_id' => $model->id]);\n $staff_interview_third = StaffEnquiryInterviewThird::findOne(['staff_id' => $model->id]);\n $staff_family = \\common\\models\\StaffEnquiryFamilyDetails::findAll(['staff_id' => $model->id]);\n $staff_salary = StaffSalary::findOne(['staff_id' => $model->id]);\n if (!empty($model) && !empty($other_info) && !empty($staff_edu) && !empty($staff_interview_first) && !empty($staff_interview_second) && !empty($staff_interview_third) && !empty($staff_salary)) {\n if ($model->load(Yii::$app->request->post()) && Yii::$app->SetValues->Attributes($model) && $other_info->load(Yii::$app->request->post()) && $staff_edu->load(Yii::$app->request->post()) && $staff_interview_first->load(Yii::$app->request->post()) && $staff_interview_second->load(Yii::$app->request->post()) && $staff_interview_third->load(Yii::$app->request->post()) && $staff_salary->load(Yii::$app->request->post())) {\n $model->dob = date('Y-m-d H:i:s', strtotime(Yii::$app->request->post()['StaffInfo']['dob']));\n $other_info->load(Yii::$app->request->post());\n $other_info->current_from = date('Y-m-d', strtotime(Yii::$app->request->post()['StaffOtherInfo']['current_from']));\n $other_info->current_to = date('Y-m-d', strtotime(Yii::$app->request->post()['StaffOtherInfo']['current_to']));\n $staff_interview_second->contact_verified_date = date('Y-m-d', strtotime($staff_interview_second->contact_verified_date));\n $staff_interview_second->alt_contact_verified_date = date('Y-m-d', strtotime($staff_interview_second->alt_contact_verified_date));\n $staff_interview_second->verified_date_1 = date('Y-m-d', strtotime($staff_interview_second->verified_date_1));\n $staff_interview_second->verified_date_2 = date('Y-m-d', strtotime($staff_interview_second->verified_date_2));\n $staff_interview_second->verified_date_3 = date('Y-m-d', strtotime($staff_interview_second->verified_date_3));\n $staff_interview_third->expected_date_of_joining = date('Y-m-d', strtotime($staff_interview_third->expected_date_of_joining));\n $staff_interview_third->interviewed_date = date('Y-m-d', strtotime($staff_interview_third->interviewed_date));\n $staff_salary->date_of_salary = date('Y-m-d', strtotime($staff_salary->date_of_salary));\n\n if (isset($staff_edu->timing) && $staff_edu->timing != '') {\n $staff_edu->timing = implode(',', $staff_edu->timing);\n }\n\n\n if (isset($model->area_interested) && $model->area_interested != '') {\n $model->area_interested = implode(',', $model->area_interested);\n }\n\n if (!empty(Yii::$app->request->post()['StaffInfo']['designation']))\n $model->designation = implode(\",\", Yii::$app->request->post()['StaffInfo']['designation']);\n\n if ($model->validate() && $other_info->validate() && $staff_interview_first->validate() && $staff_interview_second->validate() && $staff_interview_third->validate() && $staff_edu->validate() && $staff_salary->validate() && $staff_edu->save() && $model->save() && $other_info->save() && $staff_interview_first->save() && $staff_interview_second->save() && $staff_interview_third->save() && $staff_salary->save()) {\n $model->username = Yii::$app->request->post()['StaffInfo']['username'];\n $model->post_id = Yii::$app->request->post()['StaffInfo']['post_id'];\n $model->save();\n $this->AddLanguage($model, $staff_interview_first, $staff_interview_third);\n $this->Imageupload($model);\n $this->AddFamily($model);\n $this->AddOtherInfo($model, Yii::$app->request->post(), $other_info);\n Yii::$app->getSession()->setFlash('success', 'Updated Successfully');\n return $this->redirect(array('index'));\n }\n }\n\n return $this->render('_staff_form', [\n 'model' => $model,\n 'staff_edu' => $staff_edu,\n 'other_info' => $other_info,\n 'staff_previous_employer' => $staff_previous_employer,\n 'staff_interview_first' => $staff_interview_first,\n 'staff_interview_second' => $staff_interview_second,\n 'staff_interview_third' => $staff_interview_third,\n 'staff_family' => $staff_family,\n 'staff_salary' => $staff_salary\n ]);\n } else {\n throw new \\yii\\web\\HttpException(400, 'Error code:1002', 405);\n }\n }", "public function updateAttributes(&$attributes)\n {\n if ($validator = $this->getValidator()) {\n \n if ($extra = $validator->getAttributesForField($this->owner)) {\n $attributes = array_merge($attributes, $extra);\n }\n \n }\n }", "function company_settingsupdate() {\n $this->auth(COMP_ADM_LEVEL);\n $company_id = $this->uri->segment(3);\n foreach ($_POST as $key=>$value) {\n if($key != 'save'){\n $data[$key] = $this->input->post($key);\n }\n }\n if($this->m_company_settings->update($company_id, $data)){\n $this->companyadmin(7);\n }else{\n echo 'error';\n }\n }", "public function update($id, Request $request)\n { \t\n\n \t// $request->validate($this->fields_to_validate);\n\n \t$record = $this->model_class::findOrFail($id);\n $record->update($request->only($this->fields_to_update));\n\n return new $this->model_resource($record);\n }", "public function update(Request $request, $id,$class)\n {\n $record = $class::findOrFail($id);\n $this->validate($request,$class::getvalidation());\n foreach ($record->getFillable() as $fillable)\n {\n $field = $class::findField($fillable);\n switch ($field['type']){\n case 'file':\n// dd('hello');\n if (isset($field['addable']) && $field['addable']){\n $file_addresses=[];\n if (isset($request->{$fillable}) && is_array($request->{$fillable}))\n foreach ($request->file($fillable) as $key => $file)\n {\n $name = time() . '.'.$file->getClientOriginalName();\n $file->move(public_path('files'), $name);\n $file_addresses[]='files/'.$name;\n }\n if (isset($request->{$fillable.'_old'}))\n $file_addresses = array_merge($file_addresses,$request->{$fillable.'_old'});\n $record->{$fillable} = $file_addresses;\n }\n else{\n if($request->hasFile($fillable)){\n $name = time() . '.'.$request->{$fillable}->getClientOriginalName();\n $request->file($fillable)->move(public_path('files'), $name);\n $record->{$fillable} ='files/'.$name;\n }\n elseif (isset($request->{$fillable.'_old'}))\n $record->{$fillable} =$request->{$fillable.'_old'};\n\n\n }\n break;\n\n default :\n if (isset($request->{$fillable}))\n $record->{$fillable} = $request->{$fillable};\n\n }\n\n\n }\n $record->save();\n $this->handlePivots($record,$request,$class);\n\n\n return redirect($class::route('index'))->with('message','با موفقیت ویرایش شد');\n }", "public function update(array $attributes = array())\n {\n $this->validate('update');\n return parent::update();\n }", "public function update($data) {}", "public function update($data) {}", "public function update(Request $request, $id)\n {\n $typeField = TypeField::find($id);\n \n $typeField ->fill($request->all());\n $typeField->save(); \n\n \n return redirect()->route('Admin.TypeField.index');\n }", "public function update(){\n\n\t\t/* set method */\n\t\t$this->request_method = 'update';\n\t\t\t\t\n\t\t/* check for a model id */\n\t\tif( ! $this->id) {\n\t\t\t$this->set_error( 10, 'No model id in request, cant update' );\n\t\t\treturn;\t\t\t\n\t\t}\n\t\t\n\t\t/* read the data received from backbone */\n\t\t$this->parse_model_request();\n\n\t\tif($this->get_errors())\n\t\t\treturn;\n\t\t\t\t\t\n\t\t/* get the parsed post data from request */\n\t\t$item_data = $this->parsed_model_request;\n\t\t \t\t\t \t\n\t\t/* insert database */\n\t\tswitch( $this->properties->modelclass ) {\n\t\t\n\t\t\t/* posts */\n\t\t\tcase('post'):\n\t\t\tcase('attachment'):\n\t\t\t\t$post = $item_data['post'];\n\t\t\t\t\n\t\t\t\t/* privileg check */ //improve this for coded api calls, like when setting up bootstrap data (for reading it is no problem any way, because this check is only made for update and create and delete)\n\t\t\t\tif( $this->properties->access == \"loggedin\" && ! current_user_can('edit_post', $this->id)) { \n\t\t\t\t\t$this->set_error( 11, 'no user privileges to update the item on server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t$result = wp_update_post( $post );\n\t\t\t\t\n\t\t\t\t/* maybe an error while updating */\n\t\t\t\tif( ! $result) {\n\t\t\t\t\t$this->set_error( 12, 'updating the item failed on the server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* geting the id means update was a success */\n\t\t\t\t$updated_id = $result;\n\t\t\t\t\n\t\t\t\t/* save custom data, this only method does all the magic, \n\t\t\t\tdetails must be specified in the custom package handlers */\n\t\t\t\t$this->_action_custom_package_data( $updated_id, $item_data);\t\n\t\t\t\t\n\t\t\t\t/* set a clean response */\n\t\t\t\t$this->parse_model_response($updated_id);\t\n\t\t\tbreak;\n\t\t\t\n\t\t\t/* comment */\n\t\t\tcase('comment'):\n\t\t\t\t$comment = $item_data['comment'];\n\t\t\t\t\n\t\t\t\t/* comment updateding is not supported */\n\t\t\t\t$this->set_error( 13, 'comments cant be updated!' );\n\t\t\t\t\treturn; \n\t\t\tbreak;\n\t\t\tcase('user'):\n\t\t\t//@TODO\n\t\t\tbreak;\n\t\t\tcase('idone'):\n\t\t\t\t$new_id = $this->id;\n\t\t\t\t$this->_action_custom_package_data( $new_id, $item_data);\t\t\t\t\t\n\t\t\t\t$this->parse_model_response($new_id);\t\t\n\t\t\tbreak;\n\t\t}\n do_action('bb-wp-api_after_update', $updated_id, $this->properties, $this );\n\t\n\t}", "protected function preUpdate( ModelInterface &$model ) {\n }", "function setModel($model, $actual_fields = UNDEFINED){\n// $model->removeCondition('status');\n// $model->removeCondition('assigned_id');\n\n\n foreach($model->_dsql()->args['where'] as $k=>$v){\n if(!is_object($v)){\n if ($v[0]=='task.status'){\n unset($model->_dsql()->args['where'][$k]);\n }\n if ($v[0]==$model->table.'.status' || $v[0]==$model->table.'.assigned_id'){ // assigned_id\n unset($model->_dsql()->args['where'][$k]);\n }\n }\n }\n $model->getElement('status')->system(false)->editable(true);\n $model->getElement('assigned_id')->system(false)->editable(true);\n\n parent::setModel($model,$actual_fields);\n return $this->model;\n }", "public function Update($data) {\n\n }", "public function actionUpdate($id) {\n $model = $this->loadModel($id); \n $desarrollo = new Desarrollo; \n $estado = new Tblestado;\n $municipio = new Tblmunicipio;\n $parroquia = new Tblparroquia;\n\n // var_dump($model); die();\n\n// Uncomment the following line if AJAX validation is needed\n// $this->performAjaxValidation($model);\n\n if (isset($_POST['BeneficiarioTemporal'])) {\n\n $idPersona = $_POST[\"BeneficiarioTemporal\"][\"persona_id\"];\n \n $codigo_hab = substr($_POST[\"BeneficiarioTemporal_telf_habitacion\"],0,4);\n $telf_habitacion = substr($_POST[\"BeneficiarioTemporal_telf_habitacion\"], 4,11);\n\n $codigo_movil = substr($_POST[\"BeneficiarioTemporal_telf_celular\"],0,4);\n $telf_movil = substr($_POST[\"BeneficiarioTemporal_telf_celular\"], 4,11);\n\n\n /* ---------- UPDATE ------------------- */\n $idPersona = ConsultaOracle::updatePersona(array(\n // 'CEDULA' => $_POST[\"BeneficiarioTemporal\"][\"cedula\"],\n // 'NACIONALIDAD' => ($_POST[\"BeneficiarioTemporal\"]['nacionalidad'] == 97) ? 1 : 0,\n 'PRIMER_NOMBRE' => trim(strtoupper($_POST[\"BeneficiarioTemporal\"]['primer_nombre'])),\n 'SEGUNDO_NOMBRE' => trim(strtoupper($_POST[\"BeneficiarioTemporal\"]['segundo_nombre'])),\n 'PRIMER_APELLIDO' => trim(strtoupper($_POST[\"BeneficiarioTemporal\"]['primer_apellido'])),\n 'SEGUNDO_APELLIDO' => trim(strtoupper($_POST[\"BeneficiarioTemporal\"]['segundo_apellido'])),\n 'FECHA_NACIMIENTO' => $_POST[\"BeneficiarioTemporal\"]['fecha_nacimiento'],\n 'GEN_SEXO_ID' => $_POST[\"BeneficiarioTemporal\"]['sexo'],\n // 'GEN_EDO_CIVIL_ID' => $_POST[\"BeneficiarioTemporal\"]['estado_civil'],\n 'CODIGO_HAB' => (string) $codigo_hab,\n 'TELEFONO_HAB' => (string) $telf_habitacion,\n 'CODIGO_MOVIL' => (string) $codigo_movil,\n 'TELEFONO_MOVIL' => (string) $telf_movil,\n 'CORREO_PRINCIPAL' => $_POST[\"BeneficiarioTemporal\"]['correo_electronico'],\n ),$idPersona\n );\n\n /* ----------------------------------------- */\n \n\n\n\n\n $model->attributes = $_POST['BeneficiarioTemporal'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id_beneficiario_temporal));\n }\n\n $this->render('update', array(\n 'model' => $model,'desarrollo' => $desarrollo, 'municipio' => $municipio,\n 'estado' => $estado, 'parroquia' => $parroquia,\n ));\n }", "public function editModel(Model &$model)\n {\n }" ]
[ "0.7460964", "0.69655836", "0.66231287", "0.65549284", "0.6497529", "0.646454", "0.6455769", "0.63644964", "0.63113445", "0.6308253", "0.6289007", "0.6279021", "0.62369347", "0.62186605", "0.6215565", "0.614767", "0.61346143", "0.61302584", "0.61150753", "0.61005", "0.6076777", "0.6075108", "0.6073874", "0.60731155", "0.60675323", "0.60523623", "0.6045034", "0.6009574", "0.59606177", "0.59438354", "0.59438354", "0.5934319", "0.5926275", "0.591612", "0.5912167", "0.5895775", "0.58839804", "0.58721393", "0.58527994", "0.5852291", "0.5848996", "0.58459127", "0.584455", "0.58363223", "0.5835199", "0.5834006", "0.5833314", "0.5819265", "0.58167416", "0.5813946", "0.58042085", "0.57816947", "0.5778411", "0.5767188", "0.5766798", "0.5766798", "0.5765109", "0.5760163", "0.57577145", "0.5752222", "0.5743694", "0.573376", "0.57334673", "0.5728443", "0.5725205", "0.57094437", "0.56993234", "0.5693375", "0.5687717", "0.56807053", "0.56766444", "0.56683636", "0.5661193", "0.56535834", "0.5646963", "0.564259", "0.5632886", "0.5632552", "0.56298274", "0.56160027", "0.56160027", "0.56157", "0.5615079", "0.56141734", "0.5611227", "0.5611133", "0.5610668", "0.55987877", "0.5593698", "0.55892646", "0.5585083", "0.5584946", "0.5584946", "0.5582873", "0.557182", "0.5569707", "0.5564447", "0.55642235", "0.556368", "0.55580187" ]
0.5953896
29
fungsi untuk mengambil waktu sekarang
function getDateTime() { return (new DateTime('now'))->format('Y-m-d H:i:s'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tampil_bentuk_sedia(){\n $data['login'] = 'Halaman Login';\n $data['title'] = 'Kelola Satuan Sedia';\n $data['query'] = $this->m_barang->tampil_satuan_sedia();\n $this->template->load('static','barang/satuan/satuansedia', $data);\n }", "function berinamateman ($teman) {\n $this->nama_teman=$teman;\n }", "function hitung()\n\t{\n\t\t$this->model->hitungMhs();\n\t\t//$this->dashboardukmapendaftar(); //controller dikembalikan ke method index setelah selesai mengakses method ini.\n\t}", "public function set_pengiriman($id){ // untuk membuat database langkah pengiriman\n\t\t$cek = $this->M_biodata->get_biodata($id)->result();\n\t\t$this->load->model('M_transaksi');\n\t\tif (count($cek)>0){\n\t\t\tforeach ($cek as $c){\n\t\t\t\t\n\t\t\t};\n\t\t\t$data = array(\n\t\t\t'nama' => $c->namaAlumni,\n\t\t\t'alamat' => $c->alamat,\n\t\t\t'noHp' => $c->noHp,\n\t\t\t'id_pemesan' => $c->id_alumni\n\t\t\t);\t\n\t\t\t$this->M_transaksi->set_pengiriman($data,'pengiriman');\n\t\t$this->set_pembayaran($id);\n\t\t}\n\t}", "function _is_pejabat_penunjang_nt(){\n\t\t$CI \t\t=& get_instance();\n\t\t$kd \t\t= $CI->session->userdata('kd_dosen');\n\t\t$tgl \t\t= date('d-m-Y');\n\t\t$api_url \t= URL_API_SIMPEG1.'simpeg_mix/data_search';\n\t\t$parameter = array('api_kode' =>1121, 'api_subkode' => 3, 'api_search' => array($tgl, $kd, 1));\n\t\t$data = $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t//print_r ($data);\n\t\t$value = array();\n\t\t//echo $data[count($data)-1]->STR_NAMA;\n\t\tif(!empty($data)){\n\t\t\t//$kd_jab \t= $data[count($data)-1]->STR_ID;\n\t\t\t//ini harusnya yang aktif, bukan yang index 0 ; \n\t\t\tforeach ($data as $d) {\n\t\t\t\t$kd_jab \t= $d->STR_ID;\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_dosen/jabatan';\n\t\t\t\t$parameter = array('api_kode' =>20000, 'api_subkode' => 1, 'api_search' => array($kd_jab));\n\t\t\t\t$data2 = $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\tif(!empty($data2)){\n\t\t\t\t\t//$value['nama_jabatan'] = $data[count($data)-1]->STR_NAMA;\n\t\t\t\t\t$value['nama_jabatan'] = $d->STR_NAMA;\n\t\t\t\t\t$value['sks_maks'] = $this->_get_sks_max($d->STR_ID);//$data2[0]->SKS_MAX;\n\t\t\t\t\t$value['bukti_penugasan'] = 'Surat Keputusan';\n\t\t\t\t\t$value['masa_penugasan'] = '1 Tahun';\n\t\t\t\t\t$value['tgl_mulai'] = $d->RR_TANGGAL_MULAI_F;\n\t\t\t\t\t$value['tgl_selesai'] = $d->RR_TANGGAL_AKHIR_F;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn $value;\n\t\t#return $data;\n\t\t\n\t}", "function taikhoanbikhoa(){\n if($this->session->userdata('userid')!=FALSE)\n {\n $user=$this->default_model->getInfoID($this->_table,array(\"userid\" => $this->session->userdata('userid')));\n if($user['TrangThai']==1){\n $data['ThongBao']=sprintf($this->lang->line('thongbao_taikhoanbikhoa'), $this->session->userdata('username'));\n $data['title'] = $this->lang->line('title_taikhoanbikhoa');\n $data['description'] = $this->lang->line('title_taikhoanbikhoa');\n $data['template']='div_kichhoat'; \n $data['LoiNhan']=$user['LoiNhan']; \n $this->load->view('default',$data); \n }else{\n redirect(base_url());\n }\n }\n else\n {\n redirect(base_url());\n }\n }", "public function aksi_ubah_kata_sandi_profil_saya()\n {\n $kata_sandi_awal = $this->input->post('kata_sandi_awal');\n $data_lama = sha1($kata_sandi_awal);\n\n $kata_sandi = $this->input->post('kata_sandi');\n $kata_sandi_hash = sha1($kata_sandi);\n\n $data_baru = array(\n 'kata_sandi' => $kata_sandi_hash,\n );\n\n $where = $this->input->post('id_admin');\n\n $admin = $this->m_admin->cek_admin($where);\n\n if ($data_lama === $admin['kata_sandi']) {\n $this->m_admin->ubah_kata_sandi_profil_saya($where, $data_baru, 'admin');\n $this->session->set_flashdata('success', '<b>Kata Sandi</b> Berhasil Diubah');\n redirect('admin/form_ubah_kata_sandi_profil_saya/' . $where);\n } else {\n $this->session->set_flashdata('error', '<b>Kata Sandi Lama</b> Salah');\n redirect('admin/form_ubah_kata_sandi_profil_saya/' . $where);\n }\n }", "function apa_kabar() {\n return \"Apa kabar dunia?\"; //tidak menampilkan apapun\n}", "public function cariWaktuTerbaik($kelas, $id_guru, $hari, $bebanJam, $kelompokMapel, $metode = 1, $id_mapel, $nama_mapel, $id_tugas)\n\t{\n\t\t/*\n\t\t* jumlah pembagian jam \n\t\t* cek apakah ada jadwal yg ngepress\n\t\t* cek apakah ada jadwal yang ada tapi tidak ngpress\n\t\t* jika sudah tidak ada tambahi metode\n\t\t* kalau sudah tidak bisa maka geser\n\t\t* kalau sudah tidak bisa lagi maka kepepet\n\t\t*/\n\n\t\t$pembagianJam = $this->pembagianWaktu($kelompokMapel, $bebanJam, $metode);\n\t\t$dataHari = explode(',', $hari);\n\t\tforeach ($pembagianJam as $valuePembagianjam) {\n\t\t\t$hasilJadwal = $this->jadwalPas($kelas, $valuePembagianjam, $dataHari, $id_guru);\n\t\t\t// * cek hasil statusnya\n\t\t\tswitch ($hasilJadwal['status']) {\n\t\t\t\tcase 'Press':\n\t\t\t\t\techo \" sesi press\";\n\t\t\t\t\t$status = '<div style=\"background-color: #c82333\">error</div>';\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t\tprint_r($hasilJadwal['sesi']);\n\t\t\t\t\techo \"<br>\";\n\n\t\t\t\t\tforeach ($hasilJadwal['sesi'] as $keyHariJadwal => $sesi) {\n\t\t\t\t\t\t$jadwaltersedia = $this->Jadwal_Model->getJadwalGuru_Kelas_Hari($kelas, $keyHariJadwal, $id_guru);\n\t\t\t\t\t\tif (count($jadwaltersedia) == 0) {\n\t\t\t\t\t\t\t$saranSesi = [];\n\t\t\t\t\t\t\tforeach ($sesi as $valueSesi) {\n\t\t\t\t\t\t\t\t$saranSesi = $this->sesiUrut($kelas, $keyHariJadwal, $valueSesi);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!empty($saranSesi)) {\n\t\t\t\t\t\t\t\t$this->Jadwal_Model->isiJadwal($kelas, $keyHariJadwal, $saranSesi, $id_guru, $id_mapel, $nama_mapel, $id_tugas);\n\t\t\t\t\t\t\t\t$status = \"<div style='background-color: #218838;'>sukses</div>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t\techo \"$status : \";\n\t\t\t\t\tprint_r($saranSesi);\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'tidakPress':\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t\techo \"<div style='background-color: #7FFFD4 ;'>proses dahulu</div>\";\n\t\t\t\t\t$tempTotal = 0;\n\t\t\t\t\t$hariyangdipilih = '';\n\t\t\t\t\t$status = '<div style=\"background-color: #c82333\">error</div>';\n\n\t\t\t\t\tforeach ($hasilJadwal['sesi'] as $keyHariJadwal => $sesi) {\n\t\t\t\t\t\t$jadwaltersedia = $this->Jadwal_Model->getJadwalGuru_Kelas_Hari($kelas, $keyHariJadwal, $id_guru);\n\t\t\t\t\t\tif (count($jadwaltersedia) == 0) {\n\t\t\t\t\t\t\tif ($tempTotal < count($sesi)) {\n\t\t\t\t\t\t\t\t$tempTotal = count($sesi);\n\t\t\t\t\t\t\t\t$hariyangdipilih = $keyHariJadwal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\techo \"---$hariyangdipilih==>temp Total : \" . $tempTotal . \"---<br>\";\n\n\t\t\t\t\tif ($hariyangdipilih == '') {\n\t\t\t\t\t\tforeach ($hasilJadwal['sesi'] as $keyHariJadwal => $sesi) {\n\t\t\t\t\t\t\t// echo \"<br>\";\n\t\t\t\t\t\t\t// echo \"tidak ada pilihan lain jumlah jadwal \" . count($jadwaltersedia);\n\t\t\t\t\t\t\tif ($tempTotal < count($sesi)) {\n\t\t\t\t\t\t\t\t$tempTotal = count($sesi);\n\t\t\t\t\t\t\t\t$hariyangdipilih = $keyHariJadwal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo 'hari yang dipilih kosong';\n\t\t\t\t\t}\n\n\t\t\t\t\t// print_r($hasilJadwal['sesi'][$hariyangdipilih]);\n\t\t\t\t\tforeach ($hasilJadwal['sesi'][$hariyangdipilih] as $valueSesi) {\n\t\t\t\t\t\t$saranSesi = $this->sesiUrut($kelas, $hariyangdipilih, $valueSesi);\n\t\t\t\t\t\tif (!empty($saranSesi)) {\n\t\t\t\t\t\t\t// $this->Jadwal_Model->isiJadwal($kelas, $hariyangdipilih, $hasilJadwal['sesi'][$hariyangdipilih][0], $id_guru, $id_mapel, $nama_mapel, $id_tugas);\n\t\t\t\t\t\t\t$this->Jadwal_Model->isiJadwal($kelas, $hariyangdipilih, $saranSesi, $id_guru, $id_mapel, $nama_mapel, $id_tugas);\n\t\t\t\t\t\t\t$status = \"<div style='background-color: #218838;'>sukses</div>\";\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\techo \"<br>\";\n\t\t\t\t\techo \"$status : \";\n\t\t\t\t\tprint_r($saranSesi);\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'tidakMuat':\n\t\t\t\t\techo \"tidak muat\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public function tambah_toko(){\n\t}", "public function aksi_ubah_kata_sandi_profil_saya()\n\t{\n\t\t$kata_sandi_awal = $this->input->post('kata_sandi_awal');\n\t\t$data_lama = sha1($kata_sandi_awal);\n\n\t\t$kata_sandi = $this->input->post('kata_sandi');\n\t\t$kata_sandi_hash = sha1($kata_sandi);\n\n\t\t$data_baru = array(\n\t\t\t'kata_sandi' => $kata_sandi_hash,\n\t\t);\n\n\t\t$where = $this->input->post('id_warga');\n\n\t\t$warga = $this->m_warga->cek_warga($where);\n\n\t\tif ($data_lama === $warga['kata_sandi']) {\n\t\t\t$this->m_warga->ubah_kata_sandi_profil_saya($where, $data_baru, 'warga');\n\t\t\t$this->session->set_flashdata('success', '<b>Kata Sandi</b> Berhasil Diubah');\n\t\t\tredirect('warga/form_ubah_kata_sandi_profil_saya/' . $where);\n\t\t} else {\n\t\t\t$this->session->set_flashdata('error', '<b>Kata Sandi Lama</b> Salah');\n\t\t\tredirect('warga/form_ubah_kata_sandi_profil_saya/' . $where);\n\t\t}\n\t}", "function berinama($saya){\n\t\t$this->nama_saya=$saya;\n\t}", "public function aksi_ubah_kata_sandi_warga()\n {\n $kata_sandi = $this->input->post('kata_sandi');\n $kata_sandi_hash = sha1($kata_sandi);\n $data = array(\n 'kata_sandi' => $kata_sandi_hash,\n );\n\n $detailhere = $this->input->post('id_warga');\n\n if ($this->m_admin->aksi_ubah_kata_sandi_warga($detailhere, $data, 'warga')); {\n $this->session->set_flashdata('success', 'diubah');\n redirect('admin/list_data_warga');\n }\n }", "function auto_menguji_ta(){\n\t\t\t\t$ta = $this->session->userdata('kd_ta');\n\t\t\t\t$smt = $this->session->userdata('kd_smt');\n\n\t\t\t\t$data = $this->get_current_ujian_ta(2); //mengambil data menguji tugas akhir pada semester ini (2)\n\n\t\t\t\tforeach ($data as $ta) {\n\t\t\t\t\t$cek_nilai_mhs = $this->get_status_ta($ta['NIM']);\n\t\t\t\t\tif($cek_nilai_mhs){\n\t\t\t\t\t\t$nim = $ta['NIM'];\n\t\t\t\t\t\t$judul_ta = $ta['JUDUL'];\n\t\t\t\t\t\t$kd_kur_mhs = $this->kurikulum_mahasiswa($nim);\n\t\t\t\t\t\t$temp = $this->get_data_mhs($nim);\n\t\t\t\t\t\t$jenjang = $temp[0]['NM_JENJANG'];\n\t\t\t\t\t\t$prodi = $temp[0]['NM_PRODI'];\n\t\t\t\t\t\t$prodi = str_replace(\"'\", \"\", $prodi);\n\t\t\t\t\t\t$prodi = strip_tags($prodi);\n\n\t\t\t\t\t\t$list_mk = $this->api->get_api_json(\n\t\t\t\t\t\t\tURL_API_SIA.'sia_kurikulum/data_search',\n\t\t\t\t\t\t\t'POST',\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'api_kode'=>40000,\n\t\t\t\t\t\t\t\t'api_subkode' => 15,\n\t\t\t\t\t\t\t\t'api_search' => array($kd_kur_mhs)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tforeach ($list_mk as $mk) {\n\t\t\t\t\t\t\t$get_makul = strtoupper($mk['NM_MK']);\n\t\t\t\t\t\t\t$get_jenjang = strtoupper($mk['NM_PEND']);\n\t\t\t\t\t\t\tif($get_jenjang == \"S0\"){\n\t\t\t\t\t\t\t\tif($get_makul == \"TUGAS AKHIR\" || $get_makul == \"SKRIPSI\" || $get_makul == \"TUGAS AKHIR/SKRIPSI\" || $get_makul == \"SKRIPSI/TUGAS AKHIR\"){\n\t\t\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if($get_jenjang == \"S1\"){\n\t\t\t\t\t\t\t\tif($get_makul == \"TUGAS AKHIR\" || $get_makul == \"SKRIPSI\" || $get_makul == \"TUGAS AKHIR/SKRIPSI\" || $get_makul == \"SKRIPSI/TUGAS AKHIR\"){\n\t\t\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if($get_jenjang==\"S2\"){\n\t\t\t\t\t\t\t\tif($get_makul == \"TESIS\" || $get_makul == \"TESIS/TUGAS AKHIR\" || $get_makul == \"TUGAS AKHIR/TESIS\"){\n\t\t\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if($get_jenjang==\"S3\"){\n\t\t\t\t\t\t\t\tif($get_makul == \"DISERTASI\" || $get_makul == \"DISERTASI/TUGAS AKHIR\" || $get_makul == \"TUGAS AKHIR/DISERTASI\"){\n\t\t\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//BUAT NARASI + INPUT DATA KE DB + ADA CEK DUPLUKASI DATA :\n\n\t\t\t\t\t\t$narasi = \"Menguji Tugas Akhir \".$jenjang.\", Program Studi \".$prodi.\", Judul \".$judul_ta.\", \".$jml_sks.\" SKS\";\n\t\t\t\t\t\t$narasi = str_replace(\"'\", \"\", $narasi);\n\t\t\t\t\t\t$narasi = strip_tags($narasi);\n\t\t\t\t\t\t//$narasi = str_replace(\",\", \"\", $narasi);\n\t\t\t\t\t\t//$sks_rule = round($this->aturan_beban_sks2(strtoupper($jenjang), $jml_sks, 1, 'TUGAS_AKHIR'),2);\n\t\t\t\t\t\t$jml_mhs = 1;\n\n\t\t\t\t\t\t//ATURAN SKS_RULE UNTUK MENGUJI TA\n\t\t\t\t\t\t$kd_kat = '74'; //4 untuk menguji (sebagai ketua dan anggota)\n\t\t\t\t\t\tif($jenjang == 'S0'){\n\t\t\t\t\t\t\t//sks_rule sementara untuk menguji TA S0 \n\t\t\t\t\t\t\t//$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t\t\t\t$sks_rule \t= $this->sksrule->_nilai_sks($jml_mhs, 1003, 2);\n\t\t\t\t\t\t\t$kd_kat = '74';\n\t\t\t\t\t\t}elseif($jenjang == 'S1'){\n\t\t\t\t\t\t\t//sks_rule sementara untuk menguji TA S0 \n\t\t\t\t\t\t\t//$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t\t\t\t$sks_rule \t= $this->sksrule->_nilai_sks($jml_mhs, 1003, 2);\n\t\t\t\t\t\t\t$kd_kat = '74';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($jenjang == 'S2'){\n\t\t\t\t\t\t\t//$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t\t\t\t$sks_rule \t= $this->sksrule->_nilai_sks($jml_mhs, 1003, 3);\n\t\t\t\t\t\t\t$kd_kat = '74'; //74 untuk menguji sebagai anggota\n\t\t\t\t\t\t}elseif($jenjang == 'S3'){\n\t\t\t\t\t\t\t//$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t\t\t\t$sks_rule \t= $this->sksrule->_nilai_sks($jml_mhs, 1003, 4);\n\t\t\t\t\t\t\t$kd_kat = '74'; //74 untuk menguji sebagai anggota\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$smt = $this->session->userdata('kd_smt');\n\t\t\t\t\t\t$ta = $this->session->userdata('kd_ta');\n\n\t\t\t\t\t\t// $kd_jbk = 'A';\n\t\t\t\t\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t\t\t\t\t$jenis_kegiatan = $narasi;\n\t\t\t\t\t\t/*$jenis_kegiatan ='test';*/\n\t\t\t\t\t\t$bukti_penugasan = '-';\n\t\t\t\t\t\t// $sks_penugasan = $sks_rule;\n\t\t\t\t\t\t$masa_penugasan = '1 Semester';\n\t\t\t\t\t\t$bkt_dokumen = '-';\n\t\t\t\t\t\t$kd_jbk \t\t= 'A';\n\t\t\t\t\t\t$bkt_penugasan \t= '-';\n\t\t\t\t\t\t$bkt_dokumen \t= '-';\n\t\t\t\t\t\t$rekomendasi \t= 'LANJUTKAN';\n\t\t\t\t\t\t$capaian \t\t= 100;\n\t\t\t\t\t\t$jml_jam \t\t= 1;\n\t\t\t\t\t\t$outcome \t\t= '-';\n\t\t\t\t\t\t$file_penugasan = '-';\n\t\t\t\t\t\t$file_capaian \t= '-';\n\t\t\t\t\t\t// $sks_bkt = $sks_rule;\n\t\t\t\t\t\t$thn = $this->session->userdata('ta');\n\t\t\t\t\t\tif($smt == 2) $semester = 'GENAP'; else $semester = 'GANJIL';\n\n\n\n\t\t\t\t\t\t//cek kemana data akan pergi :)\n\t\t\t\t\t\t$kewajiban_serdos = $this->cek_kewajiban_serdos($kd_dosen);\n\n\t\t\t\t\t\t$status_pindah = $this->get_status_pindah($kd_kat);\n\n\t\t\t\t\t\t$jalur_data = 0;\n\t\t\t\t\t\tif($status_pindah == 0){\n\t\t\t\t\t\t\t$jalur_data = $this->cek_jalur_data_kat($kd_kat);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$sts_pakai = 1;\n\t\t\t\t\t\tif($status_pindah == 0){\n\t\t\t\t\t\t\tif($kewajiban_serdos == 0){\n\t\t\t\t\t\t\t\t$sts_pakai = 0;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tif($jalur_data != 0){\n\t\t\t\t\t\t\t\t\t$sts_pakai = 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t//cek apakah sudah ada data atau belum ?\n\t\t\t\t\t\t $cek_mhs_bimbingan = $this->cek_api_mhs_ujian($nim);\n\n\t\t\t\t\t\t //cek nilai mahasiswa ta sudah ada apa belum :\n\t\t\t\t\t\t //$cek_nilai_mhs = $this->get_status_ta($nim);\n\t\t\t\t\t\t $cek_mhs_ujian_ta = $this->cek_api_data_pendidikan($kd_dosen, $ta, $smt, $kd_kat, $nim);\n\t\t\t\t\t\t $cek_status_ketua_ta = $this->cek_api_data_pendidikan($kd_dosen, $ta, $smt, '73', $nim);\n\t\t\t\t\t\t \n\t\t\t\t\t\t//if(!$cek_mhs_bimbingan){\n\t\t\t\t\t\tif(!$cek_mhs_ujian_ta && !$cek_status_ketua_ta){\n\n\t\t\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_beban_kerja_sia_ta_maps';\n\t\t\t\t\t\t\t$parameter = array('api_search'=>array($kd_jbk, $kd_dosen, $jenis_kegiatan, $bkt_penugasan, $sks_rule, $masa_penugasan, $bkt_dokumen, $sks_rule, $thn, $semester, $rekomendasi, $jml_jam, $capaian, $outcome, $file_penugasan, $file_capaian, $ta, $smt, $sts_pakai));\n\t\t\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\t\t\tif($simpan){\n\n\t\t\t\t\t\t\t\t$getid = $simpan;\n\t\t\t\t\t\t\t\t$nm_keg = $jenis_kegiatan;\n\n\t\t\t\t\t\t\t\t$status_pindah = $this->get_status_pindah($kd_kat);\n\n\t\t\t\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_data_pendidikan_ta';\n\t\t\t\t\t\t\t\t$parameter\t= array('api_search' => array($getid, $kd_kat, $nm_keg, $jenjang, '-', '1', $jml_sks, '1', '1', 'A', '1', $prodi, $nim, $status_pindah));\n\t\t\t\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\t\t\t\tif($simpan){\n\t\t\t\t\t\t\t\t\t//echo 'simpan ke data pendidikan sukses'; echo '<br>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t}", "function latihan_soal(){\r\n \tif($this->session->userdata('akses')=='1' || $this->session->userdata('akses')=='2' || $this->session->userdata('akses')=='3'){\r\n \t$this->load->view('v_latihan_soal');\r\n \t}else{\r\n \techo \"Anda tidak berhak mengakses halaman ini\";\r\n \t}\r\n \t}", "function berinamateman($teman){\n\t\t$this->nama_teman=$teman;\n\t}", "function tampilSikap($nilai) {\nif($nilai== '1'){ \n\t$nilai = 'Kurang';\n}\nelseif($nilai== '2'){ \n\t$nilai = 'Cukup';\n}\nelseif($nilai== '3'){ \n\t$nilai = 'Baik';\n}\nelse { \n\t$nilai = 'Baik Sekali';\n}\n\treturn $nilai;\n}", "function salah()\n\t{\n\t\t# debug\n\t\t$this->tanya->dapatid($_POST['password']);\n\t\t$this->papar->mesej = 'Ada masalah pada user dan password';\n\n\t\t# Set pemboleubah utama\n\t\t$this->papar->sesat = 'Enjin Carian - Sesat';\n\t\t$this->papar->isi = '';\n\n\t\t# Pergi papar kandungan\n\t\t//$this->semakPembolehubah($this->papar->mesej); # Semak data dulu\n\t\t$this->paparKandungan('index', 'salah');\n\t}", "function _dispen_hari(){\n\t\t$CI =& get_instance();\n\t\t$api_url \t= URL_API_SIA.'sia_sistem/data_view';\n\t\t$parameter = array('api_kode' =>200002, 'api_subkode' => 1, 'api_search' => array());\n\t\t$data \t\t= $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\treturn $data[0]->KADALUWARSA_HARI1;\n\t}", "function quanlythanhvien($page=1,$sucess=\"\"){\n \n //--- Neu chua dang nhap thi bat dang nhap\n if($this->session->userdata('permission')!=1){\n redirect(base_url());\n exit();\n }\n //phan trang hien thi\n $bien_phanbiet='userid';\n $noibang=\"\";\n $dieukien=\"\";\n $this->default_model->updateDuLieu('thanhvien',array('viewed'=>1),array('viewed'=>0));\n $url_phantrang=base_url().'thanhvien/quanlythanhvien/';\n $bien_sapxep_hienthi='userid desc';\n $user['template']='admin/quanlythanhvien';\n $user['title']='Quản lý thành viên';\n include(APPPATH . 'includes/phantrang_admin.php');\n }", "public function jalan() {\n echo \"method jalan() berisi : Hewan ini terbang\";\n }", "public function tampilDataGalang(){\n\t\t\n\t}", "function SuoritaLisaysToimet(){\n /*Otetaan puuhaId piilotetustaKentasta*/\n $puuhaid = $_POST['puuha_id'];\n \n /* Hae puuhan tiedot */\n $puuha = Puuhat::EtsiPuuha($puuhaid);\n $suositus=luoSuositus($puuhaid,null);\n \n /*Tarkistetaan oliko suosituksessa virheita*/\n if(OlioOnVirheeton($suositus)){\n LisaaSuositus($suositus,$puuhaid);\n header('Location: puuhanTiedotK.php?puuhanid=' . $puuhaid . '.php');\n } else {\n $virheet = $suositus->getVirheet();\n naytaNakymaSuosituksenKirjoitusSivulle($puuha, $suositus, $virheet, \"Lisays\");\n }\n}", "function cek_ujian_akhir_mhs(){\n\t\t\t$bimbingan = $this->cek_mhs_ujian_ta();\n\t\t\t$data = array();\n\t\t\t$ta = $this->session->userdata('kd_ta');\n\t\t\t$smt = $this->session->userdata('kd_smt');\n\n\t\t\tforeach ($bimbingan as $bbg) {\n\t\t\t\t$mhs \t= $this->get_data_mhs($bbg['NIM']);\n\t\t\t\t$waktu \t= $this->periode_semester(str_replace('-', '/', $bbg['TGL_MUNA']), $mhs[0]['KD_PRODI']);\n\t\t\t\tif($waktu){\n\t\t\t\t\tforeach ($waktu as $wkt) {\n\t\t\t\t\t\tif($ta == $wkt['KD_TA'] && $smt == $wkt['KD_SMT']){\n\t\t\t\t\t\t\t$data[] = $bbg;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\tforeach ($data as $ta) {\n\t\t\t\t$nim = $ta['NIM'];\n\t\t\t\t$judul_ta = $ta['JUDUL'];\n\t\t\t\t$kd_kur_mhs = $this->kurikulum_mahasiswa($nim);\n\t\t\t\t$temp = $this->get_data_mhs($nim);\n\t\t\t\t$jenjang = $temp[0]['NM_JENJANG'];\n\t\t\t\t$prodi = $temp[0]['NM_PRODI'];\n\n\t\t\t\t$list_mk = $this->api->get_api_json(\n\t\t\t\t\tURL_API_SIA.'sia_kurikulum/data_search',\n\t\t\t\t\t'POST',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'api_kode'=>40000,\n\t\t\t\t\t\t'api_subkode' => 15,\n\t\t\t\t\t\t'api_search' => array($kd_kur_mhs)\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\tforeach ($list_mk as $mk) {\n\t\t\t\t\t$get_makul = strtoupper($mk['NM_MK']);\n\t\t\t\t\t$get_jenjang = strtoupper($mk['NM_PEND']);\n\t\t\t\t\tif($get_jenjang == \"S0\"){\n\t\t\t\t\t\tif($get_makul == \"TUGAS AKHIR\" || $get_makul == \"SKRIPSI\" || $get_makul == \"TUGAS AKHIR/SKRIPSI\" || $get_makul == \"SKRIPSI/TUGAS AKHIR\"){\n\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if($get_jenjang == \"S1\"){\n\t\t\t\t\t\tif($get_makul == \"TUGAS AKHIR\" || $get_makul == \"SKRIPSI\" || $get_makul == \"TUGAS AKHIR/SKRIPSI\" || $get_makul == \"SKRIPSI/TUGAS AKHIR\"){\n\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if($get_jenjang==\"S2\"){\n\t\t\t\t\t\tif($get_makul == \"TESIS\" || $get_makul == \"TESIS/TUGAS AKHIR\" || $get_makul == \"TUGAS AKHIR/TESIS\"){\n\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if($get_jenjang==\"S3\"){\n\t\t\t\t\t\tif($get_makul == \"DISERTASI\" || $get_makul == \"DISERTASI/TUGAS AKHIR\" || $get_makul == \"TUGAS AKHIR/DISERTASI\"){\n\t\t\t\t\t\t\t$jml_sks = $mk['SKS_MK'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//BUAT NARASI + INPUT DATA KE DB + ADA CEK DUPLUKASI DATA\n\t\t\t\t//BUAT NARASI + INPUT DATA KE DB + ADA CEK DUPLUKASI DATA\n\t\t\t\t$narasi = \"Menguji Tugas Akhir \".$jenjang.\", Program Studi \".$prodi.\", Judul \".$judul_ta.\", \".$jml_sks.\" SKS\";\n\t\t\t\t$narasi = str_replace(\"'\", \"\", $narasi);\n\t\t\t\t$narasi = strip_tags($narasi);\n\t\t\t\t//$narasi = str_replace(\",\", \"\", $narasi);\n\t\t\t\t$sks_rule = round($this->aturan_beban_sks2(strtoupper($jenjang), $jml_sks, 1, 'TUGAS_AKHIR'),2);\n\n\t\t\t\t//ATURAN SKS_RULE UNTUK MENGUJI TA\n\t\t\t\tif($jenjang == 'S0'){\n\t\t\t\t\t//sks_rule sementara untuk menguji TA S0 \n\t\t\t\t\t$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t}elseif($jenjang == 'S1'){\n\t\t\t\t\t//sks_rule sementara untuk menguji TA S0 \n\t\t\t\t\t$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t}\n\t\t\t\telseif($jenjang == 'S2'){\n\t\t\t\t\t$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t}elseif($jenjang == 'S3'){\n\t\t\t\t\t$sks_rule = round(($sks_rule*(0.5)), 2);\n\t\t\t\t}\n\n\t\t\t\t$smt = $this->session->userdata('kd_smt');\n\t\t\t\t$ta = $this->session->userdata('kd_ta');\n\n\t\t\t\t// $kd_jbk = 'A';\n\t\t\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t\t\t$jenis_kegiatan = $narasi;\n\t\t\t\t/*$jenis_kegiatan ='test';*/\n\t\t\t\t$bukti_penugasan = '-';\n\t\t\t\t// $sks_penugasan = $sks_rule;\n\t\t\t\t$masa_penugasan = '1 Semester';\n\t\t\t\t$bkt_dokumen = '-';\n\t\t\t\t$kd_jbk \t\t= 'A';\n\t\t\t\t$bkt_penugasan \t= '-';\n\t\t\t\t$bkt_dokumen \t= '-';\n\t\t\t\t$rekomendasi \t= 'LANJUTKAN';\n\t\t\t\t$capaian \t\t= 100;\n\t\t\t\t$jml_jam \t\t= 1;\n\t\t\t\t$outcome \t\t= '-';\n\t\t\t\t$file_penugasan = '-';\n\t\t\t\t$file_capaian \t= '-';\n\t\t\t\t// $sks_bkt = $sks_rule;\n\t\t\t\t$thn = $this->session->userdata('ta');\n\t\t\t\tif($smt == 2) $semester = 'GENAP'; else $semester = 'GANJIL';\n\n\t\t\t\t// $rekomendasi = 'LANJUTKAN';\n\t\t\t\t// $jumlah_jam = null;\n\t\t\t\t// $capaian = '100';\n\t\t\t\t// $outcome = null;\n\t\t\t\t// $file_penugasan = null;\n\t\t\t\t// $file_capaian = null;\n\n\t\t\t\t//insert into BKD_BEBAN_KERJA && BKD_REMUN_KINERJA\n\n\t\t\t\t//cek apakah sudah ada data atau belum ?\n\t\t\t\t $cek_mhs_bimbingan = $this->cek_api_mhs_ujian($nim);\n\t\t\t\t \n\t\t\t\tif(!$cek_mhs_bimbingan){\n\n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_beban_kerja_sia_ta';\n\t\t\t\t\t$parameter = array('api_search'=>array($kd_jbk, $kd_dosen, $jenis_kegiatan, $bkt_penugasan, $sks_rule, $masa_penugasan, $bkt_dokumen, $sks_rule, $thn, $semester, $rekomendasi, $jml_jam, $capaian, $outcome, $file_penugasan, $file_capaian, $ta, $smt));\n\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\tif($simpan){\n\t\t\t\t\t\t// echo 'simpan ke db bkd_beban_kerja dan BKD_REMUN_KINERJA sukses'; echo '<br>';\n\t\t\t\t\t\t// $api_url \t= URL_API_BKD.'bkd_beban_kerja/get_current_data_tersimpan';\n\t\t\t\t\t\t// $parameter\t= array('api_search' => array('BKD.BKD_BEBAN_KERJA','KD_BK'));\n\t\t\t\t\t\t// $getid = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t\t\t\t\t$getid = $simpan;\n\t\t\t\t\t\t$nm_keg = $jenis_kegiatan;\n\t\t\t\t\t\t#simpan data pendidikan\n\t\t\t\t\t\t//catatan: $parameter ke dua adalah kd_kat, parameter ini nantinya otomatis, misalya ketika ada status sebagai pembimbing, maka\n\t\t\t\t\t\t//akan berubah menjadi kd_kat untuk membimbing\n\n\t\t\t\t\t\t$status_pindah = $this->get_status_pindah(4);\n\n\t\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_data_pendidikan_ta';\n\t\t\t\t\t\t$parameter\t= array('api_search' => array($getid, '4', $nm_keg, $jenjang, '-', '1', $jml_sks, '1', '1', 'A', '1', $prodi, $nim, $status_pindah));\n\t\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\t\tif($simpan){\n\t\t\t\t\t\t\t//echo 'simpan ke data pendidikan sukses'; echo '<br>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t }else{\n\t\t\t\t\t\n\t\t\t\t }\n\t\t\t}\n\t}", "public function aksi_ubah_kata_sandi_kades()\n {\n $kata_sandi = $this->input->post('kata_sandi');\n $kata_sandi_hash = sha1($kata_sandi);\n $data = array(\n 'kata_sandi' => $kata_sandi_hash,\n );\n\n $detailhere = $this->input->post('id_kades');\n\n if ($this->m_admin->aksi_ubah_kata_sandi_kades($detailhere, $data, 'kepala_desa')); {\n $this->session->set_flashdata('success', 'diubah');\n redirect('admin/list_data_kades');\n }\n }", "function universitas(){\r\n \tif($this->session->userdata('akses')=='1' || $this->session->userdata('akses')=='2' || $this->session->userdata('akses')=='3'){\r\n \t$this->load->view('v_universitas');\r\n \t}else{\r\n \techo \"Anda tidak berhak mengakses halaman ini\";\r\n \t}\r\n \t}", "public function hapus_toko(){\n\t}", "function data_mhs(){\r\n\t\t\techo \"KodeMataKuliah : \".$this->KodeMataKuliah.\"<br />\";\r\n\t\t\techo \"SKS : \".$this->SKS.\"<br />\";\r\n\t\t\techo \"Daftar matakuliah yang diambil:<br />\";\r\n\t\t\t\r\n\t\t\t$i = 0; // nomor urut daftar SKS matakuliah yang diambil\r\n\t\t\tforeach($this->NamaMataKuliah as $mk){\r\n\t\t\t\techo ++$i.\". \".$mk.\"<br />\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Cuma buat ganti baris aja kok :-)\r\n\t\t\techo \"<br />\";\r\n\t\t}", "function select_tb_penduduk(){\n\t\t$this->load->model('mamdani');\n\t\t//$klasifikasi['klasifikasi']=$this->mamdani->getdata();\n\t\t$klasifikasi['jumlah_aset']=$this->mamdani->jumlah_aset();\n\t\t$klasifikasi['tingkat']= $this->mamdani->klasifikasi3();\n\n\t\t$this->load->view('templates/header');\n\t\t$this->load->view('admin/lihatdata/tabel_klasifikasi_penduduk',$klasifikasi);\n\t\t$this->load->view('templates/footer');\n\t\t// var_dump($jml_aset);\n\t\t// die;\n\n\t}", "private function generateNilaiAkhir($thn_ajaran = NULL, $smt = NULL, $kode_kel = NULL, $nbi = NULL) {\r\n if ( !$this->session->userdata('isLecturerTps') && !$this->session->userdata('isAdminTps') ) {\r\n redirect('public/home','refresh');\r\n }\r\n\r\n $dataFilter = [\r\n 'thn_ajaran' => $thn_ajaran,\r\n 'smt' => $smt,\r\n 'kode_kel' => $kode_kel,\r\n 'nbi' => $nbi\r\n ];\r\n\r\n $dataAnggota = $this->M_anggota->getAnggota($dataFilter)->row();\r\n\r\n if ( $dataAnggota ) {\r\n \r\n $setting = $this->M_setting->getSetting()->row();\r\n\r\n // Bobot masing masing nilai\r\n $bobot_bimbingan = $setting->bobot_bimbingan;\r\n $bobot_moderator = $setting->bobot_moderator;\r\n $bobot_penguji1 = $setting->bobot_penguji1;\r\n $bobot_penguji2 = $setting->bobot_penguji2;\r\n $kom_a = $setting->kom_a;\r\n $kom_b = $setting->kom_b;\r\n $kom_c = $setting->kom_c;\r\n $kom_d = $setting->kom_d;\r\n // Bobot masing masing nilai\r\n\r\n // nilai bimbingan\r\n $bimb = ( $bobot_bimbingan/100 ) * $dataAnggota->nilai_bimb;\r\n // nilai bimbingan\r\n\r\n // nilai moderator\r\n $kom_a_mod = ( $kom_a/100 ) * $dataAnggota->nilai_11;\r\n $kom_b_mod = ( $kom_b/100 ) * $dataAnggota->nilai_12;\r\n $kom_c_mod = ( $kom_c/100 ) * $dataAnggota->nilai_13;\r\n $kom_d_mod = ( $kom_d/100 ) * $dataAnggota->nilai_14;\r\n\r\n $tot_mod = ( $kom_a_mod + $kom_b_mod + $kom_c_mod + $kom_d_mod ) * ( $bobot_moderator/100 );\r\n // nilai moderator\r\n \r\n // nilai penguji 1\r\n $kom_a_p1 = ( $kom_a/100 ) * $dataAnggota->nilai_21;\r\n $kom_b_p1 = ( $kom_b/100 ) * $dataAnggota->nilai_22;\r\n $kom_c_p1 = ( $kom_c/100 ) * $dataAnggota->nilai_23;\r\n $kom_d_p1 = ( $kom_d/100 ) * $dataAnggota->nilai_24;\r\n\r\n $tot_p1 = ( $kom_a_p1 + $kom_b_p1 + $kom_c_p1 + $kom_d_p1 ) * ( $bobot_penguji1/100 );\r\n // nilai penguji 1\r\n \r\n // nilai penguji 2\r\n $kom_a_p2 = ( $kom_a/100 ) * $dataAnggota->nilai_31;\r\n $kom_b_p2 = ( $kom_b/100 ) * $dataAnggota->nilai_32;\r\n $kom_c_p2 = ( $kom_c/100 ) * $dataAnggota->nilai_33;\r\n $kom_d_p2 = ( $kom_d/100 ) * $dataAnggota->nilai_34;\r\n\r\n $tot_p2 = ( $kom_a_p2 + $kom_b_p2 + $kom_c_p2 + $kom_d_p2 ) * ( $bobot_penguji2/100 );\r\n // nilai penguji 2\r\n\r\n // Perhitungan nilai kahir\r\n $totalNilai = $bimb + $tot_mod + $tot_p1 + $tot_p2;\r\n // Perhitungan nilai kahir\r\n \r\n $dataUpdate = ['nilai_akhir' => $totalNilai];\r\n $updateNilaiAkhir = $this->M_anggota->update($thn_ajaran,$smt,$kode_kel,$nbi,$dataUpdate);\r\n\r\n if ( $updateNilaiAkhir ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n } else {\r\n return false;\r\n }\r\n\r\n }", "public function karyawan(){\n $this->setActualJadwal(TRUE);\n $this->load->model('jadwal_detail_model', 'jdm');\n $periodeTerpilih = $this->input->post('periode');\n if(empty($periodeTerpilih)){\n $tanggalTerpilih = date('Y-m-d');\n }else{\n $tanggalTerpilih = date($periodeTerpilih.'-01');\n }\n \n $idJadwal = $this->jdm->fields(['jadwal_id'])->get_by(['nik' => $this->getNIK(), 'tanggalabsensi' => $tanggalTerpilih]);\n if(!empty($idJadwal)){\n $this->load->model('User_model', 'um');\n $_POST['key'] = ['id' => $idJadwal->jadwal_id];\n $bawahan = $this->getBawahan();\n $nikBawahan = array_column($this->um->as_array()->fields('ref_nik')->get_many(array_keys($bawahan)),'ref_nik');\n $this->setFilterNik($nikBawahan);\n $this->setMarkToday(TRUE);\n $this->edit();\n }else{\n echo 'Data jadwal tidak ditemukan untuk tanggal '.tglIndonesia($tanggalTerpilih);\n }\n }", "private function generateNilaiHuruf($thn_ajaran = NULL, $smt = NULL, $kode_kel = NULL, $nbi = NULL) {\r\n if ( !$this->session->userdata('isLecturerTps') && !$this->session->userdata('isAdminTps') ) {\r\n redirect('public/home','refresh');\r\n }\r\n\r\n $dataFilter = [\r\n 'thn_ajaran' => $thn_ajaran,\r\n 'smt' => $smt,\r\n 'kode_kel' => $kode_kel,\r\n 'nbi' => $nbi\r\n ];\r\n\r\n $dataAnggota = $this->M_anggota->getAnggota($dataFilter)->row();\r\n\r\n if ( $dataAnggota ) {\r\n\r\n // Perhitungan Nilai Huruf\r\n if ( $dataAnggota->nilai_akhir > 85 )\r\n $nilaiHuruf = 'A';\r\n else if ( $dataAnggota->nilai_akhir > 80 && $dataAnggota->nilai_akhir <= 85 )\r\n $nilaiHuruf = 'A-';\r\n else if ( $dataAnggota->nilai_akhir > 75 && $dataAnggota->nilai_akhir <= 80 )\r\n $nilaiHuruf = 'AB';\r\n else if ( $dataAnggota->nilai_akhir > 70 && $dataAnggota->nilai_akhir <= 75 )\r\n $nilaiHuruf = 'B+';\r\n else if ( $dataAnggota->nilai_akhir > 65 && $dataAnggota->nilai_akhir <= 70 )\r\n $nilaiHuruf = 'B';\r\n else if ( $dataAnggota->nilai_akhir > 60 && $dataAnggota->nilai_akhir <= 65 )\r\n $nilaiHuruf = 'B-';\r\n else if ( $dataAnggota->nilai_akhir > 55 && $dataAnggota->nilai_akhir <= 60 )\r\n $nilaiHuruf = 'BC';\r\n else if ( $dataAnggota->nilai_akhir > 50 && $dataAnggota->nilai_akhir <= 55 )\r\n $nilaiHuruf = 'C+';\r\n else if ( $dataAnggota->nilai_akhir > 45 && $dataAnggota->nilai_akhir <= 50 )\r\n $nilaiHuruf = 'C';\r\n else if ( $dataAnggota->nilai_akhir > 40 && $dataAnggota->nilai_akhir <= 45 )\r\n $nilaiHuruf = 'C-';\r\n else if ( $dataAnggota->nilai_akhir > 35 && $dataAnggota->nilai_akhir <= 40 )\r\n $nilaiHuruf = 'CD';\r\n else if ( $dataAnggota->nilai_akhir > 30 && $dataAnggota->nilai_akhir <= 35 )\r\n $nilaiHuruf = 'D';\r\n else if ( $dataAnggota->nilai_akhir >= 0 && $dataAnggota->nilai_akhir <=30 )\r\n $nilaiHuruf = 'E';\r\n else\r\n $nilaiHuruf = 'F';\r\n // Perhitungan Nilai Huruf\r\n\r\n $dataUpdate = ['nilai_huruf' => $nilaiHuruf];\r\n $updateHuruf = $this->M_anggota->update($thn_ajaran,$smt,$kode_kel,$nbi,$dataUpdate);\r\n\r\n if ( $updateHuruf ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n } else {\r\n return false;\r\n }\r\n }", "public function auto_insert_pengabdian(){\n\t\t\t$ta = $this->session->userdata('kd_ta');\n\t\t\t$smt = $this->session->userdata('kd_smt');\n\t\t\t$get_api_pengabdian = $this->get_jml_pengabdian();\n\t\t\t\n\t\t\tif(isset($get_api_pengabdian)){\n\t\t\t\tforeach ($get_api_pengabdian as $key) {\n\t\t\t\t\t$id_transaksi = $key['ID_TRANSAKSI'];\n\t\t\t\t\t$kode_pengabdian = $key['KD_PENGABDIAN'];\n\t\t\t\t\t$judul_pengabdian = $key['JUDUL_PENGABDIAN'];\n\n\t\t\t\t\t$narasi = $judul_pengabdian;\n\t\t\t\t\t$narasi = str_replace(\"'\", \"\", $narasi);\n\t\t\t\t\t$narasi = strip_tags($narasi);\n\t\t\t\t\t\n\t\t\t\t\t$jml_mhs = 1;\n\t\t\t\t\t//sementara pakai api yang ketua penelitian kelompok, untuk sekedar uji coba saja\n\t\t\t\t\t$sks_rule = $this->sksrule->_nilai_sks($jml_mhs, 1004, 1);\n\t\t\t\t\t$nim = $id_transaksi;\n\n\t\t\t\t\t$smt = $this->session->userdata('kd_smt');\n\t\t\t\t\t$ta = $this->session->userdata('kd_ta');\n\n\t\t\t\t\t// $kd_jbk = 'A';\n\t\t\t\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t\t\t\t$jenis_kegiatan = $narasi;\n\t\t\t\t\t/*$jenis_kegiatan ='test';*/\n\t\t\t\t\t$bukti_penugasan = '-';\n\t\t\t\t\t// $sks_penugasan = $sks_rule;\n\t\t\t\t\t$masa_penugasan = '1 Semester';\n\t\t\t\t\t$bkt_dokumen = '-';\n\t\t\t\t\t$kd_jbk \t\t= 'C';\n\t\t\t\t\t$bkt_penugasan \t= '-';\n\t\t\t\t\t$bkt_dokumen \t= '-';\n\t\t\t\t\t$rekomendasi \t= 'LANJUTKAN';\n\t\t\t\t\t$capaian \t\t= 100;\n\t\t\t\t\t$jml_jam \t\t= 1;\n\t\t\t\t\t$outcome \t\t= '-';\n\t\t\t\t\t$file_penugasan = '-';\n\t\t\t\t\t$file_capaian \t= '-';\n\t\t\t\t\t// $sks_bkt = $sks_rule;\n\t\t\t\t\t$thn = $this->session->userdata('ta');\n\t\t\t\t\tif($smt == 2) $semester = 'GENAP'; else $semester = 'GANJIL';\n\t\t\t\t\t\n\t\t\t\t\t$cek_dosen_pengabdian = $this->cek_api_dosen_pengabdian($id_transaksi);\n\n\t\t\t\t\tif(!$cek_dosen_pengabdian){\n\n\t\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_beban_kerja_sia_ta';\n\t\t\t\t\t\t$parameter = array('api_search'=>array($kd_jbk, $kd_dosen, $jenis_kegiatan, $bkt_penugasan, $sks_rule, $masa_penugasan, $bkt_dokumen, $sks_rule, $thn, $semester, $rekomendasi, $jml_jam, $capaian, $outcome, $file_penugasan, $file_capaian, $ta, $smt));\n\t\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\t\tif($simpan){\n\t\t\t\t\t\t\t// echo 'simpan ke db bkd_beban_kerja dan BKD_REMUN_KINERJA sukses'; echo '<br>';\n\t\t\t\t\t\t\t// $api_url \t= URL_API_BKD.'bkd_beban_kerja/get_current_data_tersimpan';\n\t\t\t\t\t\t\t// $parameter\t= array('api_search' => array('BKD.BKD_BEBAN_KERJA','KD_BK'));\n\t\t\t\t\t\t\t// $getid = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t\t\t\t\t\t$getid = $simpan;\n\t\t\t\t\t\t\t$nm_keg = $jenis_kegiatan;\n\n\t\t\t\t\t\t\t$status_pindah = 1;\n\t\t\t\t\t\t\t$jenjang = 'S1';\n\t\t\t\t\t\t\t$prodi = '-';\n\t\t\t\t\t\t\t$nim = $id_transaksi;\n\t\t\t\t\t\t\t#simpan data pendidikan\n\t\t\t\t\t\t\t//catatan: $parameter ke dua adalah kd_kat, parameter ini nantinya otomatis, misalya ketika ada status sebagai pembimbing, maka\n\t\t\t\t\t\t\t//akan berubah menjadi kd_kat untuk membimbing\n\t\t\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_data_pengabdian_dosen';\n\t\t\t\t\t\t\t$parameter\t= array('api_search' => array($getid, '131', $nm_keg, $jenjang, '-', '1', $sks_rule, '1', '1', 'A', '1', $prodi, $nim, $status_pindah));\n\t\t\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\t\t\tif($simpan){\n\t\t\t\t\t\t\t\t//echo 'simpan ke data pendidikan sukses'; echo '<br>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t }else{\n\t\t\t\t\t\t\n\t\t\t\t\t }\n\n\t\t\t\t}\n\t\t\t}else{\n\n\t\t\t}\n\t\t\t\n\t\t}", "public function aksi_cari_nik_ubah_kata_sandi_warga()\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $nik_warga = $this->input->post('nik');\n $detailhere = array('nik' => $nik_warga);\n $data_detail['detail_warga'] = $this->m_admin->cari_nik_warga($detailhere, 'warga')->result();\n\n $warga = $this->m_admin->cek_nik_warga($nik_warga);\n\n if ($nik_warga === $warga['nik']) {\n $this->m_admin->cari_nik_warga($detailhere, 'warga');\n\n $this->session->set_flashdata('success', 'Data Berhasil Ditemukan');\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin');\n $this->load->view('topbar', $data);\n $this->load->view('admin/form_ubah_kata_sandi_warga', $data_detail);\n $this->load->view('footer');\n } else {\n $this->session->set_flashdata('error', '<b>NIK</b> Tidak Ditemukan');\n redirect('admin/form_cari_nik_ubah_kata_sandi_warga');\n }\n }", "public function kumpul(){\r\n\t\t$no_tim=$this->session->userdata('no_tim');\r\n\t\t$soal = $this->input->post('soal');\r\n\t\tforeach ($soal as $key => $value) {\r\n\t\t\t$query = $this->Mysql->read('soal', array('no_soal'=>$value), 'no_soal', 'ASC', null, null)->row_array();\r\n\t\t\tif ($query['jawaban_benar']==$this->input->post('jawaban_'.$value)) {\r\n\t\t\t\t$isBenar = 1;\r\n\t\t\t}else{\r\n\t\t\t\t$isBenar = 0;\r\n\t\t\t}\r\n\t\t\t$data = array(\r\n\t\t\t\t\t'no_tim'=>$this->session->userdata('no_tim'),\r\n\t\t\t\t\t'no_soal'=>$value,\r\n\t\t\t\t\t'jawab'=>$this->input->post('jawaban_'.$value),\r\n\t\t\t\t\t'is_benar'=>$isBenar\r\n\t\t\t\t);\r\n\t\t\t$update = $this->Mysql->create('ljk',$data);\r\n\t\t}\r\n\t\tredirect(site_url('tim'), 'refresh');\r\n\t}", "function berinama($saya){\r\n\t\t\t$this->nama_saya = $saya;\r\n\t\t}", "public function dang_ky_giang_vien() {\n //Dang nhap roi\n if (isset($_SESSION['uid']) && $_SESSION['level'] == 3) {\n\n $timeModel = $this->model('timeModel');\n $time = $timeModel->getTime(1);\n\n if ($this->input->comparingCurrentTimeWithDeadline($time['start'], $time['end'])) {\n\n $data['status'] = TRUE; // hệ thống đang trong thời gian mở đăng kí cho sinh viên đăng ký giảng viên\n } else {\n $data['status'] = FALSE; // Hệ thống đã đóng đăng ký nên sinh viên không thể đăng ký giảng viên được nữa\n }\n \n $name = $this->input->post('name');\n $dept = $this->input->post('dept');\n $degree = $this->input->post('degree');\n $data['teachers'] = $this->input->searchTeacherInputBased($name,$dept,$degree);\n \n $data['depts'] = $this->teacherModel->getDeptData();\n $data['degrees'] = $this->teacherModel->getDegreeData();\n $data['st_tc'] = $this->studentModel->getStudentAndTeacher($_SESSION['uid']);\n \n if($data['st_tc']['isConfirmed'] == 0){\n \n $data['st_tc']['isConfirmed'] = \"Chưa Đồng Ý\";\n }elseif($data['st_tc']['isConfirmed'] == 1){\n \n $data['st_tc']['isConfirmed'] = \"Đã Đồng Ý\";\n }else{\n \n $data['st_tc']['isConfirmed'] = \"Bạn Đã Bị Từ Chối, Xin Mời Đăng Ký Giảng Viên Khác\";\n }\n\n if (isset($_SESSION['notice'])) {\n \n $data['notice'] = $_SESSION['notice']; //Gán session thông báo cho biến $data['notice'] để truyền đến view\n $_SESSION['notice'] = null; //Huy session notice\n }\n $this->view('includes/header', $data);\n $this->view('student/registerTeacher', $data);\n $this->view('includes/footer', $data);\n $this->view('notice/notice_student/notice_assign_project',$data);\n } else { //Chua dang nhap, chuyen huong nguoi dung den trang chu\n $this->redirect_to();\n }\n }", "public function kawasan()\n {\n $data = ['aktif' => 'kawasan',\n 'data_kws' => $this->M_prospektus->get_data_kawasan()->result_array()\n ];\n\n $this->template->load('template', 'prospektus/V_kawasan', $data);\n }", "public function satuan()\n {\n if(!$_SESSION[\"user\"]){\n $this->session->set_flashdata('status-login', 'False');\n redirect(base_url());\n }\n $data[\"page\"] = \"Satuan_page\";\n $data[\"collapse_group\"] = \"Master_Data\";\n // $data[\"satuan\"] = $this->model_home->getallsatuan();\n $data[\"customer\"] = $this->model_home->getcustomer();\n $data[\"akun_akses\"] = $this->model_form->getakunbyid($_SESSION[\"user_id\"]);\n if(json_decode($data[\"akun_akses\"][\"akses\"])[0]==0){\n redirect(base_url());\n }\n $this->load->view('header',$data);\n $this->load->view('sidebar');\n $this->load->view('home/rute_muatan');\n $this->load->view('footer');\n }", "function data_siswa(){\r\n if($this->session->userdata('akses')=='1' || $this->session->userdata('akses')=='2' || $this->session->userdata('akses')=='3'){\r\n $this->load->view('v_tampilsiswa');\r\n }else{\r\n echo \"Anda tidak berhak mengakses halaman ini\";\r\n }\r\n }", "public function set_prodi_univ($univ)\n {\n\n $sis = $this->session->userdata('id_siswa');\n $data['siswa'] = $this->Loginmodel->get_siswa($sis);\n $u = urldecode($univ);\n $data['data'] = $this->Mpassing->getpassinguniv($u);\n $data['univ'] = $u;\n $data['dataa']= $this->Mpassing->tampilphoto(); \n // get data nilai tertinggi\n $data['nilai'] = $this->Mworkout1->nilai_tertinggi();\n // get data log activity\n $data['log'] = $this->Loginmodel->getlogact();\n $sis = $this->session->userdata('id_siswa');\n // get data siswa\n $data['siswa'] = $this->Loginmodel->get_siswa($sis);\n $data['jur'] = $this->Loginmodel->get_siswa($sis)[0]->jurusan_pelajaran;\n $data['status'] = $this->Loginmodel->get_siswa($sis)[0]->status_path;\n\n \n $this->load->view('template/siswa2/v-header', $data);\n $this->load->view('baru/v-set-prodi',$data);\n $this->load->view('template/siswa2/v-footer'); \n\n }", "public function themmh($loai=\"\")\r\n {\r\n $khoa_result=$this->mmonhoc->get_khoa();\r\n $loai_monhoc_result=$this->mmonhoc->get_loai_monhoc();\r\n $nhom_monhoc_result=$this->mmonhoc->get_ma_monhoc_nhom();\r\n $data[\"khoa_result\"]=$khoa_result;\r\n $data[\"loai_monhoc_result\"]=$loai_monhoc_result;\r\n $data[\"nhom_monhoc_result\"]=$nhom_monhoc_result;\r\n $data[\"loai\"]=$loai; \r\n \r\n \r\n $data[\"data_title\"]=\"Thao tác thêm môn học\";\r\n \r\n \r\n $data[\"title\"]=\"Trang thêm môn học\"; \r\n $this->load->view(\"admin/vmonhoc_add\",$data); \r\n }", "function TampilkanHeaderNilai($mnux='') {\r\n $prodiku = $_SESSION['_ProdiID'];\r\n $arrprodi = explode(',', $prodiku);\r\n $whr = array();\r\n foreach ($arrprodi as $val) {\r\n $whr[] = \"INSTR(j.ProdiID, '.$val.')>0\";\r\n }\r\n $_whr = \" (\". implode(' or ', $whr) . \") \";\r\n // query\r\n $s = \"select j.JadwalID, j.MKKode, j.Nama, j.JenisJadwalID, j.NamaKelas, j.DosenID,\r\n concat(d.Nama, ', ', d.Gelar) as DSN\r\n from jadwal j\r\n left outer join dosen d on j.DosenID=d.Login\r\n where TahunID='$_SESSION[tahun]' \r\n and $_whr \r\n and j.JadwalSer = 0\r\n group by j.JadwalID, j.MKKode, j.JenisJadwalID, j.NamaKelas\r\n order by j.MKKode, j.NamaKelas, j.JenisJadwalID\";\r\n $r = _query($s);\r\n // buat option\r\n $opt = \"<option>--</option>\";\r\n while ($w = _fetch_array($r)) {\r\n $sel = ($w['JadwalID'] == $_SESSION['JadwalID']) ? \"selected\" : \"\";\r\n $opt .= \"<option value='$w[JadwalID]' $sel>$w[MKKode] $w[Nama] - $w[NamaKelas] ($w[JenisJadwalID]) - $w[DSN]</option>\\r\";\r\n }\r\n // Tampilkan opsi\r\n echo \"<p><table class=box cellspacing=1 cellpadding=4>\r\n <form action='?' methos=POST>\r\n <input type=hidden name='mnux' value='$mnux'>\r\n <tr><td class=inp>Tahun :</td><td class=ul><input type=text name='tahun' value='$_SESSION[tahun]' size=10 maxlength=10> <input type=submit name='Tampilkan' value='Tampilkan'></td></tr>\r\n <tr><td class=inp>Jadwal :</td><td class=ul><select name='JadwalID' onChange='this.form.submit()'>$opt</select></td></tr>\r\n </form></table></p>\";\r\n}", "function selmundat($xent, &$area, &$habit, &$freg, &$dia_fer, &$des_fer ) {\n\t$sqls=\"select * from munp1.municip where cod = '$xent'\";\n\t$ress=mysql_db_query(\"munp1\",$sqls); //\n\t\tif ($ress) {\n\t\t\t\t$regs=mysql_fetch_array($ress);\n\t\t\t\tif ( $regs ) {\n\t\t\t\t\t\t\t\t$area = $regs[\"med_area\"];\n\t\t\t\t\t\t\t\t$habit = $regs[\"num_habit\"];\n\t\t\t\t\t\t\t\t$freg = $regs[\"num_freg\"];\n\t\t\t\t\t\t\t\t$dia_fer = $regs[\"dat_fermun\"];\n\t\t\t\t\t\t\t\t$des_fer = $regs[\"des_fermun\"];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmysql_free_result($ress);\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t}\n \t\t\t\t\telse return 0;\n\t\t }\n// printf(\"vai sair 0\");\nreturn 0;\n}", "function haki($param = null, $id = null){\n\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t\n\t\t$data['p_ta'] = $this->input->post(\"thn\");\n\t\t$data['p_smt'] = $this->input->post(\"smt\");\n\t\tif ($data['p_ta'] == null && $data['p_smt'] == null){\n\t\t\t$data['ta'] = $this->session->userdata('ta');\n\t\t\t$data['smt'] = $this->session->userdata('smt');\t\t\n\t\t}else{\n\t\t\t$data['ta'] = $this->input->post(\"thn\");\n\t\t\t$data['smt'] = $this->input->post(\"smt\");\n\t\t}\n\t\t\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_data_haki';\n\t\t$parameter = array('api_search' => array($kd_dosen));\n\t\t$data['haki'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\n\t\t# get data dosen prodi \n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_all_dosen';\n\t\t\t$parameter = array('api_search' => array());\n\t\t\t$data['dosen'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/data_bebankerja';\n\t\t\t\n\t\t\t$thn= $this->session->userdata('ta');\n\t\t\t$smt=$this->session->userdata('smt');\n\t\t\t$parameter = array('api_search' => array('H',$kd_dosen, $thn, $smt));\n\t\t\t$data['data_beban'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\tif ($param != null){\n\t\t\t$data['jenis_haki'] = $this->s00_lib_api->get_api_jsob(URL_API_BKD.'bkd_beban_kerja/get_jenis_haki','POST',array());\t\n\t\t\tif($param == 'tambah'){\n\t\t\t\tif($id != null){\n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_haki';\n\t\t\t\t\t$parameter = array('api_search' => array($id));\n\t\t\t\t\t$ch=$data['curr_haki'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_bkd';\n\t\t\t\t\t$parameter = array('api_search' => array($ch->KD_BK, 'H'));\n\t\t\t\t\t$data['current_data'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t}\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_all_dosen';\n\t\t\t\t$parameter = array('api_search' => array());\n\t\t\t\t$data['dosen'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\n\t\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t\t$this->output99->output_display('dosen/form_haki',$data);\n\t\t\t}\n\t\t\telse if ($param == 'detail'){\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_haki';\n\t\t\t\t$parameter = array('api_search' => array($id));\n\t\t\t\t$data['curr_haki'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\t\t\t\t\t\t\t\n\n\t\t\t\t# GET PARTNER\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_dosen/partner';\n\t\t\t\t$parameter = array('api_kode' => 11000, 'api_subkode' => 1, 'api_search' => array($id,'HAKI'));\n\t\t\t\t$data['partner'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\t\n\t\t\t\t#print_r($data['partner']); die();\n\t\t\t\t$data['nama_partner'] = array();\n\t\t\t\tforeach ($data['partner'] as $p){\n\t\t\t\t\t$data['nama_partner'][$p->PARTNER] = $this->get_nama_partner($p->PARTNER);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t\t$this->output99->output_display('dosen/daftar_haki',$data);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t\t$this->output99->output_display('dosen/daftar_haki',$data);\n\t\t\t}\n\t\t}else{\n\t\t\t#$this->output99=$this->s00_lib_output;\n\t\t\t$this->output99->output_display('dosen/daftar_haki',$data);\n\t\t}\n\t}", "abstract public function getPasiekimai();", "function HapusDataTemplatePesan()\n\t{\n\t\tinclude '../../koneksi/koneksi.php';\n\n\t\t//inisialisasi\n\t\t$id = $_GET['id'];\n\n\t\t$status_hapus = \"0\";\n\n\t\t//hapus dari tabel pesan\n\t\t$sql = \"UPDATE pesan SET status_hapus = ? WHERE id = ?\";\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bind_param('si', $status_hapus, $id);\n\t\tif($stmt->execute()){\n\t\t\t$_SESSION['status_operasi_tp'] = \"berhasil_menghapus\";\n\t\t}else{\n\t\t\t$_SESSION['status_operasi_tp'] = \"gagal_menghapus\";\n\t\t}\n\t\t$stmt->close();\n\t}", "function cek_dpl(){\n\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t$ta = $this->session->userdata('ta');\n\t\t$smt = $this->session->userdata('smt');\n\t\t# cek data beban kerja\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/cek_data_bkd';\n\t\t$parameter = array('api_search' => array($kd_dosen, 'C', $ta, $smt));\n\t\t$data['jml'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t#echo $data['jml']; print_r($parameter); die();\n\t\tif ($data['jml'] == 0){\n\t\t\t$url\t\t= 'http://service.uin-suka.ac.id/servsiasuper/index.php/';\n\t\t\t$parameter\t= array('api_kode' => 1000, 'api_subkode' => 1, 'api_search' => array($kd_dosen));\n\t\t\t$data\t\t= $this->mdl_bkd->get_api_kkn('kkn_admin/data_dpl_kkn', 'json', 'POST', $parameter);\n\t\t\tif(count($data) > 0){\n\t\t\t\t$tema = $data[0]['TEMA_KKN'];\n\t\t\t\t$angkatan = $data[0]['ANGKATAN'];\n\t\t\t\t$periode = $data[0]['PERIODE'];\n\t\t\t\t$ta = $data[0]['TA'];\n\t\t\t\t$tgl_mulai = $data[0]['TANGGAL_MULAI'];\n\t\t\t\t$tgl_selesai = $data[0]['TANGGAL_SELESAI'];\n\t\t\t\t$kelompok = $data[0]['JUM_KELOMPOK'];\n\t\t\t\t# BEBAN KERJA\n\t\t\t\t$jenis_kegiatan = \"Menjadi Dosen Pembimbing Lapangan (DPL) KKN, Angkatan \".$angkatan.\", Periode \".$periode.\", dengan Tema \\\"\".$tema.\"\\\", Kelompok \".$kelompok;\n\t\t\t\t$masa_penugasan = \"1 Semester\";\n\t\t\t\t$bukti_penugasan = '-'; $bkt_dokumen = '-';\n\t\t\t\t$sks_rule = 1;\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_beban_kerja_sia';\n\t\t\t\t$parameter = array('api_search' => array($kd_dosen, 'C', $jenis_kegiatan, $bukti_penugasan, $sks_rule, $masa_penugasan, $sks_rule, $bkt_dokumen, $ta, $smt, 'LANJUTKAN','100'));\n\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\tif($simpan){\n\t\t\t\t\t# get last id beban kerja \n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_current_data_tersimpan';\n\t\t\t\t\t$parameter\t= array('api_search' => array('BKD.BKD_BEBAN_KERJA','KD_BK'));\n\t\t\t\t\t$getid = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter); \n\t\t\t\t\t#simpan data pengabdian\n\t\t\t\t\t$sumber_dana = '-'; $jumlah_dana = 0;\n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_data_pengabdian';\n\t\t\t\t\t$parameter\t= array('api_search' => array($getid, $tgl_mulai, $tgl_selesai, $tema, $sumber_dana, $jumlah_dana, '50'));\n\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t}\n\t\t\t\tredirect('bkd/dosen/bebankerja/data/C');\n\t\t\t}else{\n\t\t\t\tredirect('bkd/dosen/bebankerja/data/C');\n\t\t\t}\n\t\t}else{\n\t\t\tredirect('bkd/dosen/bebankerja/data/C');\t\t\n\t\t}\n\t}", "public function accueil()\n {\n }", "public function aksi_ubah_pengikut_suket014()\n\t{\n\t\t$id_permohonan_surat = $this->input->post('id_permohonan_surat');\n\t\t$id_pengikut = $this->input->post('id_pengikut');\n\t\t$data = array(\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'umur' => $this->input->post('umur'),\n\t\t\t'status_perkawinan' => $this->input->post('status_perkawinan'),\n\t\t\t'pendidikan_terakhir' => $this->input->post('pendidikan_terakhir'),\n\t\t\t'nama_ortu' => $this->input->post('nama_ortu'),\n\t\t\t'status_hub_kk' => $this->input->post('status_hub_kk'),\n\t\t);\n\n\t\tif ($this->m_warga->aksi_ubah_pengikut($id_pengikut, $data, 'pengikut')); {\n\t\t\t$this->session->set_flashdata('success', 'diubah');\n\t\t\tredirect('warga/list_pengikut_suket014/' . $id_permohonan_surat);\n\t\t}\n\t}", "function cek_jabatan_kedepan(){\n\t\t\n\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t$ta = $this->_generate_ta($this->session->userdata('r_ta'));\n\t\t$smt = $this->_generate_smt($this->session->userdata('r_smt'));\n\t\t\n\t\t$tahun = $this->session->userdata('r_ta');\n\t\t$semester = $this->session->userdata('r_smt');\n\t\t\n\t\t$data = $this->setting->_is_pejabat_penunjang_nt();\n\t\t$tgl_laporan = $this->setting->_tanggal_akhir_laporan($ta, $smt, 'rbkd');\n\t\t\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/data_rbkd';\n\t\t$parameter = array('api_search' => array('D', $kd_dosen, $tahun, $semester));\n\t\t$data['data_beban'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t# data kegiatan\n\t\t$kegiatan = $data['nama_jabatan'];\n\t\t$masa_penugasan = $data['masa_penugasan'];\n\t\t$bukti_penugasan = $data['bukti_penugasan']; $bkt_dokumen = $data['bukti_penugasan'];\n\t\t$sks = $data['sks_maks'];\n\t\t\n\t\tif(count($data['data_beban']) <= 1){\n\t\t\tif($data['tgl_selesai'] == '' || \n\t\t\t\tdate('d-m-Y', strtotime($data['tgl_selesai'])) > \n\t\t\t\tdate('d-m-Y', strtotime(str_replace('/','-', $tgl_laporan)))\n\t\t\t){\n\t\t\t\t\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_rbkd';\n\t\t\t\t$parameter = array('api_search' => array('D', $kd_dosen, $kegiatan, $bukti_penugasan, $sks, $masa_penugasan, $tahun, $semester, '', $ta, $smt));\n\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t}\n\t\t}\n\t\tredirect('bkd/dosen/bebankerja/rbkd/D');\t\t\n\t}", "function konfirmasiTerima()\n {\n $data_pengajuan = array(\n 'status_pengajuan' => 'VERIFIKASI'\n );\n $this->db->where('id_pengajuan', $this->input->post('id_pengajuan'));\n $this->db->update('tbl_pengajuan', $data_pengajuan);\n }", "function hapus_pengguna($nama_pengguna) {\n global $conn; //memanggil koneksi di global variabel\n $u = generate_id('pengguna', 'nama_pengguna'); //menggenerate id dengan fungsi generator\n $e = generate_id('pengguna', 'email'); //email juga\n $n = generate_id('pengguna', 'nomor_hp'); //nomor hp juga\n //diupdate dengan data tersebut, agar tidak terdeteksi sama jika ada penambahan data baru yang kebetulan memang sama dengan data yang sudah dihapus\n //tidak dihapus karena akan berpengaruh pada tabel yang berkaitan dengan data tersebut, cuma diupdate saja dan yang bersifat unik akan diganti data acak di atas\n //selain itu, mengeset kolom aktif menjadi 0\n $q = $conn->prepare(\"UPDATE pengguna SET aktif='0', nama_pengguna='$u', email='$e', nomor_hp='$n' WHERE nama_pengguna='{$_GET['nama-pengguna']}' AND aktif='1'\");\n $q->execute();\n //menonaktifkan rekening juga berdasarkan nama pengguna yang dimasukkan (jika ada, jika tidak ada [jenis admin] tetap akan melakukan ini dan tidak berefek apa-apa)\n $q = $conn->prepare(\"UPDATE rekening SET aktif='0' WHERE nama_pengguna='$u' AND aktif='1'\");\n $q->execute();\n}", "public function aksi_setujui_permohonan_008()\n {\n $data = array(\n 'tgl_persetujuan_admin' => date(\"Y/m/d\"),\n 'notif' => 'Belum Dibaca',\n 'notif_rt' => 'Belum Dibaca',\n );\n\n $data_surat = array(\n 'no_registrasi' => $this->input->post('no_registrasi'),\n 'no_bulan' => $this->input->post('no_bulan'),\n 'no_tahun' => $this->input->post('no_tahun'),\n );\n\n $detailhere = $this->input->post('id_permohonan_surat');\n\n $this->m_admin->update_status_permohonan($detailhere, $data, 'permohonan_surat');\n $this->m_admin->update_nomor_admin_surat($detailhere, $data_surat, 'srt_ket_janda');\n\n if (\n $this->m_admin->update_status_permohonan($detailhere, $data, 'permohonan_surat')\n && $this->m_admin->update_nomor_admin_surat($detailhere, $data_surat, 'srt_ket_janda')\n ); {\n $this->session->set_flashdata('success', 'disetujui');\n redirect('admin/pilih_tanda_tangan/' . $detailhere);\n }\n }", "public function luu_tt_sanpham()\n\t\t{\n\t\t\t//lay du lieu tu view \n\t\t\tif (isset($_POST['tensanpham'])&& isset($_POST['tenloaisanpham'])&& isset($_POST['img'])&& isset($_POST['mota'])&& isset($_POST['baohanh'])&& isset($_POST['gia'])){\n\t\t\t\t//goi ham luu data cua model san pham\n\t\t\t\t$this->tensanpham = $_POST['tensanpham'];\n\t\t\t\t$this->id_loaisp = $_POST['tenloaisanpham'];\n\t\t\t\t$this->img = $_POST['img'];\n\t\t\t\t$this->mota = $_POST['mota'];\n\t\t\t\t$this->baohanh = $_POST['baohanh'];\n\t\t\t\t$this->gia = $_POST['gia'];\n\t\t\t\t//goi ham luu data cua model sanpham\n\t\t\t\t$kq = $this->sanpham_model->insert_sanpham($this->tensanpham,$this->id_loaisp,$this->img,$this->mota,$this->baohanh,$this->gia);\n\t\t\t\tif ($kq) {\n\t\t\t\t\techo 'luu du lieu thanh cong -- sanphamcontroller';\n\t\t\t\t} else {\n\t\t\t\t\techo'luu du lieu that bai -- sanphamcontroller';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\techo 'ban chua nhap du lieu -- sanphamcontroller';\n\t\t\t}\t\t\t\n\t\t}", "public function aksi_ubah_kata_sandi_rt()\n {\n $kata_sandi = $this->input->post('kata_sandi');\n $kata_sandi_hash = sha1($kata_sandi);\n $data = array(\n 'kata_sandi' => $kata_sandi_hash,\n );\n\n $detailhere = $this->input->post('id_rt');\n\n if ($this->m_admin->aksi_ubah_kata_sandi_rt($detailhere, $data, 'rt')); {\n $this->session->set_flashdata('success', 'diubah');\n redirect('admin/list_data_rt');\n }\n }", "public function aksi_ubah_pengikut()\n\t{\n\t\t$id_permohonan_surat = $this->input->post('id_permohonan_surat');\n\t\t$id_pengikut = $this->input->post('id_pengikut');\n\t\t$data = array(\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'umur' => $this->input->post('umur'),\n\t\t\t'status_perkawinan' => $this->input->post('status_perkawinan'),\n\t\t\t'pendidikan_terakhir' => $this->input->post('pendidikan_terakhir'),\n\t\t\t'nama_ortu' => $this->input->post('nama_ortu'),\n\t\t\t'status_hub_kk' => $this->input->post('status_hub_kk'),\n\t\t);\n\n\t\tif ($this->m_warga->aksi_ubah_pengikut($id_pengikut, $data, 'pengikut')); {\n\t\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\t\tredirect('warga/list_pengikut_suket012/' . $id_permohonan_surat);\n\t\t}\n\t}", "function papan_catur($angka) {\r\n}", "public function aksi_cari_nik_ubah_kata_sandi_kades()\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $nik_kades = $this->input->post('nik');\n $detailhere = array('nik' => $nik_kades);\n $data_detail['detail_kades'] = $this->m_admin->cari_nik_kades($detailhere, 'kepala_desa')->result();\n\n $kades = $this->m_admin->cek_nik_kades($nik_kades);\n\n if ($nik_kades === $kades['nik']) {\n $this->m_admin->cari_nik_kades($detailhere, 'kepala_desa');\n\n $this->session->set_flashdata('success', 'Data Berhasil Ditemukan');\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin');\n $this->load->view('topbar', $data);\n $this->load->view('admin/form_ubah_kata_sandi_kades', $data_detail);\n $this->load->view('footer');\n } else {\n $this->session->set_flashdata('error', '<b>NIK</b> Tidak Ditemukan');\n redirect('admin/form_cari_nik_ubah_kata_sandi_kades');\n }\n }", "public function aksi_cari_nik_ubah_kata_sandi_rt()\n {\n $data['admin'] = $this->db->get_where('admin', ['id_admin' =>\n $this->session->userdata('id_admin')])->row_array();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n $data['jumlah_permohonan_masuk'] = $this->m_admin->jumlah_permohonan_masuk()->result();\n $data['jumlah_pesan_masuk'] = $this->m_admin->jumlah_pesan_masuk()->result();\n\n $detailhere = $this->input->post('nik');\n $data_detail['detail_rt'] = $this->m_admin->get_detail_rt_ubah_kata_sandi($detailhere)->result();\n\n $rt = $this->m_admin->cek_nik_rt($detailhere);\n\n if ($detailhere === $rt['nik']) {\n\n $this->m_admin->get_detail_rt($detailhere);\n\n $this->session->set_flashdata('success', 'Data Berhasil Ditemukan');\n\n $this->load->view('header');\n $this->load->view('admin/sidebar_admin');\n $this->load->view('topbar', $data);\n $this->load->view('admin/form_ubah_kata_sandi_rt', $data_detail);\n $this->load->view('footer');\n } else {\n $this->session->set_flashdata('error', '<b>NIK</b> Tidak Ditemukan');\n redirect('admin/form_cari_nik_ubah_kata_sandi_rt');\n }\n }", "public function kirimbarang(){\n\t\t$no_order \t= $this->input->post('no_order');\n\t\t$ket \t= $this->input->post('ket');\n\t\tif ($ket == 'Modifikasi') {\n\t\t\t$get = $this->M_monitoringorder->getdatamodif(\"where no_order = '$no_order'\");\n\t\t}elseif ($ket == 'Baru') {\n\t\t\t$get = $this->M_monitoringorder->getdatabaru(\"where no_order = '$no_order'\");\n\t\t}else {\n\t\t\t$get = $this->M_monitoringorder->getdatarekondisi(\"where no_order = '$no_order'\");\n\t\t}\n\t\t// echo \"<pre>\";print_r($get);exit();\n\t\t$cek \t\t= $this->M_monitoringorder->cekaction($no_order, \"and person = 10\"); // status 10 = barang sudah selesai / akan kirim ke seksi pengorder\n\t\tif (empty($cek)) {\n\t\t\t$this->M_monitoringorder->saveaction($no_order, 10, 1, '', date('Y-m-d H:i:s'), $this->session->user);\n\t\t}else {\n\t\t\t$this->M_monitoringorder->updateaction($no_order, 10, 1, '', date('Y-m-d H:i:s'), $this->session->user);\n\t\t}\n\t\tif (stripos($get[0]['jenis'], 'FIXTURE') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,7);\n\t\t}elseif (stripos($get[0]['jenis'], 'MASTER') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,6);\n\t\t}elseif (stripos($get[0]['jenis'], 'GAUGE') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,5);\n\t\t}elseif (stripos($get[0]['jenis'], 'ALAT LAIN') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,9);\n\t\t}else {\n\t\t\t$jenis = $get[0]['jenis'];\n\t\t}\n\t\t$this->send_email_kirim($get[0]['pengorder'], $get[0]['no_order'], $get[0]['seksi'], $jenis);\n\t\tredirect(base_url('OrderToolMakingAdminPPC/MonitoringOrder/'));\n\t}", "public function prosesinput_jadwal_kuliah(){\n\t\t$this->m_aka->prosesinput_jadwal_kuliah();\n\t\tredirect('c_index_aka/data_jadwal_kuliah');\n\t}", "function cariObat()\n\t{\n\t\tif ($this->input->get() != NULL) {\n\t\t\t$dataForm = $this->input->get();\n\t\t\t\n\t\t\t$dataReturn = $this->db->query(\" SELECT * FROM logistik WHERE nama LIKE '%\".$dataForm['term']['term'].\"%' ESCAPE '!' AND stok > 0\")->result();\t\t\t\n\n\t\t\t$data = array();\n\t\t\tforeach ($dataReturn as $key => $value) {\n\t\t\t\t$data[$key]['id'] = $value->id.\"|\".$value->nama;\n\t\t\t\t$data[$key]['text'] = $value->nama;\n\t\t\t\t$data[$key]['stok'] = $value->stok;\n\t\t\t\tif ($value->kadaluarsa < date(\"Y-m-d-d\")) {\n\t\t\t\t\t$data[$key]['stok'] .= \" Sudah kadaluarsa\";\n\t\t\t\t}\n\t\t\t\t$data[$key]['satuan'] = $value->satuan;\n\t\t\t}\n\t\t\techo json_encode($data);\n\t\t}else{\n\t\t\tredirect();\n\t\t}\t\t\n\t}", "public function barang_keluar()\n {\n $uri = $this->uri->segment(3);\n $where = array( 'id_transaksi' => $uri);\n $data['list_data'] = $this->M_kasir->get_data('tb_barang_masuk',$where);\n $data['list_satuan'] = $this->M_kasir->select('tb_satuan');\n $data['list_bahan'] = $this->M_kasir->select('tb_bahan');\n $data['list_tas'] = $this->M_kasir->select('tb_tas');\n $data['avatar'] = $this->M_kasir->get_data_gambar('tb_upload_gambar_user',$this->session->userdata('name'));\n $this->load->view('kasir/perpindahan_barang/form_update',$data);\n }", "function sikapSiswa($nilai) {\nif($nilai=='Kurang'){ \n\t$nilai = 1;\n}\nelseif($nilai=='Cukup'){ \n\t$nilai = 2;\n}\nelseif($nilai=='Baik'){ \n\t$nilai = 3;\n}\nelse { \n\t$nilai = 4;\n}\n\treturn $nilai;\n}", "function BBdekat_tempatIbadah(){\n\t\t$this->db->select('batas_bawah');\n\t\t$this->db->where('nama_parameter', 'dekat');\n\t\t$q = $this->db->get('parameter');\n\t\t$data = $q->result_array();\n\n\t\treturn $hasil = $data[1]['batas_bawah'];\n\t}", "function jml_mhs_bimbingan_ta($periode = ''){\n\t\t\t// \t\t \t\t 2 --> untuk ujian tugas akhir (munaqasah)\n\n\t\t\t$kd_dosen \t= $this->session->userdata('kd_dosen');\n\t\t\t$ta \t\t= $this->session->userdata('kd_ta');\n\t\t\t$kd_smt \t= $this->session->userdata('kd_smt');\n\t\t\t$jumlah_mahasiswa = 0;\n\n\t\t\t$url \t\t= 'sia_skripsi_bimbingan/jadwalTA';\n\t\t\t$api_url \t= 'http://service.uin-suka.ac.id/servtugasakhir/sia_skripsi_public/'.$url;\n\t\t\t$parameter \t= array('api_kode' => 1000, 'api_subkode' => 1, 'api_search' => array($kd_dosen, $periode));\n\t\t\t$data \t \t= $this->s00_lib_api->get_api_json($api_url, 'POST', $parameter);\n\n\t\t\tif($data){\n\t\t\t\tforeach ($data as $key) {\n\t\t\t\t\t$nim \t= $key['NIM'];\n\t\t\t\t\t$tgl \t= str_replace('-', '/', $key['TGL_MUNA']);\n\n\t\t\t\t\t$data_mhs \t= $this->get_data_mhs($nim);\n\t\t\t\t\t$kd_prodi \t= $data_mhs[0]['KD_PRODI'];\n\n\t\t\t\t\t$semester \t= $this->periode_semester($tgl, $kd_prodi);\n\n\t\t\t\t\t$kd_ta_data \t= $semester[0]['KD_TA'];\n\t\t\t\t\t$kd_smt_data \t= $semester[0]['KD_SMT'];\n\n\t\t\t\t\tif($ta == $kd_ta_data && $kd_smt == $kd_smt_data){\n\t\t\t\t\t\t$jumlah_mahasiswa++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $jumlah_mahasiswa;\n\t\t}", "function ubah($koneksi){\n\n\t// ubah data\n\tif(isset($_POST['btn_ubah'])){\n\t\t$nik_pemohon = $_POST['nik_pemohon'];\n\t\t$nama_pemohon = $_POST['nama_pemohon'];\n\t\t$no_telp = $_POST['no_telp'];\n\t\t$tempat_lahir = $_POST['tempat_lahir'];\n\t\t$tanggal_lahir = $_POST['tanggal_lahir'];\n\t\t$pekerjaan = $_POST['pekerjaan'];\n\t\t$agama = $_POST['agama'];\n\t\t$desa_pemohon = $_POST['desa_pemohon'];\n\t\t$id_jk = $_POST['id_jk'];\n\t\t$kecamatan_pemohon = $_POST['kecamatan_pemohon'];\n\t\t$id_jenis_pemohon = $_POST['id_jenis_pemohon'];\n\t\t$kabupaten = $_POST['kabupaten'];\n\t\t\n\t\tif(!empty($nik_pemohon) && !empty($nama_pemohon) && !empty($no_telp) && !empty($desa_pemohon) && !empty($tempat_lahir) &&\n\t\t!empty($tanggal_lahir) && !empty($pekerjaan) && !empty($agama) &&\n\t\t!empty($id_jk) && !empty($kecamatan_pemohon) && !empty($id_jenis_pemohon) && !empty($kabupaten)){\n\t\t\t$sql_update = \"UPDATE pemohon SET nik_pemohon='$nik_pemohon', nama_pemohon='$nama_pemohon', no_telp='$no_telp',\n\t\t\t\ttempat_lahir='$tempat_lahir', tanggal_lahir='$tanggal_lahir', pekerjaan='$pekerjaan',\n\t agama='$agama',\tdesa_pemohon='$desa_pemohon', id_jk='$id_jk', kecamatan_pemohon='$kecamatan_pemohon', \n\t\t\t\tid_jenis_pemohon='$id_jenis_pemohon', kabupaten='$kabupaten' WHERE nik_pemohon=$nik_pemohon\";\n\t\t\t$update = mysqli_query($koneksi, $sql_update);\n\t\t\tif($update && isset($_GET['aksi'])){\n\t\t\t\tif($_GET['aksi'] == 'update'){\n\t\t\t\t\techo \"<div class='alert alert-info'>Data Berhasil Diubah</div>\";\n\t\t\t\t\techo \"<meta http-equiv='refresh' content='1;url=entri_pemohon.php'>\";\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$pesan = \"Data tidak lengkap!\";\n\t\t}\n\t}\n\t\n\t// tampilkan form ubah\n\tif(isset($_GET['id'])){\n\n\t\t?>\n\t\t\t<a href=\"entri_pemohon.php\"> &laquo; Home</a> | \n\t\t\t<a href=\"entri_pemohon.php?aksi=create\"> (+) Tambah Data</a>\n\t\t\t<hr>\n\t\t\t<h3>Ubah Data</h3>\n\t\t\t<dir class=\"row\">\n\t\t\t<div class=\"col-xl-6\">\n\t\t\t<form action=\"\" method=\"POST\">\n\t\t\t<fieldset>\n\t\t\t\t<div class=\"table-responsive\">\n\t\t\t\t<table class=\"table table-responsive-sm table-hover\" border=\"0\">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>NIK </td>\n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"nik_pemohon\" value=\"<?php echo $_GET['id'] ?>\" hidden/><?php echo $_GET['id'] ?></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>No. Telepon / HP</td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"no_telp\" value=\"<?php echo $_GET['no_telp'] ?>\" /></label></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Nama Pemohon </td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"nama_pemohon\" value=\"<?php echo $_GET['nama_pemohon'] ?>\"/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Tempat Lahir</td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"tempat_lahir\" value=\"<?php echo $_GET['tempat_lahir'] ?>\"/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Tanggal Lahir</td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"date\" name=\"tanggal_lahir\" value=\"<?php echo $_GET['tanggal_lahir'] ?>\"/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Pekerjaan </td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"pekerjaan\" value=\"<?php echo $_GET['pekerjaan'] ?>\"/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Agama </td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"agama\" value=\"<?php echo $_GET['agama'] ?>\"/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t<?php \n\t\t// echo \"<pre>\";\n\t\t// print_r($datadesa);\n\t\t// echo \"</pre>\";\n\t\t\t\t\t\t\t ?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</fieldset>\n\t\t\t\t\n\t</div>\n\t<div class=\"col-xl-6\">\n\t\t\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<div class=\"table-responsive\">\n\t\t\t\t\t\t\t<table class=\"table table-responsive-sm table-hover\" border=\"0\">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>Jenis Kelamin</td> \n\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t<select name=\"id_jk\" required>\n\t\t\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\t\t\t\t$datajk = array();\n\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\twhile ($jk = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t$datajk[] = $jk;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$sql = \"SELECT * FROM pemohon WHERE nik_pemohon='$_GET[id]'\";\n\t\t\t\t\t\t\t\t\t\t\t$result = mysqli_query($koneksi, $sql);\n\n\t\t\t\t\t\t\t\t\t\t\t$jk = mysqli_fetch_assoc($result);\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t<option disabled value=\"\">-Pilih Jenis Kelamin-</option>\n\t\t\t\t\t\t\t\t\t\t<?php foreach ($datajk as $key => $value):?>\n\t\t\t\t\t\t\t\t\t\t<option value=\"<?= $value[\"id_jk\"] ?>\" <?php if($jk[\"id_jk\"]==$value[\"id_jk\"]){ echo \"selected\"; } ?> >\n\t\t\t\t\t\t\t\t\t\t<?= $value[\"nama_jk\"] ?>\n\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t<?php endforeach ?>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Alamat</td> \n\t\t\t\t\t\t\t\t\t<td> : </td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Desa</td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"desa_pemohon\" value=\"<?php echo $_GET['desa_pemohon'] ?>\"/></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Kecamatan</td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"kecamatan_pemohon\" value=\"<?php echo $_GET['kecamatan_pemohon'] ?>\"/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Kabupaten </td>\n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"kabupaten\" value=\"<?php echo $_GET['kabupaten'] ?>\"/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t<td>Jenis Pemohon</td> \n\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t<select name=\"id_jenis_pemohon\" required>\n\t\t\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\t\t\t\t$datajenispemohon = array();\n\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_pemohon\");\n\t\t\t\t\t\t\t\t\t\t\twhile ($jenispemohon = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t$datajenispemohon[] = $jenispemohon;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$sql = \"SELECT * FROM pemohon WHERE nik_pemohon='$_GET[id]'\";\n\t\t\t\t\t\t\t\t\t\t\t$result = mysqli_query($koneksi, $sql);\n\n\t\t\t\t\t\t\t\t\t\t\t$jenispemohon = mysqli_fetch_assoc($result);\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t<option disabled selected value=\"\">-Pilih Jenis Pemohon-</option>\n\t\t\t\t\t\t\t\t\t\t<?php foreach ($datajenispemohon as $key => $value):?>\n\t\t\t\t\t\t\t\t\t\t<option value=\"<?= $value[\"id_jenis_pemohon\"] ?>\" <?php if($jenispemohon[\"id_jenis_pemohon\"]==$value[\"id_jenis_pemohon\"]){ echo \"selected\"; } ?> >\n\t\t\t\t\t\t\t\t\t\t<?= $value[\"jenis_pemohon\"] ?>\n\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t<?php endforeach ?>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<label class=\"ml-2\">\n\t\t\t\t\t\t\t\t\t<input type=\"submit\" name=\"btn_ubah\" value=\"Simpan Perubahan\"/>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t<br>\n\t\t\t\t</div>\n\n\t\t\t\t<p><?php echo isset($pesan) ? $pesan : \"\" ?></p>\n\t\t\t</fieldset>\n\t\t</form>\n\t\t</dir>\n\n\t\t<?php\n// \t\techo \"<pre>\";\n// \t\tprint_r($level);\n//\t\techo \"</pre>\";\n\t}\n\t\n}", "function set_value($nama, $ttl, $jk, $alamat, $tahun_ajaran, $ibu, $ttl_ibu, $ayah, $ttl_ayah, $kelas, $masuk, $keluar, $spp) {\n return $_SESSION['value'] = [\n 'nama' => $nama,\n 'tanggal_lahir' => $ttl,\n 'jenis_kelamin' => $jk,\n 'alamat' => $alamat,\n 'tahun_ajaran' => $tahun_ajaran,\n 'nama_ibu' => $ibu,\n 'tanggal_lahir_ibu' => $ttl_ibu,\n 'nama_ayah' => $ayah,\n 'tanggal_lahir_ayah' => $ttl_ayah,\n 'kelas' => $kelas,\n 'masuk_sekolah' => $masuk,\n 'keluar_sekolah' => $keluar,\n 'spp' => $spp\n ];\n}", "function hapus(){\n\t\t$previllage = 1;\n\t\tcheck_super_user($this->session->tipe_user,$previllage);\t\t\t\t\n\n\t \t$id = $this->uri->segment(3);\n\t \t//Mencegeah bypass\n\t\tif ($this->fungsi->pilihan_advanced(\"tb_soal\",\"id\",$id)->row(\"user_id\") != $this->fungsi->user_login()->id and $this->session->tipe_user < 2 ) {\n\t\t\t$this->session->set_flashdata('danger','Bukan Aksesnya');\n\t\t\tredirect('soal');\n\t\t}\n\t\t\n\t\t$this->soal_m->hapus($id);\n\t\t$this->session->set_flashdata('danger','Berhasil Di Hapus');\n\t\tredirect('soal');\n\t}", "public function aksi_ubah_surat_keluar()\n {\n $data = array(\n 'nomor_surat' => $this->input->post('nomor_surat'),\n 'tanggal' => $this->input->post('tanggal'),\n 'tujuan' => $this->input->post('tujuan'),\n 'perihal' => $this->input->post('perihal'),\n 'isi' => $this->input->post('isi')\n );\n\n $detailhere = $this->input->post('id_sk');\n\n $this->m_admin->aksi_ubah_surat_keluar($detailhere, $data, 'surat_keluar');\n\n $this->session->set_flashdata('success', 'diubah');\n redirect('admin/detail_surat_keluar/' . $detailhere);\n }", "function pesan_buat($isi){\n\t\t$_SESSION['pesan'] = $isi;\n\t}", "public function masodik()\n {\n }", "function pengumuman()\n{\n if($this->session->userdata('status') != \"loginsantri\"){\n redirect(base_url(\"santri/pendaftaran/login\"));\n }\n else{\n $variabel['data'] = $this->m_pengumuman->lihatpengumuman();\n $this->layout_pendaftaran->renderfront('calonsantri/v_pengumuman',$variabel,'calonsantri/calonsantri_js');\n}\n}", "public function getTableAcara(){\r\r\n\t\t$key = 1;\r\r\n\t\tif($this->input->post(\"key\")!==NULL){\r\r\n\t\t\t$key = intval($this->input->post(\"key\"));\r\r\n\t\t\tif($key < 0) $key = 1;\r\r\n\t\t}\r\r\n\t\t$s=true;\r\r\n\t\t$string = \"<h4>Informasi Acara</h4><div class='well'>Data Tidak ditemukan</div>\";\r\r\n\t\t$n = 1;\r\r\n\t\t$z = 1;\r\r\n\t\t$koko = 0;\r\r\n\t\t$this->loadLib('ControlEvent');\r\r\n\t\t$tempKejadian = (new ControlEvent($this->gateControlModel))->getAllData();\r\r\n\t\tif($tempKejadian){\r\r\n\t\t\twhile($tempKejadian->getNextCursor()){\r\r\n\t\t\t\tif($n <= 5 && $z == $key){\r\r\n\t\t\t\t\tif($s){\r\r\n\t\t\t\t\t\t$string = \"<h4>Informasi Acara</h4>\";\r\r\n\t\t\t\t\t\t$s = false;\t\r\r\n\t\t\t\t\t}\t\t\t\r\r\n\t\t\t\t\tif($tempKejadian->getKode() == '1'){\t\r\r\n\t\t\t\t\t\t$string .= \"<div class='well'>\";\r\r\n\t\t\t\t\t\t$string .= $tempKejadian->getJudul().\"<br>\".$tempKejadian->getIsi();\r\r\n\t\t\t\t\t\t//$string .= $tempKejadian->getJudul().\"<br>\".$tempKejadian->getIsi().\" Pada tahun ajaran \".substr($tempKejadian->getTahunAk(),0,strlen($tempKejadian->getTahunAk())-1).\"-\".(intval(substr($tempKejadian->getTahunAk(),0,strlen($tempKejadian->getTahunAk())-1))+1).\" Semester \".$tempKejadian->getTahunAk()[4].\" dimulai pada tanggal \".$tempKejadian->getMulai().\" hingga tanggal \".$tempKejadian->getBerakhir();\r\r\n\t\t\t\t\t\t$string .= \"</div>\";\t\r\r\n\t\t\t\t\t}else{\r\r\n\t\t\t\t\t\t$string .= \"<div class='well'>\";\r\r\n\t\t\t\t\t\t$string .= $tempKejadian->getJudul().\"<br>\".$tempKejadian->getIsi();\r\r\n\t\t\t\t\t\t$string .= \"</div>\";\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\t$koko ++;\r\r\n\t\t\t\t\t$n++;\r\r\n\t\t\t\t}else if($n == 5 && $z < $key){\r\r\n\t\t\t\t\t$n = 1;\r\r\n\t\t\t\t\t$z++;\r\r\n\t\t\t\t}else{\r\r\n\t\t\t\t\t$n++;\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\techo \"1\".$string;\r\r\n\t\tif($key == 1){\r\r\n\t\t\tif($koko == 5)\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"nextPageBerandaBase();\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t\telse\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t}else{\r\r\n\t\t\tif($koko == 5)\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"previousPageBerandaBase();\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"nextPageBerandaBase();\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t\telse\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"previousPageBerandaBase();\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t}\r\r\n\t\t\r\r\n\t}", "public function setoran_tunai()\n\t{\n\t\t$data['container'] = 'transaction/setoran_tunai';\n\t\t$data['rembugs'] = $this->model_cif->get_cm_data();\n\t\t$data['current_date'] = $this->format_date_detail($this->current_date(),'id',false,'/');\n\t\t$data['account_cash'] = $this->model_transaction->get_account_cash();\n\t\t$this->load->view('core',$data);\n\t}", "function jml_mhs_bimbingan_kkn(){\n\t\t\t$nip \t= $this->session->userdata('id_user'); //'197510242009121002';//\n\t\t\t$smt \t= array(1,2,3);\n\t\t\t$ta \t= $this->session->userdata('kd_ta');\n\t\t\t$kd_current_smt = $this->session->userdata('kd_smt');\n\t\t\t$jumlah_mahasiswa = 0;\n\n\t\t\t//GET ID DPL :\n\t\t\t\n\t\t\t$url \t\t= 'kkn_dosen/data_search';\n\t\t\t$api_url \t= URL_API_KKN.$url;\n\t\t\t$parameter \t= array(\n\t\t\t\t'api_kode' => 201400,\n\t\t\t\t'api_subkode' => 1,\n\t\t\t\t'api_search' => array('KKN.KKN_DPL2014','ID_DPL',array('NIP' => $nip)));\n\n\t\t\t$dpl = $this->s00_lib_api->get_api_json($api_url,'POST',$parameter);\n\n\t\t\tif($dpl){\n\t\t\t\t//GET LIST KELOMPOK KKN\n\t\t\t\t$id_dpl \t= $dpl[0]['ID_DPL'];\n\n\t\t\t\tforeach ($smt as $kd_smt) {\n\t\t\t\t\t$parameter2 = array(\n\t\t\t\t\t\t'api_kode' => 201402,\n\t\t\t\t\t\t'api_subkode' => 1,\n\t\t\t\t\t\t'api_search' => array($ta,$kd_smt,$id_dpl)\n\t\t\t\t\t);\n\n\t\t\t\t\t$kelompok = $this->s00_lib_api->get_api_json($api_url,'POST',$parameter2);\n\n\t\t\t\t\tforeach ($kelompok as $kel) {\n\t\t\t\t\t\t//GET LIST DATA MAHASISWA PER KELOMPOK\n\t\t\t\t\t\t$id_kelompok = $kel['ID_KELOMPOK'];\n\n\t\t\t\t\t\t$parameter \t= array(\t'api_kode' => 201401,\n\t\t\t\t\t\t\t\t\t\t'api_subkode' => 2,\n\t\t\t\t\t\t\t\t\t\t'api_search' => array($id_kelompok));\n\n\t\t\t\t\t\t$member \t= $this->s00_lib_api->get_api_json($api_url, 'POST', $parameter);\n\t\t\t\t\t\tforeach ($member as $mbr) {\n\t\t\t\t\t\t\t//CEK SEMESTER MAHASISWA KKN\n\t\t\t\t\t\t\t$nim \t= $mbr['NIM'];\n\t\t\t\t\t\t\t$tgl \t= str_replace('-', '/', $mbr['TGL_DAFTAR']);\n\t\t\t\t\t\t\t$data_mhs \t= $this->get_data_mhs($nim);\n\t\t\t\t\t\t\t$kd_prodi \t= $data_mhs[0]['KD_PRODI'];\n\n\t\t\t\t\t\t\t$semester \t= $this->periode_semester($tgl, $kd_prodi);\n\n\t\t\t\t\t\t\t$kd_ta_data \t= $semester[0]['KD_TA'];\n\t\t\t\t\t\t\t$kd_smt_data \t= $semester[0]['KD_SMT'];\n\n\t\t\t\t\t\t\t//JIKA SESUAI DENGAN SEMESTER SAAT INI MAKA :\n\t\t\t\t\t\t\tif($ta == $kd_ta_data && $kd_current_smt == $kd_smt_data){\n\t\t\t\t\t\t\t\t$jumlah_mahasiswa++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//$jumlah_mahasiswa++;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\treturn $jumlah_mahasiswa;\n\t\t}", "public function cek_jenis_hak()\n\t{\n\t\t$output['status'] = ($this->input->get('hak')==5) ? true : false;\n\t\t$this->output->set_content_type('application/json')->set_output(json_encode($output));\n\t}", "public function sakit(){\r\n $data['sakit'] = $this->Md_sakit->tampil();\r\n $data['judul'] = \"Permohonan Sakit\";\r\n\r\n $this->load->view('staff/data_sakit', $data);\r\n }", "public function cekJadwalBentrok($hari=NULL,$guru=NULL,$jamke=NULL){\r\n // ini diinput manual dikarenakan\r\n // untuk mengAllow kelas yang mata pelajaran olahraga\r\n \r\n $idOlahraga= $this->db->query(\"SELECT id_mapel from mapel where (nama_mapel LIKE '%Olahraga%' ) OR (nama_mapel LIKE '%olahraga%' )\")->result_array()[0]['id_mapel'];\r\n \r\n $queryCekOlahraga=$this->db->query(\"SELECT * FROM guru WHERE id_guru='$guru' AND id_mapel='$idOlahraga'\")->num_rows();\r\n\r\n if($queryCekOlahraga>=1){\r\n $result=0;\r\n }else{\r\n $result=$this->db->query(\"SELECT nama_guru, kelas.kelas, kelas.nama_kelas, id_hari,jadwal.id_guru,id_jam_jadwal FROM jadwal JOIN guru ON guru.id_guru = jadwal.id_guru JOIN kelas ON kelas.id_kelas = jadwal.id_kelas WHERE id_hari='$hari' AND jadwal.id_guru='$guru' AND id_jam_jadwal='$jamke'\")->result_array();\r\n }\r\n\r\n\r\n return $result;\r\n\r\n }", "public function ranckegiatan_kegiatan(){\t\t\t\t\n\t\t$std = new stdClass();\n\t\t$login = $this->session->userdata('SESS_LOGIN');\n\t\t$SESS_TAHUN = $this->session->userdata('SESS_TAHUN');\n\t\tif ($login){\n\t\t\t$table='dbsipd_'.$SESS_TAHUN.'.t_kegiatan_keg';\t\n\t\t\t$ArrWhere=array('KDRANCKEG');\n\t\t\t$arrFilterAdd=array('TGLVALID','HASIL_MONITORING');\n\t\t\t$action=$this->uri->segment(3);\t\t\t\t\t\n\t\t\t$std->status=$this->m_action->actionData($action, $table, $this->input->post(),$ArrWhere,$arrFilterAdd);\n\t\t}else{\n\t\t\t$std->status='failed';\n\t\t}\n\t\t$this->load->view('json', array(\"response\" => $std->status));\t\n\t}", "public function aksi_tambah_permohonan_suket002()\n\t{\n\n\t\t$data_permohonan = array(\n\t\t\t'id_nama_surat' => $this->input->post('id_nama_surat'),\n\t\t\t'id_warga' => $this->input->post('id_warga'),\n\t\t\t'status' => $this->input->post('status'),\n\t\t);\n\n\t\t$id_permohonan = $this->m_warga->tambah_permohonan($data_permohonan);\n\n\t\t$data_surat = array(\n\t\t\t'id_permohonan_surat' => $id_permohonan,\n\t\t\t'nama' => $this->input->post('nama'),\n\t\t\t'jenis_kelamin' => $this->input->post('jenis_kelamin'),\n\t\t\t'tempat_lahir' => $this->input->post('tempat_lahir'),\n\t\t\t'tanggal_lahir' => $this->input->post('tanggal_lahir'),\n\t\t\t'agama' => $this->input->post('agama'),\n\t\t\t'pekerjaan' => $this->input->post('pekerjaan'),\n\t\t\t'alamat_tinggal' => $this->input->post('alamat_tinggal'),\n\t\t\t'alamat_kk' => $this->input->post('alamat_kk'),\n\t\t);\n\n\t\t$id_surat = $this->m_warga->tambah_suket($data_surat, 'srt_ket_domisili');\n\n\t\t$this->session->set_flashdata('success', 'disimpan');\n\t\tredirect('warga/detail_suket002/' . $id_surat . '/' . $id_permohonan);\n\t}", "function sbmptn(){\r\n \tif($this->session->userdata('akses')=='1' || $this->session->userdata('akses')=='2' || $this->session->userdata('akses')=='3'){\r\n \t$this->load->view('v_sbmptn');\r\n \t}else{\r\n \techo \"Anda tidak berhak mengakses halaman ini\";\r\n \t}\r\n \r\n \t}", "function halamanbaru(){\n\t\tcek_session_admin();\n\t\t$data['record'] = $this->model_halaman->halamanstatis();\n\t\t$data['record2'] = $this->model_halaman->en_halamanstatis();\n\t\t$this->load->view('administrator/mod_halaman/view_halaman2',$data);\n\t}", "public function stok(){\n\n $hasil = $this->admin_model->ambilDataStok();\n $data['hasil'] = $hasil;\n\n $this->load->view('admin/header');\n $this->load->view('admin/stok', $data);\n $this->load->view('front/footer');\n\n }", "public function pasaje_abonado();", "public function cetakLapKartuStok()\r\n\t{\r\n\t\t//{\r\n\t\t\t$session=new THttpSession;\r\n\t\t\t$session->open();\r\n\t\t\t$session['cetakLapUmurHutangTbsSql'] = $this->getViewState('sql');\r\n\t\t\r\n\t\t\t$this->Response->redirect($this->Service->constructUrl('Keuangan.cetakLapUmurHutangTbsPdf'));\r\n\t\t/*}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->getPage()->getClientScript()->registerEndScript\r\n\t\t\t\t\t('','\r\n\t\t\t\t\ttoastr.error(\"Pilih Bulan Dan Tahun !\");\r\n\t\t\t\t\t');\r\n\t\t}*/\r\n\t}", "function HapusDataBahanBaku() {\n\tinclude '../../koneksi/index.php';\n\n\t//inisialisasi\n\t$id = $_GET['id'];\n\t$stok = \"0\";\n\t$status_hapus = \"0\";\n\n\t//hapus\n\t$sql = \"UPDATE bahan_baku SET stok = ?, status_hapus = ? WHERE id = ?\";\n\t$stmt = $db->prepare($sql);\n\t$stmt->bind_param('isi', $stok, $status_hapus, $id);\n\tif ($stmt->execute()) {\n\t\t$_SESSION['status_operasi_bahan_baku'] = \"berhasil_menghapus\";\n\t} else {\n\t\t$_SESSION['status_operasi_bahan_baku'] = \"gagal_menghapus\";\n\t}\n\t$stmt->close();\n}", "function hapuskursi($no){\n $listkursi = $this->session->userdata('kursi');\n\n //Memghapus kursi\n unset($listkursi[$no]);\n ///memsaukan sisa kursi\n $data['kursi'] = array_values($listkursi);\n\n ////mengurutkan index\n $kursi = $data['kursi'];\n\n\n //set session dengan data kursi\n $this->session->set_userdata('kursi',$kursi);\n\n ///simpan semua data dalam variable array data\n $data= array('data'=>$data);\n $this->load->view('hal_pesanan',$data);\n }", "function analisisK($perangkaan, $jadual, $key, $data)\n{\n\t$sv = $perangkaan['sv'];\n\t$hasil = $perangkaan['hasil'];\n\t$belanja = $perangkaan['belanja'];\n\t$aset = $perangkaan['aset'];\n\t$sewa = $perangkaan['asetsewa'];\n\t$noKey = substr($key, 0, 3);\n\t//echo \"<hr>$key : $sewaHarta \";\n\t\n\tif (in_array($key, array('thn','batch','Estab') ) )\n\t{\n\t\t$value = $data;\n\t\t\n\t}\n\telseif ($sv=='205') \n\t{//untuk survey 205 sahaja\n\t\tif ($jadual == 'q04_2010' && $noKey == 'F09') \n\t\t\t$nilai = ($sewa==0) ? 0 : (($data / $sewa) * 100);\n\t\telseif ($jadual == 'q04_2010' && $noKey != 'F09') \n\t\t\t$nilai = ($aset==0) ? 0 : (($data / $aset) * 100);\n\t\telseif ($jadual == 'q08_2010')\n\t\t\t$nilai = ($hasil==0) ? 0 : (($data / $hasil) * 100 );\n\t\telseif ($jadual == 'q09_2010')\n\t\t\t$nilai = ($belanja==0) ? 0 : (($data / $belanja) * 100 );\n\t\t$value = number_format($nilai,4,'.',',') . '%';\n\t\t$name = 'name=\"' . $sv . '_' . $jadual . '[' . $key . ']\"';\n\t}\n\telse\n\t{\n\t\tif ($jadual == 's'.$sv.'_q02_2010')\n\t\t\t$nilai = ($hasil==0) ? 0 : (($data / $hasil) * 100 );\n\t\telseif ($jadual == 's'.$sv.'_q03_2010')\n\t\t\t$nilai = ($belanja==0) ? 0 : (($data / $belanja) * 100 );\n\t\telseif ($jadual == 's'.$sv.'_q04_2010')\n\t\t\t$nilai = ($aset==0) ? 0 : (($data / $aset) * 100 );\n\t\t$value = number_format($nilai,4,'.',',') . '%';\n\t\t$name = 'name=\"' . $jadual . '[' . $key . ']\"';\n\n\t}\n\t// istihar pembolehubah \n\t$input = '<input type=\"text\" ' . $name . ' value=\"' \n\t\t . $data . '\" class=\"input-large\">' . $value;\n\treturn '<td>' . $input . '</td>' . \"\\r\";\n}", "public function briset_Aketua()\r\n\t{\r\n\t\t$title['title'] = \"Daftar Agenda\";\r\n\t\t$data['user'] = $this->db->get_where('user', ['nik' =>\r\n\t\t$this->session->userdata('nik')])->row_array();\r\n\t\t$data['mketua'] = $this->agendaUModel->allData_menurutKetua();\r\n\t\t$data['briset'] = $this->agendaUModel->allData_menurutBRiset();\r\n\t\t$this->load->view('templates/header', $title);\r\n\t\t$this->load->view('dewanPimpinan/temp_KetuaDP/sidebar');\r\n\t\t$this->load->view('templates/navbar', $data);\r\n\t\t$this->load->view('dewanPimpinan/agenda/briset&pengembangan', $data);\r\n\t\t$this->load->view('templates/footer');\r\n\t}", "function tambah($kode){\n\n\t\t$kode = $this->security->xss_clean($this->uri->segment(5));\n\t\t$data['kode'] = $kode;\n\t\t# set parameters \n\t\t$kd_dosen = $this->session->userdata(\"kd_dosen\");\n\t\t$thn = $this->session->userdata(\"ta\");\n\t\t$smt = $this->session->userdata(\"smt\");\n\t\t$status = $this->session->userdata(\"jenis_dosen\");\n\t\t\n\t\tif($data['kode'] == 'D' && ($status == 'PR' || $status == 'DS')){\n\t\t\t# load view\n\t\t\t$this->output99=$this->s00_lib_output;\n\t\t\t$this->output99->output_display('dosen/beban_tambahan_message');\n\t\t}else{\t\n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/data_bebankerja';\n\t\t\t$parameter = array('api_search' => array($data['kode'],$kd_dosen, $thn, $smt));\n\t\t\t$data['data_beban'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\tforeach ($data['data_beban'] as $key) {\n\t\t\t\t$kd_kat = $key->KD_KAT;\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_jenis_nilai_kat_bebankerja';\n\t\t\t\t$parameter = array('api_search' => array($kd_kat));\n\t\t\t\t$data['nilai_kat'][$kd_kat] = $this->s00_lib_api->get_api_json($api_url,'POST',$parameter);\n\t\t\t}\n\t\t\t# cek jenis beban kerja \n\t\t\tif($kode == 'F'){\n\t\t\t\t$data['title'] = \"Narasumber/Pembicara Kegiatan\";\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/tingkat';\n\t\t\t\t$parameter = array('api_kode'=>1000, 'api_subkode'=>1, 'api_search' => array());\n\t\t\t\t$data['kategori'] = $this->s00_lib_api->get_api_json($api_url,'POST',$parameter);\n\t\t\t}else if($kode == 'G'){\t\t\t\t\n\t\t\t\n\t\t\t}else if($kode == 'H'){\t\t\t\t\n\t\t\t\t$data['jenis_haki'] = $this->s00_lib_api->get_api_jsob(URL_API_BKD.'bkd_beban_kerja/get_jenis_haki','POST',array());\t\n\t\t\t}else{\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_kategori';\n\t\t\t\t$parameter = array('api_search' => array($data['kode']));\n\t\t\t\t$data['kategori'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t}\n\t\t\t# load view\n\t\t\t$data['name_prodi'] = $this->get_prodi();\n\t\t\t$data['list_kategori'] = $this->daftar_kategori_bebankerja($data['kode']);\n\t\t\t$this->output99->output_display('dosen/form_hybrid_dosen',$data);\n\t\t}\n\t}", "public function selesai($id_rawat){\n\t\t$no_pasien = $this->input->post('no_pasien');\n\t\t$tanggal = date(\"d-m-Y\");\n\t\t$waktu = date(\"H:i:s\");\n\t\t$data = array(\n\t\t\t'status' => 'finished',\n\t\t\t'jam_keluar' => $waktu, \n\t\t);\n\t\t$id_transaksi = '';\n\t\t$biaya_daftar = '';\n\t\t$id_periksa = '';\n\t\t$this->RawatModel->updateStatus($id_rawat, $data);\n\n\t\t#menambahkan item ke transaksi\n\t $where_trx = array(\n\t \t'no_rawat_jalan' => $id_rawat, \n\t );\n\t $transaksi = $this->TransaksiModel->viewTrx($where_trx);\n\t foreach ($transaksi as $trx) {\n\t \t$id_transaksi = $trx->id_transaksi;\n \t}\n\n \t$where_poli = array(\n\t\t\t'nama_poli' => 'Umum', \n\t\t);\n\n\t\t$poli = $this->PoliklinikModel->viewPoliWhere($where_poli);\n\t\tforeach ($poli as $p) {\n\t\t\t$nama_poli = $p->nama_poli;\n\t\t\t$biaya_daftar = $p->biaya_pendaftaran;\n\t\t}\n\n\t\t$transaksi_item = array(\n\t\t\t'id_transaksi' => $trx->id_transaksi,\n\t\t\t'jenis_transaksi' => 'Pemeriksaan',\n\t\t\t'nama_transaksi' => $p->nama_poli,\n\t\t\t'jumlah' => '1',\n\t\t\t'harga' => '20000', \n\t\t);\n\t\t$this->ItemTransaksiModel->tambahItem($transaksi_item);\n\n\t\t#update status antrian\n\t\t$whereAntrian = array('id' => $id_transaksi, );\n\t\t$dataAntrian = array('status' => 'Selesai', );\n\t\t$this->AntrianModel->updateStatus($whereAntrian,$dataAntrian);\n\n\n\t\techo json_encode(array('status' => true));\n\t}", "public function penarikan_tunai()\n\t{\n\t\t$data['container'] = 'transaction/penarikan_tunai';\n\t\t$data['rembugs'] = $this->model_cif->get_cm_data();\n\t\t$data['current_date'] = $this->format_date_detail($this->current_date(),'id',false,'/');\n\t\t$data['account_cash'] = $this->model_transaction->get_account_cash();\n\t\t$this->load->view('core',$data);\n\t}", "function Defpred() {\r\n global $mnux, $pref, $token;\r\n TampilkanPilihanProdi($mnux, '', $pref, \"pred\");\r\n //TampilkanPilihanProdi($mnux, '', $pref, \"MK\");\r\n if (!empty($_SESSION['prodi'])) {\r\n //TampilkanMenuPred();\r\n TampilkanPred();\r\n }\r\n}", "public function stok(){\n\n $hasil = $this->pemilik_model->ambilDataStok();\n $data['hasil'] = $hasil;\n\n $this->load->view('pemilik/header');\n $this->load->view('pemilik/stok', $data);\n $this->load->view('front/footer');\n\n }", "function Atv_setAksesKegiatan($akses): string\n{\n if ($akses == 'presensi') return '5';\n elseif ($akses == 'tambahan') return '7';\n}", "function ToonFormulierAfspraak()\n{\n\n}", "public function sankcionisi_korisnika()\n {\n\n $sankcionisaniIme= $this->request->getVar('korisnik');\n $kazna=$this->request->getVar('kazna');\n // echo $sankcionisaniIme;\n //echo $kazna;\n $admin= $this->session->get(\"korisnik\");\n $sankcionisaniIme= $this->request->getVar('korisnik');//ili na bilo koji drugi nacin dohvatanje\n $kazna=$this->request->getVar('kazna');//ili na bilo koji drugi nacin dohvatanje\n $korisnikModel=new KorisnikModel();\n $sankcionisani=$korisnikModel->dohvati_korisnika($sankcionisaniIme);\n $korisnikModel->sankcionisi($sankcionisani, $kazna);\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n \n }", "function getDataSingkatPrakt($conn,$key,$pengajar=true,$nip='') {\n\t\t\t$sql = \"select k.thnkurikulum, k.kodemk, k.kodeunit, k.periode, k.kelasmk, k.koderuang,\n\t\t\t\t\tk.nohari, k.jammulai, k.jamselesai, c.namamk\n\t\t\t\t\tfrom \".static::table('ak_kelaspraktikum').\" k join \".static::table('ak_kurikulum').\" c using (thnkurikulum,kodemk,kodeunit)\n\t\t\t\t\twhere \".static::getCondition($key,null,'k');\n\t\t\t$row = $conn->GetRow($sql);\n\t\t\t\n\t\t\t$row['jadwal'] = Date::indoDay($row['nohari']).', '.CStr::formatjam($row['jammulai']).' - '.CStr::formatjam($row['jamselesai']);\n\t\t\t//$row['jadwal2'] = Date::indoDay($row['nohari2']).', '.CStr::formatjam($row['jammulai2']).' - '.CStr::formatjam($row['jamselesai2']);\n\t\t\t\t\n\t\t\t// ambil data pengajar\n\t\t\tif($pengajar) {\n\t\t\t\t$sql = \"select p.idpegawai::text as nipdosen, akademik.f_namalengkap(p.gelardepan,p.namadepan,p.namatengah,p.namabelakang,p.gelarbelakang) as nama from \".static::table('ak_mengajar').\" a\n\t\t\t\t\t\tjoin sdm.ms_pegawai p on a.nipdosen::text = p.idpegawai::text\n\t\t\t\t\t\twhere \".static::getCondition($key,null,'a').\" order by a.nipdosen\";\n\t\t\t\t$rs = $conn->Execute($sql);\n\t\t\t\t\n\t\t\t\t$a_ajar = array();\n\t\t\t\twhile($rowa = $rs->FetchRow())\n\t\t\t\t\t$a_ajar[] = $rowa['nama'].' ('.$rowa['nipdosen'].')';\n\t\t\t\t\n\t\t\t\t$row['pengajar'] = implode('<br>',$a_ajar);\n\t\t\t}\n\t\t\tif(!empty($nip)){\n\t\t\t\t$sql = \"select idpegawai::text as nik, akademik.f_namalengkap(gelardepan,namadepan,namatengah,namabelakang,gelarbelakang) as nama \n\t\t\t\t\t\tfrom sdm.ms_pegawai where nik='$nip' or idpegawai::text='$nip'\";\n\t\t\t\t$rs=$conn->GetRow($sql);\n\t\t\t\t$row['pengajar'] =$rs['nama'].\" (\".$rs['nik'].\")\";\n\t\t\t}\n\t\t\treturn $row;\n\t\t}", "public function AggiornaPrezzi(){\n\t}" ]
[ "0.68992054", "0.6580212", "0.65088505", "0.6450263", "0.6443442", "0.64433736", "0.6428101", "0.6409441", "0.64052415", "0.6402224", "0.63957804", "0.6395323", "0.6383288", "0.6378791", "0.6377201", "0.6369719", "0.63499665", "0.63440156", "0.6341131", "0.6329661", "0.6325874", "0.63193864", "0.6319063", "0.6312234", "0.6290806", "0.6260179", "0.62591076", "0.62512475", "0.62457335", "0.6240549", "0.62374043", "0.6236692", "0.6232846", "0.6231078", "0.62279093", "0.62275815", "0.62199587", "0.6219118", "0.6218478", "0.62086743", "0.620857", "0.6204012", "0.6195708", "0.6194869", "0.61877656", "0.6185527", "0.6178821", "0.61779743", "0.6176519", "0.6175162", "0.61706287", "0.6167248", "0.6161814", "0.61598474", "0.61554235", "0.61529326", "0.6148552", "0.6148542", "0.6138271", "0.61371046", "0.61329025", "0.61221206", "0.61200583", "0.6118152", "0.61101604", "0.61089313", "0.6106916", "0.6104636", "0.61040044", "0.61036986", "0.61000806", "0.60973424", "0.60972613", "0.60951394", "0.60943544", "0.60930204", "0.60908234", "0.60898066", "0.60884273", "0.6087243", "0.60852754", "0.6084577", "0.6080774", "0.60796005", "0.6079365", "0.6075174", "0.60739625", "0.60739565", "0.6073035", "0.6067735", "0.60660183", "0.6064535", "0.6064398", "0.6063723", "0.6062322", "0.60615003", "0.60600793", "0.60596365", "0.6057498", "0.6056557", "0.6054091" ]
0.0
-1
mengambil data user yg login
function user() { return isset($_SESSION['user']) ? \Models\User::find($_SESSION['user']) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLogin();", "public function getLogin();", "public function getLogin();", "private function login(){\n \n }", "function get_userdatabylogin($user_login)\n {\n }", "public function login();", "public function login();", "private function sessionLogin() {\r\n $this->uid = $this->sess->getUid();\r\n $this->email = $this->sess->getEmail();\r\n $this->fname = $this->sess->getFname();\r\n $this->lname = $this->sess->getLname();\r\n $this->isadmin = $this->sess->isAdmin();\r\n }", "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 }", "function bAuth_data_Login($encoded_login){\n // Force the current module being JAM\n if (defined('JAM_MODULE')) $_GET['q'] = JAM_MODULE;\n else $_GET['q'] = 'jam';\n\n b_reg::$current_module = $_GET['q'];\n b_reg::load_module(b_reg::$current_module);\n\n // Start JAM\n start_JAM();\n \n list($login,$pwd) = explode(',',b_crypt::hex_decode($encoded_login),2);\n $loginData = array('org' =>'nordita',\n\t\t // 'flavor'=>'nordita',\n\t\t );\n return array($login,$pwd,$loginData);\n}", "public function login() {\n\n $user_login = trim(in('id'));\n $user_pass = in('password');\n $remember_me = 1;\n\n $credits = array(\n 'user_login' => $user_login,\n 'user_password' => $user_pass,\n 'rememberme' => $remember_me\n );\n\n $re = wp_signon( $credits, false );\n\n if ( is_wp_error($re) ) {\n $user = user( $user_login );\n if ( $user->exists() ) ferror( -40132, \"Wrong password\" );\n else ferror( -40131, \"Wrong username\" );\n }\n else if ( in('response') == 'ajax' ) {\n // $this->response( user($user_login)->session() ); // 여기서 부터..\n }\n else {\n $this->response( ['data' => $this->get_button_user( $user_login ) ] );\n }\n\n }", "function login() {\n \t$this->set('indata',$this->data);\n\t\tif(empty($this->data)){\n\t\t\t$this->pageTitle = 'Log in';\n\t\t\t$cookie = $this->Cookie->read('Auth.User');\n\t\t}\n }", "public function login(){\n\n }", "function login()\n\t{\n\t\tif(isset($this->cookie[$this->sets['cookie_prefix'] . 'user']) && isset($this->cookie[$this->sets['cookie_prefix'] . 'pass'])) {\n\t\t\t$cookie_user = intval($this->cookie[$this->sets['cookie_prefix'] . 'user']);\n\t\t\t$cookie_pass = $this->cookie[$this->sets['cookie_prefix'] . 'pass'];\n\t\t\t$user = $this->db->fetch(\"SELECT m.*, s.skin_dir, g.group_perms, g.group_file_perms, g.group_name, t.membertitle_icon\n\t\t\t\tFROM (%pskins s, %pgroups g, %pusers m)\n\t\t\t\tLEFT JOIN %pmembertitles t ON t.membertitle_id = m.user_level\n\t\t\t\tWHERE m.user_id=%d AND\n\t\t\t\t m.user_password='%s' AND\n\t\t\t\t s.skin_dir=m.user_skin AND\n\t\t\t\t g.group_id=m.user_group LIMIT 1\",\t$cookie_user, $cookie_pass);\n\t\t} else if(isset($_SESSION['user']) && isset($_SESSION['pass'])) {\n\t\t\t$session_user = intval($_SESSION['user']);\n\t\t\t$session_pass = $_SESSION['pass'];\n\t\t\t$user = $this->db->fetch(\"SELECT m.*, s.skin_dir, g.group_perms, g.group_file_perms, g.group_name, t.membertitle_icon\n\t\t\t\tFROM (%pskins s, %pgroups g, %pusers m)\n\t\t\t\tLEFT JOIN %pmembertitles t ON t.membertitle_id = m.user_level\n\t\t\t\tWHERE m.user_id=%d AND\n\t\t\t\t MD5(CONCAT(m.user_password,'%s'))='%s' AND\n\t\t\t\t s.skin_dir=m.user_skin AND\n\t\t\t\t g.group_id=m.user_group LIMIT 1\",\t$session_user, $this->ip, $session_pass);\n\t\t} else {\n\t\t\t$user = $this->db->fetch(\"SELECT m.*, s.skin_dir, g.group_perms, g.group_file_perms, g.group_name\n\t\t\t\tFROM (%pskins s, %pgroups g, %pusers m)\n\t\t\t\tWHERE m.user_id=%d AND\n\t\t\t\t s.skin_dir=m.user_skin AND\n\t\t\t\t g.group_id=m.user_group LIMIT 1\", USER_GUEST_UID);\n\t\t\t$user['user_language'] = $this->get_browser_lang($this->sets['default_lang']);\n\t\t}\n\n\t\tif (!isset($user['user_id'])) {\n\t\t\t$user = $this->db->fetch(\"SELECT m.*, s.skin_dir, g.group_perms, g.group_file_perms, g.group_name\n\t\t\t\tFROM (%pskins s, %pgroups g, %pusers m)\n\t\t\t\tWHERE m.user_id=%d AND\n\t\t\t\t s.skin_dir=m.user_skin AND\n\t\t\t\t g.group_id=m.user_group LIMIT 1\", USER_GUEST_UID);\n\n\t\t\tsetcookie($this->sets['cookie_prefix'] . 'user', '', $this->time - 9000, $this->sets['cookie_path'], $this->sets['cookie_domain'], $this->sets['cookie_secure'], true );\n\t\t\tsetcookie($this->sets['cookie_prefix'] . 'pass', '', $this->time - 9000, $this->sets['cookie_path'], $this->sets['cookie_domain'], $this->sets['cookie_secure'], true );\n\n\t\t\tunset($_SESSION['user']);\n\t\t\tunset($_SESSION['pass']);\n\t\t\t$user['user_language'] = $this->get_browser_lang($this->sets['default_lang']);\n\t\t}\n\t\treturn $user;\n\t}", "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}", "private function userLoginData($data){\n $logDataModel = new Model_Jiafuyun_RegulatorLoginData();\n $filter = array(\n 'regulator_id' => $data['regulator_id'],\n 'login_name' => $data['login_name']\n );\n $info = $logDataModel->getByWhere($filter,'*');\n if(empty($info)){\n $log_data = array(\n 'regulator_id' => $data['regulator_id'],\n 'login_name' => $data['login_name'],\n 'times' => '1',\n 'last_visit_time' => $data['last_visit_time']\n );\n $logDataModel->insert($log_data);\n }else{\n $log_data = array(\n 'times' => ++$info['times']\n );\n $logDataModel->update($info['id'],$log_data);\n }\n }", "public function get_login_info() {\r\n\t\t// Get user from cached data or from access token\r\n\t\t$user = $this->getUser ();\r\n\t\t\r\n\t\t// If there's bd_sig & bd_user parameter in query parameters,\r\n\t\t// it must be an inside web app(app on baidu) loading request,\r\n\t\t// then we must check whether the uid passed from baidu is the\r\n\t\t// same as we get from persistent data or from access token, \r\n\t\t// if it's not, we should clear all the persistent data and to \r\n\t\t// get an access token again.\r\n\t\tif (isset ( $_REQUEST ['bd_sig'] ) && isset ( $_REQUEST ['bd_user'] )) {\r\n\t\t\t$sig = self::generateSign ( array ('bd_user' => $_REQUEST ['bd_user'] ), $this->apiSecret, 'bd_sig' );\r\n\t\t\tif ($sig != $_REQUEST ['bd_sig'] || $user ['uid'] != $_REQUEST ['bd_user']) {\r\n\t\t\t\t$this->store->remove ( 'session' );\r\n\t\t\t}\r\n\t\t}\r\n\t\t$user = $this->user_data_format($user);\r\n\t\treturn $user;\r\n\t}", "public function login()\n\t{\n\t\t$mtg_login_failed = I18n::__('mtg_login_failed');\n\t\tR::selectDatabase('oxid');\n\t\t$sql = 'SELECT oxid, oxfname, oxlname FROM oxuser WHERE oxusername = ? AND oxactive = 1 AND oxpassword = MD5(CONCAT(?, UNHEX(oxpasssalt)))';\n\t\t$users = R::getAll($sql, array(\n\t\t\tFlight::request()->data->uname,\n\t\t\tFlight::request()->data->pw\n\t\t));\n\t\tR::selectDatabase('default');//before doing session stuff we have to return to db\n\t\tif ( ! empty($users) && count($users) == 1) {\n\t\t\t$_SESSION['oxuser'] = array(\n\t\t\t\t'id' => $users[0]['oxid'],\n\t\t\t\t'name' => $users[0]['oxfname'].' '.$users[0]['oxlname']\n\t\t\t);\n\t\t} else {\n\t\t\t$_SESSION['msg'] = $mtg_login_failed;\n\t\t}\n\t\t$this->redirect(Flight::request()->data->goto, true);\n\t}", "function admin_login() {\n\t\t$admin_email = $_REQUEST['admin_email'];\n\t\t$admin_pass = $_REQUEST['admin_pass'];\n\t\tif (!empty($admin_email) && !empty($admin_pass)) {\n\t\t\t$records_user = $this -> conn -> get_table_field_doubles('pg_track_admin', 'admin_email', $admin_email, 'admin_password', md5($admin_pass));\n\t\t\tif (!empty($records_user)) {\n\n\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Login Successfully\");\n\t\t\t} else {\n\t\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid login id and password\");\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Missing parameter\", 'admin_email' => $admin_email, 'admin_pass' => $_REQUEST['admin_pass']);\n\t\t}\n\t\techo $this -> json($post);\n\t}", "public function api_login_as_guider(){\n \t\n \t$username = $this->input->post('username');\n $password = md5($this->input->post('password'));\n\n $user_id = $this->login_model->api_login_as_guider($username,$password);\n\n if($user_id){\n\t\t $json_data['res'] = $user_id;\n\t\t echo json_encode($json_data);\n\t\t }else{\n\t\t $json_data['res'] = '0';\n\t\t echo json_encode($json_data);\n\t\t }\n\n }", "function login_post()\n\t{\n\t\t$user = $this->m_user_model->get(array(\n\t\t\t\"user_name\" => $this->input->post('username'), \n\t\t\t\"user_pass\" => $this->input->post('password'), \n\t\t\t));\n\n\t\tif ($user) {\n\t\t\t$array = array(\n\t\t\t\t'userid' => $user->user_id,\n\t\t\t\t'username' => $user->user_name,\n\t\t\t\t'nama' => $user->nama,\n\t\t\t\t'no_rm' => $user->no_rm,\n\t\t\t\t'group' => $user->level,\n\t\t\t\t'loged_in' => TRUE,\n\t\t\t);\n\t\t\t\n\t\t\t$this->session->set_userdata( $array );\n\t\t\tif ($user->level == 1) {\n\t\t\t\tredirect('dashboard','refresh');\n\t\t\t}elseif ($user->level == 2) {\n\t\t\t\tredirect('dashboard','refresh');\n\t\t\t}else{ //$user->level == 3\n\t\t\t\tredirect('dashboard','refresh');\n\t\t\t}\n\t\t}else{\n\t\t\t$this->session->set_flashdata('msg', 'Username atau password Anda Salah! Silahkan coba lagi');\n\t\t\tredirect('auth','refresh');\n\t\t}\n\t}", "function login()\n {\n \t \t$data = file_get_contents('php://input');\n \t\t$this->logservice->log($this->module_name, \"DEBUG\",\"EVENT\",$this->IP,\"$data \");\n\t\t$busData = json_decode($data ,true);\n\t\t//查找该用户名与密码\n\t\t$criteria = array();\n\t\t$criteria[\"and\"] = array(\"Name\" => $busData[\"name\"],\"Password\" => $busData[\"password\"]);\n\t\t$userDat = $this->User->read($criteria);\n\t\tif (!empty($userDat)) {\n\t\t\t\t\n\t\t\t//更新用户的状态\n\t\t\t$data_in = array('Status' => 1);\n \t\t$upd_criteria['and'] = array('User_Id' => $userDat[0]['User_Id']);\n \t\t$result = $this->User->update($data_in, $upd_criteria);\n\t \tif($result !== false)\n\t \t{\n\t\t\t\t$rspData[\"userID\"] =$userDat[0][\"User_Id\"];\n\t\t\t\t$rspData[\"state\"] = \"OK\";\n\t\t\t\t$rspData[\"erroInfo\"] = \"登陆成功ID为\".$userDat[0][\"User_Id\"];\n\n\t\t\t\t$rspInfo = json_encode($rspData);\n\t\t\t\techo $rspInfo;\n\t\t }\n\n\t\t}\n }", "public function processLoginDataProvider() {}", "function admin_login(){\n\t$admin_email=$_REQUEST['admin_email'];\n\t$admin_pass=$_REQUEST['admin_pass'];\n\tif(!empty($admin_email) && !empty($admin_pass)){\n\t\t\t$records_user = $this -> conn -> get_table_field_doubles('pg_track_admin', 'admin_email', $admin_email, 'admin_password', md5($admin_pass));\n\t\tif(!empty($records_user)){\n\t\t\n\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Login Successfully\");\n\t\t}else{\n\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid login id and password\");\n\t\t}\n\t}else{\n\t\t$post = array(\"status\" => \"false\", \"message\" => \"Missing parameter\",'admin_email'=>$admin_email,'admin_pass'=>$_REQUEST['admin_pass']);\n\t}\n\techo $this -> json($post);\n}", "public function loginUser()\r\n {\r\n $req = $this->login->authenticate($this->user);\r\n $req_result = get_object_vars($req);\r\n print(json_encode($req_result));\r\n }", "public function login()\n {\n $customerData = Mage::getSingleton('customer/session')->getCustomer();\n $defaultprofile = Mage::getModel('beautyprofiler/beutyprofiler')->getCollection()->addFieldToSelect('profile_id')->addFieldToFilter('is_default', array('is_default'=>1))->addFieldToFilter('customer_entity_id', array('customer_entity_id'=>$customerData->getId()))->load();\n $profile_id = $defaultprofile->getData()[0]['profile_id'];\n // $profile_id = 300;\n Mage::getSingleton('customer/session')->setBeautyProfileId($profile_id);\n /*Check if current login customer have default profile or not*/\n $getprofile = Mage::getModel('beautyprofiler/beutyprofiler')->getCollection()->addFieldToSelect('profile_id')->addFieldToFilter('customer_entity_id', array('customer_entity_id'=>$customerData->getId()))->load();\n if(count($getprofile->getData()) == 0)\n {\n Mage::getSingleton('customer/session')->setNoprofile('yes');\n }\n Mage::getSingleton('customer/session')->setIncompleteprofile('yes');\n Mage::getSingleton('customer/session')->setRegisterprofile('yes');\n }", "public function login()\n {\n }", "public function login()\n {\n }", "protected function login($data) {\n\t\n\t\t$dtype = $data->dtype;\n\t\t$token = md5(time()); //$data->token;\t\n\t\tif($dtype=='email'){\n\t\t\tif (!empty($data->username) ) {\t\n\t\t\t\t$username \t= $data->username;\n\t\t\t\t$pass \t\t= md5($data->password);\n\t\t\t\t$sql \t\t= \"SELECT * FROM users WHERE ( email = '{$username}') AND password = '{$pass}'\";\n\t\t\t\t$query \t\t= $this->db->query($sql);\n\t\t\t\t\n\t\t\t\tif ($query->num_rows() > 0) {\n\t\t\t\t\t$userData \t\t= $query->_fetch_object();\t\t\t\t\t\n\t\t\t\t\t$sql \t\t\t= \"UPDATE users SET session_token = '{$token}', dtype='{$dtype}',is_logged_in = 1 WHERE id = $userData->id\";\n\t\t\t\t\tif ($this->db->query($sql)) {\n\t\t\t\t\t\t$userid \t\t= $userData->id;\n\t\t\t\t\t\t$username \t\t= $userData->username;\n\t\t\t\t\t\t$email \t\t\t= $userData->email;\n\t\t\t\t\t\t$is_logged_in \t= $userData->is_logged_in;\n\t\t\t\t\t\t$fb_tw_id \t\t= '';//$userData->fb_tw_id;\n\t\t\t\t\t\t$data1 \t\t\t= array('user_id' => $userid, 'username' => $username, 'session_token' => \"$token\", 'dtype' => \"$dtype\", 'email' => \"$email\", 'is_logged_in' => $is_logged_in, 'fb_tw_id' => $fb_tw_id,);\n\t\t\t\t\t\t$this->trueResponse($data1);\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$sql1 \t\t= \"SELECT * FROM users WHERE ( username = '{$username}') AND password = '{$pass}'\";\n\t\t\t\t\t$query1 \t\t= $this->db->query($sql1);\n\t\t\t\t\tif ($query1->num_rows() > 0) {\n\t\t\t\t\t\t$userData \t\t= $query1->_fetch_object();\t\t\t\t\t\n\t\t\t\t\t\t$sql \t\t\t= \"UPDATE users SET session_token = '{$token}', dtype='{$dtype}',is_logged_in = 1 WHERE id = $userData->id\";\n\t\t\t\t\t\tif ($this->db->query($sql)) {\n\t\t\t\t\t\t\t$userid \t\t= $userData->id;\n\t\t\t\t\t\t\t$username \t\t= $userData->username;\n\t\t\t\t\t\t\t$email \t\t\t= $userData->email;\n\t\t\t\t\t\t\t$is_logged_in \t= $userData->is_logged_in;\n\t\t\t\t\t\t\t$fb_tw_id \t\t= '';//$userData->fb_tw_id;\n\t\t\t\t\t\t\t$data1 \t\t\t= array('user_id' => $userid, 'username' => $username, 'session_token' => \"$token\", 'dtype' => \"$dtype\", 'email' => \"$email\", 'is_logged_in' => $is_logged_in, 'fb_tw_id' => $fb_tw_id,);\n\t\t\t\t\t\t\t$this->trueResponse($data1);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->falseResponse(\"You have entered wrong credentials\");\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\t\n\t\t\t} \n\t\t} \n\t\tif($dtype=='fb' || $dtype=='tw'){\t\n\t\t\t$fb_tw_id \t= $data->fb_tw_id;\n\t\t\t$sql \t\t\t= \"SELECT * FROM users WHERE ( fb_tw_id = '{$fb_tw_id}') AND dtype= $dtype\";\n\t\t\t$query \t\t\t= $this->db->query($sql);\n\t\t\tif ($query->num_rows() > 0) {\n\t\t\t\t$userData = $query->_fetch_object();\n\t\t\t\t$sql = \"UPDATE users SET session_token = '{$token}', dtype='{$dtype}',is_logged_in = 1 WHERE id = $userData->id\";\n\t\t\t\tif ($this->db->query($sql)) {\n\t\t\t\t\t$userid \t\t= $userData->id;\n\t\t\t\t\t$username \t\t= $userData->username;\n\t\t\t\t\t$email \t\t\t= '';\n\t\t\t\t\t$is_logged_in \t= $userData->is_logged_in;\n\t\t\t\t\t$fb_tw_id \t\t= $userData->fb_tw_id;\n\t\t\t\t\t$data1 \t\t= array('user_id' => $userid, 'username' => $username, 'session_token' => \"$token\", 'dtype' => \"$dtype\", 'email' => \"$email\", 'is_logged_in' => $is_logged_in, 'fb_tw_id' => $fb_tw_id,);\n\t\t\t\t\t$this->trueResponse($data1);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->falseResponse(\"You have entered wrong credentials\");\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\t\n\t}", "function doLogin()\n {\n\n //var_dump($sql);exit;\n /*if($res){*/\n //存入session\n /*session_start();\n $_SESSION['user'] = json_encode($res);*/\n\n //展示数据库\n $sql = 'show databases;';\n $res = $GLOBALS['data']->query($sql)->fetchAll();\n foreach ($res as $k=>$v){\n $res[$k] = $v['Database'];\n }\n //var_dump($res);exit;\n\n include \"views/homePage.html\";\n /*}*/\n }", "protected function login_load($dat){\n $uo = $this->umu_get($dat['user']);\n if(!is_object($uo)) return 1;\n $this->login_state = $dat['login_state'];\n $this->cuser = $uo;\n $this->ctime = $dat['datetime'];\n return 0;\n }", "function login() {\n $params = $this->objService->get_request_params();\n $isSuccess = $this->objQuery->count('user','email= ? AND password = ?', array($params->email,$params->password));\n echo $isSuccess;\n }", "public function do_login($data)\n {\n $this->db->select(\"id,nama,email,no_hp,username,level,id_,blokir\");\n //$this->db->where(array(\"blokir\"=>\"N\"));\n $this->db->where($data);\n $hasil = $this->db->get('v_member_all');\n if($hasil->num_rows()>0){\n $data = $hasil->row(1);\n if($data->blokir == \"Y\"){\n return array(\"status\"=>false,\"message\"=>\"Akun Anda di Nonaktifkan.\");\n }\n $sesi = new myObject();\n $sesi->islogin = true;\n $sesi->nama = $data->nama;\n $sesi->id = $data->id;\n $sesi->email = $data->email;\n $sesi->no_hp = $data->no_hp;\n $sesi->level = $data->level;\n $sesi->user = $data->username;\n $sesi->id_member = $data->id_;\n set_session(\"user\",$sesi);\n return array(\"status\"=>true);\n }\n unset_session(\"user\");\n return array(\"status\"=>false,\"message\"=>\"Username / Password Salah\");\n }", "private function _loginUser($data) { \n try {\n $username = mb_strtolower($data->username);\n $password = $data->password;\n\n require_once 'DBAdmin_Model.php';\n $this->model = new DBAdmin_Model();\n\n $conf = realpath('config');\n if (!is_file($conf.'/config.json')) {\n throw new Exception('Datei config.json nicht gefunden!');\n }\n\n $config = json_decode(file_get_contents($conf.'/config.json'));\n\n if (!isset($config->host)) {\n throw new Exception('Datei config.json ist fehlerhaft!');\n }\n $host = $config->host; \n \n try {\n $pdo = $this->model->openDbConnection($host, $username, $password);\n } catch (Throwable $ex) {\n throw new Exception('Benutzername oder Passwort falsch!');\n }\n $this->model->closeDbConnection($pdo);\n\n // conf-File für Benutzer erstellen\n $confFile = fopen($conf.'/user_'.$username.'.conf', 'w');\n\n if (!$confFile) {\n throw new Exception('fopen ist fehlgeschlagen!');\n }\n $txt = \"[client]\\r\\nhost=\".$host.\"\\r\\nuser=\".$username.\"\\r\\npassword=\\\"\".$password.\"\\\"\";\n $write = fwrite($confFile, $txt);\n\n if ($write === false) {\n throw new Exception('fwrite ist fehlgeschlagen!');\n }\n fclose($confFile);\n \n $return = array(\n 'username' => $username,\n 'id' => md5($password)\n );\n } catch (Throwable $ex) {\n $return = $ex;\n }\n return $return; \n }", "public function logInRegisterPage();", "public function get_login() \n {\n return $this->login;\n }", "public function coustomer_login_data_check(){\n\t\t$dt = new DateTime('now', new DateTimezone('Asia/Dhaka'));\n\t\t$email \t\t\t= \t$this->input->post('email');\n\t\t$password \t\t=\tmd5($this->input->post('password'));\n\n\t\t$attar = array(\n\t\t\t'email'\t\t\t\t=>\t\t\t$email,\n\t\t\t'password'\t\t\t=>\t\t\t$password,\n\t\t\t);\n\t\t$result = $this->db->get_where('users',$attar);\n\t\tif($result->num_rows() == 1){\n\t\t\t$attr\t=\tarray(\n\t\t\t\t'current_user_id'\t\t=>\t$result->row(0)->id,\n\t\t\t\t'current_user_email'\t=>\t$email,\n\t\t\t\t'current_user_name'\t\t=>\t$result->row(20)->username,\n\t\t\t\t);\n\t\t\t$this->session->set_userdata($attr);\n\t\t\t$attard = array(\n\t\t\t\t'name'\t\t=>\t$this->session->userdata('current_user_id'),\n\t\t\t\t'user_name'\t=>\t$this->session->userdata('current_user_name'),\n\t\t\t\t'agent' \t=>\t$this->agent->browser(),\n\t\t\t\t'ip' \t\t=>\t$this->input->ip_address(),\n\t\t\t\t'platform'\t=> $this->agent->platform(),\n\t\t\t\t'date'\t\t=>\t$dt->format('F j, Y'),\n\t\t\t\t'time'\t\t=>\t$dt->format('g:i a'),\n\t\t\t\t'activity' \t=>\t1,\n\t\t\t);\n\t\t\t$this->db->insert('online_user_activity',$attard);\n\t\t\treturn TRUE;\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function getLogin() {\n return [\n 'uid' => isset($_SESSION['uid']) ? $_SESSION['uid'] : 0 ,\n 'bid' => isset($_SESSION['bid']) ? $_SESSION['bid'] : 0 ,\n 'mid' => isset($_SESSION['mid']) ? $_SESSION['mid'] : 0 ,\n ];\n}", "public function setLogin(){\n \n\t\t\t$obUser = Model::getUserByEmail($this->table, $this->camp,$this->email);\n\t\t\tif (!$obUser instanceof Model) {\n\t\t\t\t$this->message = 'Usuario ou Senha incorretos';\n return false;\n\t\t\t}\n\t\t\tif (!password_verify($this->password, $obUser->senha)) {\n\t\t\t\t$this->message = 'Usuario ou Senha incorretos';\n return false;\n\t\t\t}\n\t\t\t\n\t\t\t$this->session($obUser);\n\n\t\t\theader('location: '.$this->location);\n\t\t\texit;\n\n\t\t}", "public function get_login()\n\t{\n\t\t$this->template->body = View::forge('user/login');\n\t}", "function login() { }", "public function info_login()\r\n\t{ \r\n\t\treturn $this->login;\r\n\t}", "public function getLoginFormData() {}", "public function getLoginFormData() {}", "public function login(){\n\n }", "public function login($data)\n {\n $data['access_level'] = 2;\n $time = microtime();\n $key = Config::get('app.key');\n \n //these are the columns selected\n $columns = ['*'];\n\n $login_with = isset($data['use']) ? $data['use'] : 'email';\n\n if($this->validation->isValidForLogin($data)) {\n \n //$user = $this->authRepository->findByEmail($data, $columns);\n $user = $this->authRepository->findByUsername($data, $columns);\n\n\n if( empty($user) ) {\n return ['valid'=>false,'error'=>'Invalid Email or Password.'];\n }\n\n $user_id = $user->id;\n\n if( $this->hasher->check($data['password'], $user->getAuthPassword()) ) {\n\n $token = base64_encode((\"$time-$user_id-$key\") );\n\n\n $event_data = [\n 'user_id' => $user_id,\n 'api_token' => $token,\n 'expired_at' => Carbon::now()->addDays(Config::get('app.expiration')),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ];\n\n //fire the event \"auth.login\" this will register the API token details\n Event::fire('auth.login', [$event_data]);\n $this->authRepository->update(['status' => 1], $user_id);\n return ['valid' => true, 'token' => $token];\n } else {\n return ['valid'=>false,'error'=>'Invalid Email or Password.'];\n }\n\n } else {\n $errors = $this->validation->errors()->first();\n return ['valid'=>false,'error'=>$errors];\n }\n\n\n \n }", "public function AdminLogin(){\n if($this->get_request_method()!= \"POST\"){\n $this->response('',406);\n }\n $username = $_POST['email'];\n $password = $_POST['password'];\n $format = $_POST['format'];\n $db_access = $this->dbConnect();\n $conn = $this->db;\n $res = new getService();\n if(!empty($username) && !empty($password)){\n $res->admin_login($username, $password, $conn);\n $this->dbClose();\n }\n else{\t\n $this->dbClose();\n $error = array('status' => \"0\", \"msg\" => \"Fill Both Fields !!\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($res->json($error), 200);\n }\n }", "function login();", "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 }", "static public function getLogin() {\n //resultat : chaîne de caractère qui correspond au login \n return self::$databases['login'];\n }", "public function adminlogin(){\n\n \t return json_encode(User::All());\n }", "public static function get_user_data()\n {\n }", "private function _cek_user_login() {\r\n //if ($this->session->userdata('VNAME')) {\r\n if (isset($_SESSION['VNAME'])) {\r\n //echo \"test\";exit; \r\n header('location:' . $this->data['base_url'] . \"index.php/backend/home\");\r\n }\r\n //$this->data['username'] = strtoupper($this->session->userdata('VUSERNAME'));\r\n //echo \"test22\". $this->session->userdata('username').\" lalala\";exit;\r\n }", "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}", "private function user_login() {\n\t\t\t// Cross validation if the request method is POST else it will return \"Not Acceptable\" status\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\tif(!isset($_POST['password']) && !isset($_POST['email'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter email and password is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tif(!isset($_POST['email'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter email is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tif(!isset($_POST['password'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter password is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\t$email = $this->_request['email'];\n\t\t\t$password = $this->_request['password'];\n\t\t\t$hashed_password = sha1($password);\n\t\t\t\t\t\t\t\t\t\t// Input validations\n\t\t\tif(!empty($email) and !empty($password)) {\n\t\t\t\tif(filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t\t\t\t$sql = \"SELECT user_name, user_email, user_phone_no, user_pic, user_address, remember_token\n\t\t\t\t\t\t\t\t\tFROM table_user\n\t\t\t\t\t\t\t\t\tWHERE user_email = '$email'\n\t\t\t\t\t\t\t\t\tAND user_password = '\".$hashed_password.\"'\n\t\t\t\t\t\t\t\t\tLIMIT 1\";\n\t\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t\t$stmt->execute();\n\t\t\t\t $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n if($stmt->rowCount()=='0') {\n $error = array('status' => \"Failed\", \"msg\" => \"Invalid Email address or Password\");\n $this->response($this->json($error), 200);\n }\n\t\t\t\t\t\t$error = array('status' => \"Success\", \"msg\" => \"Sucessfully Login!\", \"data\" => json_encode($results) );\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Fields are required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\t// If invalid inputs \"Bad Request\" status message and reason\n\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Invalid Email address or Password\");\n\t\t\t$this->response($this->json($error), 200);\n\t\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 }", "function login(){\n\t\t$this->init(new User());\n\n\t\tif(isset($_POST['login_user'])){\n\t\t\t$this->record = array();\n\n\t\t\t// $row = $this->model->get_by_property(array('username'=>$_POST['email']));\n\t\t\t$record = Model::get_sql_data(\"select u.*,df.value as date_format_primary,df2.value date_format_short,\n\t\t\t d.value as first_day_week,l.locale as 'locale', l.value as 'language' from `user` u \n\t\t\tinner join user_settings us on (us.user_id=u.id)\n\t\t\tinner join `date_format` df on (df.id=us.date_format_id)\n\t\t\tinner join `date_format` df2 on (df2.id=us.date_format_short_id)\n\t\t\tinner join `day` d on (us.first_day_week_id=d.id)\n\t\t\tinner join `language` l on (l.id=us.language_id)\n\t\t\twhere u.username=? or u.mail=?\", array('username'=>$_POST['email'],'mail'=>$_POST['email']) , false);\n\n\t\t\t$row = empty($record)? $this->model->get_by_property(array('username'=>$_POST['email'])):$record;\n\n\t\t\tif(!$row){\n\t\t\t\t$row = $this->model->get_by_property(array('mail'=>$_POST['email']));\n\t\t\t}\n\n\t\t\tif(isset($row) && isset($row['id'])){\n\t\t\t\tif($row['password'] == $_POST['password']){\n\t\t\t\t\tSession::set_user_session_data($row);\n\t\t\t\t\theader('location: '.CoreUtils::base_url().'index/index');\n\t\t\t\t}else{\n\t\t\t\t\t$this->record['error_message']='error_msg_password';\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->record['error_message']='error_msg_email';\n\t\t\t}\n\t\t}else{\n\t\t\tSession::unset_user_session_data();\n\t\t}\n\t\t$this->render(\"login\");\t\n\t}", "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 }", "function _genLogin()\n {\n $this->mismatch = false;\n if (isset($_POST['login']) && $this->_verify() == \"\") {\n $this->name_post = $_POST['gebruikersnaam'];\n $this->pass_post = $_POST['wachtwoord'];\n\n $this->_getFromGebruikersDb($this->name_post);\n if ($this->_isMatch()) {\n $_SESSION['ingelogd'] = true;\n //toegevoegd door rens om een gebruikersnaam en rol te krijgen\n $_SESSION['gebruikersnaam'] = $this->name_post;\n $_SESSION['Rol'] = $this->role_db;\n header('location: Login_Redir.php');\n }\n }\n }", "public function user();", "public function user();", "public function user();", "public function user();", "public function user();", "public function user();", "public function user();", "public function user();", "function cek_login($tabel,$where) {\n\t\t$login = $this->db->get_where('user',$where);\n\t\treturn $login;\n\t}", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function _check_login()\n {\n\n }", "public function connexionSuperAdminLogin(){\n }", "public function login()\n\t{\n\t\tredirect($this->config->item('bizz_url_ui'));\n\t\t// show_404();\n\t\t// ////import helpers and models\n\n\t\t// ////get data from database\n\n\t\t// //set page info\n\t\t// $pageInfo['pageName'] = strtolower(__FUNCTION__);\n\n\t\t// ////sort\n\t\t\n\t\t// //render\n\t\t// $this->_render($pageInfo);\n\t}", "public function userLogin($data)\n\t\t{\n\t\t\t$result = $this->query($data);\n\t\t\tif ($this->getRows($result) > 0) {\n\t\t\t\t$row = $this->getArray($result);\n\t\t\t\treturn $row;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 'false';\n\t\t\t}\n\t\t}", "public function documentcheck() {\n $user = User::load(\\Drupal::currentUser()->id());\n bhge_user_registration_user_login($user);\n }", "public function login($data) {\n $query = $this->get_by($data, TRUE);\n\n if ($query) {\n return $query->user_id;\n } else {\n return false;\n }\n }", "public function login()\n {\n self::$facebook = new \\Facebook(array(\n 'appId' => $this->applicationData[0],\n 'secret' => $this->applicationData[1],\n ));\n\n $user = self::$facebook->getUser();\n if (empty($user) && empty($_GET[\"state\"])) {\n \\Cx\\Core\\Csrf\\Controller\\Csrf::header('Location: ' . self::$facebook->getLoginUrl(array('scope' => self::$permissions)));\n exit;\n }\n\n self::$userdata = $this->getUserData();\n $this->getContrexxUser($user);\n }", "public function login() {\n\t\t$this -> load -> model('models_events254/m_clients');\n\t\t$this -> m_clients -> getUser();\n\t\tif ($this -> m_clients -> isUser == 'true') {\n\n\t\t\n\t\t\t/*create session data*/\n\t\t\t$newdata = array('email' => $this -> m_clients -> email, 'logged_in' => TRUE,'id' => $this ->m_clients->id);\n\t\t\t$this -> session -> set_userdata($newdata);\n\n\t\t\tredirect(base_url() . 'C_front/index', 'refresh');\n\t\n\n\t\t} else {\n\t\t\t#use an ajax request and not a whole refresh\n\t\t\t\n\t\t\t$data['message']=\"User Not Found\";\n\t\t\t$data['messageType']=\"error\";\n\t\t\t\n\t\t\t$this->load->view('login',$data);\n\t\t}\n\t}", "public function get_login_data()\n\t{\n\t\tthrow new steam_exception( $this->get_login_user_name(), \"Error: get_login_data is not available using steam_connector_lite\", 980 );\n\t}", "public function p_login() {\n\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\t\n\t# Search the db for this email and password\n\t# Retrieve the token if it's available\n\t$q = \"SELECT token \n\t\tFROM users \n\t\tWHERE email = '\".$_POST['email'].\"' \n\t\tAND password = '\".$_POST['password'].\"'\";\n\t\n\t$token = DB::instance(DB_NAME)->select_field($q);\t\n\t\t\t\t\n\t# If we didn't get a token back, login failed\n\tif(!$token) {\n\t\t\t\n\t\t# Send them back to the login page\n\n\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t\n\t# But if we did, login succeeded! \n\t} else {\n\t\t\t\n\t\t# Store this token in a cookie\n\t\t@setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\t\t\n\t\tRouter::redirect(\"/users/profile\");\n\t\t\t\t\t\n\t}\n }", "function login()\n{\n\tglobal $conf, $json, $resout, $db;\n\n\t$username = cRequest::any('_user');\n\t$password = cRequest::any('_pass');\n\t$p = $password;\n\n\t//die(\"_user: $username | _pass: $password\");\n\t\n\tif ((!$password) || (!$username)) {\n\t\t# XXX: Error page\n\t\tdie(\"Username and Password Required\");\n\t}\n\n\t$dbh = $db->open($conf['db']['host'], $conf['db']['user'],\n\t\t\t $conf['db']['passwd'], $conf['db']['name']);\n\n\t$uname = $db->secure($username);\n\t$passwd = sha1($password);\n\n\t$sql = \"select * from {$conf['tbl']['usermap']}\n\t\twhere username='$uname';\";\n\t$ret = $db->query($sql);\n\tif ($ret) {\n\t\t$res = $db->asfetch($ret);\n\t\t$uid = $res['uid'];\n\t\t$actype = $res['actype'];\n\t\tswitch($actype) {\n\t\tcase 'sa':\n\t\t\t$sql = \"select * from {$conf['tbl']['login']}\n\t\t\t\twhere username='$uname'\";\n\t\t\t$ret = $db->query($sql);\n\t\t\t$res = $db->asfetch($ret);\n\t\t\tbreak;\n\t\tcase 'a':\n\t\t\t$sql = \"select * from {$conf['tbl']['shopinfo']}\n\t\t\t\tleft join {$conf['tbl']['login']} \n\t\t\t\ton({$conf['tbl']['shopinfo']}.sid = \n\t\t\t\t{$conf['tbl']['login']}.uid )\n\t\t\t\twhere username='$uname'\";\n\t\t\t$ret = $db->query($sql);\n\t\t\t$res = $db->asfetch($ret);\n\t\t\tbreak;\n\t\tcase 'u':\n\t\t\t$sql = \"select * from {$conf['tbl']['profile']}\n\t\t\t\tleft join {$conf['tbl']['login']} \n\t\t\t\ton({$conf['tbl']['profile']}.uid = \n\t\t\t\t{$conf['tbl']['login']}.uid )\n\t\t\t\twhere username='$uname'\";\n\t\t\t$ret = $db->query($sql);\n\t\t\t$res = $db->asfetch($ret);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t/* XXX: ERROR */\n\t\t\tdie(\"[!] Error: No account with Username $uname\");\n\t\t\t/* NOTREACHED */\n\t\t}\n\n\t\t# cmp passwd\n\t\tif ($passwd != $res['passwd']) {\n\t\t\tprint_r($res);\n\t\t\tprint \"Passwords don't match[$passwd | {$res['passwd']}]\";\n\t\t\texit();\n\t\t}\n\n\t\t# get last login\n\t\t$sqll = \"select * from loginhistory where uid='$uid'\";\n\t\t$retl = $db->query($sqll);\n\t\t$resl = $db->asfetch($retl);\n\n\t\t# set up session data\n\t\t$sess = new cSession;\n\t\t$datetime = date('Y/m/d H:i:s');\n\t\t$lastip = cIP::getusrip();\n\t\t$location = cIP::getusrcountry($lastip); # FIXME: need to add ip2ctry dir\n\t\tif (isset($location['country_name'])) {\n\t\t\t$location = $location['country_name'];\n\t\t} else {\n\t\t\t$location = \"Unknown\";\n\t\t}\n\n\t\tif (preg_match('/1996\\/09\\/26 16:00:00/', $resl['lastlogin'], $match)) {\n\t\t\t$ll = $datetime;\n\t\t} else {\n\t\t\t$ll = $resl['lastlogin'];\n\t\t}\n\n\t\tif (preg_match('/0\\.0\\.0\\.0/', $resl['lastip'], $match)) {\n\t\t\t$lip = $lastip;\n\t\t} else {\n\t\t\t$lip = $resl['lastip'];\n\t\t}\n\n\t\t$sess->set('uid', $res['uid']);\n\t\t$sess->set('uname', $username);\n\t\t$sess->set('actype', $actype);\n\t\tif ($actype == 'u') {\n\t\t\t$sess->set('fname', $res['fname']);\n\t\t\t$sess->set('email', $res['email']);\n\t\t}\n\t\tif ($actype == 'a') {\n\t\t\t$sess->set('sname', $res['sname']);\n\t\t\t$sess->set('email', $res['email']);\n\t\t}\n\n\t\t$sess->set('lastlogin', $ll);\n\t\t$sess->set('lastip', $lip);\n\n\t\t# XXX: update login history\n\t\t$sql = \"update {$conf['tbl']['loginhistory']} set lastlogin='$datetime',\n\t\t\tlastip='$lastip', lastlocation='$location'\n\t\t\twhere uid='$uid';\";\n\t\t$db->query($sql);\n\n\t\t$db->close($dbh);\n\t\tunset($db);\n\t\tunset($sess);\n\n\t\theader(\"Location: dashboard.php\");\n\t\texit();\n\t} else {\n\t\t# XXX: Error page\n\t\tdie(\"[!] Fatal Error: No account with Username '$uname'\");\n\t\t/* NOTREACHED */\n\t}\n}", "function _read_user_session_db()\n {\n if (!$this->sessionModel->read()) {return false;}\n\t\t\n\t\t$this->user = SHIN_Core::$_models['sys_user_model']->get_instance();\n\n if (!$this->user->fetchByID($this->sessionModel->uid)) {\n\t\t\t$pk = $this->user->primary_key;\n $this->user->$pk = 0;\n return false;\n }\n\n\t\t$pk = $this->user->primary_key;\n\t\tSHIN_Core::$_user = $this->user;\n\t\t\n\t\t// addons for new field added //////////////////////////\n\t\t// request by Stefano. Detail: http://binary-studio.office-on-the.net/issues/5287\n\t\t//$data = array('updated' => date('Y-m-d H:i:s'));\n\t\t//SHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->where('idUser', SHIN_Core::$_user->idUser);\n\t\t//SHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->update('sys_user', $data); \t\t\n\t\t////////////////////////////////////////////////////////\t\t\n\n\t\t// lang //////////////////////////////////////////////////////////////////////////////\n\t\t$_current_language = '';\n\t\t//dump(SHIN_Core::$_libs['session']->userdata('language'));\n\t\tif(SHIN_Core::$_libs['session']->userdata('language')){\n\t\t\t$_current_language = SHIN_Core::$_libs['session']->userdata('language');\n\t\t} else {\n\t\t\t$_current_language = SHIN_Core::$_user->lang;\n\t\t}\n\t\tif($_current_language == '') {$_current_language = SHIN_Core::$_config['lang']['language'];} \n//\t\tSHIN_Core::$_libs['session']->set_userdata('language', $_current_language);\n\t\t//dump($_current_language);\n\t\t\n\t\t// addons from Dimas (need disscuss with Stefano) \n\t\t// Logic follow. each application can override native language /////\n\t\t// if($_current_language != SHIN_Core::$_config['lang']['language']){\n\t\t// $_current_language = SHIN_Core::$_config['lang']['language'];\n\t\t// }\n\t\t////////////////////////////////////////////////////////////////////\n\n\t\tSHIN_Core::$_language->load('app', $_current_language);\n\t SHIN_Core::$_current_lang = $_current_language;\n\t SHIN_Core::log('debug', '[LANGUAGE] Current language: '.SHIN_Core::$_current_lang);\n\t\t//////////////////////////////////////////////////////////////////////////////////////\n \n\t\t// theme /////////////////////////////////////////////////////////////////////////////\n\t\t$_current_theme = '';\n if(SHIN_Core::$_libs['session']->userdata('theme')){\n $_current_theme = SHIN_Core::$_libs['session']->userdata('theme');\n } else {\n\t\t\t$_current_theme = SHIN_Core::$_user->theme;\n }\n\t\tif($_current_theme == '') {SHIN_Core::$_config['theme']['default_theme'];}\n\n\t SHIN_Core::$_theme = $_current_theme;\n\t\t//////////////////////////////////////////////////////////////////////////////////////\n\n return true;\n }", "public function connexionAdminStructureLogin(){\n }", "public function checkFirstLogin();", "public function login(){\n\t\t$post = $this->input->post(NULL, TRUE);\n\t\t\n\t\tif(isset($post['nik']) ){ \n\t\t\t$this->user_detail = $this->user_model->get_by(array('nik' => $post['nik'], 'group' => 'Admin'), 1, NULL, TRUE);\n\t\t}\n\n\t\t$this->form_validation->set_message('required', '%s kosong, tolong diisi!');\n\n\t\t$rules = $this->user_model->rules;\n\t\t$this->form_validation->set_rules($rules);\t\n\n\t\tif($this->form_validation->run() == FALSE){\t\n\t\t\t$this->site->view('login');\n }\n else{\n\t\t\t$login_data = array(\n\t\t\t\t\t'id_user' => $this->user_detail->id_user,\n\t\t\t 'nik' => $post['nik'],\t\t\n\t\t\t 'nama_user' => $this->user_detail->nama_lengkap,\n\t\t\t 'group' => $this->user_detail->group,\n\t\t\t 'email' => $this->user_detail->email,\t \n\t\t\t 'logged_in' => TRUE,\n\t\t\t 'last_login' => date('Y m d')\n\t\t\t);\t\t\t\t\t\t\n\n\t\t\t$this->session->set_userdata($login_data);\n\n\t\t\tif(isset($post['remember']) ){\n\t\t\t\t$expire = time() + (86400 * 7);\n\t\t\t\tset_cookie('nik', $post['nik'], $expire , \"/\");\n\t\t\t\tset_cookie('password', $post['password'], $expire , \"/\" );\n\t\t\t}\n\t\t\t\n\t\t\tredirect(set_url('dashboard'));\n }\n }", "function shopLogin()\r\n\t{\r\n\t\t$tpl_dir = BASE_DIR . \"/modules/login/templates/\";\r\n\t\t$lang_file = BASE_DIR . \"/modules/login/lang/\" . STD_LANG . \".txt\";\r\n\r\n\t//\t$login = new Login;\r\n\r\n\t\tif(!isset($_SESSION[\"cp_benutzerid\"]))\r\n\t\t\treturn $this->displayLoginform($tpl_dir,$lang_file);\r\n\t\telse\r\n\t\t\treturn $this->displayPanel($tpl_dir,$lang_file);\r\n\t}", "public function login(){\n echo $this->name . ' logged in';\n }", "public function actionLogin() {\n \n }", "function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db for this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the database, it means login failed\n if(!$token) {\n\n # Send them back to the login page\n Router::redirect(\"/users/login/error\");\n\n # But if we did, login succeeded! \n } else {\n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+1 year'), '/');\n\n # update the last_login time for the user\n/* $_POST['last_login'] = Time::now();\n\n $user_id = DB::instance(DB_NAME)->update('users', $_POST); */\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n }\n }", "function login() {\n \n $request = \\Slim\\Slim::getInstance()->request();\n $data = json_decode($request->getBody());\n \n try {\n \n $db = getDB();\n $userData ='';\n $sql = \"SELECT user_id, name, email, username, surname, mobile, id, gender, address, province, language FROM users WHERE (mobile=:mobile or email=:mobile) and password=:password \";\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"mobile\", $data->mobile, PDO::PARAM_STR);\n $password=hash('sha256',$data->password);\n $stmt->bindParam(\"password\", $password, PDO::PARAM_STR);\n $stmt->execute();\n $mainCount=$stmt->rowCount();\n $userData = $stmt->fetch(PDO::FETCH_OBJ);\n \n if(!empty($userData))\n {\n $user_id=$userData->user_id;\n $userData->token = apiToken($user_id);\n }\n \n $db = null;\n if($userData){\n $userData = json_encode($userData);\n echo '{\"userData\": ' .$userData . '}';\n } else {\n echo '{\"error\":{\"text\":\"Bad request wrong username and password\"}}';\n }\n\n \n }\n catch(PDOException $e) {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}';\n }\n}", "private function assign_auth_values(){\n\t\t$is_authenticated = AuthManager::is_authenticated();\n\t\t$this->assign('batl_is_logged', $is_authenticated);\n\t\tif($is_authenticated && $this->is_db_available()){\n\t\t\t// check if logged in local server\n\t\t\t$this->assign('batl_is_admin', AuthManager::is_current_user_admin());\n\t\t\t$this->assign('batl_current_user', AuthManager::get_user_infos());\n\n\t\t}else{\n\t\t\t// check if logged in on FB\n\t\t\t/*$facebook_manager = new FacebookService();\n\t\t\t$batl_current_user = AuthManager::get_user_profile($facebook_manager);\n\t\t\t$this->assign('batl_current_user', $batl_current_user);\n\t\t\t$this->assign('fbloginouturl', AuthManager::get_loginout_url($facebook_manager,$batl_current_user));*/\n\t\t}\n\t}", "public function userLogin(){\n\t\t\tif (isset($_POST['user_name']) && isset($_POST['password'])){\n\t\t\t\t$response = $this->model->getUser(\"*\", \"user_name = \".\"'\".$_POST['user_name'].\"'\");\n\t\t\t\t$response = $response[0];\n\t\t\t\t$user_rol = null;\n\t\t\t\t//The user is valid\n\t\t\t\tif ($response['password']==$_POST['password']) {\n\t\t\t\t\t//Verify the roles\n\t\t\t\t\t$response_role = $this->model->getRoles(\"user_id = '\".$response['_id'].\"'\");\n\t\t\t\t\tif (count($response_role)>1) {\n\t\t\t\t\t\t//Multipage user\n\t\t\t\t\t\t$user_rol = array();\n\t\t\t\t\t\tforeach ($response_role as $value) {\n\t\t\t\t\t\t\tarray_push($user_rol, $value['role']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (in_array('ADMIN', $user_rol)) { \n\t\t\t\t\t\t\t$_SERVER['PHP_AUTH_USER'] = $_POST['user_name'];\n \t\t\t\t\t$_SERVER['PHP_AUTH_PW'] = $_POST['password'];\n \t\t\t\t\t$_SERVER['AUTH_TYPE'] = \"Basic Auth\"; \n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$user_rol = $response_role[0]['role'];\n\t\t\t\t\t\tif ($user_rol == 'ADMIN') {\n\t\t\t\t\t\t\t$_SERVER['PHP_AUTH_USER'] = $_POST['user_name'];\n \t\t\t\t\t$_SERVER['PHP_AUTH_PW'] = $_POST['password'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->createSession($response['user_name'], $user_rol);\n\t\t\t\t\techo 1;\n\t\t\t\t}\n\t\t\t \n\t\t\t}\n\t\t}", "function loggedin_data()\n {\n\n\n try {\n\n if (isset($_REQUEST['AuthToken'])) {\n $AuthToken = $_REQUEST['AuthToken'];\n } else {\n $AuthToken = '';\n }\n \n $masterloging = DB::table('master_token')->select('master.id', 'master.fname', 'master.lname', 'master.email', 'master_token.token', 'master_token.expires_at')->join(\"master\", \"master.id\", '=', 'master_token.master_id')->where('token', $AuthToken)->where('expires_at', '>', date('Y-m-d H:i:s'))->first();\n $setting = DB::table('setting')->first();\n\n if (isset($masterloging->id)) {\n return response([\n 'message' => \"Successfully Login\",\n 'token' => $masterloging->token,\n 'user' => $masterloging,\n 'setting' => $setting,\n 'expires_at' => $masterloging->expires_at,\n 'server_time_at_now' => date('Y-m-d H:i:s'),\n ], 200);\n } else {\n return response([\n 'message' => \"Token Expired\",\n 'status' => 'TokenExpired',\n 'server_time_at_now' => date('Y-m-d H:i:s'),\n\n ], 400);\n }\n } catch (Exception $e) {\n return response([\n 'message' => $e->getMessage(),\n 'ball' => 'chater problem'\n ], 400);\n }\n }", "public function getLoginAfterRegistration();", "public function login(){\n \n $this->data[\"title_tag\"]=\"Lobster | Accounts | Login\";\n \n $this->view(\"accounts/login\",$this->data);\n }", "public function authHospital(){\n\n\t}" ]
[ "0.6863907", "0.6863907", "0.6863907", "0.6823112", "0.67430097", "0.6727759", "0.6727759", "0.671942", "0.6654", "0.6616035", "0.6603831", "0.6592929", "0.6589889", "0.6489692", "0.6480355", "0.6447294", "0.643399", "0.6421071", "0.64206177", "0.6413082", "0.6336544", "0.6333948", "0.6328738", "0.6328124", "0.6312735", "0.6301003", "0.6280296", "0.6280296", "0.62714964", "0.6242931", "0.62385947", "0.62022793", "0.619647", "0.6192102", "0.6184403", "0.6183193", "0.61807376", "0.61793494", "0.61786765", "0.6178578", "0.6178314", "0.61763734", "0.6167874", "0.6167874", "0.61544013", "0.615206", "0.6141149", "0.6135084", "0.6126437", "0.61154276", "0.6113578", "0.6111583", "0.6110244", "0.61086863", "0.61011493", "0.60961497", "0.60952383", "0.6084244", "0.6080271", "0.6077555", "0.6077555", "0.6077555", "0.6077555", "0.6077555", "0.6077555", "0.6077555", "0.6077555", "0.60767025", "0.60732067", "0.60732067", "0.60732067", "0.60732067", "0.60732067", "0.60732067", "0.60732067", "0.6067788", "0.6066908", "0.60633767", "0.60581005", "0.6055834", "0.6052649", "0.6045082", "0.604383", "0.6040294", "0.60402215", "0.6037138", "0.60312617", "0.6027725", "0.6016091", "0.6013784", "0.6013767", "0.6012628", "0.60106623", "0.600654", "0.600422", "0.60028595", "0.60013497", "0.5994055", "0.59795594", "0.59744555", "0.5974168" ]
0.0
-1
fungsi untuk menulis log
function writeLog($text) { $file = fopen("../log.txt", "a+") or die("Unable to open file!"); fwrite($file, $text . "\n"); fclose($file); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function log() {\n }", "public function log($log);", "public function log($log) {\n //$this->log = $log;\n }", "function log()\n {\n }", "public function log()\n {\n $this->appendLog('log', \\func_get_args());\n }", "function changeLogs() {\n\n }", "function log($cxn,$class,$id,$folder=NULL)\r\n {\r\n \r\n }", "public function getLog();", "public function log($msg)\n {\n }", "function account_log()\n {\n }", "public function addLog($data);", "function ilog(){\r\n\t\tif($this->input['action'] != 'mylog'){\r\n\t\t\tif($this->vars['logSavePage'] == 1) $logSavePage = addslashes(serialize($this->page));\r\n\t\t\t// user log\r\n\t\t\t$this->DB->query(\"\r\n\t\t\t\tINSERT INTO `log` (`userid` , `title` , `area` , `module` , `action` , `id` , `ip` , `kinput` , `page` , `dateline`)\r\n\t\t\t\tVALUES (\r\n\t\t\t\t'\".$this->user['userid'].\"', '\".$this->page['title'].\"', '\".$this->vars['area'].\"', '\".$this->input['module'].\"', '\".$this->input['action'].\"', '\".$this->iif($this->input[$this->input['module'].'id'] > 0, $this->input[$this->input['module'].'id'], 0).\"', '\".IP.\"', '\".serialize($this->input).\"', '\".$logSavePage.\"', '\".TIMENOW.\"'\r\n\t\t\t\t)\r\n\t\t\t\");\r\n\t\t}\r\n\t}", "public static function logging()\n {\n }", "public function log(){\n\t\t$args = $this->getArgs();\n\t\t$uid = $_SESSION[\"user\"][\"uid\"];\n\t\t$base_url = substr($_SERVER[\"REQUEST_URI\"], 0, strrpos($_SERVER[\"REQUEST_URI\"], \"/\") + 1);\n\t\t$header = array(\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LOG_LIST_HEADER_TIME)),\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LOG_LIST_HEADER_VALUE))\n\t\t);\n\t\t\n\t\t$config = array(\n\t\t\t\t\"config\" => array(\n\t\t\t\t\t\t\"page\" => (isset($args[\"GET\"][\"page\"]) ? $args[\"GET\"][\"page\"] : System::PAGE_ACTUAL_DEFAULT),\n\t\t\t\t\t\t\"column\" => (isset($args[\"GET\"][\"column\"]) ? $args[\"GET\"][\"column\"] : System::SORT_DEFAULT_COLUMN),\n\t\t\t\t\t\t\"direction\" => (isset($args[\"GET\"][\"direction\"]) ? $args[\"GET\"][\"direction\"] : System::SORT_DES),\n\t\t\t\t\t\t\"actual_pagesize\" => (isset($_SESSION[\"page_size\"]) ? $_SESSION[\"page_size\"] : System::PAGE_SIZE_DEFAULT),\n\t\t\t\t\t\t\"data_count\" => $this->getModel()->getCountLogList($uid),\n\t\t\t\t\t\t\"disable_menu\" => true,\n\t\t\t\t\t\t\"disable_select\" => true,\n\t\t\t\t\t\t\"disable_pagging\" => false,\n\t\t\t\t\t\t\"disable_set_pagesize\" => false\n\t\t\t\t),\n\t\t\t\t\"form_url\" => array(\n\t\t\t\t\t\t\"page\" => $base_url . \"-%d-%d-%s\",\n\t\t\t\t\t\t\"header_sort\" => $base_url . \"-%d-%d-%s\",\n\t\t\t\t\t\t\"form_action\" => $base_url\n\t\t\t\t),\n\t\t\t\t\"item_menu\" => array(),\n\t\t\t\t\"select_item_action\" => array(),\n\t\t\t\t\"style\" => array(\n\t\t\t\t\t\t\"marked_row_class\" => \"marked\",\n\t\t\t\t\t\t\"count_box_class\" => \"count_box\",\n\t\t\t\t\t\t\"pagging_box_class\" => \"pagging_box\",\n\t\t\t\t\t\t\"actual_page_class\" => \"actual_page\",\n\t\t\t\t\t\t\"table_header_class\" => \"head\",\n\t\t\t\t\t\t\"table_id\" => \"user_log\",\n\t\t\t\t\t\t\"select_form_id\" => \"\",\n\t\t\t\t\t\t\"pagesize_form_id\" => \"pagesize_box\",\n\t\t\t\t\t\t\"list_footer_id\" => \"\"\n\t\t\t\t)\n\t\t);\n\t\t$data = $this->getModel()->getLogList($uid, $config[\"config\"][\"page\"], $config[\"config\"][\"actual_pagesize\"], $config[\"config\"][\"column\"], $config[\"config\"][\"direction\"], $config[\"config\"][\"disable_pagging\"]);\n\t\t$out = Paginator::generatePage($header, $data, $config);\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}", "function ttp_lms_log( $tag = \"\", $msg = \"\") {\n\tlog( $tag, $msg );\n}", "public function logs($id);", "public function log($text)\n {\n }", "private function add_log($log) {\n $this->log .= \" \" . $log;\n }", "protected function _initLog()\n {\n }", "function logge($message, $type=INFO, $dateiName=\"\", $methodName=\"\") {\n\n $str = date(\"Y.m.d H:i:s\") . \" \" . $type;\n\n if ($dateiName !=\"\" || $methodName != \"\") {\n $str .= \"(\";\n if ($dateiName != \"\") {\n $str .= \"File: \" . $dateiName . \" \";\n }\n if ($methodName != \"\") {\n $str .= \"Methode: \" . $methodName;\n }\n $str .= \")\";\n }\n $str .= \": \" . $message . \"\\n\\r\";\n\n if (isset($_ENV[\"LOGFILE\"]) && $_ENV[\"LOGFILE\"] != '') {\n $fd = fopen($_ENV[\"LOGFILE\"], \"a\");\n\n fwrite($fd, $str);\n fclose($fd);\n } else {\n echo \"LOGFILE ist nicht bekannt, um Meldungen in die Log-Datei zu schreiben.<br>\\n\";\n echo $str;\n }\n\n}", "public function log_info($attr)\r\n {\r\n try\r\n {\r\n $logindata=$this->session->userdata(\"admin_loggedin\");\r\n return $this->write_log($attr[\"msg\"],decrypt($logindata[\"user_id\"]),($attr[\"sql\"]?$attr[\"sql\"]:\"\"));\r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n } \r\n }", "public function log_info($attr)\r\n {\r\n try\r\n {\r\n $logindata=$this->session->userdata(\"admin_loggedin\");\r\n return $this->write_log($attr[\"msg\"],decrypt($logindata[\"user_id\"]),($attr[\"sql\"]?$attr[\"sql\"]:\"\"));\r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n } \r\n }", "public function log_info($attr)\r\n {\r\n try\r\n {\r\n $logindata=$this->session->userdata(\"admin_loggedin\");\r\n return $this->write_log($attr[\"msg\"],decrypt($logindata[\"user_id\"]),($attr[\"sql\"]?$attr[\"sql\"]:\"\"));\r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n } \r\n }", "function log()\n\t{\n\t\tcall_user_func_array(array($this->server, 'log'), func_get_args());\n\t}", "public function logData() {\n\t\t/* Implement in subclasses */\n\t}", "function logMe($comment, $status_id = 0, $data = array(), $update_process = 0) {\n\n if (!class_exists('systemToolkit')) {\n return; // not loaded (cache fix)\n }\n $toolkit = systemToolkit::getInstance();\n $centerLogMapper = $toolkit->getMapper('log', 'log');\n\n if(count($data)) {\n ob_start();\n $i = 1;\n foreach($data as $d) {\n var_dump($d);\n if($i < count($data)) {\n echo \"<br />===<br />\";\n }\n $i++;\n }\n $err_content = ob_get_contents();\n ob_end_clean();\n $comment .= \"<br />{$err_content}\";\n }\n\n $log = $centerLogMapper->create();\n $log->setTime(new SQLFunction('UNIX_TIMESTAMP'));\n $log->setModule($toolkit->getRequest()->getModule());\n $log->setAction($toolkit->getRequest()->getAction());\n $log->setComment($comment);\n $log->setStatus($status_id);\n if ($user = systemToolkit::getInstance()->getUser()) {\n $log->setUser($user);\n }\n if ($update_process) {\n $log->setProcessId($update_process);\n }\n $centerLogMapper->save($log);\n}", "public function index($log_date = NULL){\n // print_r(log_message('info','se ingresa dato al log'));\n //var_dump($this->session->userdata('NameUser'));\n $log_date = \"2019-02-15\";\n $this->load->library('log_library');\n if ($log_date == NULL)\n {\n // default: today\n $log_date = date('Y-m-d');\n }\n $data['cols'] = $this->log_library->get_file('log-'. $log_date . '.php');\n $data['log_date'] = $log_date;\n\t$this->load->view('log_view', $data);\n }", "protected function AutoLog(){\r\n \r\n //DEPRECATED for test\r\n \r\n }", "function CDFLog()\n\t{\n\t\t// ** Aktivierung der Logfunktionalitaet **\n\t\t// ########################################\n\t\t$this->m_enable = true;\n\t\t// ########################################\n\t\tif ($this->m_enable)\n\t\t{\t\t\t\n\t\t\t// Basispfad der Logdateien\n\t\t\t$this->m_base = \"./\";\n\t\t\t// Unterordner der Logdateien\n\t\t\t$this->m_sub = \"Logfiles/\";\n\t\t\t// Dateiname der Logdatei: YYYY_MM_DD_PHP.log\n\t\t\t$this->m_fileNameTemplate = \"20%02u_%02u_%02u_PHP.log\";\n\t\t\t// Die Verwaltungsroutine fuer die automatische Loeschung\n\t\t\t// Aelterer Dateien geht davon aus, dass der Dateiname\n\t\t\t// mit dem Datumsstempel beginnt.\n\t\t\t$this->m_fileNameTemplateMatch = \"^20[0-9]{2}_[0-9]{2}_[0-9]{2}_PHP.log\";\n\t\t\t// Aktuellen Dateiname der Logdatei erstellen\n\t\t\t$t = time();\n\t\t\t$ltm = localtime($t, 1);\n\t\t\t$this->m_fileName = sprintf($this->m_fileNameTemplate, \n\t\t\t\t$ltm[\"tm_year\"] % 100, $ltm[\"tm_mon\"] + 1, $ltm[\"tm_mday\"]);\n\t\t\t// Loeschen von Dateien die aelter sind als m_eraseFilesCount Logtage\n\t\t\t$this->m_eraseFilesEnable = true;\n\t\t\t// Anzahl zu haltender Logdateien (in Tagen)\n\t\t\t$this->m_eraseFilesCount = 5;\n\t\t\t// Zeichenfolge fuer einen Zeilenumbruch\n\t\t\t$this->m_crLf = \"\\r\\n\";\n\t\t\t// Automatische Einfuegung eines Zeitstempels vor jedem Logeintrag\n\t\t\t$this->m_withTimestamp = true;\n\t\t\t// Pruefen ob der Logpfad existiert.\n\t\t\tif (!is_dir($this->m_base . $this->m_sub))\n\t\t\t{\t\n\t\t\t\tif (!mkdir($this->m_base . $this->m_sub))\n\t\t\t\t{\n\t\t\t\t\t// Logsystem wegen Fehlschlag abstellen\n\t\t\t\t\t$this->m_enable = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Pruefung fuer eraseFile durchfuehren\n\t\t\t$this->logCheckOnWorkDate();\n\t\t}\n\t}", "private function send_log() {\n MessageLogger::add_log($this->log);\n $this->log = \"\";\n }", "function debuglog($numero,$texto,$errfile, $errline){\n global $conn;\n\n\n if(DEBUG==1) {\n\n ## VARIAVEIS DE CONFIG\n if (!isset($_SESSION['user'])) {\n $userdata = array(\n 'id' => '',\n 'nome' => '',\n 'ip' => $_SERVER['REMOTE_ADDR'],\n 'useragent' => $_SERVER['HTTP_USER_AGENT']\n );\n\n foreach($userdata as $k=>$v) {\n $log[$k]=$v;\n }\n\n } else {\n\n foreach($_SESSION['user'] as $k=>$v) {\n $log[$k]=$v;\n }\n\n }\n\n # se DEBUG_LOG nao for vazio vai gravar no arquivo de log\n if (DEBUG_LOG<>'') {\n $ddf = fopen(DEBUG_LOG,'a');\n fwrite($ddf,\"\".date(\"r\").\": [$numero] $texto $errfile $errline \\r\\n [$log[id]]$log[nome] - $log[ip], $log[useragent] \\r\\n\\r\\n\");\n fclose($ddf);\n }\n\n }\n\n}", "function WriteLog($s) {\r\n}", "function show_log()\n\t{\n\t\t$options = array();\n\t\tif($this->input->get_post(\"kTeach\")){\n\t\t\t$options[\"kTeach\"] = $this->input->get_post(\"kTeach\");\n\t\t}\n\n\t\tif($this->input->get_post(\"username\")){\n\t\t\t$options[\"username\"] = $this->input->get_post(\"username\");\n\t\t}\n\n\t\tif($this->input->get_post(\"action\")){\n\t\t\t$options[\"action\"] = $this->input->get_post(\"action\");\n\t\t}\n\n\t\tif($this->input->get_post(\"time_start\") && $this->input->get_post(\"time_end\")){\n\t\t\t$time_start = $this->input->get_post(\"time_start\");\n\t\t\t$time_end = $this->input->get_post(\"time_end\");\n\t\t\t$time_end .= \" 23:59:59\";// make the end time the end of the same day\n\t\t\t$options[\"date_range\"][\"time_start\"] = $time_start;\n\t\t\t$options[\"date_range\"][\"time_end\"] = $time_end;\n\t\t}\n\n\t\t$data[\"header\"] = array(\"username\",\"timestamp\",\"action\");\n\t\t$data[\"logs\"] = $this->auth_model->get_log($options);\n\t\t$data[\"options\"] = $options;\n\t\t$data[\"target\"] = \"admin/log\";\n\t\t$data[\"title\"] = \"User Log\";\n\t\t$this->load->view(\"page/index\",$data);\n\t}", "public function log() {\r\n\t\t$this->resource->log();\r\n\t}", "public function log()\n {\n $this->fetchFields();\n Log::console($this);\n }", "public function log($message) {\n }", "public function log($message) {\n }", "public function log($message) {\n }", "abstract public function log( $message );", "function log($content=\"\",$loglevel = \"\") {\n\t// si esta desactivado, salimos\n\t//echo \"Veamos: \" .$this->LogFile. \" y \" .$this->LogLevel.\"<br>\"; // DEBUG\n\n\tif (!$this->LogLevel) return;\n\t \n\t// abrimos el fichero\n\t$file = fopen($this->LogFile,\"a\");\n\t$cn = \"<log date='\" . date(\"j-m-Y G:i:s\") . \"'>$content</log>\\n\";\n\t\n\tfputs($file, $cn);\n\t//Cerramos fichero\n\tfclose($file);\n }", "function log1($msg)\n{\n if(WRITE_LOG == false)\n return;\n date_default_timezone_set('Europe/Vienna');\n $now = date(\"Y-m-d H:i:s\");\n $line = sprintf(\"%s => %s\\r\\n\", $now, $msg);\n file_put_contents(LOG_FILE, $line, FILE_APPEND);\n}", "protected function log($msg, $level = 'Info'){\n// if ($msg != false) {\n// $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);\n// \n// if (isset($logfunction) && $logfunction != '' && function_exists($logfunction)){\n// switch ($level){\n// case('Info'): $loglevel = LOG_INFO; break; \n// case('Throttle'): $loglevel = LOG_INFO; break; \n// case('Warning'): $loglevel = LOG_NOTICE; break; \n// case('Urgent'): $loglevel = LOG_ERR; break; \n// default: $loglevel = LOG_INFO;\n// }\n// call_user_func($logfunction,$msg,$loglevel);\n// }\n// \n// \n// if(isset($userName) && $userName != ''){ \n// $name = $userName;\n// }else{\n// $name = 'guest';\n// }\n// \n// if(isset($backtrace) && isset($backtrace[1]) && isset($backtrace[1]['file']) && isset($backtrace[1]['line']) && isset($backtrace[1]['function'])){\n// $fileName = basename($backtrace[1]['file']);\n// $file = $backtrace[1]['file'];\n// $line = $backtrace[1]['line'];\n// $function = $backtrace[1]['function'];\n// }else{\n// $fileName = basename($backtrace[0]['file']);\n// $file = $backtrace[0]['file'];\n// $line = $backtrace[0]['line'];\n// $function = $backtrace[0]['function'];\n// }\n// if(isset($_SERVER['REMOTE_ADDR'])){\n// $ip = $_SERVER['REMOTE_ADDR'];\n// if($ip == '127.0.0.1')$ip = 'local';//save some char\n// }else{\n// $ip = 'cli';\n// }\n// if (!file_exists($this->logpath)) {\n// //attempt to create the file if it does not exist\n// file_put_contents($this->logpath, \"This is the Amazon log, for Amazon classes to use.\\n\");\n// }\n// if (file_exists($this->logpath) && is_writable($this->logpath)){\n// $str = \"[$level][\" . date(\"Y/m/d H:i:s\") . \" $name@$ip $fileName:$line $function] \" . $msg;\n// $fd = fopen($this->logpath, \"a+\");\n// fwrite($fd,$str . \"\\r\\n\");\n// fclose($fd);\n// } else {\n// throw new Exception('Error! Cannot write to log! ('.$this->logpath.')');\n// }\n// } else {\n// return false;\n// }\n }", "abstract public function logData( $data );", "function jx_log() {\n header('Content-Type: application/json; charset=utf-8');\n\n $msg = (isset($_POST['msg'] )) ? ( (!empty($_POST['msg'] )) ? $_POST['msg'] : false ) : false;\n $type = (isset($_POST['type'])) ? ( (!empty($_POST['type'])) ? $_POST['type'] : 'ajax' ) : 'ajax';\n\n // all saving already happens in respond(), so no need to double it\n if($msg) toLog($msg,'ajax');\n else respond('false', 'logged with empty msg');\n }", "public function get_logs()\n {\n }", "private static function logging()\n {\n $files = ['Handler', 'Exception', 'Log'];\n $folder = static::$root.'Logging'.'/';\n\n self::call($files, $folder);\n }", "public function withLog($entry);", "function write_log($log) {\n $orderLog = new Logger('order');\n $orderLog->pushHandler(new StreamHandler(storage_path('logs/frontend.log')), Logger::INFO);\n $orderLog->info('OrderLog', $log);\n}", "public function writeLog()\n {\n $redis = self::getClient();\n $redis ->lPush('admin_log',$this->data);\n }", "function writeLog($string){\n}", "private function log($message) {\n //echo $message . \"\\n\";\n }", "public function logs()\n {\n $this->_display('logs');\n }", "function trace_log()\n {\n $messages = func_get_args();\n\n foreach ($messages as $message) {\n $level = 'info';\n\n if ($message instanceof Exception) {\n $level = 'error';\n }\n elseif (is_array($message) || is_object($message)) {\n $message = print_r($message, true);\n }\n\n Log::$level($message);\n }\n }", "public function log($data){\n\n $type = \"\";\n\n switch($data[\"severity\"]){\n case 0: $type = \"INFORMATION\";\n break;\n case 1: $type = \"WARNING\";\n break;\n case 2: $type = \"ERROR\";\n break;\n default: $type = \"FATAL\";\n break;\n }\n\n\n $data[\"userid\"] = $this->user[\"userid\"];\n $data[\"msg_type\"] = $type;\n $data[\"api_version\"] = \"v100\";\n $data[\"recd\"] = json_encode(Input::all());\n $data[\"server\"] = gethostname();\n\n $log = new Log($data);\n $log->save();\n }", "public function log($obj);", "function addUserLog($content='无内容',$base='pc',$uid='',$uname=''){\r\n}", "function Homelog($user_name,$action,$class_name,$class_obj,$result){\n if(empty($user_name)||empty($action)||empty($class_name)||empty($class_obj)||empty($result)){\n return false;\n }\n $data=array(\n \"user_name\"=>$user_name,\n \"action\"=>$action,\n \"class_name\"=>$class_name,\n \"class_obj\"=>$class_obj,\n \"result\"=>$result,\n \"op_time\"=>time()\n );\n $res=M(\"Sys_log\")->add($data);\n return $res;\n}", "function logger($str)\r\n\t\t{\r\n\t\t\t//write log\r\n\t\t\t$log = $str = '' ? PHP_EOL : '[' . date('Y-m-d H:i:s') . '] ' . $str . PHP_EOL;\r\n\t\t\tfile_put_contents('patcher.log', $log, FILE_APPEND | LOCK_EX);\r\n\t\t}", "function logger($message)\n\t\t{\n\t\t\t$requester=$_SERVER['REMOTE_ADDR'];\n\t\t\t$log = new Logging();\n\t\t\t$log->logfile('./'.$this->aps->id.'.log');\n\t\t\t$log->logwrite($requester.\":\".$message);\n\t\t\t$log->logclose();\n\t\t}", "private function Log($msg) {\n// error_log( '[LOG] '.$msg);\n\t}", "private function do_log($log_type, $log_line='') {\n\t\tswitch ($log_type) {\n\t\t\tcase 'auth_code':\n\t\t\t\t$currDay = date('Y-m-d', time());\n\t\t\t\t$log_file = self::LOG_PATH.\"auth_code_{$currDay}.log\";\n\n\t\t\t\t$time = date('Y-m-d H:i:s', time());\n\t\t\t\t$log = \"[$time][$log_line]\\n\";\n\t\t\t\tfile_put_contents($log_file, $log, FILE_APPEND);\n\t\t\t\tbreak;\n\t\t}\n\t\treturn;\n\t}", "public function log()\n {\n $user = new UserManager;\n $request = new Request;\n $errorMessage = '';\n $method = $request->getMethode();\n // check if the user are loged \n $userSession = $this->request->getSession('user');\n if ($userSession != '') {\n return $this->render('user/index.html.twig', ['user' => $userSession]);\n }\n\n if ($method == \"POST\") {\n $mailUser = $request->getPost('mail');\n $password = $request->getPost('mdp');\n $hashPassword = hash(\"sha256\", $password);\n $response = $user->checkMail($mailUser);\n \n if ($response) {\n if ($response['pass'] == $hashPassword) {\n $userSesssion = [];\n $errorMessage = 'Vous êtes connecté avec succés ';\n $userSesssion['role'] = $response['role'];\n $userSesssion['mail'] = $response['mail'];\n $userSesssion['userName'] = $response['user_Name'];\n $request->newSession('user', $userSesssion);\n return $this->log();\n } else {\n $errorMessage = 'L\\'association mot de passe, email est incorrect ';\n }\n } else {\n $errorMessage = 'L\\'association mot de passe, email est incorrect ';\n }\n return $this->render('user/login.html.twig', ['errorMessage' => $errorMessage]);\n }\n\n return $this->render('user/login.html.twig', ['errorMessage' => $errorMessage]);\n }", "public static function initSysLog() {}", "public function firstlog()\n\t{\n\t\t$this->load->view('newlog');\n\t}", "function logToFile($arg1=\"\", $arg2=\"\",$arg3=\"\",$arg4=\"\",$arg5=\"\",$arg6=\"\"){\n\n\t$time = date(\"Y-m-d H:i:s\");\n\t\n\t$date = date(\"Y-m-d\");\n\t\n\t$str = \" $time \\t $arg1 \\t $arg2 \\t $arg3 \\t $arg4 \\t $arg5 \\t $arg6 \\t \\n\"; \n\t\n\terror_log(\"$str\\n\", 3, 'log/test_MoveProspectAccounts_'.$date.'.log'); \n\n}", "function logheader() {\n $str = \"\\n=============================\"\n .\"======================================\";\n $str .= \"\\n============================ \"\n .\"logrecord ============================\";\n $str .= \"\\nstartlogrecord timestamp : \".date(\"Y-m-d H:i:s\",time()).\"\\n\";\n\n $this->prn($str);\n// fwrite($this->fp, $str.\"\\n\");\n }", "public function log() {\n // data we are going to log\n $variables = func_get_args();\n $trace = debug_backtrace(null, 1);\n Yii::info(VarDumper::dump($this));\n $this->debugInternal($variables, $trace);\n }", "private static function addLog($msg) {\n\t\tself::$log[] = '\"'.formatTimestamp(time()).' - '.$msg.'\"';\n\t}", "private static function log($message)\n\t{\n\t}", "function publishLog() {\n\t\t$id = $this->current_log;\t\t\n\t\t$res = $this->query(\"SELECT event_id FROM $this->table_log WHERE id=$id\");\n\t\t$row = $res->fetch_assoc();\n\t\t$cal_id = explode(\",\",$row['event_id']);\n\t\t$calEvent = $this->calendar_instance->getEventDetails($row['event_id']);\n\t\t$topic = $calEvent['caption'];\n\t\t$year = $calEvent['year'];\n\t\t$slug = $calEvent['slug'];\n\t\t$url = $this->generateCoolURL(\"/$year/$slug\");\n\t\t$this->addToActivityLog(\"publiserte logg fra <a href=\\\"$url\\\">$topic</a>.\",false,\"major\");\n\t}", "protected function printLogMgm() {}", "public function log()\n {\n $output = new Output(Output::MODE_FILE, $this->getLogPath());\n $output->open();\n foreach (func_get_args() as $argument) {\n $output->dump($argument);\n }\n $output->close();\n }", "private static function _initLog()\n {\n if (!empty(self::$config->log->servers)) {\n $servers = self::$config->log->servers->toArray();\n } else {\n $servers = self::LOG_SERVERS;\n }\n\n if (php_sapi_name() == 'cli') {\n $extra = [\n 'command' => implode(' ', $_SERVER['argv']),\n 'mem' => memory_get_usage(true),\n ];\n } elseif (isset($_REQUEST['udid'])) {\n //for app request\n $extra = [\n 'h' => $_SERVER['HTTP_HOST'] ?? '',\n 'uri' => $_SERVER['REQUEST_URI'] ?? '',\n 'v' => $_REQUEST['v'] ?? '',\n 'd' => $_REQUEST['udid'] ?? '',\n 't' => $_REQUEST['mytoken'] ?? $_REQUEST['mytoken_sid'] ?? '',\n 'os' => $_REQUEST['device_os'] ?? '',\n 'm' => $_REQUEST['device_model'] ?? '',\n 'p' => $_REQUEST['platform'] ?? '',\n 'l' => $_REQUEST['language'] ?? '',\n 'real_ip' => \\Util::getClientIp(),\n ];\n } else {\n //pc or other ?\n $extra = [\n 'h' => $_SERVER['HTTP_HOST'] ?? '',\n 'uri' => $_SERVER['REQUEST_URI'] ?? '',\n 'v' => $_REQUEST['v'] ?? '',\n 't' => $_REQUEST['mytoken'] ?? $_REQUEST['mytoken_sid'] ?? '',\n 'p' => $_REQUEST['platform'] ?? '',\n 'l' => $_REQUEST['language'] ?? '',\n 'ua' => $_SERVER['HTTP_USER_AGENT'] ?? '',\n 'real_ip' => \\Util::getClientIp(),\n ];\n }\n\n if (\\Yaf\\ENVIRON != 'product') {\n \\Log::setLogFile(self::$config->log->path);\n }\n\n LoggerHandler::setServers($servers);\n LoggerHandler::setEnv(\\YAF\\ENVIRON);\n LoggerHandler::setExtra($extra);\n LoggerHandler::setUniqueId($_REQUEST['preRequestId'] ?? self::$request->header('preRequestId'));\n }", "function _log($message)\n{\n\tfwrite($GLOBALS['logfile'], date(\"Y-m-d H:i:s :: \", time()) . $message . \"\\n\");\n}", "function update_log($msg)\r\n\t{\r\n\t\tglobal $LEA_REP;\r\n\r\n\t\t$rep = $LEA_REP.'log/';\r\n\r\n\t\tif(file_exists($rep.$this->id_usager.'.log')){\r\n\t\t\t$fp = fopen($rep.$this->id_usager.'.log', \"a\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$fp = fopen($rep.$this->id_usager.'.log', \"a\");\r\n\t\t\tfwrite($fp, \"********************************************************\\r\\n\\r\\n\");\r\n\t\t\tfwrite($fp, \"Fichier log de : \".$this->civilite.\" \".$this->nom.\" \".$this->prenom.\" du profil : \".$this->profil.\"\\r\\n\\r\\n\");\r\n\t\t\tfwrite($fp, \"********************************************************\\r\\n\\r\\n\");\r\n\t\t}\r\n\r\n\t\tfwrite($fp, $msg);\r\n\t}", "private function zlog($msg = null) {\r\n\t\t\r\n\t\t// Evito di loggare se l'ho già fatto\r\n\t\tif (self::$logged !== TRUE) {\r\n\t\t\t// Verifica necessaria ad evitare loop infiniti\r\n\t\t\t// e coerenza semantica\r\n\t\t\t$class = get_class($this->owner);\r\n\t\t\tif ($class !== 'Log'\r\n\t\t\t\t\t\t\t&& $class !== 'DataObject'\r\n\t\t\t\t\t\t\t&& $this->owner instanceof DataObject) {\r\n\r\n\t\t\t\t// Creo il Log\r\n\t\t\t\t$log = new Log();\r\n\t\t\t\t$log->doLog($msg, $this->owner);\r\n\t\t\t\tself::$logged = TRUE;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function logfile_init() { \n if ($this->LOGGING) { \n $this->FILE_HANDLER = fopen($this->LOGFILE,'a') ; \n $this->debug(); \n } \n }", "function _log($text,$level=10) {\n if($this->logger) call_user_func($this->logger, $text, $level);\n }", "abstract public function load_logger();", "function log($str)\n\t{\n\t\tif($this->enable_log)\n\t\t{\n\t\t\techo \"$str<br>\\n\";\n\t\t}\n\t}", "function hlog($msg,$logfile,$setperm=false,$sethost=false,$levelstr=NULL)\n{\n\n\t\tdate_default_timezone_set(DEFAULT_TIME_ZONE);\n\t\t$today = date(\"Y-m-d\");\n\n\t\tif($sethost)\n\t\t{\n\t\t\t$hostname = gethostname();\n\t\t\t$logfile = $logfile.'_'.$hostname;\n\t\t}\n\n\t\t$filename = VBOXLITE_LOG_LOCATION.$logfile.'_'.$today.'.csv';\n\n\t\tif (file_exists($filename)){\n\t\t\tif($setperm)\n\t\t\t{\n\t\t\t\tchmod($filename,0777);\n\t\t\t}\n\t\t}\n\n\t\t$fd = fopen($filename, \"a\");\n\t\t$timestamp = round(microtime(true));\n\n\t\tif(!empty($levelstr))\n\t\t{\n\t\t\tfwrite($fd, $timestamp.LLOG_SEPARATOR.\"[\".$levelstr.\"]\".LLOG_SEPARATOR.$msg.PHP_EOL);\n\t\t}else\n\t\t{\n\t\t\tfwrite($fd, $timestamp.LLOG_SEPARATOR.$msg.PHP_EOL);\n\t\t}\n\t\tfclose($fd);\n}", "public function log_activity() {\n \n \n $CI =& get_instance();\n $CI->load->library('audit_trail');\n // Start off with the session stuff we know\n $data = array();\n $data['user_id'] = $CI->session->userdata('user_id');\n \n // Next up, we want to know what page we're on, use the router class\n $data['section'] = $CI->router->class;\n $data['action'] = $CI->router->method;\n \n // Lastly, we need to know when this is happening\n $data['when'] = date('Y-m-d G:i:s');\n \n // We don't need it, but we'll log the URI just in case\n $data['uri'] = uri_string();\n $path = realpath(APPPATH);\n // And write it to the database\n if($CI->router->method!='checkPortal' && $CI->router->method!='getAttendanceUpdates' && $CI->router->method!='getAverageDailyAttendance'):\n $CI->audit_trail->lfile($path.'/modules/logs/'.$CI->session->userdata('user_id').'.txt');\n $CI->audit_trail->lwrite($CI->session->userdata('name').' access '.$CI->router->method.' through '. uri_string().'.' , 'TRACE');\n endif;\n }", "public function log()\n \t{\n\t $reference = $this->session->userdata('logged_in');\n\t\tif(empty($reference)){\n\t\t\tredirect('','refresh');\n\t\t}\n\t\t$stu_id = $reference['cms_id'];\n\t\t$stu_role = $reference['cms_role'];\n\n\t\t$data['profile'] = $this->sam->get_students_profile_record($stu_id,$stu_role);\n\t\t$data['menus'] = $this->sam->get_menu_role_permissions($stu_role);\n\n\t\t$studentid \t = $data['profile']->stud_id;\n\t\t$studentrole = $data['profile']->roles_id;\n\n\t\t$data['message'] = $this->sam->get_all_unread_notification($studentid,$studentrole);\n\t\t$data['msg_list'] = $this->sam->get_all_unread_notification_detail_list($studentid,$studentrole);\n\n\t\t$data['notify_list'] = $this->sam->get_all_notifications_list_read_unread($studentid,$studentrole);\n\n\t\t// echo \"<pre>\";\n\t\t// print_r($data);die;\n\t\t\n\t\t$this->load->view('students/includes/header', $data);\n\t\t$this->load->view('students/includes/sidebar');\n\t\t$this->load->view('students/includes/top_header');\n\t\t$this->load->view('students/viewNotifications');\n\t\t$this->load->view('students/includes/footer');\n \t}", "function wlog($msg,$typ='INF',$level=1)\n{\n global $log;\n\n if ($level==0)\n {\n return; //no logging\n }\n else {\n $log->log($msg,$typ );\n }\n\n}", "public function logInfo($text2log) {\n\n //echo ROOT;die;\n $rootFolder = ROOT .'/logs/';\n\n if(!is_dir($rootFolder)){\n mkdir($rootFolder,0777,true);\n }\n\n /* Log will be saved in \"Month_Year\" based folder. It will create \"Month_Year\"\n named folder and dump log date wise.\n ../log/May_2015/... # Contains web page related logs\n ../log/June_2015/... # Contains app related logs */\n\n $today = getdate();\n $date = $today['mday'];\n $dir_name = $today['month'] . '_' . $today['year'] . '/';\n\n // Check app/web named folder is exist or not\n if (!file_exists($rootFolder . $dir_name)) {\n mkdir($rootFolder . $dir_name, 0777, true);\n }\n\n $filename = $rootFolder . $dir_name . \"/log_$date.log\";\n if (!file_exists($filename)) {\n $fh = fopen($filename, 'a+'); //implicitly creates file\n fwrite($fh, '==================================================================================' . \"\\r\\n\");\n fwrite($fh, 'II Time(12 Hr) Request' . \"\\r\\n\");\n fwrite($fh, '==================================================================================' . \"\\r\\n\");\n fwrite($fh, $text2log);\n } else {\n $fh = fopen($filename, \"a+\");\n fwrite($fh, $text2log);\n }\n fclose($fh);\n }", "function log_staff($log){\n \t\tif($this->db->insert('logs', $log)){\n \t\t\treturn true;\n \t\t}\n \t\telse{\n \t\t\treturn false;\n \t\t}\n \t}", "public final function withLog ()\n {\n\n $this->withLog = true;\n\n }", "function insert_log( $log_data = array() ) {\n\t\n\t\t/* Get Log From Rule ID */\t\t\n\t\t$logs_array = Inbound_Logging_Automation::get_logs( $log_data['rule_id'] );\n\t\t\n\t\t/* Push log to front of array */\n\t\t$logs_array[] = $log_data;\n\t\t\n\t\t/* Trim logs array to X entries */\n\t\tif ( count($logs_array) > self::$log_limit ) {\n\t\t\t$trim = count($logs_array) - self::$log_limit;\n\t\t\t$logs_array = array_slice($logs_array, $trim);\n\t\t}\n\t\t\n\t\t/* Update logs meta */\n\t\tupdate_post_meta( $log_data['rule_id'] , '_automation_logs' , json_encode($logs_array) );\n\n\t}", "function logfile() {\n\tglobal $urlpath, $staticFile, $log_file;\n\t$page = \"\";\n\t$buttons = \"\";\n\n\t$page .= hlc(t(\"sweep_title\"));\n\t$page .= hl(t(\"sweep_log\"),4);\n\t$page .= par(t(\"sweep_log_path\").\" $log_file: \");\n\t$page .= '<a href=\"#bottom\">'.t(\"sweep_scroll_down\").'</a>';\n $page .= ptxt(file_get_contents($log_file));\n $page .= '<hr id=\"bottom\" />';\n\n\n $buttons .= addButton(array('label'=>t(\"sweep_button_status\"),'class'=>'btn btn-success', 'href'=>\"$urlpath\", 'divOptions'=>array('class'=>'btn-group')));\n\t$buttons .= addButton(array('label'=>t(\"sweep_button_reload\"),'class'=>'btn btn-success', 'href'=>\"$urlpath/logfile\", 'divOptions'=>array('class'=>'btn-group')));\n\t\t\n\n $page .= $buttons;\n\treturn(array('type' => 'render','page' => $page));\n}", "private function _log()\n {\n try {\n // Connect\n $dbh = $this->_connectToDb();\n \n // Insert\n $stmt = $dbh->prepare(\"INSERT INTO log_table(`nick`, `said`, `when`, `channel`) VALUES (:nick, :message, NOW(), :channel)\");\n\n $stmt->bindParam(':nick', $this->_data->nick, PDO::PARAM_STR);\n $stmt->bindParam(':message', $this->_data->message, PDO::PARAM_STR);\n $stmt->bindParam(':channel', $this->_data->channel, PDO::PARAM_STR);\n \n if (!$stmt->execute())\n {\n $arr = $stmt->errorInfo();\n print_r($arr);\n }\n\n $dbh = null;\n \t\n }\n catch(PDOException $e)\n {\n echo $e->getMessage();\n }\n }", "function scaffold_log() {\n\t$args = func_get_args();\n\tforeach ($args as $arg) {\n\t\t$msg = print_r($arg, true);\n\t\terror_log($msg);\n\t}\n}", "function logMe() {\n\tglobal $conn;\n\t\t\n\t// THIS IS FOR YOU TO COMPLETE\n}", "function userclass2_adminlog($msg_num='00', $woffle='')\n{\n\te107::getAdminLog()->log_event('UCLASS_'.$msg_num,$woffle,E_LOG_INFORMATIVE,'');\n}", "private function logRequest() {\n\t\t//Uncomment or set 'error_log = syslog' to log to system default syslog location\n\t\topenlog(basename(__FILE__), LOG_NDELAY, LOG_LOCAL5);\n\t\tsyslog(LOG_NOTICE, get_class($this).\" \".$_SERVER['REMOTE_ADDR'].\" did $this->_method with request: \".$this->_request['rquest'].\"\\n\");\n\t\tcloselog;\n\t}", "public function get_log($id_log)\n\t{\n\t\t$log = $this->db\n\t\t\t->select(\"s.nama as status, s.id as status_id, date_format(tgl_peristiwa, '%d-%m-%Y') as tgl_peristiwa, id_detail, ref_pindah, catatan\")\n\t\t\t->where('l.id', $id_log)\n\t\t\t->join('tweb_penduduk p','l.id_pend = p.id', 'left')\n\t\t\t->join('tweb_status_dasar s','s.id = p.status_dasar', 'left')\n\t\t\t->get('log_penduduk l')->row_array();\n\t\tif (empty($log['tgl_peristiwa'])) $log['tgl_peristiwa'] = date(\"d-m-Y\");\n\t\treturn $log;\n\t}", "public function toLogEntry();", "public function tlog($text);", "function log(array $args, array $assoc_args ) {\n //TODO: format output\n return $this->terminus_request(\"site\", $this->_siteInfo->site_uuid, 'code-log', 'GET');\n }", "public function log()\r\n {\r\n echo $this->message.PHP_EOL;\r\n }", "public function settingsLog(){\n\t\tpermittedArea();\n\n\t\t$data['settingsLog'] = $this->settings_model->adminSettingsLog();\n\n\t\ttheme('settingsLog', $data);\n\t}", "function save_log($g,$p,$file) {\n\t$txt = '';\n\t$txt .= \"GET\\n\";\n\tforeach ($g as $key => $string_value)\t{\n\t\t$txt .= $key.\" = \".$string_value.\"\\n\";\n\t}\n\t$txt .= \"POST\\n\";\n\tforeach ($p as $key => $string_value)\t{\n\t\t$txt .= $key.\" = \".$string_value.\"\\n\";\n\t}\n\n// ECRITURE FICHIER\n\t// ENREGISTREMENT LOG\n\tif ($fp=fopen($file, \"a\")) {\n\t\tfwrite($fp, \"\\n---------------------------------------------------------\\n\");\n\t\tfwrite($fp, $txt);\n\t\tfwrite($fp, \"\\n---------------------------------------------------------\\n\\n\");\n\t\tfclose($fp);\n\t} else {\n\t\techo \"Erreur d'ouverture de \".$file;\n\t}\n}" ]
[ "0.77604216", "0.7690199", "0.76225424", "0.75519484", "0.7499335", "0.73860186", "0.7283939", "0.7266439", "0.7107609", "0.7100534", "0.7067475", "0.7058697", "0.70411104", "0.70120126", "0.7000011", "0.69713634", "0.69698614", "0.6964543", "0.69456565", "0.69372445", "0.6909774", "0.6909774", "0.6909774", "0.688648", "0.68856525", "0.68795013", "0.68666244", "0.6844059", "0.6833426", "0.6817291", "0.68143517", "0.6810431", "0.67943645", "0.6778584", "0.67660147", "0.6753852", "0.6753852", "0.6753852", "0.67520165", "0.6739202", "0.67281556", "0.67102414", "0.6701113", "0.66549885", "0.6651029", "0.6631239", "0.6630012", "0.66217494", "0.6619489", "0.66085756", "0.6607361", "0.6593285", "0.658257", "0.6580991", "0.6573326", "0.6570774", "0.6566297", "0.65626234", "0.6557176", "0.65548587", "0.65530044", "0.654787", "0.6540198", "0.6536552", "0.65342385", "0.653336", "0.6531724", "0.65303904", "0.6529138", "0.65264547", "0.65238065", "0.65218216", "0.65099037", "0.6508677", "0.6491627", "0.64893955", "0.64880717", "0.6487527", "0.6484199", "0.64789164", "0.64781535", "0.64749396", "0.64748657", "0.6470318", "0.64607316", "0.645286", "0.6445969", "0.6440304", "0.644022", "0.6436271", "0.6429572", "0.64250094", "0.6422321", "0.64218783", "0.641125", "0.6408766", "0.64080316", "0.6403717", "0.63970524", "0.6394314", "0.63875985" ]
0.0
-1
fungsi untuk membaca log pengguna
function readLog() { $file = fopen("../log.txt", "r"); while (!feof($file)) { $text = fgets($file); $line = explode('_', $text); if (isset($line[1])){ if (!isset($log[$line[0]])) $log[$line[0]] = []; array_push($log[$line[0]], $line[1]); } } fclose($file); return $log; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function log_info($attr)\r\n {\r\n try\r\n {\r\n $logindata=$this->session->userdata(\"admin_loggedin\");\r\n return $this->write_log($attr[\"msg\"],decrypt($logindata[\"user_id\"]),($attr[\"sql\"]?$attr[\"sql\"]:\"\"));\r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n } \r\n }", "public function log_info($attr)\r\n {\r\n try\r\n {\r\n $logindata=$this->session->userdata(\"admin_loggedin\");\r\n return $this->write_log($attr[\"msg\"],decrypt($logindata[\"user_id\"]),($attr[\"sql\"]?$attr[\"sql\"]:\"\"));\r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n } \r\n }", "public function log_info($attr)\r\n {\r\n try\r\n {\r\n $logindata=$this->session->userdata(\"admin_loggedin\");\r\n return $this->write_log($attr[\"msg\"],decrypt($logindata[\"user_id\"]),($attr[\"sql\"]?$attr[\"sql\"]:\"\"));\r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n } \r\n }", "protected function log() {\n }", "function account_log()\n {\n }", "public function getLog();", "public function log($log) {\n //$this->log = $log;\n }", "public function logData() {\n\t\t/* Implement in subclasses */\n\t}", "public function get_log($id_log)\n\t{\n\t\t$log = $this->db\n\t\t\t->select(\"s.nama as status, s.id as status_id, date_format(tgl_peristiwa, '%d-%m-%Y') as tgl_peristiwa, id_detail, ref_pindah, catatan\")\n\t\t\t->where('l.id', $id_log)\n\t\t\t->join('tweb_penduduk p','l.id_pend = p.id', 'left')\n\t\t\t->join('tweb_status_dasar s','s.id = p.status_dasar', 'left')\n\t\t\t->get('log_penduduk l')->row_array();\n\t\tif (empty($log['tgl_peristiwa'])) $log['tgl_peristiwa'] = date(\"d-m-Y\");\n\t\treturn $log;\n\t}", "public function log($log);", "function changeLogs() {\n\n }", "public function index($log_date = NULL){\n // print_r(log_message('info','se ingresa dato al log'));\n //var_dump($this->session->userdata('NameUser'));\n $log_date = \"2019-02-15\";\n $this->load->library('log_library');\n if ($log_date == NULL)\n {\n // default: today\n $log_date = date('Y-m-d');\n }\n $data['cols'] = $this->log_library->get_file('log-'. $log_date . '.php');\n $data['log_date'] = $log_date;\n\t$this->load->view('log_view', $data);\n }", "public function log(){\n\t\t$args = $this->getArgs();\n\t\t$uid = $_SESSION[\"user\"][\"uid\"];\n\t\t$base_url = substr($_SERVER[\"REQUEST_URI\"], 0, strrpos($_SERVER[\"REQUEST_URI\"], \"/\") + 1);\n\t\t$header = array(\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LOG_LIST_HEADER_TIME)),\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LOG_LIST_HEADER_VALUE))\n\t\t);\n\t\t\n\t\t$config = array(\n\t\t\t\t\"config\" => array(\n\t\t\t\t\t\t\"page\" => (isset($args[\"GET\"][\"page\"]) ? $args[\"GET\"][\"page\"] : System::PAGE_ACTUAL_DEFAULT),\n\t\t\t\t\t\t\"column\" => (isset($args[\"GET\"][\"column\"]) ? $args[\"GET\"][\"column\"] : System::SORT_DEFAULT_COLUMN),\n\t\t\t\t\t\t\"direction\" => (isset($args[\"GET\"][\"direction\"]) ? $args[\"GET\"][\"direction\"] : System::SORT_DES),\n\t\t\t\t\t\t\"actual_pagesize\" => (isset($_SESSION[\"page_size\"]) ? $_SESSION[\"page_size\"] : System::PAGE_SIZE_DEFAULT),\n\t\t\t\t\t\t\"data_count\" => $this->getModel()->getCountLogList($uid),\n\t\t\t\t\t\t\"disable_menu\" => true,\n\t\t\t\t\t\t\"disable_select\" => true,\n\t\t\t\t\t\t\"disable_pagging\" => false,\n\t\t\t\t\t\t\"disable_set_pagesize\" => false\n\t\t\t\t),\n\t\t\t\t\"form_url\" => array(\n\t\t\t\t\t\t\"page\" => $base_url . \"-%d-%d-%s\",\n\t\t\t\t\t\t\"header_sort\" => $base_url . \"-%d-%d-%s\",\n\t\t\t\t\t\t\"form_action\" => $base_url\n\t\t\t\t),\n\t\t\t\t\"item_menu\" => array(),\n\t\t\t\t\"select_item_action\" => array(),\n\t\t\t\t\"style\" => array(\n\t\t\t\t\t\t\"marked_row_class\" => \"marked\",\n\t\t\t\t\t\t\"count_box_class\" => \"count_box\",\n\t\t\t\t\t\t\"pagging_box_class\" => \"pagging_box\",\n\t\t\t\t\t\t\"actual_page_class\" => \"actual_page\",\n\t\t\t\t\t\t\"table_header_class\" => \"head\",\n\t\t\t\t\t\t\"table_id\" => \"user_log\",\n\t\t\t\t\t\t\"select_form_id\" => \"\",\n\t\t\t\t\t\t\"pagesize_form_id\" => \"pagesize_box\",\n\t\t\t\t\t\t\"list_footer_id\" => \"\"\n\t\t\t\t)\n\t\t);\n\t\t$data = $this->getModel()->getLogList($uid, $config[\"config\"][\"page\"], $config[\"config\"][\"actual_pagesize\"], $config[\"config\"][\"column\"], $config[\"config\"][\"direction\"], $config[\"config\"][\"disable_pagging\"]);\n\t\t$out = Paginator::generatePage($header, $data, $config);\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}", "function log()\n {\n }", "function debuglog($numero,$texto,$errfile, $errline){\n global $conn;\n\n\n if(DEBUG==1) {\n\n ## VARIAVEIS DE CONFIG\n if (!isset($_SESSION['user'])) {\n $userdata = array(\n 'id' => '',\n 'nome' => '',\n 'ip' => $_SERVER['REMOTE_ADDR'],\n 'useragent' => $_SERVER['HTTP_USER_AGENT']\n );\n\n foreach($userdata as $k=>$v) {\n $log[$k]=$v;\n }\n\n } else {\n\n foreach($_SESSION['user'] as $k=>$v) {\n $log[$k]=$v;\n }\n\n }\n\n # se DEBUG_LOG nao for vazio vai gravar no arquivo de log\n if (DEBUG_LOG<>'') {\n $ddf = fopen(DEBUG_LOG,'a');\n fwrite($ddf,\"\".date(\"r\").\": [$numero] $texto $errfile $errline \\r\\n [$log[id]]$log[nome] - $log[ip], $log[useragent] \\r\\n\\r\\n\");\n fclose($ddf);\n }\n\n }\n\n}", "function ilog(){\r\n\t\tif($this->input['action'] != 'mylog'){\r\n\t\t\tif($this->vars['logSavePage'] == 1) $logSavePage = addslashes(serialize($this->page));\r\n\t\t\t// user log\r\n\t\t\t$this->DB->query(\"\r\n\t\t\t\tINSERT INTO `log` (`userid` , `title` , `area` , `module` , `action` , `id` , `ip` , `kinput` , `page` , `dateline`)\r\n\t\t\t\tVALUES (\r\n\t\t\t\t'\".$this->user['userid'].\"', '\".$this->page['title'].\"', '\".$this->vars['area'].\"', '\".$this->input['module'].\"', '\".$this->input['action'].\"', '\".$this->iif($this->input[$this->input['module'].'id'] > 0, $this->input[$this->input['module'].'id'], 0).\"', '\".IP.\"', '\".serialize($this->input).\"', '\".$logSavePage.\"', '\".TIMENOW.\"'\r\n\t\t\t\t)\r\n\t\t\t\");\r\n\t\t}\r\n\t}", "function addUserLog($content='无内容',$base='pc',$uid='',$uname=''){\r\n}", "function log($cxn,$class,$id,$folder=NULL)\r\n {\r\n \r\n }", "function logMe($comment, $status_id = 0, $data = array(), $update_process = 0) {\n\n if (!class_exists('systemToolkit')) {\n return; // not loaded (cache fix)\n }\n $toolkit = systemToolkit::getInstance();\n $centerLogMapper = $toolkit->getMapper('log', 'log');\n\n if(count($data)) {\n ob_start();\n $i = 1;\n foreach($data as $d) {\n var_dump($d);\n if($i < count($data)) {\n echo \"<br />===<br />\";\n }\n $i++;\n }\n $err_content = ob_get_contents();\n ob_end_clean();\n $comment .= \"<br />{$err_content}\";\n }\n\n $log = $centerLogMapper->create();\n $log->setTime(new SQLFunction('UNIX_TIMESTAMP'));\n $log->setModule($toolkit->getRequest()->getModule());\n $log->setAction($toolkit->getRequest()->getAction());\n $log->setComment($comment);\n $log->setStatus($status_id);\n if ($user = systemToolkit::getInstance()->getUser()) {\n $log->setUser($user);\n }\n if ($update_process) {\n $log->setProcessId($update_process);\n }\n $centerLogMapper->save($log);\n}", "function CDFLog()\n\t{\n\t\t// ** Aktivierung der Logfunktionalitaet **\n\t\t// ########################################\n\t\t$this->m_enable = true;\n\t\t// ########################################\n\t\tif ($this->m_enable)\n\t\t{\t\t\t\n\t\t\t// Basispfad der Logdateien\n\t\t\t$this->m_base = \"./\";\n\t\t\t// Unterordner der Logdateien\n\t\t\t$this->m_sub = \"Logfiles/\";\n\t\t\t// Dateiname der Logdatei: YYYY_MM_DD_PHP.log\n\t\t\t$this->m_fileNameTemplate = \"20%02u_%02u_%02u_PHP.log\";\n\t\t\t// Die Verwaltungsroutine fuer die automatische Loeschung\n\t\t\t// Aelterer Dateien geht davon aus, dass der Dateiname\n\t\t\t// mit dem Datumsstempel beginnt.\n\t\t\t$this->m_fileNameTemplateMatch = \"^20[0-9]{2}_[0-9]{2}_[0-9]{2}_PHP.log\";\n\t\t\t// Aktuellen Dateiname der Logdatei erstellen\n\t\t\t$t = time();\n\t\t\t$ltm = localtime($t, 1);\n\t\t\t$this->m_fileName = sprintf($this->m_fileNameTemplate, \n\t\t\t\t$ltm[\"tm_year\"] % 100, $ltm[\"tm_mon\"] + 1, $ltm[\"tm_mday\"]);\n\t\t\t// Loeschen von Dateien die aelter sind als m_eraseFilesCount Logtage\n\t\t\t$this->m_eraseFilesEnable = true;\n\t\t\t// Anzahl zu haltender Logdateien (in Tagen)\n\t\t\t$this->m_eraseFilesCount = 5;\n\t\t\t// Zeichenfolge fuer einen Zeilenumbruch\n\t\t\t$this->m_crLf = \"\\r\\n\";\n\t\t\t// Automatische Einfuegung eines Zeitstempels vor jedem Logeintrag\n\t\t\t$this->m_withTimestamp = true;\n\t\t\t// Pruefen ob der Logpfad existiert.\n\t\t\tif (!is_dir($this->m_base . $this->m_sub))\n\t\t\t{\t\n\t\t\t\tif (!mkdir($this->m_base . $this->m_sub))\n\t\t\t\t{\n\t\t\t\t\t// Logsystem wegen Fehlschlag abstellen\n\t\t\t\t\t$this->m_enable = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Pruefung fuer eraseFile durchfuehren\n\t\t\t$this->logCheckOnWorkDate();\n\t\t}\n\t}", "function logge($message, $type=INFO, $dateiName=\"\", $methodName=\"\") {\n\n $str = date(\"Y.m.d H:i:s\") . \" \" . $type;\n\n if ($dateiName !=\"\" || $methodName != \"\") {\n $str .= \"(\";\n if ($dateiName != \"\") {\n $str .= \"File: \" . $dateiName . \" \";\n }\n if ($methodName != \"\") {\n $str .= \"Methode: \" . $methodName;\n }\n $str .= \")\";\n }\n $str .= \": \" . $message . \"\\n\\r\";\n\n if (isset($_ENV[\"LOGFILE\"]) && $_ENV[\"LOGFILE\"] != '') {\n $fd = fopen($_ENV[\"LOGFILE\"], \"a\");\n\n fwrite($fd, $str);\n fclose($fd);\n } else {\n echo \"LOGFILE ist nicht bekannt, um Meldungen in die Log-Datei zu schreiben.<br>\\n\";\n echo $str;\n }\n\n}", "public function addLog($data);", "public function get_logs()\n {\n }", "function gravarLog($log){\n\t$idUsuario = $_SESSION['idUsuario'];\n\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\t$data = date('Y-m-d H:i:s');\n\t$sql = \"INSERT INTO `ig_log` (`idLog`, `ig_usuario_idUsuario`, `enderecoIP`, `dataLog`, `descricao`) VALUES (NULL, '$idUsuario', '$ip', '$data', '$log')\";\n\n\tmysql_query($sql);\n\t\n}", "function log_system($accion = \"SIN ESPECIFICAR\", $entidad = \"SIN ESPECIFICAR\", $id_result = 0){\n $con = Database\\conectar();\n $accion = strtoupper($accion);\n $entidad = strtoupper($entidad);\n $date = date('Y-m-d H:i:s');\n $table_name = $GLOBALS[\"prefix\"].\"log\";\n $sql = \"INSERT INTO \".$table_name.\" (ID_USER,SERVER_ADDR,REMOTE_ADDR, REQUEST_TIME, DATE_ACTION, ACCTION, ENTITY, RESULT) VALUE (:ID_USER, :SERVER_ADDR, :REMOTE_ADDR, :REQUEST_TIME, :DATE_ACTION, :ACCTION, :ENTITY, :RESULT)\";\n $query = $con->prepare($sql);\n $id_user = (isset($_SESSION[\"id\"])) ? $_SESSION[\"id\"] : $id_result ;\n $query->bindParam(\"ID_USER\", $id_user, \\PDO::PARAM_INT);\n $query->bindParam(\"SERVER_ADDR\", $_SERVER[\"SERVER_ADDR\"], \\PDO::PARAM_INT);\n $query->bindParam(\"REMOTE_ADDR\", $_SERVER[\"REMOTE_ADDR\"], \\PDO::PARAM_INT);\n $query->bindParam(\"REQUEST_TIME\", date('Y-m-d H:i:s', $_SERVER[\"REQUEST_TIME\"]), \\PDO::PARAM_INT);\n $query->bindParam(\"DATE_ACTION\", $date, \\PDO::PARAM_INT);\n $query->bindParam(\"ACCTION\", $accion, \\PDO::PARAM_INT);\n $query->bindParam(\"ENTITY\", $entidad, \\PDO::PARAM_INT);\n $query->bindParam(\"RESULT\", $id_result, \\PDO::PARAM_INT);\n $query->execute();\n}", "function update_log($msg)\r\n\t{\r\n\t\tglobal $LEA_REP;\r\n\r\n\t\t$rep = $LEA_REP.'log/';\r\n\r\n\t\tif(file_exists($rep.$this->id_usager.'.log')){\r\n\t\t\t$fp = fopen($rep.$this->id_usager.'.log', \"a\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$fp = fopen($rep.$this->id_usager.'.log', \"a\");\r\n\t\t\tfwrite($fp, \"********************************************************\\r\\n\\r\\n\");\r\n\t\t\tfwrite($fp, \"Fichier log de : \".$this->civilite.\" \".$this->nom.\" \".$this->prenom.\" du profil : \".$this->profil.\"\\r\\n\\r\\n\");\r\n\t\t\tfwrite($fp, \"********************************************************\\r\\n\\r\\n\");\r\n\t\t}\r\n\r\n\t\tfwrite($fp, $msg);\r\n\t}", "function Homelog($user_name,$action,$class_name,$class_obj,$result){\n if(empty($user_name)||empty($action)||empty($class_name)||empty($class_obj)||empty($result)){\n return false;\n }\n $data=array(\n \"user_name\"=>$user_name,\n \"action\"=>$action,\n \"class_name\"=>$class_name,\n \"class_obj\"=>$class_obj,\n \"result\"=>$result,\n \"op_time\"=>time()\n );\n $res=M(\"Sys_log\")->add($data);\n return $res;\n}", "public function log()\n {\n $user = new UserManager;\n $request = new Request;\n $errorMessage = '';\n $method = $request->getMethode();\n // check if the user are loged \n $userSession = $this->request->getSession('user');\n if ($userSession != '') {\n return $this->render('user/index.html.twig', ['user' => $userSession]);\n }\n\n if ($method == \"POST\") {\n $mailUser = $request->getPost('mail');\n $password = $request->getPost('mdp');\n $hashPassword = hash(\"sha256\", $password);\n $response = $user->checkMail($mailUser);\n \n if ($response) {\n if ($response['pass'] == $hashPassword) {\n $userSesssion = [];\n $errorMessage = 'Vous êtes connecté avec succés ';\n $userSesssion['role'] = $response['role'];\n $userSesssion['mail'] = $response['mail'];\n $userSesssion['userName'] = $response['user_Name'];\n $request->newSession('user', $userSesssion);\n return $this->log();\n } else {\n $errorMessage = 'L\\'association mot de passe, email est incorrect ';\n }\n } else {\n $errorMessage = 'L\\'association mot de passe, email est incorrect ';\n }\n return $this->render('user/login.html.twig', ['errorMessage' => $errorMessage]);\n }\n\n return $this->render('user/login.html.twig', ['errorMessage' => $errorMessage]);\n }", "public function toLogEntry();", "private function add_log($log) {\n $this->log .= \" \" . $log;\n }", "function show_log()\n\t{\n\t\t$options = array();\n\t\tif($this->input->get_post(\"kTeach\")){\n\t\t\t$options[\"kTeach\"] = $this->input->get_post(\"kTeach\");\n\t\t}\n\n\t\tif($this->input->get_post(\"username\")){\n\t\t\t$options[\"username\"] = $this->input->get_post(\"username\");\n\t\t}\n\n\t\tif($this->input->get_post(\"action\")){\n\t\t\t$options[\"action\"] = $this->input->get_post(\"action\");\n\t\t}\n\n\t\tif($this->input->get_post(\"time_start\") && $this->input->get_post(\"time_end\")){\n\t\t\t$time_start = $this->input->get_post(\"time_start\");\n\t\t\t$time_end = $this->input->get_post(\"time_end\");\n\t\t\t$time_end .= \" 23:59:59\";// make the end time the end of the same day\n\t\t\t$options[\"date_range\"][\"time_start\"] = $time_start;\n\t\t\t$options[\"date_range\"][\"time_end\"] = $time_end;\n\t\t}\n\n\t\t$data[\"header\"] = array(\"username\",\"timestamp\",\"action\");\n\t\t$data[\"logs\"] = $this->auth_model->get_log($options);\n\t\t$data[\"options\"] = $options;\n\t\t$data[\"target\"] = \"admin/log\";\n\t\t$data[\"title\"] = \"User Log\";\n\t\t$this->load->view(\"page/index\",$data);\n\t}", "abstract public function logData( $data );", "private function _log()\n {\n try {\n // Connect\n $dbh = $this->_connectToDb();\n \n // Insert\n $stmt = $dbh->prepare(\"INSERT INTO log_table(`nick`, `said`, `when`, `channel`) VALUES (:nick, :message, NOW(), :channel)\");\n\n $stmt->bindParam(':nick', $this->_data->nick, PDO::PARAM_STR);\n $stmt->bindParam(':message', $this->_data->message, PDO::PARAM_STR);\n $stmt->bindParam(':channel', $this->_data->channel, PDO::PARAM_STR);\n \n if (!$stmt->execute())\n {\n $arr = $stmt->errorInfo();\n print_r($arr);\n }\n\n $dbh = null;\n \t\n }\n catch(PDOException $e)\n {\n echo $e->getMessage();\n }\n }", "function WriteLog($s) {\r\n}", "function userclass2_adminlog($msg_num='00', $woffle='')\n{\n\te107::getAdminLog()->log_event('UCLASS_'.$msg_num,$woffle,E_LOG_INFORMATIVE,'');\n}", "function logs_tbl()\n {\n // SELECT \n }", "function save_log($g,$p,$file) {\n\t$txt = '';\n\t$txt .= \"GET\\n\";\n\tforeach ($g as $key => $string_value)\t{\n\t\t$txt .= $key.\" = \".$string_value.\"\\n\";\n\t}\n\t$txt .= \"POST\\n\";\n\tforeach ($p as $key => $string_value)\t{\n\t\t$txt .= $key.\" = \".$string_value.\"\\n\";\n\t}\n\n// ECRITURE FICHIER\n\t// ENREGISTREMENT LOG\n\tif ($fp=fopen($file, \"a\")) {\n\t\tfwrite($fp, \"\\n---------------------------------------------------------\\n\");\n\t\tfwrite($fp, $txt);\n\t\tfwrite($fp, \"\\n---------------------------------------------------------\\n\\n\");\n\t\tfclose($fp);\n\t} else {\n\t\techo \"Erreur d'ouverture de \".$file;\n\t}\n}", "public function log($data){\n\n $type = \"\";\n\n switch($data[\"severity\"]){\n case 0: $type = \"INFORMATION\";\n break;\n case 1: $type = \"WARNING\";\n break;\n case 2: $type = \"ERROR\";\n break;\n default: $type = \"FATAL\";\n break;\n }\n\n\n $data[\"userid\"] = $this->user[\"userid\"];\n $data[\"msg_type\"] = $type;\n $data[\"api_version\"] = \"v100\";\n $data[\"recd\"] = json_encode(Input::all());\n $data[\"server\"] = gethostname();\n\n $log = new Log($data);\n $log->save();\n }", "function logUsersFromPeru($lang=\"\"){\n $helper = new Helper();\n $country_code = $helper->getCountryCode();\n $data = array();\n if($country_code == $lang){\n $stringen = new RandomStringGenerator(implode(range(0, 9)));\n $code = $stringen->generate(15);\n\n $browser = new Browser();\n $navigateur = $browser->getBrowser();\n\n $data = [\n 'cookie_code' => $code,\n 'ip_address' => $helper->getRealUserIp(),\n 'browser' => $navigateur,\n 'country_code' => $helper->getCountryCode()\n ];\n $log = fopen(\"ressources/views/log_peru_users.txt\", \"a+\");\n\n $data_log = \"\\n\".date('d/m/Y H:i:s').\" -> IP : \".$data['ip_address'].\"\\n\";\n $data_log .= \"Browser : \".$data['browser'].\"\\n\";\n $data_log .= \"country_code : \".$data['country_code'].\"\\n\";\n fputs($log, $data_log);\n }\n\n return $data;\n }", "protected function _initLog()\n {\n }", "function jx_log() {\n header('Content-Type: application/json; charset=utf-8');\n\n $msg = (isset($_POST['msg'] )) ? ( (!empty($_POST['msg'] )) ? $_POST['msg'] : false ) : false;\n $type = (isset($_POST['type'])) ? ( (!empty($_POST['type'])) ? $_POST['type'] : 'ajax' ) : 'ajax';\n\n // all saving already happens in respond(), so no need to double it\n if($msg) toLog($msg,'ajax');\n else respond('false', 'logged with empty msg');\n }", "function log_staff($log){\n \t\tif($this->db->insert('logs', $log)){\n \t\t\treturn true;\n \t\t}\n \t\telse{\n \t\t\treturn false;\n \t\t}\n \t}", "function wLogRead($path,$param) {\n \n $fp = fopen ($path.\"/\".$param.\".log\", \"a+\");// Un nouveau fichier créé chaque jour\n $ligne = fgetcsv($fp, 1024);\n fclose ($fp);\n\n return $ligne[0];\n \n}", "public function logs($id);", "public function log($text)\n {\n }", "public function log($msg)\n {\n }", "function log1($msg)\n{\n if(WRITE_LOG == false)\n return;\n date_default_timezone_set('Europe/Vienna');\n $now = date(\"Y-m-d H:i:s\");\n $line = sprintf(\"%s => %s\\r\\n\", $now, $msg);\n file_put_contents(LOG_FILE, $line, FILE_APPEND);\n}", "function setLog($proceso,$sucursal,$usuario){\n $data = array(\n 'proceso_id' => $proceso,\n 'sucursal_id' => $sucursal,\n 'id_usuario' => $usuario\n );\n $this->db->insert(self::sys_procesos_log,$data);\n }", "function logquery() {\n global $conn, $log_id;\n\n if (!isset($_SESSION['user'])) {\n $userdata = array(\n 'id' => '',\n 'nome' => '',\n 'email' => '',\n 'senha' => '',\n 'ip' => $_SERVER['REMOTE_ADDR'],\n 'host' => gethostbyaddr($_SERVER['REMOTE_ADDR']),\n 'useragent' => $_SERVER['HTTP_USER_AGENT']\n );\n\n foreach($userdata as $k=>$v) {\n $log[$k]=$v;\n }\n\n\n } else {\n\n foreach($_SESSION['user'] as $k=>$v) {\n $log[$k]=$v;\n }\n\n }\n\n\n #computa variaveis para o log\n $server = array(\n 'php_self' => $_SERVER['PHP_SELF'],\n 'query_string' => $_SERVER['QUERY_STRING'],\n 'request_uri' => $_SERVER['REQUEST_URI'],\n 'request_time' => $_SERVER['REQUEST_TIME'],\n 'http_referer' => isset($_SERVER['HTTP_REFERER'])?$_SERVER['HTTP_REFERER']:''\n );\n\n foreach($server as $k=>$v) {\n $slog[$k]=$v;\n }\n\n\n\n $sql_log = \"INSERT INTO \".TABLE_PREFIX.\"_log\n (\n log_adm_id,\n log_nome,\n log_email,\n log_senha,\n log_php_self,\n log_query_string,\n log_request_uri,\n log_request_time,\n log_http_referer,\n log_ip,\n log_host,\n log_useragent\n ) VALUES (\n ?,?,?,?,?,?,?,?,?,?,?,?\n )\n \";\n if(($qr_log = $conn->prepare($sql_log))==false) {\n echo $conn->error();\n $qr_log->close();\n }\n\n else {\n $qr_log->bind_param('isssssssssss', $log['id'], $log['nome'], $log['email'], $log['senha'], $slog['php_self'], $slog['query_string'], $slog['request_uri'], $slog['request_time'], $slog['http_referer'], $log['ip'], $log['host'],$log['useragent']);\n $qr_log->execute();\n return $log_id = $conn->insert_id;\n $qr_log->close();\n }\n\n}", "function logxtvx($nama_anda,$ubah)\n{\n\t$_POST['user'] = $nama_anda;\n\t$_POST['aktiviti'] = 'kemaskini mm2012';\n\t$_POST['arahan_sql'] = \"<pre>($ubah)</pre>\";\n\tinclude '../log_xtvt.php';\n}", "protected function AutoLog(){\r\n \r\n //DEPRECATED for test\r\n \r\n }", "function log(){\n\n $email=filter_input(INPUT_POST, 'email');\n $password=filter_input(INPUT_POST, 'password');\n $recordar=filter_input(INPUT_POST, 'recordar');\n\n $errors=array();\n \n // Validación del mail\n if(!is_null($email) && !empty($email)){\n if (isset($_COOKIE['email']) && $_COOKIE['email']!=$email) {\n }else{\n if(!filter_var($email, FILTER_VALIDATE_EMAIL)){\n $errors['email']=\"Email invalido\";\n } \n }\n \n }else{\n $errors['email']=\"Ingrese un correo \";\n }\n // Validación del password\n if(is_null($password) || empty($password)){\n $errors['password']=\"Ingrese la contraseña\";\n }\n // Una vez válidos..\n if (count($errors)==0){\n\n $row=$this->model->validUser($email,$password);\n \n // Si existe\n if (count($row)>0){ \n // opción marcada para recordar en el equipo\n if(!is_null($recordar) && $recordar==\"Si\"){\n $this->saveCookies($email, $password);\n }\n // guardo las credenciales\n Session::set('id_usuario', $row[0]['id']);\n Session::set('email', $row[0]['email']);\n Session::set('password', $row[0]['password']);\n Session::set('nombre', $row[0]['nombre']);\n Session::set('apellidos', $row[0]['apellidos']);\n\n // listado de tareas\n header(\"Location: \".URL.\"tarea\");\n\n //rutas a utilizar\n //header(\"Location: /A4/tarea\"); production\n //header(\"Location: /tarea\"); developer\n\n }else{\n\n $errors['password']=\"Contraseña o usuario inválidos\";\n $this->addData([\n \"page\"=>'Login',\n 'title'=>'Inicia sesión',\n 'email'=>$email,\n 'errors'=>$errors\n ]);\n $this->model=new mLogin();\n $this->view=new vLogin($this->dataView, $this->dataTable);\n $this->view->show();\n }\n }else{\n // mostrar el formulario con los errores\n $this->addData([\n \"page\"=>'Login',\n 'title'=>'Inicia sesión',\n 'email'=>$email,\n 'errors'=>$errors\n ]);\n $this->model=new mLogin();\n $this->view=new vLogin($this->dataView, $this->dataTable);\n $this->view->show();\n }\n \n }", "function write_log($cadena){\n\t\t\t$arch = fopen(\"../../logs/deletes\".\".txt\", \"a+\"); //date(\"Y-m-d\"). define hora en archivo\n\t\t\n\t\t\tfwrite($arch, \"[\".date(\"Y-m-d H:i:s\").\" \".$_SERVER['REMOTE_ADDR'].\" \".\" - Elimino produccion ] \".$cadena.\"\\n\");\n\t\t\tfclose($arch);\n\t\t}", "function logheader() {\n $str = \"\\n=============================\"\n .\"======================================\";\n $str .= \"\\n============================ \"\n .\"logrecord ============================\";\n $str .= \"\\nstartlogrecord timestamp : \".date(\"Y-m-d H:i:s\",time()).\"\\n\";\n\n $this->prn($str);\n// fwrite($this->fp, $str.\"\\n\");\n }", "public function cekLog($npk,$tanggal)\n {\n return $this->db->get_where('log_login',array('id_karyawan' => $npk , 'tanggal' => $tanggal));\n }", "function __saveLog() {\n $this->__UserLog->save($this->__UserLog->data,false);\n }", "public static function accessLog(){\n\t\t$al = new AccessLogModel();\n\t\t$ip = new Ip();\n\t\t$type \t= 1;\n\t\t$spider = 'null';\n\t\t$ipaddr\t= self::getIp();\n\t\t$addr \t= $ip->ip2addr($ipaddr);\n\t\t$date\t= date('Y-m-d');\n\t\tif(self::is_spider()){\n\t\t\t$spider = self::robot();\n\t\t\t$type = 2;\n\t\t}\n\t\t$data = [\n\t\t\t\t'ip'\t\t=> $ipaddr,\n\t\t\t\t'type'\t\t=> $type,\n\t\t\t\t'spider'\t=> $spider,\n\t\t\t\t'num'\t\t=> 1,\n\t\t\t\t'country'\t=> $addr['country'],\n\t\t\t\t'area'\t\t=> $addr['area'],\n\t\t\t\t'cdate' \t=> $date,\n\t\t];\n\t\t$find = $al->where(\"ip = '\".$ipaddr.\"' AND cdate = '\".$date.\"'\")->fRow();\n\t\tif($find){\n\t\t\t$data['num'] = $find['num'] + 1;\n\t\t\t$al->where('id ='.$find['id'])->update($data);\n\t\t}else{\n\t\t\t$al->insert($data);\n\t\t}\t\t\n\t}", "private function send_log() {\n MessageLogger::add_log($this->log);\n $this->log = \"\";\n }", "function db_log ($username,$domain,$action,$data)\n{\n global $CONF;\n \n if ($CONF['logging'] == 'YES')\n {\n $result = db_query (\"INSERT INTO log (timestamp,username,domain,action,data) VALUES (NOW(),'$username','$domain','$action','$data')\");\n if ($result['rows'] != 1)\n {\n return false;\n }\n else\n {\n return true;\n }\n }\n}", "function loginLogger()\n {\n $remote = quote_content($_SERVER['REMOTE_ADDR']);\n $forwar = quote_content($_SERVER['HTTP_X_FORWARDED_FOR']);\n $uagent = quote_content($_SERVER['HTTP_USER_AGENT']);\n $day = date(\"Y-m-d\");\n\t $time = date(\"H:i:s\");\n $type = \"admin\";\n\n $query = \" INSERT INTO log_acesso (login, ip1, ip2, ip3, dia, hora, tipo) \";\n $query.= \" VALUES (?, ?, ?, ?, ?, ?, ?)\";\n\n $q = $this->_con->prepare($query);\n $uname = $this->_object->getUName();\n $q->bindParam(1, $uname);\n $q->bindParam(2, $remote);\n $q->bindParam(3, $forwar);\n $q->bindParam(4, $uagent);\n $q->bindParam(5, $day);\n $q->bindParam(6, $time);\n $q->bindParam(7, $type);\n\n return $q->execute();\n }", "public function tlog($text);", "public function logInfo($text2log) {\n\n //echo ROOT;die;\n $rootFolder = ROOT .'/logs/';\n\n if(!is_dir($rootFolder)){\n mkdir($rootFolder,0777,true);\n }\n\n /* Log will be saved in \"Month_Year\" based folder. It will create \"Month_Year\"\n named folder and dump log date wise.\n ../log/May_2015/... # Contains web page related logs\n ../log/June_2015/... # Contains app related logs */\n\n $today = getdate();\n $date = $today['mday'];\n $dir_name = $today['month'] . '_' . $today['year'] . '/';\n\n // Check app/web named folder is exist or not\n if (!file_exists($rootFolder . $dir_name)) {\n mkdir($rootFolder . $dir_name, 0777, true);\n }\n\n $filename = $rootFolder . $dir_name . \"/log_$date.log\";\n if (!file_exists($filename)) {\n $fh = fopen($filename, 'a+'); //implicitly creates file\n fwrite($fh, '==================================================================================' . \"\\r\\n\");\n fwrite($fh, 'II Time(12 Hr) Request' . \"\\r\\n\");\n fwrite($fh, '==================================================================================' . \"\\r\\n\");\n fwrite($fh, $text2log);\n } else {\n $fh = fopen($filename, \"a+\");\n fwrite($fh, $text2log);\n }\n fclose($fh);\n }", "function EventLog($page,$action,$orignal_value,$new_value)\n{\n\t\t$email = $_SESSION['user_email'];\n\t\t$ipaddress = getUserIP();\n\t\t\n\t\t$data = sprintf(\"%s,%s,%s,%s,%s\" . PHP_EOL, $ipaddress,date(\"F j Y g:i a\"), $email, $page, $action);\n\t\t\n\t\t//file_put_contents($_SERVER['DOCUMENT_ROOT'] .'/log.txt', $data, FILE_APPEND);\t\t\n\t\tfile_put_contents('log.txt', $data, FILE_APPEND);\t\t\t\n\t\t\n\t\t\n}", "public function setRecordLog() {\n \t$msg = '';\n \t$defaultFilterFields = array( 'id', 'modify_user_id' ,'modify_time', 'create_user_id', 'create_time','check_user_id','check_time');\n \t$addFilterFields = !empty($this->filterFields) ? $this->filterFields : array();\n \t$filterFields = array_merge($defaultFilterFields,$addFilterFields);\n \tforeach ( $this->getAttributes() as $key => $val ) {\n \t\tif ( ! $this->getIsNewRecord() && $val == $this->beforeSaveInfo[$key] ) {\n \t\t\tcontinue;\n \t\t}\n// \t\t$label = $this->getAttributeLabel($key);\n $label = get_class($this) . ':'.$key; //by shenll\n \t\tif (in_array($key, $filterFields)) {\n \t\t\tcontinue;\n \t\t}else {\n \t\t\tif ( $this->getIsNewRecord() ) {\n \t\t\t\t$msg .= MHelper::formatInsertFieldLog($label, $val);\n \t\t\t} else {\n \t\t\t\t$msg .= MHelper::formatUpdateFieldLog($label, $this->beforeSaveInfo[$key], $val);\n \t\t\t}\n \t\t}\n \t}\n //\treturn $msg;\n \t$this->addLogMsg($msg);\n }", "function logdetails ($log_id=null){\n\n\t\n\t\t$log\t\t\t=\t$this->Log->find('first',array('conditions'=>array('Log.id'=>$log_id)));\n\t\t\n\t\t$this->loadModel('Transaction');\n\t\t\n\t\t$transactiondata = $this->Transaction->findById($log['Log']['transaction_id']);\n\t\t$log['Transaction'] = $transactiondata['Transaction'];\n\t\t\n\t\t$this->loadModel('Station');\n\t\t$stationID = $log['Log']['affected_obj'];\n\t\t$stationdata = $this->Station->findById($stationID);\n\t\t$log['Station'] = $stationdata['Station'];\n\t\t\n\t\t\n\t\t$loginfo\t\t=\t$log['Log'];\n\t\t\n\t\t$this->update\t=\t$log['Log'];\n\t\t$this->layout\t=\t'ajax';\n\t\t\n\t\n\t\t#if((isset($log['Log']['affected_obj'])) && (isset($log['Log']['affected_obj_type'])) && (!(isset($log['Log']['affected_obj_name']))))\n\t\t#if((isset($log['Log']['affected_obj'])) && (isset($log['Log']['affected_obj_type'])))\n\t\t#{\n\t\t#\t$objDetails = $this->$log['Log']['affected_obj_type']->findById($log['Log']['affected_obj']);\n\t\t#\t$this->set('affected_obj_name_found',$objDetails[$log['Log']['affected_obj_type']]['affected_obj_name']);\n\t\t#}\n\t\t#else \n\t\t#{\n\t\t#\t$this->set('affected_obj_name_found',$log['Log']['affected_obj_name']);\n\t\t#}\n\t\t$this->set('display',$this->update);\n\t\t$this->set('transaction',$log['Transaction']);\n\t\t$this->set('stationdata',$log['Station']);\n\n\t}", "public function writeLog()\n {\n $redis = self::getClient();\n $redis ->lPush('admin_log',$this->data);\n }", "protected function printLogMgm() {}", "public function log()\n {\n $this->appendLog('log', \\func_get_args());\n }", "function geraLog($msg)\n {\n $caminho_atual = getcwd();\n\n//muda o contexto de execução para a pasta logs\n\n $data = date(\"d-m-y\");\n $hora = date(\"H:i:s\");\n $ip = $_SERVER['REMOTE_ADDR'];\n\n//Nome do arquivo:\n $arquivo = \"log_$data.txt\";\n\n//Texto a ser impresso no log:\n $texto = \"[$hora][$ip]> $msg \\n\";\n\n $manipular = fopen(\"$arquivo\", \"a+b\");\n fwrite($manipular, $texto);\n chmod (getcwd().$arquivo, 0777);\n fclose($manipular);\n\n\n }", "function acf_dev_log()\n{\n}", "function to_log($vvod)\n{\n $date = date(\"Y_m_d\");\n $filename = \"logs/log_\".$date.\".txt\";\n $string = date(\"d.m.Y H:i:s\").\" => $vvod\".\"\\n\";\n $f = fopen($filename,\"a+\");\n fwrite($f,$string);\n fclose($f);\n}", "function writeLog(){\n\t\t$logContainer=new LogContainer();\n\t\t$ret = $this->writeLogFromLogContainer($logContainer);\n\t\t//special delivery for v9\n\t\t$old_appid=$logContainer->getAppid();\n\t\tif(substr($old_appid, 0,3)==\"v9-\" && !($old_appid == \"v9-v9\")){\n\t\t\trequire_once APP_ROOT.\"/v9_transforms.php\";\n\t\t\t$logContainer->setAppid(\"v9-v9\");\n\t\t\t$ret = $this->writeLogFromLogContainer($logContainer);\n\t\t}\n\t\treturn $ret;\n\t}", "public static function logging()\n {\n }", "public function log()\n {\n if(Auth::user()->type != 'مدیر'){ return redirect()->back(); }\n /* Security Admin Panel */ \n $users = UserLog::orderby('pk_userlog','desc')->get();\n $instance_Model_user =new UserLog();\n $names = $instance_Model_user->GetListAllNameColumns_ForTable();\n //dd($users);\n return view('admin.user.userlog',compact('users','names'));\n }", "function selectionLogEntry ($site)\n\t{\n\t}", "function hlog($msg,$logfile,$setperm=false,$sethost=false,$levelstr=NULL)\n{\n\n\t\tdate_default_timezone_set(DEFAULT_TIME_ZONE);\n\t\t$today = date(\"Y-m-d\");\n\n\t\tif($sethost)\n\t\t{\n\t\t\t$hostname = gethostname();\n\t\t\t$logfile = $logfile.'_'.$hostname;\n\t\t}\n\n\t\t$filename = VBOXLITE_LOG_LOCATION.$logfile.'_'.$today.'.csv';\n\n\t\tif (file_exists($filename)){\n\t\t\tif($setperm)\n\t\t\t{\n\t\t\t\tchmod($filename,0777);\n\t\t\t}\n\t\t}\n\n\t\t$fd = fopen($filename, \"a\");\n\t\t$timestamp = round(microtime(true));\n\n\t\tif(!empty($levelstr))\n\t\t{\n\t\t\tfwrite($fd, $timestamp.LLOG_SEPARATOR.\"[\".$levelstr.\"]\".LLOG_SEPARATOR.$msg.PHP_EOL);\n\t\t}else\n\t\t{\n\t\t\tfwrite($fd, $timestamp.LLOG_SEPARATOR.$msg.PHP_EOL);\n\t\t}\n\t\tfclose($fd);\n}", "function log_result($word) {\n\t$fp = fopen(\"./log.txt\",\"a\");\t\n\tflock($fp, LOCK_EX) ;\n\tfwrite($fp,$word.\":执行日期:\".strftime(\"%Y%m%d%H%I%S\",time()).\"\\t\\n\");\n\tflock($fp, LOCK_UN); \n\tfclose($fp);\n}", "function audit_log()\n\t{\n\t\tif($this->session->userdata('logged_in')==\"\")\n\t\t\theader(\"Location: \".$this->config->base_url().\"Login\");\n\t\t\t$this->cache_update();\n\t\t\t$this->check_privilege(14);\n\t\t//mandatory\n\t\t$this->load->driver('cache',array('adapter' => 'file'));\n\t\t$u_type = array('var'=>$this->cache->get('Active_status'.$this->session->userdata('loginid'))['user_type_id_fk']);\n\t\t$this->load->model('profile_model');\n\t\t$noti = array('meeting'=>$this->profile_model->meeting_notification());\n\t\t$u_type['notification'] = $noti;\n\t\t$u_type['noti1']=$this->profile_model->custom_notification();\n\t\t$this->load->view('dashboard/navbar',$u_type);\n\t\t$da = $this->profile_model->get_profile_info($this->session->userdata('uid'));\n\t\t$this->load->view('dashboard/sidebar',$da);\n\t// ends here\n\t\t$this->load->model('Sup_Admin');\n\t\t$this->load->model('Crud_model');\n\t\t$data['audit']=$this->Sup_Admin->get_user_details();\n\t\t$data['login_as']=array();\n\t\tforeach ($data['audit'] as $key) \n\t\t{\n\t\t\tarray_push($data['login_as'],$this->Sup_Admin->get_log_id($key['login_id_fk']));\n\t\t}\n\t\t$this->load->view('audit_view',$data);\n\t\t$this->db->trans_off();\n\t \t$this->db->trans_strict(FALSE);\n\t\t$this->db->trans_start();\n\t\t$this->Crud_model->audit_upload($this->session->userdata('loginid'),\n\t\t\t\t\t\t\t current_url(),\n\t\t\t\t\t\t\t 'Audit Log Page Visited',\n\t\t\t\t\t\t\t 'Custom message here');\n\t\t$this->db->trans_complete();\n\t\t$this->load->view('dashboard/footer');\n\n\t}", "public function filLog($params)\r\n { \r\n \r\n $uid=$params['uid'];\r\n $udsql=\"SELECT\r\n logmobile,\r\n user_name,\r\n is_vendor,\r\n email\r\n FROM\r\n tbl_registration\r\n WHERE\r\n user_id=\".$uid.\"\";\r\n $udres=$this->query($udsql);\r\n $chkres=$this->numRows($udres);\r\n if($chkres == 1)\r\n {\r\n while($row1=$this->fetchData($udres))\r\n {\r\n $udetail['umobile']=$row1['logmobile'];\r\n $udetail['uname']=$row1['user_name'];\r\n $udetail['uemail']=$row1['email'];\r\n $isV['isV'] = $row1['is_vendor'];\r\n }\r\n\r\n $chksql=\"SELECT user_id FROM tbl_product_enquiry where user_id=\".$uid.\" AND product_id=\".$params['pid'].\" and vendor_id=\".$params['pid'].\"\";\r\n $chkres=$this->query($chksql);\r\n $numchk=$this->numRows($chkres);\r\n \r\n if($numchk == 0)\r\n {\r\n if($isV['isV'] == 2)\r\n {\r\n $arr= array();\r\n $err=array('Code'=>0,'Msg'=>'Data Hidden');\r\n }\r\n else\r\n { \r\n \r\n $isql=\" INSERT\r\n INTO\r\n tbl_product_enquiry\r\n (user_id,\r\n user_name,\r\n user_mobile,\r\n user_email,\r\n product_id,\r\n vendor_id,\r\n type_flag,\r\n updatedby,\r\n date_time)\r\n VALUES\r\n (\".$uid.\",\r\n \\\"\".$udetail['uname'].\"\\\",\r\n \\\"\".$udetail['umobile'].\"\\\",\r\n \\\"\".$udetail['uemail'].\"\\\",\r\n \\\"\".$params['pid'].\"\\\",\r\n \\\"\".$params['vid'].\"\\\",\r\n 1,\r\n 'customer',\r\n now())\r\n ON DUPLICATE \r\n KEY UPDATE updatedby=now()\";\r\n $ires=$this->query($isql);\r\n \r\n \r\n if($ires)\r\n {\r\n global $comm;\r\n\r\n $getvdet = \"SELECT\r\n logmobile,\r\n email,\r\n user_name\r\n FROM\r\n tbl_registration\r\n WHERE\r\n user_id =\".$params['vid'].\" \";\r\n $getvres = $this->query($getvdet);\r\n $getRow = $this->fetchData($getvres);\r\n\r\n $catidSql = \" SELECT \r\n (SELECT GROUP_CONCAT(category_id) FROM tbl_product_category_mapping WHERE product_id=\".$params['pid'].\") AS cids, \r\n (SELECT GROUP_CONCAT(catid) FROM tbl_category_master WHERE p_catid=0 AND catid IN(cids)) AS category_id \r\n FROM \r\n tbl_product_category_mapping \r\n WHERE \r\n product_id =\".$params['pid'].\"\r\n AND \r\n display_flag=1\";\r\n $catidRes = $this->query($catidSql);\r\n $catidRow = $this->fetchData($catidRes);\r\n $catid = $catidRow['category_id'];\r\n \r\n $pidDetSql = \" SELECT\r\n *\r\n FROM\r\n tbl_product_search as a,\r\n tbl_product_master as b\r\n WHERE\r\n a.product_id=\\\"\".$params['pid'].\"\\\"\r\n AND\r\n a.product_id = b.product_id\r\n AND\r\n a.active_flag=1\";\r\n $pidDetRes = $this->query($pidDetSql);\r\n\r\n if($pidDetRes)\r\n {\r\n while($row = $this->fetchData($pidDetRes))\r\n {\r\n $pdet['pid'] = $row['product_id'];\r\n $pdet['barcode']= $row['barcode'];\r\n $pdet['shape']= $row['shape'];\r\n $pdet['metal']= $row['metal'];\r\n $pdet['gold_purity'] = $row['gold_purity'];\r\n $pdet['gold_weight'] = $row['gold_weight'];\r\n $pdet['type'] = $row['type'];\r\n $pdet['certified'] = $row['certified'];\r\n $pdet['carat'] = $row['carat'];\r\n $pdet['cut'] = $row['cut'];\r\n $pdet['clarity'] = $row['clarity'];\r\n $pdet['color'] = $row['color'];\r\n $pdet['price'] = $row['price'];\r\n }\r\n $vSql = \" SELECT\r\n gold_rate,\r\n dollar_rate,\r\n silver_rate\r\n FROM\r\n tbl_vendor_master\r\n WHERE\r\n vendor_id =\".$params['vid'];\r\n $vRes = $this->query($vSql);\r\n $vRow = $this->fetchData($vRes);\r\n $pdet['goldRate'] = $vRow['gold_rate'];\r\n $pdet['silverRate'] = $vRow['silver_rate'];\r\n $pdet['dollarRate'] = $vRow['dollar_rate'];\r\n }\r\n if($catid == \"10000\")\r\n {\r\n\r\n $p[0] = $pdet['pid'];\r\n $p[1] = $pdet['shape'];\r\n $p[2] = $pdet['certified'];\r\n $p[3] = $pdet['barcode'];\r\n $p[4] = $pdet['cut'];\r\n $p[5] = $pdet['carat'];\r\n $p[6] = $pdet['clarity'];\r\n $p[7] = $pdet['color'];\r\n $p[8] = ceil($pdet['carat']*$pdet['price']*$pdet['dollarRate']);\r\n $msgng = array(0=>'Product Id',1=>'Shape',2=>'Certificate',3=>'Barcode',4=>'Cut',5=>'Carat',6=>'Clarity',7=>'Colour',8=>'Price');\r\n }\r\n if($catid == \"10001\")\r\n {\r\n $p[0] = $pdet['pid'];\r\n $p[1] = $pdet['shape'];\r\n $p[2] = $pdet['metal'];\r\n $p[3] = $pdet['barcode'];\r\n $p[4] = $pdet['gold_purity'];\r\n $p[5] = $pdet['gold_weight'];\r\n $p[6] = $pdet['certified'];\r\n $p[7] = ceil($pdet['price']);\r\n $msgng = array(0=>'Product Id',1=>'Type',2=>'Metal',3=>'Barcode',4=>'Purity',5=>'Gold Weight',6=>'Certificate',7=>'Price');\r\n }\r\n if($catid == \"10002\")\r\n {\r\n $p[0] = $pdet['pid'];\r\n $p[1] = $pdet['type'];\r\n $p[2] = $pdet['metal'];\r\n $p[3] = $pdet['barcode'];\r\n $p[4] = $pdet['gold_purity'];\r\n $p[5] = $pdet['gold_weight'];\r\n if($pdet['metal'] == 'Gold')\r\n {\r\n $p[6]= ceil($pdet['gold_weight']*(($pdet['goldRate']/10)*($pdet['gold_purity']/995)));\r\n }\r\n else if($pdet['metal'] == 'Silver')\r\n {\r\n $p[6]=ceil($pdet['gold_weight']*(($pdet['silverRate']/1000)*($pdet['gold_purity']/999)));\r\n }\r\n $msgng = array(0=>'Product Id',1=>'Type',2=>'Metal',3=>'Barcode',4=>'Purity',5=>'Gold Weight',6=>'Price');\r\n }\r\n $msg ='';\r\n for($i=0;$i < count($p);$i++)\r\n {\r\n $msg .= $msgng[$i].' : '.$p[$i].\",\\r\\n\";\r\n }\r\n $tempParams = array('useremail'=>$udetail['uemail'],'user_name'=>$udetail['uname'],'user_mob'=>$udetail['umobile'],'mobile'=>$getRow['logmobile'],'email'=>$getRow['email'],'username'=>$getRow['user_name'],'pdet'=>urlencode($msg));\r\n $sendMail = $this->sendEnqMailSMS($tempParams,$catid);\r\n $fil = $sendMail['error']['code'];\r\n if($fil == 0)\r\n {\r\n $arr=\"Log Entry is successfully completed\";\r\n $err=array('Code'=>0,'Msg'=>'Data inserted');\r\n }\r\n }\r\n else\r\n {\r\n $arr=array();\r\n $err=array('Code'=>1,'Msg'=>'Error in completing the operation');\r\n }\r\n }\r\n }\r\n }\r\n $result=array('results'=>$arr,'error'=>$err);\r\n return $result;\r\n }", "public function updateLog () {\n\t\t$this->log = json_encode($this->SYN_Log);\n\t\t$this->save();\n\t}", "function TransLog($message){\t\n notify_webmaster($message);\t\n}", "protected function getLogEntries() {}", "function writeLog($string){\n}", "public function log_accessi($cartella='',$dati_aggiuntivi=''){\n\n\t\t$Ndata=new Ndate();\t\n\t\t\t\n\t\t$ip = $_SERVER['REMOTE_ADDR']; //Indirizzo ip\n\t\t$agent = $_SERVER['HTTP_USER_AGENT']; //User agent come Firefox etc, e altre informazioni.\n\t\t$ref = $_SERVER['HTTP_REFERER']; // Referer, come sono arrivati al sito, con che link, dove lo hanno cliccato\n\t\t$date = $Ndata->nomegiorno().' '.$Ndata->giorno().' '.$Ndata->nomemese().' '.$Ndata->anno().' alle '.$Ndata->ora('','si'); //Data e giorno.\n\t\tif($cartella!='')$cartella.='/';\n\t\t$file = $cartella.\"Nlog.htm\"; //Nome del file log.\n\n\t\t$open = fopen($file, \"a+\"); //Apri il file\n\t\t\t\n\t\tfwrite($open, \"<p><b>Indirizzo IP:</b> \" .$ip . \"<br/>\"); //stampa/scrivi indriizzo ip.\n\t\tfwrite($open, \"<b>Referer:</b>\". $ref . \"<br/>\"); //stampa/scrivi il referer.\n\t\tfwrite($open, \"<b>UserAgent:</b>\". $agent. \"<br/>\"); //stampa/scrivi lo useragent.\n\t\tfwrite($open, \"<b>Data & Ora:</b>\". $date. \"<br/>\"); //stampa/scrivi data e ora\n\t\t\n\t\tif($dati_aggiuntivi!=''){\n\t\t\t$dati=explode(',,',$dati_aggiuntivi);\n\t\t\tfor($i=0;$i<count($dati);$i++){\n\t\t\t\tfwrite($open, \"<b>\".$dati[$i++].\":</b>\". $dati[$i]. \"<br/>\"); //aggiungi valori aggiuntivi al file\n\t\t\t}\n\t\t}\n\t\tfwrite($open, \"</p>\");\n\t\t\n\t\tfclose($open); // chiudi il file\n\t}", "function putLog($modulo,$funcion){\n$strquery=\"INSERT INTO log (ip,id_user,fecha,modulo,funcion) VALUES ('%s',%d,'%s',%d,%d)\";\n$queryn=sprintf($strquery,$_SERVER['REMOTE_ADDR'],$_SESSION['id_usuario'],date(\"Y-m-d H:i:s\"),$modulo,$funcion);\n//echo $queryn;\n\n$result=@pg_query($queryn) or die('ERROR AL INSERTAR DATOS DE LOG: ' . pg_last_error());\n\n//$log = pg_fetch_array($result, NULL, PGSQL_ASSOC);\n//print_r($log);\n\n///////////////////////////////////////////////////////////////////////////////////////////////\n\n\n\treturn 0;\n\t\t\t}", "private static function addLog($msg) {\n\t\tself::$log[] = '\"'.formatTimestamp(time()).' - '.$msg.'\"';\n\t}", "public function log()\n \t{\n\t $reference = $this->session->userdata('logged_in');\n\t\tif(empty($reference)){\n\t\t\tredirect('','refresh');\n\t\t}\n\t\t$stu_id = $reference['cms_id'];\n\t\t$stu_role = $reference['cms_role'];\n\n\t\t$data['profile'] = $this->sam->get_students_profile_record($stu_id,$stu_role);\n\t\t$data['menus'] = $this->sam->get_menu_role_permissions($stu_role);\n\n\t\t$studentid \t = $data['profile']->stud_id;\n\t\t$studentrole = $data['profile']->roles_id;\n\n\t\t$data['message'] = $this->sam->get_all_unread_notification($studentid,$studentrole);\n\t\t$data['msg_list'] = $this->sam->get_all_unread_notification_detail_list($studentid,$studentrole);\n\n\t\t$data['notify_list'] = $this->sam->get_all_notifications_list_read_unread($studentid,$studentrole);\n\n\t\t// echo \"<pre>\";\n\t\t// print_r($data);die;\n\t\t\n\t\t$this->load->view('students/includes/header', $data);\n\t\t$this->load->view('students/includes/sidebar');\n\t\t$this->load->view('students/includes/top_header');\n\t\t$this->load->view('students/viewNotifications');\n\t\t$this->load->view('students/includes/footer');\n \t}", "public function get_query_log()\n {\n }", "function logToFile($file,$level,$msg) { \n\t\t// Connectie met DB\n\t\t$db_conn = new SafeMySQL(array('db'=>DB_LOGS));\t\n\t\t$pdo = new PDO(\"mysql:host=\".DB_HOST.\";dbname=\".DB_LOGS.\";charset=utf8\", DB_USER, DB_PASS); \t\n\n\t\t$user = (isset($_SESSION[SES_NAME]['user_email'])) ? htmlentities($_SESSION[SES_NAME]['user_email'], ENT_QUOTES, 'UTF-8') : '---';\n\t\t$env = APP_ENV;\t\t\n\t\t$year = date(\"Y\");\n\t\t$date = date(\"Y-m-d\");\n\t\t$path = ROOT_PATH;\n $path .= \"/Src/Logs/\".$year.\"/\";\n\t\t// Bestaat de folder niet maak deze dan aan\n\t\tif(!file_exists($path)){\n\t\t\tmkdir($path);\n\t\t}\n\t\t\n $filename = $path.$date.'.log';\n // Open file\n\t\t$fileContent = @file_get_contents($filename);\n\t\t\t\n\t\t$datum = date(\"D Y-m-d H:i:s\");\n\t\t\t// Log level\n\t\t\tif($level === 1){\n\t\t\t\t$level = \"CRITICAL\";\n\t\t\t} elseif($level === 2){\n\t\t\t\t$level = \"WARNING\";\n\t\t\t} else {\n\t\t\t\t$level = \"NOTICE\";\n\t\t\t}\n\t\t\t\n $str = \"[{$datum}] [{$level}] [{$user}] [{$env}] [{$file}] {$msg}\".PHP_EOL; \n // Schrijf string naar file\n file_put_contents($filename, $str . $fileContent);\n\t\t\n\t\t$query_arr = array(\n\t\t\t'datum' \t\t\t=> date(\"Y-m-d H:i:s\"),\n\t\t\t'filename' \t\t\t=> $file,\n\t\t\t'criteria_level' \t=> $level,\n\t\t\t'msg'\t\t\t\t=> $msg\n\t\t);\t\t\n\t\t//var_dump($db_conn->query(\"SHOW TABLES\"));\n\t\t\n\t\tif(!$db_conn->query(\"SHOW TABLES LIKE 'beheer_log_\".$year.\"'\")){\n\t\t\t$db_conn->query(\"CREATE TABLE `beheer_log_\".$year.\"` (\n\t\t\t\t\t\t\t`id` INT(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t`datum` DATETIME DEFAULT NULL,\n\t\t\t\t\t\t\t`filename` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,\n\t\t\t\t\t\t\t`criteria_level` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,\n\t\t\t\t\t\t\t`msg` VARCHAR(5000) COLLATE utf8_unicode_ci DEFAULT NULL,\n\t\t\t\t\t\t\tPRIMARY KEY (`id`)\n\t\t\t\t\t\t) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\");\n\n\t\t\t$db_conn->query(\"INSERT INTO `beheer_log_\".$year.\"` SET ?u\", $query_arr);\n\t\n\t\t// Insert in DB\n\t\t} else {\n\t\t\t$db_conn->query(\"INSERT INTO `beheer_log_\".$year.\"` SET ?u\", $query_arr);\t\t\n\t\t}\t\t\t\t\t\n\t\t\t\t\n\t}", "function logBegin($format)\n\t{\n\t\t// Log aktiv?\n\t\tif (!$this->m_enable)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\t// Uhrzeit des Logeintrages\n\t\t$t = time();\n\t\t//m_clockBegin = clock();\n\t\t$ltm = localtime($t, 1);\n\t\t\n\t\t// Mit fuehrendem Zeitstring?\n\t\tif ($this->m_withTimestamp)\n\t\t{\t\n\t\t\t$timeString = sprintf(\"%02u:%02u:%02u\\t\", $ltm[\"tm_hour\"], $ltm[\"tm_min\"], $ltm[\"tm_sec\"]);\n\t\t}\n\t\t/*\n\t\t// Dateiname der Logdatei\n\t\t$fileName = sprintf($this->m_fileNameTemplate, \n\t\t\t$ltm[\"tm_year\"] % 100, $ltm[\"tm_mon\"] + 1, $ltm[\"tm_mday\"]);\n\t\t// Pruefen ob sich der Name geandert hat.\n\t\tif (strcmp($fileName, $this->m_fileName) != 0)\n\t\t{\n\t\t\t// Dateiname hat sich geaendert.\n\t\t\t$this->m_fileName = $fileName;\n\t\t\t$this->logCheck(); // Eventuell die aelteste Logdatei loeschen.\n\t\t}\n\t\t*/\n\t\t// Alle Argumente als Parameter aufbereiten\n\t\t$args = func_get_args();\n\t\t// Erstes Element ist Formatstring, diesen entfernen\n\t\tarray_shift($args);\n\t\t// Logzeile aufbauen und halten\n\t\t$this->m_row = vsprintf($timeString . $format, $args);\n\n\t\treturn 1;\n\t}", "function publishLog() {\n\t\t$id = $this->current_log;\t\t\n\t\t$res = $this->query(\"SELECT event_id FROM $this->table_log WHERE id=$id\");\n\t\t$row = $res->fetch_assoc();\n\t\t$cal_id = explode(\",\",$row['event_id']);\n\t\t$calEvent = $this->calendar_instance->getEventDetails($row['event_id']);\n\t\t$topic = $calEvent['caption'];\n\t\t$year = $calEvent['year'];\n\t\t$slug = $calEvent['slug'];\n\t\t$url = $this->generateCoolURL(\"/$year/$slug\");\n\t\t$this->addToActivityLog(\"publiserte logg fra <a href=\\\"$url\\\">$topic</a>.\",false,\"major\");\n\t}", "public function logFilePath();", "function dblog_event($id) {\n $severity = watchdog_severity_levels();\n $result = db_query('SELECT w.*, u.name, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid WHERE w.wid = :id', array(':id' => $id))->fetchObject();\n if ($dblog = $result) {\n $rows = array(\n array(\n array('data' => t('Type'), 'header' => TRUE),\n t($dblog->type),\n ),\n array(\n array('data' => t('Date'), 'header' => TRUE),\n format_date($dblog->timestamp, 'long'),\n ),\n array(\n array('data' => t('User'), 'header' => TRUE),\n theme('username', array('account' => $dblog)),\n ),\n array(\n array('data' => t('Location'), 'header' => TRUE),\n l($dblog->location, $dblog->location),\n ),\n array(\n array('data' => t('Referrer'), 'header' => TRUE),\n l($dblog->referer, $dblog->referer),\n ),\n array(\n array('data' => t('Message'), 'header' => TRUE),\n theme('dblog_message', array('event' => $dblog)),\n ),\n array(\n array('data' => t('Severity'), 'header' => TRUE),\n $severity[$dblog->severity],\n ),\n array(\n array('data' => t('Hostname'), 'header' => TRUE),\n check_plain($dblog->hostname),\n ),\n array(\n array('data' => t('Operations'), 'header' => TRUE),\n $dblog->link,\n ),\n );\n $build['dblog_table'] = array(\n '#theme' => 'table',\n '#rows' => $rows,\n '#attributes' => array('class' => array('dblog-event')),\n );\n return $build;\n }\n else {\n return '';\n }\n}", "function logMe() {\n\tglobal $conn;\n\t\t\n\t// THIS IS FOR YOU TO COMPLETE\n}", "function ttp_lms_log( $tag = \"\", $msg = \"\") {\n\tlog( $tag, $msg );\n}", "function log($content=\"\",$loglevel = \"\") {\n\t// si esta desactivado, salimos\n\t//echo \"Veamos: \" .$this->LogFile. \" y \" .$this->LogLevel.\"<br>\"; // DEBUG\n\n\tif (!$this->LogLevel) return;\n\t \n\t// abrimos el fichero\n\t$file = fopen($this->LogFile,\"a\");\n\t$cn = \"<log date='\" . date(\"j-m-Y G:i:s\") . \"'>$content</log>\\n\";\n\t\n\tfputs($file, $cn);\n\t//Cerramos fichero\n\tfclose($file);\n }", "public function getLogTable() {}", "private static function _initLog()\n {\n if (!empty(self::$config->log->servers)) {\n $servers = self::$config->log->servers->toArray();\n } else {\n $servers = self::LOG_SERVERS;\n }\n\n if (php_sapi_name() == 'cli') {\n $extra = [\n 'command' => implode(' ', $_SERVER['argv']),\n 'mem' => memory_get_usage(true),\n ];\n } elseif (isset($_REQUEST['udid'])) {\n //for app request\n $extra = [\n 'h' => $_SERVER['HTTP_HOST'] ?? '',\n 'uri' => $_SERVER['REQUEST_URI'] ?? '',\n 'v' => $_REQUEST['v'] ?? '',\n 'd' => $_REQUEST['udid'] ?? '',\n 't' => $_REQUEST['mytoken'] ?? $_REQUEST['mytoken_sid'] ?? '',\n 'os' => $_REQUEST['device_os'] ?? '',\n 'm' => $_REQUEST['device_model'] ?? '',\n 'p' => $_REQUEST['platform'] ?? '',\n 'l' => $_REQUEST['language'] ?? '',\n 'real_ip' => \\Util::getClientIp(),\n ];\n } else {\n //pc or other ?\n $extra = [\n 'h' => $_SERVER['HTTP_HOST'] ?? '',\n 'uri' => $_SERVER['REQUEST_URI'] ?? '',\n 'v' => $_REQUEST['v'] ?? '',\n 't' => $_REQUEST['mytoken'] ?? $_REQUEST['mytoken_sid'] ?? '',\n 'p' => $_REQUEST['platform'] ?? '',\n 'l' => $_REQUEST['language'] ?? '',\n 'ua' => $_SERVER['HTTP_USER_AGENT'] ?? '',\n 'real_ip' => \\Util::getClientIp(),\n ];\n }\n\n if (\\Yaf\\ENVIRON != 'product') {\n \\Log::setLogFile(self::$config->log->path);\n }\n\n LoggerHandler::setServers($servers);\n LoggerHandler::setEnv(\\YAF\\ENVIRON);\n LoggerHandler::setExtra($extra);\n LoggerHandler::setUniqueId($_REQUEST['preRequestId'] ?? self::$request->header('preRequestId'));\n }", "public function getLogFile() {}", "public function insert_error_log($log = NULL){\n\t\tif (!empty($this->input->post('log'))) {\n\t\t\t$log = $this->input->post('log');\n\t\t}\n\t\t$data = array(\n\t\t\t'value' => $log\n\t\t);\n\t\t$insertStatus = $this->Main_model->insert_error_log($data);\n\t\t// echo $insertStatus;\n\t}", "public static function initSysLog() {}" ]
[ "0.70409", "0.70409", "0.70409", "0.70099217", "0.69143885", "0.6909542", "0.6905303", "0.6900457", "0.6891625", "0.6873019", "0.6871168", "0.6870433", "0.68411607", "0.6838295", "0.68371564", "0.68205917", "0.6811551", "0.6796058", "0.67258644", "0.6695385", "0.66761523", "0.66289496", "0.6595902", "0.65829474", "0.6558288", "0.65240496", "0.6500968", "0.6498843", "0.6485649", "0.64595836", "0.6450561", "0.64487535", "0.6443934", "0.6439028", "0.64360446", "0.6428257", "0.64225644", "0.64001876", "0.6391487", "0.6389977", "0.6379074", "0.6368908", "0.6364403", "0.635818", "0.6351927", "0.6348892", "0.63431066", "0.6342034", "0.6336451", "0.63363093", "0.6330736", "0.63155955", "0.6302563", "0.6288433", "0.6285009", "0.6274254", "0.627416", "0.6268386", "0.62588584", "0.6254013", "0.62532395", "0.6251155", "0.6247703", "0.6242165", "0.62405014", "0.62256134", "0.62150866", "0.62148917", "0.6212882", "0.62126344", "0.6211243", "0.62037575", "0.62015396", "0.62003464", "0.6199529", "0.61880606", "0.61878103", "0.6187557", "0.6186213", "0.6185592", "0.618291", "0.6182867", "0.6180987", "0.618031", "0.6178938", "0.6178742", "0.61787033", "0.617158", "0.6159178", "0.6158157", "0.61547506", "0.61488056", "0.6146105", "0.6142035", "0.6140436", "0.6135899", "0.6126886", "0.61192745", "0.6118451", "0.6117611", "0.61172765" ]
0.0
-1
Returns information on a user.
public function get($user) { return $this->makeRequest('get', "/users/{$user}"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserInfo()\n {\n return $this->_process('user/info')->user;\n }", "function getUserInfo(){\n\n\t\t/* Fetch user info from Flickr */\n\t\t$user = $this->askFlickr('people.getinfo','user_id='.$this->user);\n\n\t\t/* Return User info */\n\t\treturn $user;\n\t}", "public function getUserInfo() {}", "abstract public function getUserInfo();", "public function getUserInfo()\n {\n }", "private function getUserInfo()\n {\n // TODO This could be cached\n return $this->userInfoApi->getUserInfo();\n }", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function user_information($user_name)\n {\n $url = preg_replace('/set/i', 'user:' . $user_name, $this->public_url);\n return $this->curl($url)->user;\n }", "public static function getUser();", "public function getUserInfo()\n {\n $CI = &get_instance();\n if (!$this->loggedIn()) {\n return null;\n } else {\n $id = $CI->session->userdata('user_id');\n return $CI->user_model->get($id);\n }\n }", "public function getDetails()\n {\n if($user = $this->loadUser())\n \treturn $user;\n }", "function getUserInfo() {\n\t$page = $this -> get('http://vk.com/al_profile.php') -> body;\n\n\t$pattern = '/\"user_id\":([0-9]*),\"loc\":([\"a-z0-9_-]*),\"back\":\"([\\W ]*|[\\w ]*)\",.*,\"post_hash\":\"([a-z0-9]*)\",.*,\"info_hash\":\"([a-z0-9]*)\"/';\n\tpreg_match($pattern, $page, $matches);\n\tarray_shift($matches);\n\t\n\t$this -> user['id'] = $matches[0];\n\t$this -> user['alias'] = $matches[1];\n\t$this -> user['name'] = $matches[2];\n\t$this -> user['post_hash'] = $matches[3];\n\t$this -> user['info_hash'] = $matches[4];\n\n\treturn $this -> user;\n\t}", "public function get_user_info()\n\t{\n\t\tif ( function_exists('wp_remote_get') ) {\n\t\t\t$json = wp_remote_get($this->API_URL . '?username='. $this->user);\n\t\t\t$user_info = @json_decode($json['body'], true);\n\t\t} else {\n\t\t\t$json = @file_get_contents($this->API_URL . '?username='. $this->user);\n\t\t\t$user_info = @json_decode($json, true);\n\t\t}\n\t\t\n\t\treturn $user_info['resp'];\n\t}", "public function getUserInformation()\n {\n return $this->userInformation;\n }", "public function getInfo()\n {\n $user = User::with(['optician'])->find(auth()->id());\n\n return api_resource('mobile\\User')->make($user);\n }", "public function getUserInfo ()\n\t{\n\t\t$info[\"id\"]\t\t\t\t\t\t= $this->id;\t\t\t\t\t//The unique id of the user in the database\n\t\t$info[\"user_id\"] \t\t\t\t= $this->userId;\t\t\t\t//The id of the user includes API id's\n\t\t$info[\"email\"]\t\t\t\t\t= $this->email;\t\t\t\t\t//The email of the user\n\t\t$info[\"description\"]\t\t\t= $this->description;\t\t\t//The description of the user\n\t\t$info[\"location\"]\t\t\t\t= $this->location;\t\t\t\t//The location of the user\n\t\t$info[\"first_name\"]\t\t\t\t= $this->firstName;\t\t\t\t//The first name of the user\n\t\t$info[\"last_name\"]\t\t\t\t= $this->lastName;\t\t\t\t//The last name of the user\n\t\t$info[\"name\"]\t\t\t\t\t= $this->fullName;\t\t\t\t//The full name of the user\n\t\t$info[\"username\"]\t\t\t\t= $this->username;\t\t\t\t//The username of the user\n\t\t$info[\"type\"]\t\t\t\t\t= $this->type;\t\t\t\t\t//The type of user registration\n\t\t$info[\"thumbnail\"]\t\t\t\t= $this->thumbnail;\t\t\t\t//The user's image thumbnail\n\t\t$info[\"gender\"]\t\t\t\t\t= $this->gender;\t\t\t\t//The gender of the user\n\t\t$info[\"num_calendars\"]\t\t\t= $this->numCalendarsCreated;\t//The number of calendars the user has created\n\t\t$info[\"num_followed_calendars\"]\t= $this->numCalendarsFollowed;\t//The number of calendars the user is following\n\t\t$info[\"primary_calendar\"]\t\t= $this->primaryCalendar;\t\t//The primary calendar that a user is using\n\t\t\n\t\treturn $info;\n\t}", "public function getInfoProfile(){\n return $this->get_user_by_id($this->getAccountID());\n }", "public function user()\n\t{\n\n\t\t$user = $this->current_user ? $this->current_user : $this->ion_auth->get_user();\n\n\t\techo json_encode($user);die;\n\t}", "public function get_userInfo()\n {\n return $this->call_method(\"get/userInfo\",\n array()\n );\n }", "function get_user_info( $user, $key )\n {\n //Unimplemented\n }", "public function userInfo()\n {\n $this->startBrokerSession();\n $user = null;\n\n $userId = $this->getSessionData('sso_user');\n\n if ($userId) {\n $user = $this->getUserInfo($userId);\n if (!$user) return $this->fail(\"User not found\", 500); // Shouldn't happen\n }\n\n header('Content-type: application/json; charset=UTF-8');\n echo json_encode($user);\n }", "public function getUserInfo()\n {\n return $this->userInfo;\n }", "public function getUserInfo()\n {\n return $this->userInfo;\n }", "public function getUserInfo()\n {\n return $this->userInfo;\n }", "function getUserInfo()\n {\n return $this->userinfo;\n }", "public function getUser()\n {\n\t\t//TODO User 1. How can we check the id of the JWT user?\n\t\t$user = '';\n\t\tif ($user) {\n\t\t\treturn $this->sendResponse(UserModel::find($user->id));\n\t\t}\n\t\treturn $this->sendResponse('You are not authorised to view this user');\n }", "public function actionInfo()\n {\n $uid = getParam('id', null);\n if (!$uid) {\n $uid = getMyId();\n }\n if (!empty($uid)) {\n\n $useModel = User::find()->active()->where(['id' => $uid])->one();\n if ($useModel) {\n $this->msg = 'User Info';\n $this->data = User::getDetail($uid);\n } else {\n $this->code = 404;\n $this->msg = 'User Not found';\n }\n } else {\n $this->code = 422;\n $this->msg = 'Id is require';\n }\n\n }", "public function getUser() {}", "public function getUser()\n {\n $this->getParam('user');\n }", "function get_user_info(){\t\t\n\t\t// Fetch user data from database\n\t\t$user_data_array=$this->UserModel->get_user_data(array('member_id'=>$this->session->userdata('member_id')));\n\t\techo $user_data_array[0]['company'].\"|\".$user_data_array[0]['address_line_1'].\"|\".$user_data_array[0]['city'].\"|\".$user_data_array[0]['state'].\"|\".$user_data_array[0]['zipcode'].\"|\".$user_data_array[0]['country_id'].\"|\".$user_data_array[0]['country_name'];\n\t}", "public function getMyAccountInfo()\n {\n $ajax_data = array();\n $user_id = $this->user_session->getUserId();\n\n if ($user_id) {\n $user = $this->user_logic->getUserById($user_id);\n if ($user !== false) {\n if (! empty($user) AND is_array($user)) {\n $user = array_pop($user);\n $ajax_data['code'] = 0;\n $ajax_data['data']['user'] = $user;\n $ajax_data['message'] = 'Successfully retrieved user info';\n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'User does not exist'; \n } \n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'Failed to get user info'; \n } \n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'Invalid user id';\n }\n \n $this->ajax_respond($ajax_data);\n }", "private function get_userInfo() {\n $params = [ 'user_ids' => $this->user_id ];\n $result = $this->api->users->get($params);\n $params['fields'] = '';\n $result2 = $this->api2->users->get($params);\n $result['hidden'] = (int)array_has($result2, 'hidden');\n return $result;\n }", "public function getInfo()\n {\n if(Sentry::check())\n {\n $user = Sentry::getUser();\n $data = $this->app->json([\n \"username\" => $user->first_name,\n \"password\" => \" \",\n \"email\" => $user->email\n ]);\n return $data;\n } else {\n return false;\n }\n }", "public function getMe()\n {\n return $this->_execute('/user/', self::METHOD_GET);\n }", "public static function retrieveUserInformation($user) {\n return R::find('user', 'username = ? ', [ $user ]);\n }", "public function user_get()\n\t{\n\t\t$id = $this->get('id');\n\t\tif ($id == null) {\n\t\t\t$data = $this->User->showUser();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data = $this->User->showUser($id);\n\t\t}\n\n\t\tif ($data) {\n\t\t\t$this->response($data,200);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->response([\n\t\t\t\t'error'=>true,\n\t\t\t\t'message'=>'Id tidak ada'\n\t\t\t],200);\n\t\t}\n\n\t}", "public function getUserInfo()\r\n {\r\n return self::makeCall('getUserInfo', array(), null, false, $this->sessionID);\r\n }", "public function getUserInfo()\n {\n\n if (empty($this->_user))\n return '';\n\n $userInfo = $this->_user;\n\n if (!empty($this->_password))\n $userInfo .= \":{$this->_password}\";\n\n return $userInfo;\n }", "public function user_info() {\n if ($this->rails_cookie_value() == NULL) {\n return null;\n }\n if (!self::$user_info && !self::$user_info_called) {\n $json_data = $this->api_request(\"user/\" . $this->rails_cookie_value());\n self::$user_info = $json_data->{'user'};\n self::$user_info_called = true;\n }\n return self::$user_info;\n }", "private function get_user_info() {\n $user_info = $this->_api_call('https://api.twitter.com/1.1/account/settings.json');\n return $user_info;\n }", "public function get_user_info()\n {\n try {\n $user_info = self::api(\"me\");\n } catch (Exception $e) {\n // TODO: Handle the error\n // Set the return value to be an empty array\n $user_info = array();\n }\n\n return $this->convert_array_to_object($user_info);\n }", "public function getUserDetails()\n {\n try\n {\n $user = \\App\\User::find(getLoggedInUser('id'));\n\n return createResponse(200, \"User Details.\", ['user' => $user]);\n\n }catch(\\Exception $e)\n {\n \\Log::error(\"Get user details API failed: \".$e->getMessage());\n return createResponse(config('httpResponse.SERVER_ERROR'),\n \"Cound not fetch detail!\",\n ['error' => 'Cound not fetch detail!']);\n }\n }", "public function userDetails(){\n\t\t\techo $this->name .\"<br>\";\n\t\t\techo $this->age .\"<br>\";\n\t\t\techo $this->dept .\"<br>\";\n\t\t}", "public function getUserInfo() {\n $endpoint = '/users';\n $client = $this->_constructClient($endpoint . '/self');\n try {\n $response = $client->request();\n } catch (Zend_Http_Client_Exception $e) { // timeout or host not accessible\n return;\n }\n\n // error in response\n if ($response->isError()) return;\n\n $result = Zend_Json::decode($response->getBody());\n\n // foursquare returned an error\n if ($result['meta']['code'] != 200) return;\n\n $entry = $result['response']['user'];\n $user = array(\n 'name' => $entry['firstName'] . ' ' . $entry['lastName'],\n 'id' => $entry['id'],\n 'avatar' => $entry['photo']\n );\n return $user;\n }", "public function get_user_info($info)\n {\n Session::_start();\n return Session::_get(\"user\", $info);\n }", "abstract protected function getUser();", "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 getUserInfo() {\n\t\t$userInfo = $this->HttpSocket->get(FLICKR_API_URL,\n\t\t\tarray(\n\t\t\t\t'method' => USERINFO,\n\t\t\t\t'format' => DATAFORMAT,\n\t\t\t\t'api_key' => $this->api_key,\n\t\t\t\t'user_id' => $this->photo['owner'],\n\t\t\t));\n\t\treturn unserialize($userInfo->body);\n\t}", "public function get_user()\n\t{\n\t\t$username = 'root';\n\t\t$password = md5('123');\n\n\t\t//将数据存储到数据中\n\t\t$arr = array(\n\t\t\t'username'\t=>\t$username,\n\t\t\t'psd' \t\t=>\t$password\n\t\t);\n\n\t\t$this->load->model('user_model','user');\n\t\t$data = $this->user->get_user($arr);\n\t\techo $this->_gen_userinfo_json($data);\n\t}", "public function getUser() {\n\t\t$urlUser = \"{$this->apiHost}/me.json\";\n\t\treturn $this->runCurl ( $urlUser );\n\t}", "public function getUserInfo()\n {\n $request = new Resource('GET', 'https://api.dropbox.com/1/account/info', array(\n 'oauth_consumer_key' => $this->consumer->client_id,\n 'oauth_token' => $this->token->access_token,\n ));\n\n // Sign the request using the consumer and token\n $request->sign($this->signature, $this->consumer, $this->token);\n\n $user = json_decode($request->execute());\n\n // Create a response from the request\n return array(\n 'uid' => $this->token->uid,\n 'name' => $user->display_name,\n 'email' => $user->email,\n 'location' => $user->country,\n );\n }", "public function getUserInfo($user)\r\n {\r\n return $this->exec('user_info ' . $this->escapePeer($user));\r\n }", "private function getUserInfo()\n\t{\n\t\t$user = Sentry::user();\n\t\t$result = array(\n\t\t\t'username' => $user->get('username'),\n\t\t\t'isAdmin' => $user->in_group('admin'),\n\t\t);\n\t\treturn $result;\n\t}", "function user_get()\n {\n $id = $this->get('id');\n if ($id == '') {\n $user = $this->db->get('auth_user')->result();\n } else {\n $this->db->where('id', $id);\n $user = $this->db->get('auth_user')->result();\n }\n $this->response($user, 200);\n }", "public function getUserInfo($user_name) {\n $query = \"SELECT * FROM users WHERE user_name = '%s'\";\n $vals = Array();\n $vals[] = $user_name;\n $user_info = $this->read_one($query, $vals);\n return $user_info;\n }", "public function user()\n {\n return $this->request('get', '/api/user');\n }", "public function getuserAction()\r\n {\r\n $User = $this->getUser();\r\n $data = $User;\r\n return $data;\r\n }", "public function getUserInfo($id)\n {\n return $this->_dbTable->getUserInfo($id);\n }", "public function UserDetails()\n {\n if (!Auth::user()) {\n return response()->json(\"Not Authenticated\");\n } else {\n $user = Auth::user();\n return response()->json([$user], 200);\n }\n }", "private function getUser()\n {\n return $this->user->getUser();\n }", "public function profileInfo()\n {\n\n return response()->json(User::where('id', '=', Auth::user()->id)->get());\n }", "function getUserInfo($user_id) {\n jincimport('utility.servicelocator');\n $servicelocator = ServiceLocator::getInstance();\n $logger = $servicelocator->getLogger();\n \n $query = 'SELECT id, username, name, email FROM #__users ' .\n 'WHERE id = ' . (int) $user_id;\n $dbo =& JFactory::getDBO();\n $dbo->setQuery($query);\n $logger->debug('JINCJoomlaHelper: executing query: ' . $query);\n $infos = array();\n if ($user_info = $dbo->loadObjectList()) {\n if (! empty ($user_info)) {\n $user = $user_info[0]; \n $infos['user_id'] = $user->id;\n $infos['username'] = $user->username;\n $infos['name'] = $user->name;\n $infos['email'] = $user->email;\n }\n return $infos;\n }\n return $infos;\n }", "public function info()\n {\n return $this->query($this->userEndpoint);\n }", "public static function get_user($user_id);", "abstract protected function getUserInfo($username);", "public function userDetails()\n {\n $user = Auth::user();\n return response()->json(['success' => $user]);\n }", "public function info() {\n $data = array();\n if ($this->user->is_logged_in()) {\n\n $this->user->get_user($this->user->getMyId());\n $data['user'] = $this->user;\n }\n $this->load->view('account/account_info', $data);\n }", "public function getUserInformation($uid, User &$userObject = null);", "public function user()\n {\n return $this->response_json($this->guard()->user());\n }", "function getProfileInfo($user){\n\t\tglobal $db;\n\t\t$sql = \"SELECT * from personalinfo WHERE user_email ='$user'\";\n\t\t$result =$db->query($sql);\n\t\t$infotable = $result->fetch_assoc();\n\t\treturn $infotable;\n\t}", "public function getUser() {\n\t\treturn $this->api->getUserById($this->getUserId());\n\t}", "function get_user_details($username)\n {\n }", "public static function user() {\n // $userInfo = $oauth2->userinfo->get();\n $userInfo = json_decode(json_encode(['email' => '@', 'gender' => null, 'name' => 'test', 'picture' => 'f']));\n return User::fromGoogleUser($userInfo);\n \n }", "public function getUser()\n {\n }", "function paces_get_users_all_details( $user_id ){\n return get_metadata( 'user', $user_id );\n}", "public function getUserInformation() {\n /** @var User $user */\n $user = auth()->user() ;\n\n return $user->toArray() ;\n }", "public function getUserInfo(): string\n {\n return (string) $this->user_info;\n }", "public function getUser() {\n\t\treturn $this->getTable('User')->find($this->user_id);\n\t}", "public function profile()\n {\n try {\n $user = auth('api')->user();\n return $this->sendResponse($user, trans('actions.get.success'));\n } catch (Exception $ex) {\n return $this->sendError([], trans('actions.get.failed'));\n }\n }", "public function getUser() {\r\n return $this->user;\r\n }", "public function getUser()\r\n {\r\n return $this->user;\r\n }", "function User_Info($UserIDorUsername)\n\t{\n\t\t$UserID=$this->GetUserID($UserIDorUsername);\n\t\t$R=j::SQL(\"SELECT * FROM jfp_xuser AS XU JOIN jf_users AS U ON (U.ID=XU.ID) WHERE XU.ID=?\",$UserID);\n\t\tif ($R) return $R[0];\n\t\telse return null;\n\t}", "public function fetchUser() {\n return $this->QueryAPI(\"current_user\");\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUserInfo(): array;", "public function getUser(){\n\t\treturn $this->user;\n\t}", "function show() {\n // Process request with using of models\n $user = Service::get_authorized_user();\n // Make Response Data\n if ($user !== NULL) {\n $data = [\n 'profile' => $user,\n ];\n $view = 'user/show';\n return $this->render($view, $data);\n } else {\n return Application::error403();\n }\n}", "public function getUserInfo($user_id) {\n $params = array_merge([\n 'token' => $this->bot_token,\n 'user' => $user_id,\n 'pretty' => true,\n ]);\n\n $response = $this->get($params, 'users.info');\n\n return $response['user'];\n }", "private function getUser()\n {\n $userObj = new Core_Model_Users;\n return $userObj->profile();\n }", "public function getUserDetails($userId) {\n\t\t\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t \n\t\t$query->select($db->quoteName(array('last_name', 'first_name', 'phone_1', 'phone_2', 'fax')));\n\t\t$query->from($db->quoteName('#__virtuemart_userinfos'));\n\t\t$query->where($db->quoteName('virtuemart_user_id') . ' = ' . $db->quote($userId));\n\n\t\t$db->setQuery($query);\n\t\t$user = $db->loadObject();\n\t\t\n\t\treturn $user;\n\t}", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }" ]
[ "0.81525236", "0.81124127", "0.8033031", "0.80057615", "0.7858954", "0.7805747", "0.77782476", "0.77782476", "0.77782476", "0.77782476", "0.77782476", "0.77782476", "0.77782476", "0.7729571", "0.7676437", "0.7664914", "0.7664103", "0.7638963", "0.76306313", "0.76062924", "0.75926584", "0.7586108", "0.7494266", "0.7483023", "0.74778926", "0.7465529", "0.74632597", "0.74545467", "0.74545467", "0.74545467", "0.741758", "0.73837453", "0.7375233", "0.7373065", "0.7363058", "0.7361974", "0.7356134", "0.7355019", "0.73484296", "0.73469067", "0.73422766", "0.73357123", "0.73327917", "0.73210406", "0.7314141", "0.7313886", "0.7297903", "0.7295563", "0.7286591", "0.7286389", "0.7279566", "0.72669506", "0.7246889", "0.7229902", "0.72208637", "0.7211363", "0.7200435", "0.7196821", "0.7179363", "0.71740246", "0.71723336", "0.71556646", "0.7151242", "0.713461", "0.7131392", "0.7129433", "0.7109464", "0.71081764", "0.7098196", "0.70873374", "0.70803857", "0.7080051", "0.70623875", "0.70599", "0.70557624", "0.70554435", "0.7053184", "0.70508736", "0.7050455", "0.70487225", "0.7042894", "0.7037538", "0.7035985", "0.70112324", "0.7010006", "0.6997224", "0.69968563", "0.69958496", "0.69938684", "0.6990309", "0.6990309", "0.6990309", "0.6990309", "0.69876754", "0.6986128", "0.6982763", "0.69661194", "0.6963208", "0.69614816", "0.6956091", "0.6956091" ]
0.0
-1
Returns a list of emoticons that the currently authenitcated user is authorized to use. Authentication is required. Required scope: user_subscriptions
public function getAuthenticatedEmotes($user) { return $this->makeRequest('get', "/users/{$user}/emotes"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find_emoticons()\n {\n if (!is_null($this->EMOTICON_CACHE)) {\n return $this->EMOTICON_CACHE;\n }\n $rows = $this->connection->query_select('smilies', array('*'));\n $this->EMOTICON_CACHE = array();\n foreach ($rows as $myrow) {\n $src = $this->get_emo_dir() . $myrow['image'];\n $this->EMOTICON_CACHE[$myrow['find']] = array('EMOTICON_IMG_CODE_DIR', $src, $myrow['find']);\n }\n uksort($this->EMOTICON_CACHE, '_strlen_sort');\n $this->EMOTICON_CACHE = array_reverse($this->EMOTICON_CACHE);\n return $this->EMOTICON_CACHE;\n }", "function wp_super_emoticons_provider_filter( $providers ) {\n\t$providers[] = 'wp-se-emotions';\n\treturn $providers;\n}", "public function getUserCharacters(){\n $this->filter('userCharacters', ['active = ?', 1]);\n\n $userCharacters = [];\n if($this->userCharacters){\n $userCharacters = $this->userCharacters;\n }\n\n return $userCharacters;\n }", "public function detect_emoticons()\r\n\t{\r\n\t\tif(empty($this->emoticons))\r\n\t\t\treturn $this;\r\n\r\n\t\t$pattern = '';\r\n\t\tforeach($this->emoticons as $key => $url)\r\n\t\t\t$pattern .= ($pattern === ''? '/(?:':'|') . preg_quote($key, '/');\r\n\t\t$pattern .= ')/';\r\n\t\t\r\n\t\t$emoticons = $this->emoticons;\r\n\r\n\t\t$this->loop_text_nodes(function($child) use ($pattern, $emoticons) {\r\n\t\t\tpreg_match_all($pattern,\r\n\t\t\t\t$child->get_text(),\r\n\t\t\t\t$matches,\r\n\t\t\t\tPREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE);\r\n\r\n\t\t\tif(count($matches[0]) == 0)\r\n\t\t\t\treturn;\r\n\r\n\t\t\t$replacment = array();\r\n\t\t\t$last_pos = 0;\r\n\r\n\t\t\tforeach($matches[0] as $match)\r\n\t\t\t{\r\n\t\t\t\t$url = new SBBCodeParser_TagNode('img', array('alt'=>$match[0]));\r\n\t\t\t\t$url_text = new SBBCodeParser_TextNode($emoticons[$match[0]]);\r\n\t\t\t\t$url->add_child($url_text);\r\n\r\n\t\t\t\t$replacment[] = new SBBCodeParser_TextNode(substr($child->get_text(), $last_pos, $match[1] - $last_pos));\r\n\t\t\t\t$replacment[] = $url;\r\n\t\t\t\t$last_pos = $match[1] + strlen($match[0]);\r\n\t\t\t}\r\n\r\n\t\t\t$replacment[] = new SBBCodeParser_TextNode(substr($child->get_text(), $last_pos));\r\n\t\t\t$child->parent()->replace_child($child, $replacment);\r\n\t\t}, $this->get_excluded_tags(SBBCodeParser_BBCode::AUTO_DETECT_EXCLUDE_EMOTICON));\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "private function disposableEmailList()\n {\n return array(\n 'df@mailinator.com',\n 'df@spamevader.com',\n 'temp@tempmail.com',\n 'something@trbvm.com',\n 'anything@boximail.com',\n );\n }", "public function getmtAlertMessageUsersRepresentation()\n {\n $strs = array();\n foreach ($this->getmtAlertMessageUsers() as $d)\n {\n $strs[] = $d->getUsername();\n }\n return $strs;\n }", "public function mentionedUsers()\n {\n\n preg_match_all('/\\@([\\w\\-]+)/', $this->body, $matches);\n\n // return the mentioned users\n\n return $matches[1];\n\n }", "public function getUsersToNotifyOfTokenGiven() {\n return array(\n $this->getAuthorPHID(),\n );\n }", "public function findEmailSubscriptions()\n {\n return $this->em\n ->createQueryBuilder('q')\n ->select('s.email')\n ->from('BackendBundle:Subscription', 's')\n ->getQuery()\n ->getResult();\n }", "public function completeUserMention(){\n $mentions=array();\n if (!empty($this->mention_id)){\n foreach ($this->mention_id as $mid){\n array_push($mentions,User::find($mid)->infoSmall());\n }\n }\n return $mentions;\n }", "function getEmoticons($grayscale, $emoticonbar = 0)\r\n {\r\n global $database;\r\n $grayscale == 1 ? $column = \"greylocation\" : $column = \"location\";\r\n $sql = \"SELECT `code` , `$column` FROM `#__fb_smileys`\";\r\n\r\n if ($emoticonbar == 1)\r\n $sql .= \" where `emoticonbar` = 1\";\r\n\r\n $sql .= \";\";\r\n $database->setQuery($sql);\r\n $smilies = $database->loadObjectList();\n \tcheck_dberror(\"Unable to load smilies.\");\r\n\r\n $smileyArray = array();\r\n foreach ($smilies as $smiley) { // We load all smileys in array, so we can sort them\r\n $smileyArray[$smiley->code] = '' . JB_URLEMOTIONSPATH . '' . $smiley->$column; // This makes sure that for example :pinch: gets translated before :p\r\n }\r\n\r\n if ($emoticonbar == 0)\r\n { // don't sort when it's only for use in the emoticonbar\r\n array_multisort(array_keys($smileyArray), SORT_DESC, $smileyArray);\r\n reset($smileyArray);\r\n }\r\n\r\n return $smileyArray;\r\n }", "public function getAvatarList(){\n return $this->_get(5);\n }", "public static function default_emoticons()\r\n\t{\r\n\t\tglobal $config;\r\n\t\t\r\n\t\treturn array(\r\n\t\t\t\":)\" \t\t=> $config['BaseURL'] . \"/template/style/images/emoticons/smile.png\",\r\n\t\t\t\":angel:\" \t=> $config['BaseURL'] . \"/template/style/images/emoticons/angel.png\",\r\n\t\t\t\":angry:\" \t=> $config['BaseURL'] . \"/template/style/images/emoticons/angry.png\",\r\n\t\t\t\"8-)\" \t\t=> $config['BaseURL'] . \"/template/style/images/emoticons/cool.png\",\r\n\t\t\t\":'(\"\t \t=> $config['BaseURL'] . \"/template/style/images/emoticons/cwy.png\",\r\n\t\t\t\":ermm:\" \t=> $config['BaseURL'] . \"/template/style/images/emoticons/ermm.png\",\r\n\t\t\t\":D\" \t\t=> $config['BaseURL'] . \"/template/style/images/emoticons/grin.png\",\r\n\t\t\t\"<3\" \t\t=> $config['BaseURL'] . \"/template/style/images/emoticons/heart.png\",\r\n\t\t\t\":(\" \t\t=> $config['BaseURL'] . \"/template/style/images/emoticons/sad.png\",\r\n\t\t\t\":O\" \t\t=> $config['BaseURL'] . \"/template/style/images/emoticons/shocked.png\",\r\n\t\t\t\":P\" \t\t=> $config['BaseURL'] . \"/template/style/images/emoticons/tongue.png\",\r\n\t\t\t\";)\" \t\t=> $config['BaseURL'] . \"/template/style/images/emoticons/wink.png\",\r\n\t\t\t\":alien:\" \t=> $config['BaseURL'] . \"/template/style/images/emoticons/alien.png\",\r\n\t\t\t\":blink:\" \t=> $config['BaseURL'] . \"/template/style/images/emoticons/blink.png\",\r\n\t\t\t\":blush:\" \t=> $config['BaseURL'] . \"/template/style/images/emoticons/blush.png\",\r\n\t\t\t\":cheerful:\" => $config['BaseURL'] . \"/template/style/images/emoticons/cheerful.png\",\r\n\t\t\t\":devil:\" \t=> $config['BaseURL'] . \"/template/style/images/emoticons/devil.png\",\r\n\t\t\t\":dizzy:\" \t=> $config['BaseURL'] . \"/template/style/images/emoticons/dizzy.png\",\r\n\t\t\t\":getlost:\" => $config['BaseURL'] . \"/template/style/images/emoticons/getlost.png\",\r\n\t\t\t\":happy:\" \t=> $config['BaseURL'] . \"/template/style/images/emoticons/happy.png\",\r\n\t\t\t\":kissing:\" => $config['BaseURL'] . \"/template/style/images/emoticons/kissing.png\",\r\n\t\t\t\":ninja:\" \t=> $config['BaseURL'] . \"/template/style/images/emoticons/ninja.png\",\r\n\t\t\t\":pinch:\" \t=> $config['BaseURL'] . \"/template/style/images/emoticons/pinch.png\",\r\n\t\t\t\":pouty:\" \t=> $config['BaseURL'] . \"/template/style/images/emoticons/pouty.png\",\r\n\t\t\t\":sick:\" \t=> $config['BaseURL'] . \"/template/style/images/emoticons/sick.png\",\r\n\t\t\t\":sideways:\" => $config['BaseURL'] . \"/template/style/images/emoticons/sideways.png\",\r\n\t\t\t\":silly:\" \t=> $config['BaseURL'] . \"/template/style/images/emoticons/silly.png\",\r\n\t\t\t\":sleeping:\" => $config['BaseURL'] . \"/template/style/images/emoticons/sleeping.png\",\r\n\t\t\t\":unsure:\" \t=> $config['BaseURL'] . \"/template/style/images/emoticons/unsure.png\",\r\n\t\t\t\":woot:\" \t=> $config['BaseURL'] . \"/template/style/images/emoticons/w00t.png\",\r\n\t\t\t\":wassat:\" \t=> $config['BaseURL'] . \"/template/style/images/emoticons/wassat.png\",\r\n\t\t\t\":whistling:\" => $config['BaseURL'] . \"/template/style/images/emoticons/whistling.png\",\r\n\t\t\t\":love:\" \t=> $config['BaseURL'] . \"/template/style/images/emoticons/wub.png\"\r\n\t\t);\r\n\t}", "public function getAllEmails() {\n $users = $this->getDoctrine()->getRepository(User::class)->findAll();\n $emails = [];\n foreach($users as $email) {\n if(\"admin@email.com\" != $email->getEmail())\n array_push($emails, $email->getEmail());\n }\n\n return $emails;\n }", "public function getList()\n {\n $result = array();\n $list = Pi::registry('activity', 'user')->read();\n foreach ($list as $name => $activity) {\n $result[$name] = array(\n 'title' => $activity['title'],\n 'icon' => $activity['icon'],\n );\n }\n\n return $result;\n }", "function show_current_user_attachments( $query = array() ) {\n\n\t// Checks to see if user role is lower than editor\n\tif( !current_user_can('edit_others_pages') ){\n\n\t\t// Alters media query to only those associated w/ user id\n\t\t$user_id = get_current_user_id();\n if( $user_id ) {\n $query['author'] = $user_id;\n }\n\t}\n return $query;\n}", "public function tags()\n {\n return [\n 'instagram',\n 'collection',\n 'id:' . Arr::get($this->message, 'id'),\n 'username:' . Arr::get($this->message, 'accounts.instagram.username'),\n ];\n }", "public function getEnableSpokenEmojis()\n {\n return $this->enable_spoken_emojis;\n }", "public function getMailUsers()\n {\n return $this->userRepo->getMailUsers(\\Auth::user()->id);\n }", "public function getInvitations ()\n {\n return $this->invitations;\n }", "function _wp_emoji_list($type = 'entities')\n {\n }", "public function getCommentatorsAvatars()\n {\n return $this->getData('commentatorsAvatars', []);\n }", "public static function getAllAdminEmails()\n {\n $pdo = static::getDB();\n\n $user_role = User::ROLE_ADMIN;\n\n $sql = \"select email from users where user_role = :email\";\n\n $result = $pdo->prepare($sql);\n \n $result->execute([$user_role]);\n\n return $result->fetchAll(PDO::FETCH_COLUMN, 0); \n }", "public function invitations() {\n\n return DB::table('invitation')\n ->where('recepteur_id', Auth::User()->id)\n ->where('status', 0)\n ->get();\n }", "public function getSupportedEmojis(): string;", "function getSubscribedEntities()\n\t{\n\t\t$options = array(\n\t\t\t'type' => 'user',\n\t\t\t'metadata_names' => 'isSubscribedNewsletter',\n\t\t\t'metadata_values' => true,\t\n\t\t\t'limit' => 9999999999,\n\t\t);\n\t\treturn elgg_get_entities_from_metadata($options);\n\t}", "public function getAllAvatarsByUser()\n {\n $userId = Auth::user()->id;\n $avatar = Avatar::select('image_url', 'id')->where('user_id', $userId)->get();\n return $avatar;\n }", "private function get_authorized_users() {\n\t\t$authorized_users = get_option( 'livechat_authorized_users' );\n\t\tif ( ! $authorized_users ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn array_values(\n\t\t\tarray_filter( explode( ',', $authorized_users ) )\n\t\t);\n\t}", "public function getIconEmoji(): string\n {\n return $this->iconEmoji;\n }", "public function get_emoticon_chooser($field_name = 'post')\n {\n require_code('comcode_compiler');\n $emoticons = $this->connection->query_select('smilies', array('*'), array('showclickable' => '1'));\n $em = new Tempcode();\n foreach ($emoticons as $emo) {\n $code = $emo['find'];\n $em->attach(do_template('EMOTICON_CLICK_CODE', array('_GUID' => '89aa93c39b3929b00245981ba632371f', 'FIELD_NAME' => $field_name, 'CODE' => $code, 'IMAGE' => apply_emoticons($code))));\n }\n return $em;\n }", "public function getList()\n {\n return $this->returnText('Full list of users and queues can be found here: https://nbq.2g.be/'. $this->c->id .'/'. urlencode($this->c->displayName) .' ');\n }", "function getInvites() {\n $invites = $this->carddavBackend->getInvites($this->addressBookInfo['id']);\n\n $invites[] = new \\Sabre\\DAV\\Xml\\Element\\Sharee([\n 'href' => \\Sabre\\HTTP\\encodePath($this->getOwner()),\n 'access' => $this->getShareAccess(),\n 'inviteStatus' => SPlugin::INVITE_ACCEPTED,\n 'properties' => [],\n 'principal' => $this->getOwner()\n ]);\n\n return $invites;\n }", "public function adminMessageList()\n {\n\n $users=[];\n $em = $this->getDoctrine()->getManager();\n $messageRepository = $em->getRepository(Message::class);\n $userRepository = $em->getRepository(User::class);\n\n $Ids = $messageRepository->findByDistinct();\n foreach ($Ids as $id)\n {\n $users[] = $userRepository->findOneBy(array('id'=>$id));\n }\n return $this->render(\"admin/message/list.html.twig\",\n array(\n 'users' => $users,\n ));\n }", "public static function show_entities() \n {\n return $_SESSION['_user_vision']['show_entities'];\n }", "public function getModeratorEmails() {\n $moderatorNames = $this->get('moderators');\n $moderatorNames = explode(',',$moderatorNames);\n $moderators = array();\n foreach ($moderatorNames as $name) {\n $c = $this->xpdo->newQuery('modUser');\n $c->innerJoin('modUserProfile','Profile');\n $c->select(array('modUser.id','Profile.email'));\n $c->where(array('username' => $name));\n $user = $this->xpdo->getObject('modUser',$c);\n if ($user) {\n $moderators[] = $user->get('email');\n }\n }\n\n /* now get usergroup moderators */\n $moderatorGroup = $this->get('moderator_group');\n $c = $this->xpdo->newQuery('modUserProfile');\n $c->innerJoin('modUser','User');\n $c->innerJoin('modUserGroupMember','UserGroupMembers','User.id = UserGroupMembers.member');\n $c->innerJoin('modUserGroup','UserGroup','UserGroup.id = UserGroupMembers.user_group');\n $c->where(array(\n 'UserGroup.name' => $moderatorGroup,\n ));\n $members = $this->xpdo->getCollection('modUserProfile',$c);\n foreach ($members as $member) {\n $email = $member->get('email');\n if (!empty($email)) array_push($moderators,$email);\n }\n $moderators = array_unique($moderators);\n\n return $moderators;\n }", "public function getExternalUserIds() {\n\n if (!isset(Yii::app()->params['googlePlayExternalUserIds']))\n return [];\n\n return Yii::app()->params['googlePlayExternalUserIds'];\n }", "public function getUsers()\n {\n return Security::getUserList();\n }", "public function getMedia(): array\n {\n $token = InstagramMedia::getInstance()->getSettings()->longAccesToken;\n\n $this->instagram->setAccessToken($token);\n\n $media = $this->instagram->getUserMedia();\n\n if (empty($media->data)) {\n Craft::warning('No Instagram account configured.', __METHOD__);\n\n return [];\n }\n\n return $media->data;\n }", "public function getCustomerNotificationAttachments(): array;", "public function get_mail_administrators(){\n $query = $this->db->select('n_mail_user')\n ->from('user')\n ->where('n_role_user', 'administrador')\n ->where('n_mail_user !=', null) \n ->get();\n\n return $query->result();\n }", "public function getInternalUserIds() {\n\n if (!isset(Yii::app()->params['googlePlayInternalUserIds']))\n return [];\n\n return Yii::app()->params['googlePlayInternalUserIds'];\n }", "public function getAccessibleUserIDs()\n {\n if (!WCF::getSession()->getPermission('user.profile.canViewUsersOnlineList')) {\n // user must have the permission to view the user online list\n return array();\n }\n\n $userIDs = array();\n\n foreach ($this->userIDs as $userID => $canViewOnlineStatus) {\n if ($canViewOnlineStatus === '0' ||\n $userID === WCF::getUser()->userID ||\n WCF::getSession()->getPermission('admin.user.canViewInvisible')\n ) {\n $userIDs[] = $userID;\n } elseif (WCF::getUser()->userID) {\n if ($canViewOnlineStatus === '1') {\n $userIDs[] = $userID;\n } elseif (UserProfileHandler::getInstance()->isFollowing($userID)) {\n $userIDs[] = $userID;\n }\n }\n }\n\n return $userIDs;\n }", "public function usersLogged(){\n $repository = $this->doctrine->getRepository('AppBundle:User');\n $users = $repository->getActive();\n \n return $users;\n }", "public function getEmails()\n {\n $response = $this->get('user/emails');\n\n return $response['emails'];\n }", "public function listInscriptions()\n {\n $slug_socio = Auth()->user()->Socio->slugSocio;\n return Inscription::listaInscripciones($slug_socio);\n }", "public function retrieveInactiveUserActions()\n {\n return $this->start()->uri(\"/api/user-action\")\n ->urlParameter(\"inactive\", true)\n ->get()\n ->go();\n }", "public function invitations()\n {\n return $this->belongsToMany('App\\User')->active();\n }", "private function itemsList()\n {\n /**\n * Defined variables\n */\n $request = $this->getRequest();\n $publicKey = $request->getServer('PHP_AUTH_USER');\n\n $searchCriteriaBuilder = $this->searchCriteria;\n $searchCriteria = $searchCriteriaBuilder->addFilter(\n 'auth_key',\n $publicKey,\n 'eq'\n )->create();\n $authenticationList = $this->customerAuthRepository->getList($searchCriteria);\n $items = $authenticationList->getItems();\n\n return $items;\n }", "public function getAllInvitation()\n {\n try{\n $allInvitations = UserInvite::listAllInvites(Auth::user()->user_id);\n if(is_object($allInvitations)){\n $result = $this->renderSuccess(trans('messages.received_invitation_list'),$allInvitations);\n } else {\n $result = $this->renderFailure(trans('messages.common_error'), StatusCode::$EXCEPTION,[false]);\n }\n }\n catch(\\Exception $e){\n UtilityHelper::logException(__METHOD__, $e);\n $result = $this->renderFailure(trans('messages.error.exception'), Response::HTTP_OK);\n }\n return $result;\n }", "public function getAdminEmails() {\n //get administration email array\n $administration_email = Doctrine::getTable('AdministrationEmails')->getEmails();\n\n\n //create admin email query\n $admin_email_query = Doctrine_Query::create()\n ->select('sgu.email_address')\n ->from('sfGuardUser sgu')\n ->leftJoin('sgu.sfGuardUserPermission sgup')\n ->whereNotIn('sgu.email_address', $administration_email)\n ->andWhere('sgup.user_id IS NOT NULL');\n $admin_email_record = $admin_email_query->fetchArray();\n $administration_email_array = array('Dirección de correo electrónico Selecte');\n foreach ($admin_email_record as $index => $email) {\n $administration_email_array[$email['email_address']] = $email['email_address'];\n }\n return $administration_email_array;\n }", "public function index()\n {\n $em = $this->getDoctrine()->getManager();\n $user = $this->getUser();\n\n if ($user->hasRole('ROLE_ECOMMERCE_ADMIN')) {\n $ingredients = $em->getRepository(Ingredient::class)->findAll();\n } else {\n $ingredients = $em->getRepository(Ingredient::class)->getOwnedByUser($user);\n }\n\n return [\n 'ingredients' => $ingredients,\n ];\n }", "public function getUserList()\n {\n $responseMap = $this->_postCommand(static::$COMMAND_GET_USER_LIST);\n \n // From the response, filter out only the users that matched this environment Prefix\n $userIdList = [];\n foreach ($responseMap['ids'] as $userId) {\n $unprefixedUserId = PrefixHelper::unprefix($userId);\n \n if ($unprefixedUserId !== false) {\n $userIdList[] = $unprefixedUserId;\n }\n }\n \n return $userIdList;\n }", "public function getUserTokens();", "function &getInvitedUsers()\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$result_array = array();\n\t\t$result = $ilDB->queryF(\"SELECT user_fi FROM svy_inv_usr WHERE survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\twhile ($row = $ilDB->fetchAssoc($result))\n\t\t{\n\t\t\tarray_push($result_array, $row[\"user_fi\"]);\n\t\t}\n\t\treturn $result_array;\n\t}", "public function listUsers() {\n\t\t$users = Common::loadJSON(\"users\");\n\t\t$temp = array();\n\n\t\t//Remove the user in session.\n\t\tforeach ($users as $username => $data) {\n\t\t\tif ($username == $this->activeUser) continue;\n\t\t\t$temp[] = $username;\n\t\t}\n\n\t\treturn $temp;\n\t}", "public function getSubscriberEmails() {\n $stmt = $this->pdo->query(\"SELECT email\n FROM subscribers\n \");\n $subscribers = [];\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n $subscribers[] = $row['email'];\n }\n return $subscribers;\n }", "function getUserIds() {\n\t\t$charIds = $this->getCharIds();\n\t\t$idsToReturn = array();\n\t\tforeach ($charIds as $id) {\n\t\t\n\t\t\t$idsToReturn[] = getOneThing(\"playedby\", \"gamestate_characters\", \"id=$id and gameid=$this->gameId\");\n\t\t\n\t\t}\n\t\tdbug(\"getUserIds is about to return \".implode(\", \", $idsToReturn));\n\t\treturn $idsToReturn;\n\t}", "public static function iconsList()\n {\n $icons = [\n 'build',\n 'add_shopping_cart',\n 'settings_phone',\n 'assignment_turned_in',\n 'check_circle_outline',\n 'theaters',\n 'airplay',\n 'cached',\n 'calendar_today',\n 'check_circle',\n 'credit_card',\n 'dashboard',\n 'description',\n 'exit_to_app',\n 'extension',\n 'feedback',\n 'grade',\n 'group_work',\n 'help',\n 'help_outline',\n 'home',\n 'https',\n 'info',\n 'language',\n 'lock',\n 'open_in_browser',\n 'pageview',\n 'payment',\n 'perm_identity',\n 'record_voice_over',\n 'question_answer',\n 'redeem',\n 'restore_from_trash',\n 'shop',\n 'shopping_basket',\n 'shopping_cart',\n 'settings_voice',\n 'speaker_notes',\n 'stars',\n 'supervised_user_circle',\n 'system_update_alt',\n 'verified_user',\n 'add_alert',\n 'featured_play_list',\n 'queue',\n 'video_library',\n 'contact_mail',\n 'ring_volume',\n 'save',\n 'devices',\n 'widgets',\n 'insert_invitation',\n ];\n \n return $icons;\n }", "public function broadcastOn()\n {\n $user = $this->user;\n \n return [$user->id];\n }", "public function artIdList()\n {\n return User::where('status', 1)->where('role_id', 3)->get();\n }", "private function emailList()\n {\n return array(\n 'temp@yahoo.com',\n 'something@outlook.com',\n 'anything@yahoo.com',\n );\n }", "public function getIcons()\n {\n $aPicGallery = $this->getPictureGallery();\n\n return $aPicGallery['Icons'];\n }", "public function viaNotificationChannels()\n {\n return UserNotificationChannel::with('notification_channel')->get()->filter(function ($item) {\n return $item->muted_at == null;\n })->pluck('notification_channel.name');\n }", "public function getActiveCharacters(){\n $activeCharacters = [];\n $userCharacters = $this->getUserCharacters();\n\n foreach($userCharacters as $userCharacter){\n /**\n * @var $userCharacter UserCharacterModel\n */\n $characterModel = $userCharacter->getCharacter();\n if($characterLog = $characterModel->getLog()){\n $activeCharacters[] = $characterModel;\n }\n }\n\n return $activeCharacters;\n }", "public function getUserMails()\r\n\t{\r\n\t\t$userDir = __DIR__ . '/../../settings/users';\r\n\t\t\t\t\r\n\t\t/* check if users directory exists */\r\n\t\tif(!is_dir($userDir)){ return array(); }\r\n\t\t\r\n\t\t/* get all user files */\r\n\t\t$users = array_diff(scandir($userDir), array('..', '.'));\r\n\t\t\r\n\t\t$usermails\t= array();\r\n\r\n\t\tforeach($users as $key => $user)\r\n\t\t{\r\n\t\t\tif($user == '.logins'){ continue; }\r\n\r\n\t\t\t$contents \t= file_get_contents($userDir . DIRECTORY_SEPARATOR . $user);\r\n\r\n\t\t\tif($contents === false){ continue; }\r\n\r\n\t\t\t$searchfor \t= 'email:';\r\n\r\n\t\t\t# escape special characters in the query\r\n\t\t\t$pattern \t= preg_quote($searchfor, '/');\r\n\t\t\t\r\n\t\t\t# finalise the regular expression, matching the whole line\r\n\t\t\t$pattern \t= \"/^.*$pattern.*\\$/m\";\r\n\r\n\t\t\t# search, and store first occurence in $matches\r\n\t\t\tif(preg_match($pattern, $contents, $match)){\r\n\t\t\t\t$usermails[] = trim(str_replace(\"email:\", \"\", $match[0]));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $usermails;\r\n\t}", "public function getSubscriptions()\n {\n return [\n self::NAME.'.command.message',\n self::NAME.'.command.part',\n self::NAME.'.command.join',\n self::NAME.'.command.quit',\n self::NAME.'.command.kick',\n self::NAME.'.command.invite',\n ];\n }", "public function getExternalSubscriptionsToEmail()\n {\n $principal = System_Api_Principal::getCurrent();\n\n $query = 'SELECT s.subscription_id, s.issue_id, s.user_id, s.stamp_id, s.user_email, p.is_public'\n . ' FROM {subscriptions} AS s'\n . ' JOIN {issues} AS i ON i.issue_id = s.issue_id'\n . ' JOIN {folders} AS f ON f.folder_id = i.folder_id'\n . ' JOIN {projects} AS p ON p.project_id = f.project_id';\n if ( !$principal->isAdministrator() )\n $query .= ' JOIN {effective_rights} AS r ON r.project_id = f.project_id AND r.user_id = %1d';\n $query .= ' WHERE s.user_id IS NULL AND i.stamp_id > s.stamp_id AND p.is_archived = 0';\n\n return $this->connection->queryTable( $query, $principal->getUserId() );\n }", "public function getUserCards()\n {\n // Get the customer id\n $customerId = $this->adminQuote->getQuote()->getCustomer()->getId();\n\n // Return the cards list\n return $this->vaultHandler->getUserCards($customerId);\n }", "private function listUsers()\n {\n $users = get_users();\n $user_ids = array();\n\n foreach ($users as $u) {\n $user_ids[] = $u['id'];\n }\n\n if (count($this->ids) != 0) {\n return array_intersect($this->ids, $user_ids);\n } else {\n return $user_ids;\n }\n }", "function get_topic_icons() {\n $dir = TOPIC_ICON_DIR;\n\n $icons = glob($dir . '/*.png');\n $new_icons = '';\n foreach ($icons as $icon) {\n $icon_parts = explode('/', $icon);\n $icon_file = $icon_parts[count($icon_parts) - 1];\n $new_icons[] = array('file' => $icon_file, 'path' => $icon, 'url' => TOPIC_ICON_URL . '/' . $icon_file);\n }\n\n if (count($new_icons) > 0)\n return $new_icons;\n else\n return false;\n }", "private function getUsersMailist() {\n $param = array(\n 'where' => 'registered = 1'\n );\n\n $users = $this->mailist->gets($param);\n\n return $users;\n }", "public function invites()\n {\n return $this->get('/user/invites');\n }", "public function getAllVoicemail()\n {\n return $this->_getAndParse($this->_serverPath['voicemail'], null);\n }", "public function getItems() {\n\t\treturn User::all();\n\t}", "public function index()\n {\n return $this->user->all();\n }", "public function getIcons() {\n\t\treturn $this->find('list', array('fields' => array('icon'), 'order' => array('id')));\n\t}", "public function getItems()\r\n {\r\n return $this->user->wishlistItems;\r\n }", "public function emails()\n {\n return $this->emails;\n }", "public function read_returned_emails($extension = '.eml')\n {\n $directory = \"public/returned_emails/\";\n\n //get all image files with a .jpg extension.\n $files = glob($directory . \"*\" . $extension);\n\n return $files;\n }", "public function getUserActivityList(){\n return($this->userActivityList);\n }", "function monitor_list_users() {\n $query = \"select distinct(`wf_user`) from `\".GALAXIA_TABLE_PREFIX.\"instance_activities`\";\n $result = $this->query($query);\n $ret = Array();\n while($res = $result->fetchRow()) {\n $ret[] = $res['wf_user'];\n }\n return $ret;\n }", "function getChatUsers()\n\t{\n\t\treturn $this->chatUsers;\n\t}", "public function get_invited_users( $subscription_id ){\n return pms_get_member_subscription_meta( $subscription_id, 'pms_gm_invited_emails' );\n }", "public function getInvoices() {\n $result = ChargeBee_Invoice::invoicesForSubscription($this->user->subscription_id, array(\"limit\" => 20));\n\n return $result;\n }", "public function getEmails()\n {\n return $this->emails;\n }", "public function getEmails()\n {\n return $this->emails;\n }", "public function getEmbList(): array\n {\n $database = pluginApp(DataBase::class);\n\n $id = $this->getCurrentContactId();\n /**\n * @var ToDo[] $toDoList\n */\n $embList = $database->query(emb::class)->where('id', '=', $id)->get();\n return $embList;\n }", "public function all()\n {\n return $this->jsonData(Auth::user()->notifications);\n }", "public function get_active_users() {\n /** check for invalid users, users that have not been active since 1 hour ago **/\n $datetime = strtotime('-5 minutes',strtotime(date('Y-m-d H:i:s')));\n $params_d = array(\n 'stream' => 'active_users',\n 'namespace' => $this->namespace,\n 'where' => \"last_activity_u_a < '\" .$datetime.\"'\"\n );\n $entries_d = $this->streams->entries->get_entries($params_d);\n foreach($entries_d['entries'] as $e_d){\n $this->streams->entries->delete_entry($e_d['id'], 'active_users', $this->namespace);\n }\n $params = array(\n 'stream' => 'active_users',\n 'namespace' => $this->namespace\n );\n $entries = $this->streams->entries->get_entries($params);\n $users = array();\n foreach ($entries['entries'] as $e) {\n $users[] = array(\n 'user_id' => $e['created_by']['user_id'],\n 'user' => $e['created_by']['display_name'],\n 'gest_name' => (!empty($e['user_nick_c'])) ? $e['user_nick_c'] : false,\n 'isUser' => (!empty($e['created_by']['user_id'])) ? true : false,\n 'last_activity' => date('Y-m-d H:i:s', $e['last_activity_u_a']),\n 'user_ip' => $e['user_b_ip']\n );\n }\n echo json_encode($users);\n }", "public function users()\n {\n try {\n $resp = $this->httpService->request('GET', 'user/get', []);\n return $resp['data']['openid'];\n } catch (\\Exception $e) {\n $this->logError($e);\n return array();\n }\n }", "private static function getFaiconsList() {\n\t\n\t\t$content = file_get_contents('https://raw.githubusercontent.com/FortAwesome/Font-Awesome/master/metadata/icons.json');\n\t\t$json = json_decode($content);\n\t\t$icons = [];\n\t\n\t\tforeach ($json as $icon => $value) {\n\t\t\tforeach ($value->styles as $style) {\n\t\t\t\t$icons[] = 'fa'.substr($style, 0 ,1).' fa-'.$icon;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $icons;\n\t}", "public function meList( )\n\t{\n\t\t$userId = $this->getCurrentUserId();\n\t\treturn $this->adminListByUser($userId);\n\t}", "public function artList()\n {\n return User::where('status', 1)->where('role_id', 3)->get();\n }", "function getUsers() {\n $users = $this->users;\n if (is_string($users)) {\n $users = explode(',', $users);\n }\n return $users;\n }", "function getUserList($ac_token, $screen_name, $slug) {\n return self::getInstance()->_getUserList($ac_token, $screen_name, $slug);\n }", "public function getInstagramAccounts() {\n $current_uid = isset($_GET['team']) ? $_GET['muid'] : \\Drupal::currentUser()->id();\n $facebookHelper = new FacebookHelperFunction();\n $properties = ['token_access', 'id', 'status'];\n $network_properties = $this->getKabbodeNetworkStatusProperty(168, $current_uid, $properties);\n $access_token = $network_properties['token_access'];\n $insta_accounts = $facebookHelper->getAllInstagramAccounts($access_token);\n return $insta_accounts;\n }", "public function getAvailableExtensions() {}", "function load_internal_letters_emoticons($text)\r\n \t {\r\n \t if(file_exists(LTChatTemplateSystemPath.\"tpl_emoticons.txt\"))\r\n \t {\r\n\t\t $tpl_emoticons = file(LTChatTemplateSystemPath.\"tpl_emoticons.txt\");\r\n\t\t foreach ($tpl_emoticons as $line)\r\n\t\t {\r\n\t\t \t$lines = explode(\"\\t\",$line);\r\n\t\t \tif(count($lines) <2) continue;\r\n\r\n\t\t \t$from = htmlspecialchars($lines[0]);\r\n\t\t \t$letter[$from] = str_replace(\"#path#\",\"./emoticons/smiles/\".$lines[count($lines)-1],LTChat_emotStyle);\r\n\t\t }\r\n \t }\r\n \t return $out = strtr($text, $letter);\r\n \t }", "public function contents() {\n return Session::get_all();\n }", "public function avatars()\n {\n return $this->hasMany(\\IDoc\\Models\\UserAvatar::class, 'user_id')->orderBy('id', 'desc');\n }" ]
[ "0.620023", "0.5851211", "0.5702223", "0.55356514", "0.54271233", "0.5394965", "0.5339925", "0.5306913", "0.52977407", "0.5286911", "0.5286805", "0.5284953", "0.5277632", "0.5277615", "0.5252867", "0.5247422", "0.5224818", "0.521768", "0.5217433", "0.5196056", "0.51900446", "0.51886743", "0.5165051", "0.5144226", "0.5105351", "0.51035446", "0.5102379", "0.50766766", "0.50585467", "0.50532144", "0.5029806", "0.5027834", "0.50239116", "0.5016115", "0.49948", "0.49918053", "0.49885175", "0.49871126", "0.49761197", "0.4973984", "0.496496", "0.4963937", "0.4960034", "0.49532035", "0.49406457", "0.493059", "0.4927097", "0.4923734", "0.49177644", "0.49141115", "0.4913645", "0.4901948", "0.48997512", "0.489218", "0.48891354", "0.48838356", "0.48743263", "0.48731473", "0.4858508", "0.48578626", "0.48485082", "0.48314577", "0.48204973", "0.48091918", "0.48083875", "0.48079497", "0.48056325", "0.4799244", "0.4786547", "0.4785943", "0.4784162", "0.47832853", "0.47832447", "0.47803175", "0.4776187", "0.4774552", "0.47646314", "0.47553346", "0.47530255", "0.47512463", "0.47497222", "0.47400576", "0.47315377", "0.47239155", "0.47206435", "0.47206435", "0.47206146", "0.47190753", "0.4714727", "0.47092643", "0.47062907", "0.47022814", "0.4699675", "0.4698573", "0.4695277", "0.4694347", "0.46943158", "0.469172", "0.4691344", "0.46886492" ]
0.60182273
1
Returns the currently authenticated user's information. If the user's registered Email Address is not verified, null will be returned. Authentication is required. Required scope: user_read
public function getAuthenticated($user) { return $this->makeRequest('get', "/user"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserInfo()\n {\n $CI = &get_instance();\n if (!$this->loggedIn()) {\n return null;\n } else {\n $id = $CI->session->userdata('user_id');\n return $CI->user_model->get($id);\n }\n }", "public function user_info() {\n if ($this->rails_cookie_value() == NULL) {\n return null;\n }\n if (!self::$user_info && !self::$user_info_called) {\n $json_data = $this->api_request(\"user/\" . $this->rails_cookie_value());\n self::$user_info = $json_data->{'user'};\n self::$user_info_called = true;\n }\n return self::$user_info;\n }", "public function getAuthUserDetail()\n {\n return $this->user;\n }", "public function getUserInfo()\n {\n return $this->_process('user/info')->user;\n }", "public function getAuthenticatedUser()\n {\n return $this->getUnsplashClient()->sendRequest('GET', 'me');\n }", "public function getUserInformation()\n {\n return $this->userInformation;\n }", "public function user()\n {\n if ( ! Auth::check()) {\n return null;\n }\n\n return Auth::getUser();\n }", "private function getUserInfo()\n {\n // TODO This could be cached\n return $this->userInfoApi->getUserInfo();\n }", "public function user()\n {\n if (!Auth::check()) {\n return null;\n }\n\n return Auth::getUser();\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = self::findOne(['login' => $this->login]);\n if($this->_user[attributes] === null) {\n self::findOne(['email' => $this->login]);\n }\n }\n\n return $this->_user;\n }", "public function user() {\n\t\tif (!Auth::check()) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn Auth::getUser();\n\t}", "public function getUserData()\n {\n if (!$this->tokenStorage->getToken()\n || !$this->authorizationChecker->isGranted('IS_AUTHENTICATED_REMEMBERED')\n ) {\n return null;\n }\n\n $user = $this->tokenStorage->getToken()->getUser();\n\n if (!$user) {\n return null;\n }\n\n return $this->userHelper->buildUserData($user);\n }", "public function getUserInfo()\r\n {\r\n return self::makeCall('getUserInfo', array(), null, false, $this->sessionID);\r\n }", "public static function getInfoCurrentUser()\n {\n /**\n * @var \\ZCMS\\Core\\ZSession $session\n */\n $session = Di::getDefault()->get('session');\n $auth = $session->get('auth');\n\n if ($auth) {\n return Users::findFirst($auth['id']);\n }\n return null;\n }", "public function getUserInfo()\n {\n return $this->userInfo;\n }", "public function getUserInfo()\n {\n return $this->userInfo;\n }", "public function getUserInfo()\n {\n return $this->userInfo;\n }", "public function get_user_info()\n {\n try {\n $user_info = self::api(\"me\");\n } catch (Exception $e) {\n // TODO: Handle the error\n // Set the return value to be an empty array\n $user_info = array();\n }\n\n return $this->convert_array_to_object($user_info);\n }", "public function getDetails()\n {\n if($user = $this->loadUser())\n \treturn $user;\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByUsername($this->email);\n }\n return $this->_user;\n }", "function getUserInfo()\n {\n return $this->userinfo;\n }", "public function getUser() {\n\t\treturn $this->Session->read('UserAuth');\n\t}", "public function getUserData()\r\n \t{\r\n \t\tif ($this->_client->getUser())\r\n \t\t{\r\n \t\t\treturn $this->_client->api('/me');\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "public static function user() {\n // $userInfo = $oauth2->userinfo->get();\n $userInfo = json_decode(json_encode(['email' => '@', 'gender' => null, 'name' => 'test', 'picture' => 'f']));\n return User::fromGoogleUser($userInfo);\n \n }", "public function getUser()\n {\n return $this->accessToken->getUser();\n }", "protected function getUser()\n {\n return $this->user_provider->getHydratedUser();\n }", "function LoggedIn() {\n\t\treturn $this->Get('UserDetails');\n\t}", "public static function getUser() {\n return session(\"auth_user\", null);\n }", "public function getAuthenticatedUser()\n {\n return response()->json($this->guard('api')->user());\n }", "public function getAuthenticatedUser()\n {\n // get the web-user\n $user = Auth::guard()->user();\n\n // get the api-user\n if(!isset($user) && $user == null) {\n $user = Auth::guard('api')->user();\n }\n return $user;\n }", "public static function getUser()\n {\n return self::getInstance()->_getUser();\n }", "public function UserDetails()\n {\n if (!Auth::user()) {\n return response()->json(\"Not Authenticated\");\n } else {\n $user = Auth::user();\n return response()->json([$user], 200);\n }\n }", "public function get_userInfo()\n {\n return $this->call_method(\"get/userInfo\",\n array()\n );\n }", "public function readCurrentUser()\n {\n\t\t$data = $this->call(array(), \"GET\", \"users/current.json\");\n\t\tif(isset($data->{'error'})){\n\t\t\tdie($data->{'error'});\n\t\t}\n\t\t$data = $data->{'user'};\n\t\treturn new User($data, $this);\n }", "private function getUser()\n {\n return $this->user->getUser();\n }", "public function get_user() {\n\t\treturn ($this->logged_in()) ? $this->session->get($this->config['session_key'], null) : null;\n\t}", "public function getUser() {\n // Check if user is logged in\n if ($this->isLoggedIn()) {\n // Get user id from session\n $userId = $_SESSION['user_id'];\n // Query database for user details\n $stmt = $this->_pdo->prepare(\"SELECT * FROM \".$this->_dbTable.\" WHERE \".$this->_dbFields[\"id\"].\" = :user_id\");\n $stmt->execute([\":user_id\" => $userId]);\n $user = $stmt->fetch(\\PDO::FETCH_ASSOC);\n // Return user details as associative array\n return $user;\n } else {\n // User is not logged in so return null\n return null;\n }\n }", "public function getUser()\n {\n return $this->getAuth()->getIdentity();\n }", "public function user()\n {\n if ($this->loggedOut) {\n return;\n }\n\n // If we've already retrieved the user for the current request we can just\n // return it back immediately. We do not want to fetch the user data on\n // every call to this method because that would be tremendously slow.\n if (! is_null($this->user)) {\n return $this->user;\n }\n\n if (\\session()->has($this->user_provider->getAuthIdentifierName()))\n {\n $user = \\session()->get($this->user_provider->getAuthIdentifierName());\n return $user;\n }\n\n $authenticated_user = $this->user_provider->retrieveById($this->user_provider->getAuthIdentifier());\n if (!isset($authenticated_user))\n {\n return;\n }\n $this->user_provider->setUserAttribute($authenticated_user);\n $this->setUser($this->user_provider);\n\n return $this->user;\n }", "public function getCurrentUser()\n {\n $accessToken = $this->getFOSOauthServer()->verifyAccessToken(\n $this->getAccessTokenString(),\n 'user'\n );\n\n return $accessToken->getUser();\n }", "public function user()\n {\n return $this->app->auth->user();\n }", "public function user()\n {\n return $this->app->auth->user();\n }", "public function user()\n {\n\n //Check if the user exists\n if (! is_null($this->user)) {\n return $this->user;\n }\n\n //Retrieve token from request and authenticate\n return $this->getTokenForRequest();\n }", "public function getUserInformation() {\n /** @var User $user */\n $user = auth()->user() ;\n\n return $user->toArray() ;\n }", "public function getUserInfo() {\n\t\t$session = Yii::$app->session;\n\t\t$session->open();\n\t\t$session->regenerateID();\n\t\t\n\t\treturn $session['accountInfo'];\n\t}", "public function user() {\n $connection = new HTTPConnector($this);\n $url = $this->credential->getRequestUrl(BitcasaConstants::METHOD_USER . BitcasaConstants::METHOD_PROFILE);\n if (!BitcasaUtils::isSuccess($connection->get($url))) {\n return null;\n }\n\n $response = $connection->getResponse(true);\n\n $user = User::getInstance($response);\n return $user;\n }", "public function getUser() {\r\n\r\n if (self::$user === null)\r\n $this->refreshIdentity();\r\n\r\n return self::$user;\r\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function user()\n {\n return $this->auth->user();\n }", "public function getUser() {\n\t\treturn $this->api->getUserById($this->getUserId());\n\t}", "public function getUser()\n {\n if (is_null($this->_user)) {\n $this->setUser(new User([\n 'username' => $this->username,\n 'email' => $this->email,\n 'status_id' => Status::STATUS_INACTIVE,\n 'privacity' => $this->privacity\n ]));\n }\n\n return $this->_user;\n }", "public function getUser() {\n\n if (isset($this->user)) {\n return $this->user;\n }\n\n return NULL;\n }", "function getAuthenticatedUser()\n {\n if (isset($_SESSION['MFW_authenticated_user'])) {\n return $_SESSION['MFW_authenticated_user'];\n }\n\n return null;\n }", "public function GetUserProfile() {\n\t\treturn $this->session->GetAuthenticatedUser();\n\t}", "public function getLoggedInUserDetails()\n {\n try\n {\n return $user = $this->jwtToken()->payload('context');\n\n }catch(\\Exception $e)\n {\n \\Log::error(\"Get user details API failed: \".$e->getMessage());\n return createResponse(config('httpResponse.SERVER_ERROR'),\n \"Cound not fetch detail!\",\n ['error' => 'Cound not fetch detail!']);\n }\n }", "public function getUser()\n {\n return Session::get(self::USER);\n }", "public function getCurrentUser(){\n\t\t$cm = \\OC::$server->getContactsManager();\n\t\t// The API is not active -> nothing to do\n\n\t\t$result = $cm->search(\\OCP\\User::getUser(), array('FN'));\n\t\t$r = $result[0];\n\t\t$data = array();\n\t\t$data['id'] = $r['id'];\n\t\t$data['displayname'] = $r['FN'];\n\t\tif(!isset($r['EMAIL'])){\n\t\t\t$r['EMAIL'] = array();\n\t\t}\n\n\t\tif(!isset($r['IMPP'])){\n\t\t\t$r['IMPP'] = array();\n\t\t}\n\t\t$data['backends'] = $this->contactBackendToBackend($r['EMAIL'], $r['IMPP']);\n\t\tlist($addressBookBackend, $addressBookId) = explode(':', $r['addressbook-key']);\n\t\t$data['address_book_id'] = $addressBookId;\n\t\t$data['address_book_backend'] = $addressBookBackend;\n\t\treturn $data;\n\t}", "public function getInfo()\n {\n if(Sentry::check())\n {\n $user = Sentry::getUser();\n $data = $this->app->json([\n \"username\" => $user->first_name,\n \"password\" => \" \",\n \"email\" => $user->email\n ]);\n return $data;\n } else {\n return false;\n }\n }", "protected function getUser()\n {\n return $this->container->get('security.context')->getToken()->getUser();\n }", "private function getUser()\n {\n if ($this->userData['id']) {\n $user = gateway('northstar')->asClient()->getUser($this->userData['id']);\n\n if ($user && $user->id) {\n info('Found user by id', ['user' => $user->id]);\n\n return $user;\n }\n }\n\n if ($this->userData['email']) {\n $user = gateway('northstar')->asClient()->getUserByEmail($this->userData['email']);\n\n if ($user && $user->id) {\n info('Found user by email', ['user' => $user->id]);\n\n return $user;\n }\n }\n\n if (! isset($this->userData['mobile'])) {\n return null;\n }\n\n $user = gateway('northstar')->asClient()->getUserByMobile($this->userData['mobile']);\n\n if ($user && $user->id) {\n info('Found user by mobile', ['user' => $user->id]);\n\n return $user;\n }\n\n return null;\n }", "private function getAuthenticatedUser()\n {\n return auth()->user();\n }", "public function user()\n {\n if (!$this->user) {\n $identifier = $this->getToken();\n $this->user = $this->provider->retrieveByToken($identifier, '');\n }\n return $this->user;\n }", "public function getUser()\n {\n if(!$this->user)\n $this->user = User::getActive();\n\n return $this->user;\n }", "public function getInfoProfile(){\n return $this->get_user_by_id($this->getAccountID());\n }", "public function profile(){\n // using the auth() helper we are returning the authenticated user info\n return auth('api')->user();\n }", "public final function getUser()\n {\n return $this->user;\n }", "public function getUserInfo() {\n\t\t$userInfo = $this->HttpSocket->get(FLICKR_API_URL,\n\t\t\tarray(\n\t\t\t\t'method' => USERINFO,\n\t\t\t\t'format' => DATAFORMAT,\n\t\t\t\t'api_key' => $this->api_key,\n\t\t\t\t'user_id' => $this->photo['owner'],\n\t\t\t));\n\t\treturn unserialize($userInfo->body);\n\t}", "public function getUser()\n\t{\n\t\tif ($this->_user === false) {\n\t\t\t$model = User::findIdentityByEmail($this->email);\n\n\t\t\tif ($model and ($model->role == User::ROLE_USER or $model->role == User::ROLE_ADMINISTRATOR)) {\n\t\t\t\t$this->_user = $model;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_user;\n\t}", "public function getUser ()\r\n\t{\r\n\t\treturn $this->user;\r\n\t}", "public function getUserProperty(): Authenticatable|null\n {\n return Auth::user();\n }", "private function getAuthenticatedUser()\r\n {\r\n $tokenStorage = $this->container->get('security.token_storage');\r\n return $tokenStorage->getToken()->getUser();\r\n }", "private function getAuthenticatedUser()\r\n {\r\n $tokenStorage = $this->container->get('security.token_storage');\r\n return $tokenStorage->getToken()->getUser();\r\n }", "public function getUser( ) {\n\t\treturn $this->user;\n\t}", "public function getUser( ) {\n\t\treturn $this->user;\n\t}", "public function getUserInfo() {}", "protected function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n\t\t//TODO User 1. How can we check the id of the JWT user?\n\t\t$user = '';\n\t\tif ($user) {\n\t\t\treturn $this->sendResponse(UserModel::find($user->id));\n\t\t}\n\t\treturn $this->sendResponse('You are not authorised to view this user');\n }", "protected function getUser()\n {\n return $this->loadUser(array(\n 'user_name' => $this->context['admin'],\n ));\n }", "public static function getUser() {\n return isset($_SESSION[Security::SESSION_USER]) ? $_SESSION[Security::SESSION_USER] : NULL;\n }", "public function user()\n {\n return $this->response_json($this->guard()->user());\n }", "public function getUserInfo ()\n\t{\n\t\t$info[\"id\"]\t\t\t\t\t\t= $this->id;\t\t\t\t\t//The unique id of the user in the database\n\t\t$info[\"user_id\"] \t\t\t\t= $this->userId;\t\t\t\t//The id of the user includes API id's\n\t\t$info[\"email\"]\t\t\t\t\t= $this->email;\t\t\t\t\t//The email of the user\n\t\t$info[\"description\"]\t\t\t= $this->description;\t\t\t//The description of the user\n\t\t$info[\"location\"]\t\t\t\t= $this->location;\t\t\t\t//The location of the user\n\t\t$info[\"first_name\"]\t\t\t\t= $this->firstName;\t\t\t\t//The first name of the user\n\t\t$info[\"last_name\"]\t\t\t\t= $this->lastName;\t\t\t\t//The last name of the user\n\t\t$info[\"name\"]\t\t\t\t\t= $this->fullName;\t\t\t\t//The full name of the user\n\t\t$info[\"username\"]\t\t\t\t= $this->username;\t\t\t\t//The username of the user\n\t\t$info[\"type\"]\t\t\t\t\t= $this->type;\t\t\t\t\t//The type of user registration\n\t\t$info[\"thumbnail\"]\t\t\t\t= $this->thumbnail;\t\t\t\t//The user's image thumbnail\n\t\t$info[\"gender\"]\t\t\t\t\t= $this->gender;\t\t\t\t//The gender of the user\n\t\t$info[\"num_calendars\"]\t\t\t= $this->numCalendarsCreated;\t//The number of calendars the user has created\n\t\t$info[\"num_followed_calendars\"]\t= $this->numCalendarsFollowed;\t//The number of calendars the user is following\n\t\t$info[\"primary_calendar\"]\t\t= $this->primaryCalendar;\t\t//The primary calendar that a user is using\n\t\t\n\t\treturn $info;\n\t}", "public function user()\n {\n if ($this->loggedOut) {\n return;\n }\n\n // If we've already retrieved the user for the current request we can just\n // return it back immediately. We do not want to fetch the user data on\n // every call to this method because that would be tremendously slow.\n if (! is_null($this->user)) {\n return $this->user;\n }\n\n $id = $this->session->get($this->getName());\n\n // First we will try to load the user using the identifier in the session if\n // one exists. Otherwise we will check for a \"remember me\" cookie in this\n // request, and if one exists, attempt to retrieve the user using that.\n if (! is_null($id)) {\n if ($this->user = $this->provider->retrieveById($id)) {\n $this->fireAuthenticatedEvent($this->user);\n }\n }\n\n // If the user is null, but we decrypt a \"recaller\" cookie we can attempt to\n // pull the user data on that cookie which serves as a remember cookie on\n // the application. Once we have a user we can return it to the caller.\n $recaller = $this->recaller();\n\n if (is_null($this->user) && ! is_null($recaller)) {\n $this->user = $this->userFromRecaller($recaller);\n\n if ($this->user) {\n $this->replaceRememberToken($this->user, $recaller->token());\n\n $this->updateSession($this->user->getAuthIdentifier());\n\n $this->fireLoginEvent($this->user, true);\n }\n }\n\n return $this->user;\n }", "public function getUserProfile()\n {\n $user = $this->security->getUser();\n return $user;\n }", "public function getUser(){\r\n\t\treturn $this->facebook_obj->getUser();\r\n\t}", "public function getUser()\n {\n return $this->container->get('user')->getUser();\n }", "public function user()\n {\n $this->checkTimeouts();\n\n if (! $this->session->has('socialite_token')) return null;\n if ($this->session->has('google_guard_user')) return $this->session->get('google_guard_user');\n\n try {\n $user = Socialite::driver('google')->userFromToken($this->session->get('socialite_token'));\n } catch (\\Exception $e) {\n }\n\n if (! isset($user) || ! $user) return $this->flushSession();\n\n $userModel = $this->hydrateUserModel($user);\n $this->session->put('google_guard_user', $userModel);\n\n return $userModel;\n }", "public function getUser()\n {\n if ($this->user === null) {\n // if we have not already determined this and cached the result.\n $this->user = $this->getUserFromAvailableData();\n }\n\n return $this->user;\n }", "function getUser() {\n return user_load($this->uid);\n }", "public function getCurrentUser()\n {\n $this->validateUser();\n\n if ($this->session->has(\"user\")) {\n return $this->session->get(\"user\");\n }\n }", "public function getUser() {\n\t\treturn $this->user;\n\t}", "public function getUser() {\n\t\treturn $this->user;\n\t}", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }" ]
[ "0.77322865", "0.7501728", "0.7487985", "0.74824005", "0.7353201", "0.73199815", "0.72836107", "0.72814626", "0.7254474", "0.7243872", "0.72340024", "0.72238094", "0.71814936", "0.71681863", "0.71671766", "0.71671766", "0.71671766", "0.71216", "0.7120387", "0.71201956", "0.7098211", "0.7091999", "0.708232", "0.70782954", "0.70678824", "0.70676154", "0.7060843", "0.70550853", "0.7047405", "0.7043328", "0.70383674", "0.7029386", "0.70095885", "0.7005927", "0.69975597", "0.69958425", "0.6993813", "0.6978182", "0.6973458", "0.69473857", "0.6946453", "0.6946453", "0.6945736", "0.6940452", "0.6937536", "0.6933799", "0.69277424", "0.692372", "0.692372", "0.692372", "0.692372", "0.690557", "0.6897737", "0.6895216", "0.68905556", "0.6889756", "0.68866515", "0.68790567", "0.68760365", "0.6874531", "0.68727237", "0.687134", "0.68699276", "0.6868467", "0.68665683", "0.685736", "0.68532586", "0.68481255", "0.68275607", "0.6826595", "0.6824996", "0.68233293", "0.68166274", "0.68043375", "0.68043375", "0.6802609", "0.6802609", "0.67977583", "0.67943305", "0.67935693", "0.67930204", "0.67903346", "0.6788945", "0.6786916", "0.67865705", "0.6786553", "0.67767626", "0.67751557", "0.6770345", "0.67679065", "0.67599934", "0.6755325", "0.67528725", "0.67528725", "0.674944", "0.674944", "0.674944", "0.674944", "0.674944", "0.674944", "0.674944" ]
0.0
-1