This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $route = Model\Staticroute::getByName("blog"); | |
| echo $route->assemble(["prefix" => "/en/my-section", "id" => 123, "text" => "My Super Text"]); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $sql = <<<DB | |
| ($fromDate BETWEEN von | |
| AND bis | |
| OR $toDate BETWEEN von | |
| AND bis | |
| OR von BETWEEN $fromDate | |
| AND $toDate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| header("Content-type: text/csv"); | |
| header("Content-Disposition: attachment; filename=kunden.csv"); | |
| header("Pragma: no-cache"); | |
| header("Expires: 0"); | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $fp = fsockopen('127.0.0.1', 6379, $errno, $errstr, 30); | |
| $data = array(); | |
| if (!$fp) { | |
| die($errstr); | |
| } else { | |
| fwrite($fp, "INFO\r\nQUIT\r\n"); | |
| while (!feof($fp)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // SSL redirect | |
| if(!$this->editmode){ | |
| if($this->document instanceof Document_Page){ | |
| $domain = 'www.domain.tld'; | |
| if($this->document->getProperty('https') && !$this->getRequest()->isSecure()){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // feed | |
| $url = 'https://api.instagram.com/v1/users/{USERID}/media/recent/?access_token={ACCESS_TOKEN}'; | |
| $instagram = new InstagramImport(); | |
| $instagram->fetchURL($url); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $tmpFiles = []; | |
| foreach ($_FILES as $file) { | |
| $imPath = PIMCORE_TEMPORARY_DIRECTORY . "/" . uniqid() . ".jpg"; | |
| $im = Pimcore_Image::getInstance(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pimcore.registerNS("pimcore.plugin.productimport"); | |
| pimcore.plugin.productimport = Class.create(pimcore.plugin.admin, { | |
| getClassName: function() { | |
| return "pimcore.plugin.productimport"; | |
| }, | |
| initialize: function() { | |
| pimcore.plugin.broker.registerPlugin(this); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Website\Controller\Action; | |
| use Pimcore\Model\Asset; | |
| class DownloadController extends Action { | |
| private $file; | |
| private $asset; | |
| private $filename; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(typeof(Storage) !== "undefined") { | |
| var d = new Date(); | |
| var n = Math.round(d.getTime() /1000); | |
| if (sessionStorage.toralarmvisit) { | |
| } else { | |
| sessionStorage.toralarmvisit = n; | |
| } |