return $handle; } /* * @param string $dir */ private static function clearDir($dir) { if (!is_dir($dir)) { throw new InvalidArgumentException("The dir argument must be a directory: $dir"); } return rtrim($dir, DIRECTORY_SEPARATOR); } /** * Checks if the given file path satisfies the filtering options. * @param string $path the path of the file or directory to be checked * @param array $options the filtering options. See [[findFiles()]] for explanations of * the supported options.
* - `recursive`: boolean, whether the files under the subdirectories should also be looked for. Defaults to `true`. * @return array files found under the directory, in no particular order. Ordering depends on the files system used. * @throws InvalidArgumentException if the dir is invalid. */ public static function findFiles($dir, $options = []) { $dir = self::clearDir($dir); $options = self::setBasePath($dir, $options); $list = []; $handle = self::openDir($dir); while (($file = readdir($handle)) !== false) { if ($file === '.' || $file === '..') { continue;
$item['kepindex'] = $key; return $item; }, array_keys($eredmeny), $eredmeny); } } else if (isset($parancsok['cikk-kep'])) { $directory = getCikkImageDirectory($aloldal, true); $images = FileHelper::findFiles($directory, ['recursive'=>false, 'only' => ['*_*']]); if($images) { foreach ($images as $image) { $eredmeny[]['galleriakep'] = end( explode('web/', $image) ); } } else { $eredmeny[]['galleriakep'] = 'hidden';
$html = $html2; $i = 0;// ciklus újrakezdése az elejéről } } $domHtml = str_get_html($html, true, true, DEFAULT_TARGET_CHARSET, false); $res = recursiveDomReplacer2($domHtml, $aloldal, $customdata, 'first-data-sys'); $htmlResult = (string)$domHtml; $newDomHtml = str_get_html($htmlResult, true, true, DEFAULT_TARGET_CHARSET, false); $res = recursiveDomReplacer2($newDomHtml, $aloldal, $customdata, 'data-sys'); $htmlResult = (string)$newDomHtml; return $htmlResult; }
} else { $modul = ModulOldal::findOne(4); } $html = "[$modul->indito_modul]"; $this->getView()->params['modulClass'] = $modul->indito_modul; $html = modulHelyettesito3($html, $cikk); $this->getView()->title = $cikkAdat->cim; $this->getView()->params['meta'] = $this->renderPartial('@common/views/site/meta', ['cikk' => $cikkAdat]); $this->getView()->registerJsFile('@web/vendors/autosize/autosize.min.js'); $this->getView()->registerJsFile('@web/js/sj.comments.js'); $_SESSION['tulajdonsag'] = $cikkAdat->tulajdonsag;
$args = $this->controller->bindActionParams($this, $params); Yii::debug('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__); if (Yii::$app->requestedParams === null) { Yii::$app->requestedParams = $args; } return call_user_func_array([$this->controller, $this->actionMethod], $args); } }
} $result = null; if ($runAction && $this->beforeAction($action)) { // run the action $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); // call afterAction on modules foreach ($modules as $module) { /* @var $module Module */
$parts = $this->createController($route); if (is_array($parts)) { /* @var $controller Controller */ list($controller, $actionID) = $parts; $oldController = Yii::$app->controller; Yii::$app->controller = $controller; $result = $controller->runAction($actionID, $params); if ($oldController !== null) { Yii::$app->controller = $oldController; } return $result; }
$params = $this->catchAll; unset($params[0]); } try { Yii::debug("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } $response = $this->getResponse(); if ($result !== null) {
{ try { $this->state = self::STATE_BEFORE_REQUEST; $this->trigger(self::EVENT_BEFORE_REQUEST); $this->state = self::STATE_HANDLING_REQUEST; $response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send();
$config = yii\helpers\ArrayHelper::merge( require __DIR__ . '/../../common/config/main.php', require __DIR__ . '/../../common/config/main-local.php', require __DIR__ . '/../config/main.php', require __DIR__ . '/../config/main-local.php' ); (new yii\web\Application($config))->run();
$_GET = [ 'cikk' => '209', ]; $_SESSION = [ '__flash' => [], '__returnUrl' => 'https://elektromos-kerekpar.info/?oldal=1&cikk=209&hp=35', ];