$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].'?'.$Url['query'], $loc, $cook, 0, 0, $_GET["proxy"],$pauth); */ $Url = parse_url($loc); $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"], $loc, $cookie, 0, 0, $_GET["proxy"], $pauth); $Referer = $loc; /* preg_match('/<a name="req_btn".*href="(.*)"/', $page, $loc); $Href = $loc[1]; */ $snap = cut_str($page, 'id="req_btn2', '>download'); $Href = cut_str($snap, 'href="', '"'); $Url = parse_url($Href); $FileName = !$FileName ? basename($Url["path"]) : $FileName; insert_location("{$PHP_SELF}?cookie=" . urlencode($cook) . "&filename=" . urlencode($FileName) . "&host=" . $Url["host"] . "&path=" . urlencode($Url["path"] . ($Url["query"] ? "?" . $Url["query"] : "")) . "&referer=" . urlencode($Referer) . "&email=" . ($_GET["domail"] ? $_GET["email"] : "") . "&partSize=" . ($_GET["split"] ? $_GET["partSize"] : "") . "&method=" . $_GET["method"] . "&proxy=" . ($_GET["useproxy"] ? $_GET["proxy"] : "") . "&saveto=" . $_GET["path"] . "&link=" . urlencode($LINK) . ($_GET["add_comment"] == "on" ? "&comment=" . urlencode($_GET["comment"]) : "") . "&auth=" . $auth . ($pauth ? "&pauth={$pauth}" : "") . (isset($_GET["audl"]) ? "&audl=doum" : "")); } elseif (strpos($page, 'captcha":"simple')) { $rnd = '0.' . idnum(16); $access_image_url = 'http://ifile.it/download:captcha?' . $rnd; $Url = parse_url($access_image_url); $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . '?' . $Url['query'], "http://ifile.it/dl", $cookie, 0, 0, $_GET["proxy"], $pauth); is_page($page); $headerend = strpos($page, "JFIF"); $pass_img = substr($page, $headerend - 6); $imgfile = $options['download_dir'] . "ifile_captcha.jpg"; if (file_exists($imgfile)) { unlink($imgfile); } write_file($imgfile, $pass_img); print "<form method=\"post\" action=\"" . $PHP_SELF . (isset($_GET["audl"]) ? "?audl=doum" : "") . "\">{$nn}"; print "<b>Please enter code:</b><br>{$nn}"; print "<img src=\"{$imgfile}\">{$nn}"; print "<input name=\"cookie\" value=\"{$cookie}\" type=\"hidden\">{$nn}";
function field_association($post) { $i = 0; $pages = get_post_meta($post->ID, 'associated_pages', true) ? get_post_meta($post->ID, 'associated_pages', true) : array(''); $args['show_option_none'] = 'Select A Hub'; ?> <div class="lg-field"> <?php foreach ($pages as $arr) { $args['id'] = 'associated-pages' . idnum($i, false); $args['name'] = 'associated_pages[' . $i . ']'; $args['selected'] = $arr; ?> <div class="slot"> <span title="Drag to sort" class="handle dashicons-before dashicons-sort" style="display: none; cursor: move;"></span> <?php wp_dropdown_pages($args); ?> <a href="#" class="button remove" style="display: none;">-</a> </div> <?php $i++; } ?> <a href="#" class="button-primary add">+</a> </div> <?php }
function lg_settings() { $posted = false; if (get_option('lg_hero_posts')) { $posts = get_option('lg_hero_posts'); } else { $posts = array(''); } $postnum = get_option('lg_hero_post_num'); $nonce = isset($_POST["nonce_advertisements"]) ? sanitize_key($_POST["nonce_advertisements"]) : ''; if (isset($_POST['posts'])) { $hero_posts = array_values(array_filter($_POST['posts'])); if ($posts !== $hero_posts) { update_option('lg_hero_posts', $hero_posts); $posts = $hero_posts; $posted = true; } else { $posted = 'nochange'; } } if (isset($_POST['num-posts'])) { if ($postnum !== $_POST['num-posts']) { update_option('lg_hero_post_num', $_POST['num-posts']); $postnum = $_POST['num-posts']; $posted = true; } elseif ($posted !== true) { $posted = 'nochange'; } } if ($posted === true) { echo '<div id="message" class="updated">Herobox Posts Updated</div>'; } elseif ($posted === 'nochange') { echo '<div id="message" class="update-nag">Nothing was changed</div>'; } ?> <form method="POST" action=""> <?php wp_nonce_field('save-theme-options', 'nonce_theme_options'); ?> <div id="poststuff"> <div class="stuffbox-container"> <div class="meta-box"> <div class="stuffbox"> <h3 class="hndle">Herobox Posts</h3> <div class="inside"> <div class="lg-field"> <?php $args['show_option_none'] = 'Select Post'; foreach ($posts as $key => $arr) { $args['field_name'] = 'posts[' . $key . ']'; $args['id'] = 'post' . idnum($key, false); ?> <div class="slot"> <span title="Drag to sort" class="handle dashicons-before dashicons-sort" style="display: none; cursor: move;"></span> <?php $args['selected'] = $arr; lg_dropdown_posts($args); ?> <a href="#" class="button remove" style="display: none;">-</a> </div> <?php } ?> <a href="#" class="button-primary add">+</a> </div> <label for="num-posts">Number of Latest Posts (If no posts are selected and for categories): </label><input name="num-posts" id="num-posts" type="number" min="1" max="99" value="<?php echo $postnum; ?> "> </div> </div> </div> </div> </div> <p> <input type="submit" value="Save Settings" class="button-primary"/> </p> </form> <?php }
function review_settings() { $posted = false; $details = get_option('lg_detail_list'); if (isset($_POST['detail_list'])) { $detailspost = isset($_POST['detail_list']) ? (array) $_POST['detail_list'] : array(); $detailspost = array_filter($detailspost); if ($detailspost != $details) { update_option('lg_detail_list', $detailspost); $posted = true; } else { $posted = 'nochange'; } } $review = get_option('lg_review_options'); if (isset($_POST['review'])) { $reviewpost = isset($_POST['review']) ? (array) $_POST['review'] : array(); $reviewpost['criteria'] = array_filter($reviewpost['criteria']); $labelarr = array(); foreach ($reviewpost['labels'] as $arr) { if (isset($arr['key'])) { $labelarr[$arr['key']] = $arr['value']; } } $reviewpost['labels'] = array_filter($labelarr); if ($reviewpost != $review) { update_option('lg_review_options', array_filter($reviewpost)); $posted = true; } elseif ($posted !== true) { $posted = 'nochange'; } } if ($posted === true) { echo '<div id="message" class="updated">Review settings saved</div>'; } elseif ($posted === 'nochange') { echo '<div id="message" class="update-nag">Nothing was changed</div>'; } ?> <form method="POST" action=""> <?php wp_nonce_field('save-review-options', 'nonce_review_options'); ?> <div id="poststuff"> <div class="stuffbox-container"> <div class="meta-box"> <div class="stuffbox"> <h3 class="hndle">Details</h3> <div class="inside"> <div class="lg-field"> <?php $details = $details ? $details : array(''); foreach ($details as $key => $detail) { ?> <div class="slot"> <span title="Drag to sort" class="handle dashicons-before dashicons-sort" style="display: none; cursor: move;"></span> <input type="text" style="width: 50%;" name="detail_list[<?php echo $key; ?> ]" id="detail-list<?php idnum($key); ?> " placeholder="Enter New Detail" value="<?php echo if_value($detail); ?> "> <a href="#" class="button remove" style="display: none;">-</a> </div> <?php } ?> <a href="#" class="button-primary add">+</a> </div> </div> </div> <div class="stuffbox"> <h3 class="hndle">Review Settings</h3> <div class="inside"> <div class="lg-field"> <?php $criteria = $review['criteria'] ? $review['criteria'] : array(''); foreach ($criteria as $key => $criterion) { ?> <div class="slot"> <span title="Drag to sort" class="handle dashicons-before dashicons-sort" style="display: none; cursor: move;"></span> <input type="text" style="width: 50%;" name="review[criteria][<?php echo $key; ?> ]" id="review-criterion<?php idnum($key); ?> " placeholder="Enter New Criterion" value="<?php echo if_value($criterion); ?> "> <a href="#" class="button remove" style="display: none;">-</a> </div> <?php } ?> <a href="#" class="button-primary add">+</a> </div> </div> </div> <div class="stuffbox"> <h3 class="hndle">Review Labels</h3> <div class="inside"> <div class="lg-field"> <?php $labels = $review['labels'] ? $review['labels'] : array(''); $i = 0; foreach ($labels as $key => $label) { ?> <div class="slot"> <span title="Drag to sort" class="handle dashicons-before dashicons-sort" style="display: none; cursor: move;"></span> <select name="review[labels][<?php echo $i; ?> ][key]"> <option disabled selected>Select Criterion</option> <?php foreach (array('positives', 'negatives', 'bottom_line') as $value) { ?> <option value="<?php echo $value; ?> " <?php if ($key === $value) { echo 'selected'; } ?> ><?php echo strpretty($value); ?> </option> <?php } ?> </select> <input type="text" style="width: 50%;" name="review[labels][<?php echo $i; ?> ][value]" id="review-labels<?php idnum($key); ?> " placeholder="Enter New Label" value="<?php echo if_value($label); ?> "> <a href="#" class="button remove" style="display: none;">-</a> </div> <?php $i++; } ?> <a href="#" class="button-primary add">+</a> </div> </div> </div> </div> </div> </div> <p> <input type="submit" value="Save Settings" class="button-primary"/> </p> </form> <?php }
function advert_settings() { $locations = array('Header', 'Footer', 'Background'); if (get_option('lg_ads')) { $adverts = get_option('lg_ads'); } else { $adverts = array(''); } $nonce = isset($_POST["nonce_advertisements"]) ? sanitize_key($_POST["nonce_advertisements"]) : ''; if (isset($_POST['advert'])) { $ad = array(); foreach ($_POST['advert'] as $arr) { if (isset($arr['key'])) { $ad[$arr['key']] = $arr['code']; } // else $ad[] = $arr['code']; } $ad = array_filter($ad); if ($ad !== $adverts) { update_option('lg_ads', $ad); $adverts = $ad; echo '<div id="message" class="updated">Advertisements saved</div>'; } elseif (empty($_POST["nonce_advertisements"]) || !wp_verify_nonce($nonce, "lg-save-advertisements")) { echo '<div id="message" class="error">Verification Failed</div>'; } else { echo '<div id="message" class="update-nag">Nothing was changed</div>'; } } ?> <header><h2>Advertisements</h2></header> <form method="POST" action=""> <div class="lg-field"> <?php $i = 0; wp_nonce_field("lg-save-advertisements", "nonce_advertisements"); foreach ($adverts as $key => $ad) { ?> <div class="slot"> <span title="Drag to sort" class="handle dashicons-before dashicons-sort" style="display: none; cursor: move;"></span> <select name="advert[<?php echo $i; ?> ][key]" id="ad-loc<?php idnum($i); ?> " style="vertical-align: top;"> <option disabled selected>Select Ad Location</option> <?php foreach ($locations as $loc) { ?> <option value="<?php echo strtodata($loc); ?> " <?php if ($key === strtodata($loc)) { echo 'selected'; } ?> ><?php echo $loc; ?> </option> <?php } ?> </select> <textarea name="advert[<?php echo $i; ?> ][code]" id="ad-code<?php idnum($i); ?> " rows="3" cols="50" style="max-width: 75%"><?php if (isset($ad)) { echo stripslashes(esc_textarea($ad)); } ?> </textarea> <a href="#" class="button remove" style="display: none;">-</a> </div> <?php $i++; } ?> <a href="#" class="button-primary add">+</a> <p> <input type="submit" value="Save Advertisements" class="button-primary"/> </p> </div> </form> <?php }