R
remg
Curioso
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
hola necesito ayuda con este codigo quiero ingresar este codigo
en este
deberia de estar en medio de <head> y </head> pero como pueden ver esta la etiqueta head
PHP:
<!-- PopAds.net Popunder Code for kingcutters.esy.es -->
<script type="text/javascript" data-cfasync="false">
/*<![CDATA[/* */
var _pop = _pop || [];
_pop.push(['siteId', 1898031]);
_pop.push(['minBid', 0]);
_pop.push(['popundersPerIP', 10000]);
_pop.push(['delayBetween', 0]);
_pop.push(['default', false]);
_pop.push(['defaultPerDay', 0]);
_pop.push(['topmostLayer', true]);
(function() {
var pa = document.createElement('script'); pa.type = 'text/javascript'; pa.async = true;
var s = document.getElementsByTagName('script')[0];
pa.src = '//c1.popads.net/pop.js';
pa.onerror = function() {
var sa = document.createElement('script'); sa.type = 'text/javascript'; sa.async = true;
sa.src = '//c2.popads.net/pop.js';
s.parentNode.insertBefore(sa, s);
};
s.parentNode.insertBefore(pa, s);
})();
/*]]>/* */
</script>
<!-- PopAds.net Popunder Code End -->
en este
PHP:
<?php
/*
PHP File - core/php/preview-url.php
*/
//Generate a Preview for the URL or redirect the user to the site immediately
function previewUrl($su_key, $advertising)
{
//User parameters
$id = getUrlAuthor($su_key);
$user = getUserEmail($id);
$user_lvl = getUserLevelById($id);
//Check that the user has not exceeded the limit of clicks
if(checkClickLimit($id, $user_lvl)) {
require_once('core/php/components.php');
//Get the parameters
$su_title = getTitle($su_key);
$su_url = getLongUrl($su_key);
$su_clicks = getClicks($su_key);
$base = KINGCUTTERS_SITE;
$time = KINGCUTTERS_PREVIEW_TIME;
//Initialize Errors (Password)
$error = "";
$head = outputHead("preview");
$footer = outputFooter("preview");
//Checking the password that has been sent
$check_password = getPassword($su_key);
$password_error = 0;
if(isset($_POST['password'])) {
if($_POST['password'] == $check_password) {
$password_passed = 1;
} //$_POST['password'] == $check_password
else {
$password_passed = 0;
$password_error = 1;
}
} //isset($_POST['password'])
else {
$password_passed = 0;
}
//Cutting the title if it is equal to the URL
if($su_url == $su_title) {
$t_length = strlen($su_title) - 2;
$su_title = substr($su_title, 0, $t_length) . "...";
} //$su_url == $su_title
//Wrap the title
if(KINGCUTTERS_DISPLAY_ADVERTISING != "fullpage") {
$su_title_wrapped = substr($su_title, 0, 37);
if(strlen($su_title) > 37) {
$su_title_wrapped = $su_title_wrapped . "<br />" . substr($su_title, 37, 37);
} //strlen($su_title) > 37
if(strlen($su_title) > 74) {
$su_title_wrapped = $su_title_wrapped . "...";
} //strlen($su_title) > 74
} //KINGCUTTERS_DISPLAY_ADVERTISING != "fullpage"
else {
$su_title_wrapped = substr($su_title, 0, 60);
if(strlen($su_title) > 60) {
$su_title_wrapped = $su_title_wrapped . "...";
} //strlen($su_title) > 60
}
//Wrap the long URL
$su_url_wrapped = substr($su_url, 0, 37);
if(strlen($su_url) > 37) {
$su_url_wrapped = $su_url_wrapped . "<br />" . substr($su_url, 37, 47);
} //strlen($su_url) > 37
if(strlen($su_url) > 84) {
$su_url_wrapped = $su_url_wrapped . "<br />" . substr($su_url, 84, 47) . "...";
} //strlen($su_url) > 84
if(strlen($su_url) > 131) {
$su_url_wrapped = $su_url_wrapped . "...";
} //strlen($su_url) > 131
//Wrap the short URL
$short_wrapped = substr("$base/$su_key", 0, 45);
if(strlen("$base/$su_key") > 45) {
$short_wrapped = $short_wrapped . "...";
} //strlen("$base/$su_key") > 45
//Wrap the User
$user_wrapped = "";
if($user) {
$user_wrapped = substr($user, 0, 48);
if(strlen($user) > 48) {
$user_wrapped = $user_wrapped . "...";
} //strlen($user) > 48
$user_wrapped = "<p><strong>User:</strong> $user_wrapped</p>";
} //$user
//If the password has not been passed, show the form
if($check_password && !$password_passed) {
//Show password Error
if($password_error) {
$error = "Invalid Password";
} //$password_error
echo <<<HTML
$head
<div id="url-pop" class="dialog dialog--open">
<div class="dialog__overlay"></div>
<div class="dialog__content">
<div class="logo_login"></div>
<h2>Enter the password to <strong>$su_title_wrapped</strong></h2>
<p class="preview-error">$error</p>
<form action="" method="post">
<input type="password" class="pass-l-icon-2" id="li-password" name="password" size="30" placeholder="Password">
<button id="submit" name="submit" value="Submit!">Submit</button>
</form>
</div>
</div>
$footer
</body>
HTML;
//Passed or nonexistent password
} //$check_password && !$password_passed
else {
//Update click count in main table
if($_SESSION['user']['id'] != $id){
$update_clicks = updateClicks($su_key);
}
//Update detailed Logs for stats
$log_redirect = updateLogs($su_key);
//Updates the user balance after the click
$user_balance = updateUserBalance($id, "add", KINGCUTTERS_WITHDRAWALS_RATE);
if(!$user_balance){
//Send to the administrator details about the system error
mail(KINGCUTTERS_MAIL, 'Account Withdrawal Error 305', 'Dear administrator, KingCutters failed updating the user balance after watching a link.');
}
//Checking if there is Preview or instant redirection
if(!KINGCUTTERS_PREVIEW) {
if(KINGCUTTERS_GEOTARGETING) {
//Manage GeoTargeting URLs and countries
$geo_countries = getGeoCountries($su_key);
$geo_urls = getGeoUrls($su_key);
if($geo_countries) {
//Get the country of the visitor and redirect he to the custom site if necessary
echo <<<HTML
<script>
var country_redirect = [$geo_countries];
var country_url = [$geo_urls];
geoDirectRedirect(country_redirect, country_url, '$su_url');
</script>
<noscript><meta property="og:url" content="$su_url" /><meta http-equiv="REFRESH" content="0;url=$su_url"></noscript>
HTML;
} //$geo_countries
else {
//There are not GeoTarget URLs
echo <<<HTML
<meta property="og:url" content="$su_url" />
<meta http-equiv="REFRESH" content="0;url=$su_url">
HTML;
}
} //KINGCUTTERS_GEOTARGETING
else {
echo <<<HTML
<meta property="og:url" content="$su_url" />
<meta http-equiv="REFRESH" content="0;url=$su_url">
HTML;
}
die();
} //!KINGCUTTERS_PREVIEW
if(KINGCUTTERS_PREVIEW_TIMER) {
//Create a timed button if necessary
$button = "<button id=\"submit\" name=\"submit\" value=\"kingcutters\" disabled>Wait <span id=\"time\">$time</span> seconds </button>";
} //KINGCUTTERS_PREVIEW_TIMER
else {
$button = "<button id=\"submit\" name=\"submit\" value=\"Continue!\">Continue</button>";
}
echo <<<HTML
$head
<script src="$base/core/js/preview.js" type="text/javascript"></script>
<script>
jQuery(function ($) {
var time = $time,
display = $('#time');
startTimer(time, display);
});
</script>
HTML;
if(KINGCUTTERS_GEOTARGETING) {
//Manage GeoTargeting URLs and countries
$geo_countries = getGeoCountries($su_key);
$geo_urls = getGeoUrls($su_key);
echo <<<HTML
<script>
var country_redirect = [$geo_countries];
var country_url = [$geo_urls];
</script>
HTML;
} //KINGCUTTERS_GEOTARGETING
if(KINGCUTTERS_DISPLAY_ADVERTISING != "fullpage") {
echo <<<HTML
<div id="url-pop" class="dialog dialog--open">
HTML;
} //KINGCUTTERS_DISPLAY_ADVERTISING != "fullpage"
if(KINGCUTTERS_DISPLAY_ADVERTISING == "noadv") {
//Page without advertising
echo <<<HTML
<div class="dialog__overlay"></div>
<div class="dialog__content">
<div class="logo_login"></div>
<h2> <strong>$su_title_wrapped</strong></h2>
HTML;
if(KINGCUTTERS_GEOTARGETING && $geo_countries) {
//Establish the URL depending on GeoTargeting
echo <<<HTML
<script>
document.write("<form id=\"redirect_form\">");
geoRedirect(country_redirect, country_url, '$su_url');
</script>
<noscript><form action="$su_url"></noscript>
HTML;
} //KINGCUTTERS_GEOTARGETING && $geo_countries
else {
//No scheduled URL, show the standard
echo "<form action=\"$su_url\">";
}
//Obviously I do not show all the complete address
$abs_su_length = strlen($su_url_wrapped) - 2;
$abs_su_url = substr($su_url_wrapped, 0, $abs_su_length) . "...";
echo <<<HTML
<form action="$su_url">
<p><strong>Long URL:</strong> $abs_su_url</p>
<p><strong>Short URL:</strong> $short_wrapped</p>
$user_wrapped
<p><strong>Clicks:</strong> $su_clicks </p>
<input type="hidden" id="hiddenurl" value="$su_url" />
$button<br />
</form>
</div>
</div>
</div>
$footer
</body>
HTML;
} //KINGCUTTERS_DISPLAY_ADVERTISING == "noadv"
else if(KINGCUTTERS_DISPLAY_ADVERTISING == "insidecontainer") {
//Page with a Banner
$advertising = html_entity_decode(KINGCUTTERS_ADVERTISING_CODE);
echo <<<HTML
<div class="dialog__overlay"></div>
<div class="dialog__content advertising">
<div class="banner-content">
$advertising
</div>
<div class="details-content">
<div class="logo_login"></div>
<h2> <strong>$su_title_wrapped</strong></h2>
HTML;
if(KINGCUTTERS_GEOTARGETING && $geo_countries) {
//Establish the URL depending on GeoTargeting
echo <<<HTML
<script>
document.write("<form id=\"redirect_form\">");
geoRedirect(country_redirect, country_url, '$su_url');
</script>
<noscript><form action="$su_url"></noscript>
HTML;
} //KINGCUTTERS_GEOTARGETING && $geo_countries
else {
//No scheduled URL, show the standard
echo "<form action=\"$su_url\">";
}
//Obviously I do not show all the complete address
$abs_su_length = strlen($su_url_wrapped) - 2;
$abs_su_url = substr($su_url_wrapped, 0, $abs_su_length) . "...";
echo <<<HTML
<form action="$su_url">
<p><strong>Long URL:</strong> $abs_su_url</p>
<p><strong>Short URL:</strong> $short_wrapped</p>
$user_wrapped
<p><strong>Clicks:</strong> $su_clicks </p>
<input type="hidden" id="hiddenurl" value="$su_url" />
$button<br />
</form>
</div>
<div style="clear: both"></div>
</div>
</div>
$footer
</body>
HTML;
} //KINGCUTTERS_DISPLAY_ADVERTISING == "insidecontainer"
else if(KINGCUTTERS_DISPLAY_ADVERTISING == "fullpage") {
//Show the full-page advertisement
$advertising = KINGCUTTERS_FULLPAGE_URL;
echo <<<HTML
<div class="preview__header">
<div class="details-content">
<div class="logo_login"></div>
<h2> <strong>$su_title_wrapped</strong></h2>
HTML;
if(KINGCUTTERS_GEOTARGETING && $geo_countries) {
//Establish the URL depending on GeoTargeting
echo <<<HTML
<script>
document.write("<form id=\"redirect_form\">");
geoRedirect(country_redirect, country_url, '$su_url');
</script>
<noscript><form action="$su_url"></noscript>
HTML;
} //KINGCUTTERS_GEOTARGETING && $geo_countries
else {
//No scheduled URL, show the standard
echo "<form action=\"$su_url\">";
}
echo <<<HTML
<input type="hidden" id="hiddenurl" value="$su_url" />
$button<br />
</form>
</div>
<div style="clear: both"></div>
</div>
<div class="iframe__container">
<iframe src="$advertising" scrolling="yes">
$advertising
</iframe>
</div>
</div>
$footer
</body>
HTML;
} //KINGCUTTERS_DISPLAY_ADVERTISING == "fullpage"
}
die();
} //checkClickLimit($id, $user_lvl)
else {
//The user has exceeded the limits of its level
echo <<<HTML
$head
<div id="url-pop" class="dialog dialog--open">
<div class="dialog__overlay"></div>
<div class="dialog__content">
<div class="logo_login"></div>
<h2> <strong>Click limit exceeded</strong></h2>
<p><strong>User:</strong> $user</p>
<a href="index.php"><button id=\"submit\" value=\"Go home\">Go home</button></a><br />
</div>
</div>
</div>
$footer
</body>
HTML;
}
}
deberia de estar en medio de <head> y </head> pero como pueden ver esta la etiqueta head