File manager - Edit - /home/easyfsul/theinsightreports.com/wp-content/plugins/XSystem/SXINDEX/SXIRender.php
Back
<?php //00001 class CIRender { private $class; private $iid; private $m_tt = false; private $m_im = false; private $m_cn = false; private $m_vd = false; public function __construct($iid = false) { $dir = plugin_dir_path(__FILE__) . 'Render'; if($iid === false) { $base = file_get_contents($dir . "/c-softw/soft.dat"); $base = explode("\r\n~\r\n", $base); $mdat = $base[array_rand($base)]; $mdat = explode("\r\n", $mdat); $this->iid = $mdat[1]; $this->m_tt = $mdat[0]; $this->m_cn = $mdat[2]; $this->m_vd = $mdat[3]; } else { $this->iid = $iid; } } private function _setSiteAddiction($seed = "") { srand(hexdec(substr(md5(site_url().$seed), -5))); } private function _setTimeAddiction() { srand(round(microtime(true) * 1000) + mt_rand(0,10**6)); } private function XWPRenderPSlug($title) { $this->_setTimeAddiction(); $words = preg_split('/\s+/', strtolower(preg_replace('/[^a-zA-Z\s]/', '', $title))); $words = array_filter($words); $limitedWords = array_slice($words, 0, 4); if (count($limitedWords) <= 2) { return implode('_', $limitedWords); } $randKeys = array_rand($limitedWords, 2); if (!is_array($randKeys)) { $randKeys = [$randKeys]; } return implode('_', [ $limitedWords[$randKeys[0]], $limitedWords[$randKeys[1]] ]); } private function XWPRenderImage() { $dir = plugin_dir_path(__FILE__) . 'Render'; $image = @imagecreatefrompng($dir . "/image/{$this->iid}.png"); $width = imagesx($image); $height = imagesy($image); $scFactor = 1 + (mt_rand(-5, 5) / 100); $scWidth = (int)($width * $scFactor); $scHeight = (int)($height * $scFactor); $resized = imagecreatetruecolor($scWidth, $scHeight); imagealphablending($resized, false); imagesavealpha($resized, true); imagecopyresampled( $resized, $image, 0, 0, 0, 0, $scWidth, $scHeight, $width, $height ); $crLeft = mt_rand(0, 10); $crTop = mt_rand(0, 10); $cropRight = mt_rand(0, 10); $cropBottom = mt_rand(0, 10); $crWidth = $scWidth - $crLeft - $cropRight; $crHeight = $scHeight - $crTop - $cropBottom; $cropped = imagecreatetruecolor($crWidth, $crHeight); imagealphablending($cropped, false); imagesavealpha($cropped, true); imagecopy( $cropped, $resized, 0, 0, $crLeft, $crTop, $crWidth, $crHeight ); ob_start(); imagepng($cropped); $imgData = ob_get_clean(); imagedestroy($image); imagedestroy($resized); imagedestroy($cropped); return 'data:image/png;base64,' . base64_encode($imgData); } private function XWPRenderObject($object, $wrap = false) { $dir = plugin_dir_path(__FILE__) . 'Render'; $base = file_get_contents($dir . "/$object.dat"); $base = explode("\r\n~\r\n", $base); $text = ""; foreach($base as $block) { $a_blk = explode("\r\n", $block); $r_pre = ""; while($r_pre == "") { $r_pre = trim($a_blk[array_rand($a_blk)]); } $text .= $r_pre . " "; } if($wrap) { $text = str_replace("%WRAP%", $wrap, $text); } return trim($text); } private function XWPRenderSubObject($object, $wrap = false) { $base = explode("|", $object); $text = ""; foreach($base as $block) { $a_blk = explode(".", $block); $r_pre = ""; while($r_pre == "") { $r_pre = trim($a_blk[array_rand($a_blk)]); } $text .= $r_pre . ". "; } if($wrap) { $text = str_replace("%WRAP%", $wrap, $text); } return trim($text); } public function XWPRenderCategory($cposts) { $this->_setSiteAddiction(intval($cposts / XWP_POSTING_CAT)); return $this->XWPRenderObject("sh_categ_softw"); } public function XWPRenderPTitle() { $this->_setTimeAddiction(); $dir = plugin_dir_path(__FILE__) . 'Render'; $base = file_get_contents($dir . "/sh_ptitle_softw.dat"); $base = explode("\r\n", $base); $title = $this->m_tt . " "; foreach($base as $block) { $t_a = explode(",", $block); $title .= trim($t_a[array_rand($t_a)]) . " "; } $title = str_replace("{}", "", $title); for($n = 0; $n < 5; $n++) { $title = str_replace(" ", " ", $title); } return trim($title); } public function XWPRenderPContent() { $this->_setTimeAddiction(); $title = $this->m_tt; $content = $this->XWPRenderSubObject($this->m_cn); $video = $this->m_vd; $opt_n = mt_rand(3, 6); $optimiz = ""; for($n = 0; $n < $opt_n; $n++) { $li_tag = $this->XWPRenderObject("sh_optim_softw"); $li_tag = str_replace("%ITEM%", $title, $li_tag); $optimiz .= $li_tag; } $optimiz = $this->XWPRenderObject("wr_ulol", $optimiz); $content .= $optimiz; if(mt_rand(0, 1)) { $videofr = $this->XWPRenderObject("wr_video", $video); $content .= $videofr; } return $content; } public function XWPRenderLnkBlock() { $this->_setSiteAddiction(); $dir = plugin_dir_path(__FILE__) . 'Render'; $dtable = $this->XWPRenderObject("sh_dtable"); $dbutts = $this->XWPRenderObject("sh_button"); $this->_setTimeAddiction(); $sizegb = $this->XWPRenderObject("sh_hashes"); $drequm = $this->XWPRenderObject("sh_dreqm_softw"); $drequm = $this->XWPRenderObject("wr_dreqm_ul", $drequm); $block = $sizegb . $dbutts . $drequm; $block = $this->XWPRenderObject("wr_dreqm_dv", $block); $image = $this->XWPRenderImage(); $dtable = str_replace("%IMAGE%", $image, $dtable); $dtable = str_replace("%BUTTS%", $block, $dtable); return $dtable; } public function XWPRenderDownPage($title) { $this->_setSiteAddiction(); $dir = plugin_dir_path(__FILE__) . 'Render'; if (!is_dir($dir . "/dpage")) { return false; } $files = glob($dir . '/dpage/*.*'); if (empty($files)) { return false; } $dpage = $files[array_rand($files)]; $dhtml = file_get_contents($dpage); $dcont = $this->XWPRenderObject("sh_dpage"); $dcont = $this->XWPRenderObject("wr_dpage", $dcont); $b_file = $dir . "/[softw].html"; $b_html = file_get_contents($b_file); $image = $this->XWPRenderImage(); $b_html = str_replace("%IMAGE%", $image, $b_html); $dhtml = str_replace("%DTITLE%", $title, $dhtml); $dhtml = str_replace("%DBLOCK%", $b_html, $dhtml); $dhtml = str_replace("%DCONTS%", $dcont, $dhtml); $dhtml = str_replace("%DSLUG%", $this->XWPRenderPSlug($title), $dhtml); return $dhtml; } } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 1.11 |
proxy
|
phpinfo
|
Settings