function downloads($dirName = "") { $realDirName = $dirName === "" ? $_SERVER["DOCUMENT_ROOT"] . "/downloads" : $dirName; foreach (array_diff(scandir($realDirName), array(".", "..")) as $fileName) { if (is_dir($realDirName . "/" . $fileName)) { downloads($realDirName . "/" . $fileName); } else { if (strpos($fileName, "OpenCOR") !== false) { echo str_replace($_SERVER["DOCUMENT_ROOT"] . "/downloads/", "", $realDirName . "/" . $fileName) . "," . filesize($realDirName . "/" . $fileName) . "\n"; } } } }
function getqrcode($url, $scene_id) { $imageinfo = downloadImageFromWechat($url); $filename = time() . "qrcode_" . $scene_id . ".jpg"; $local_file = fopen('qrcode_image/' . $filename, 'w'); if (false !== $local_file) { if (false !== fwrite($local_file, $imageinfo['body'])) { fclose($local_file); } } //echo '<img src="qrcode_image/"'.$filename.'/>'; downloads($filename); exit; }
function fullupdate() { $GLOBALS["FULL"] = true; $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid"; $unix = new unix(); $pid = @file_get_contents($pidfile); if ($unix->process_exists($pid, __FILE__)) { writelogsBLKS("Warning: Already running pid {$pid}", __FUNCTION__, __FILE__, __LINE__); return; } @file_put_contents($pidfile, getmypid()); update(); downloads(); inject(); }
GraphicAdmin(); OpenTable(); echo "<br><center>"; echo "<font class=\"content\">"; echo "" . _NEWDOWNLOADADDED . "<br><br>"; echo "[ <a href=\"" . $admin_file . ".php?op=downloads\">" . _WEBDOWNLOADSADMIN . "</a> ]</center><br><br>"; CloseTable(); if ($new == 1) { $db->sql_query("delete from " . $prefix . "_downloads_newdownload where lid='{$lid}'"); } include "footer.php"; } } switch ($op) { case "downloads": downloads(); break; case "DownloadsDelNew": DownloadsDelNew($lid); break; case "DownloadsAddCat": DownloadsAddCat($title, $cdescription); break; case "DownloadsAddSubCat": DownloadsAddSubCat($cid, $title, $cdescription); break; case "DownloadsAddDownload": DownloadsAddDownload($new, $lid, $title, $url, $cat, $description, $name, $email, $submitter, $filesize, $version, $homepage, $hits); break; case "DownloadsAddEditorial": DownloadsAddEditorial($downloadid, $editorialtitle, $editorialtext);
function import() { include_once dirname(__FILE__) . "/exec.squid.blacklists.php"; update(); downloads(); inject(); WriteCategoriesStatus(true); }
function get_the_page($id, $ajax = false) { if ($_REQUEST["post_id"]) { $id = $_REQUEST["post_id"]; $ajax = $_REQUEST['ajax']; } //if($id == 5 && $ajax == true) { // if ( !wp_verify_nonce( $_REQUEST['nonce'], "get_the_page_nonce")) { // exit("You are not allowed to use this function"); // } //} global $post; $post = get_post($id); $out = array(); if ($id == 168) { $out[] = '<div class="col-md-6"><h3 class="column-left">' . get_field('c1_headline') . '</h3>' . get_field('c1_content', $post->ID); $out[] = our_friends() . '</div>'; $out[] = '<div class="col-md-6"><h3 class="column-right">Useful Downloads' . get_field('c2_headline') . '</h3>' . downloads() . '</div>'; } elseif ($id == 15) { $out[] = '<div class="col-md-6"><h3 class="column-left">' . get_field('c1_headline') . '</h3>' . in_touch() . '</div>'; $out[] = '<div class="col-md-6"><h3 class="column-right">' . get_field('c2_headline') . '</h3>' . find_us() . '</div>'; } elseif ($id == 5) { $out[] = '<div class="col-md-6"><h3 class="column-left">' . get_field('c1_headline') . '</h3>' . get_field('c1_content') . get_field('c2_content') . '</div>'; $out[] = '<div class="col-md-6"><div class="row cottage-images cottage-intro">'; if (have_rows('landing_images', $cottage)) { // loop through the rows of data while (have_rows('landing_images', $cottage)) { the_row(); $image = get_sub_field('landing_thumb', $cottage); $img = $image['url']; $image_main = get_sub_field('landing_main', $cottage); $img_main = $image_main['url']; $title = $image['title']; $out[] = '<div class="col-sm-4 col-xs-6"><a href="' . $img_main . '" data-lightbox="cottage-group"><img src="' . $img . '" title="' . $title . '" class="img-responsive"></a></div>'; } } else { $out[] = 'did not work'; } $out[] = '</div></div></div>'; } else { $out[] = '<div class="col-md-6"><h3 class="column-left">' . get_field('c1_headline') . '</h3>' . get_field('c1_content') . '</div>'; $out[] = '<div class="col-md-6"><h3 class="column-right">' . get_field('c2_headline') . '</h3>' . get_field('c2_content') . '</div>'; } wp_reset_postdata(); if ($ajax == false) { echo $ajax . implode($out); } elseif ($id == 5 && $ajax == true or $id == 7 && $ajax == true) { if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') { echo implode($out); exit; } else { header("Location: " . $_SERVER["HTTP_REFERER"]); die('this did not work'); } } else { exit; } }
function download_spezial() { global $db; downloads(); switch ($_GET['view']) { case 'new': $field = 'datum'; break; case 'hits': $field = 'downloads'; break; case 'traffic': $field = 'traffic'; break; default: $field = 'datum'; } $db->query('SELECT dID, name, ' . DB_PRE . 'ecp_downloads.userID, info, kID, subkID, kname, ' . DB_PRE . 'ecp_downloads.homepage, version, size, traffic, downloads, ' . DB_PRE . 'ecp_downloads.datum, COUNT(comID) as comments, username FROM ' . DB_PRE . 'ecp_downloads LEFT JOIN ' . DB_PRE . 'ecp_user ON (' . DB_PRE . 'ecp_downloads.userID = ID) LEFT JOIN ' . DB_PRE . 'ecp_comments ON (bereich = "downloads" AND subID = dID) LEFT JOIN ' . DB_PRE . 'ecp_downloads_kate ON (kID = cID) WHERE ' . DB_PRE . 'ecp_downloads.access = "" OR ' . str_replace('access', DB_PRE . 'ecp_downloads.access', $_SESSION['access_search']) . ' GROUP BY dID ORDER BY ' . $field . ' DESC LIMIT 15'); if ($db->num_rows()) { $tpl = new smarty(); $downloads = array(); while ($row = $db->fetch_assoc()) { $row['size'] = goodsize($row['size']); $row['traffic'] = goodsize($row['traffic']); $row['datum'] = date(LONG_DATE, $row['datum']); $row['downloads'] = number_format($row['downloads'], 0, ',', '.'); $lang = json_decode($row['info'], true); if (isset($lang[LANGUAGE])) { $row['info'] = $lang[LANGUAGE]; } else { $row['info'] = @$lang['de']; } $downloads[] = $row; } $tpl->assign('dls', $downloads); ob_start(); $tpl->display(DESIGN . '/tpl/downloads/downloads.html'); $content = ob_get_contents(); ob_end_clean(); main_content(DOWNLOADS, $content, '', 1); } else { table(INFO, NO_ENTRIES); } }