Exemple #1
0
<?php

require_once __DIR__ . '/../lib/hydrogen/hydrogen.inc.php';
require_once __DIR__ . '/../lib/appdb/appdb.inc.php';
use appdb\usersession\UserSession;
use hydrogen\recache\RECacheManager;
// Open up our session
UserSession::open_session(false);
if (!($ubean = UserSession::getUserBean())) {
    die('Hey. Log in.');
}
// Are we allowed in?
$group = $ubean->getMapped('group');
if ($group->group_name != 'Administrator' && $group->group_name != 'Moderator') {
    die('Your permissions suck.');
}
$reset = false;
$success = false;
if (isset($_POST['submit'])) {
    $cm = RECacheManager::getInstance();
    if (isset($_POST['apiprofiles'])) {
        $success = $cm->clearGroup('apiprofiles');
        $reset = "apiprofiles";
    } else {
        if (isset($_POST['appdetails'])) {
            $success = $cm->clearGroup('appdetails');
            $reset = "appdetails";
        } else {
            if (isset($_POST['applinks'])) {
                $success = $cm->clearGroup('applinks');
                $reset = "applinks";
Exemple #2
0
require_once __DIR__ . '/lib/appdb/appdb.inc.php';
use hydrogen\config\Config;
use hydrogen\errorhandler\ErrorHandler;
use appdb\usersession\UserSession;
// Are we mobile?
if (preg_match('/(iPod|iPhone)/', $_SERVER['HTTP_USER_AGENT'])) {
    die(header('Location: ' . Config::getVal('urls', 'base_url') . '/i'));
}
// Open up our session
UserSession::open_session();
// Honor any requests to log out
if (isset($_GET['action']) && $_GET['action'] == "logout") {
    UserSession::logout();
}
// Get the user
$user = UserSession::getUserBean();
// Turn off caching
header('Expires: Thu, 21 Jul 1977 07:30:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
// Detect if this is an AJAX call and handle appropriately
if (isset($_GET['call']) && isset($_GET['calltype']) && $_GET['calltype'] == 'ajax') {
    $validAjax = array('applisting', 'appsubmit', 'itunesinfo', 'login', 'register');
    $handler = false;
    foreach ($validAjax as $callopt) {
        if ($callopt == $_GET['call']) {
            $handler = true;
            break;
        }
    }
Exemple #3
0
        $version = "unknown";
    } else {
        $version = str_replace('<', '&lt;', $version);
        $version = str_replace('>', '&gt;', $version);
    }
}
// Get links
$links = array();
for ($i = 1; $i <= 4; $i++) {
    if (isset($_POST["link{$i}"])) {
        $links[] = $_POST["link{$i}"];
    }
}
// Do it to it
$alm = AppLinkModel::getInstance();
$result = $alm->submit($itunes_id, $version, $cracker, $links, UserSession::getUserBean());
switch ($result) {
    case AppLinkModel::SUBMIT_OK:
    case AppLinkModel::SUBMIT_PARTIAL_OK:
        die(json_encode(array('success' => 1)));
    case AppLinkModel::SUBMIT_FAIL_APP_NOT_FOUND:
        die(json_encode(array('success' => 0, 'errormsg' => 'The submitted app was not found in the US iTunes Store.')));
    case AppLinkModel::SUBMIT_FAIL_USER_CANNOT_SUBMIT_NEW_APP:
        die(json_encode(array('success' => 0, 'errormsg' => 'You do not have permission to submit new apps.')));
    case AppLinkModel::SUBMIT_FAIL_USER_CANNOT_SUBMIT_LINKS:
        die(json_encode(array('success' => 0, 'errormsg' => 'You do not have permission to submit new links.')));
    case AppLinkModel::SUBMIT_FAIL_USER_CANNOT_SUBMIT_NEW_VERSION:
        die(json_encode(array('success' => 0, 'errormsg' => 'You do not have permission to submit new versions.')));
    case AppLinkModel::SUBMIT_FAIL_USER_CANNOT_SUBMIT_FREE_APP:
        die(json_encode(array('success' => 0, 'errormsg' => 'You do not have permission to submit free applications.')));
    case AppLinkModel::SUBMIT_FAIL_ITUNES_TIMEOUT:
Exemple #4
0
		<p>If downloading the file requires a password, or if the downloaded archive itself requires a password to be extracted, that link is not allowed here.  But you're welcome to re-package and re-upload these files so that they do not require a password!  Repeat violators will be banned.</p>
		<h2 class="pheading">Version numbers are important</h2>
		<p>If you don't know the version number for an application you can submit it as 'Unknown', but please do that as a last resort ONLY.  Accuracy is very important so that we can track updates.</p>
		<h2 class="pheading">Give credit where credit is due</h2>
		<p>If you're not aware who the cracker is for a particular release, you can leave that field blank -- however, please do your best to find out and give credit.  If there's evidence of credit stealing or intentionally not giving credits, you may be banned.</p>
		<p class="continuelink"><a href="?page=submit&bypass=true">Continue to the submission form</a></p>
	</div>
	<?php 
    } else {
        if (!$sawWarn) {
            ?>
	<div id="submitnotes">
		<h3>STUFF YOU SHOULD KNOW:</h3>
		<h2 class="pheading">Advertisers and Credit-stealers get banned</h2>
		<p>If you're using the 'cracker' field to advertise your own website, it will be changed or you'll be banned entirely.  Appulous isn't here for free advertising.  If you're interested in advertising on the site, contact the site owner.</p>
		<h2 class="pheading">Post a text file, get insta-banned</h2>
		<p>A handful of people have been posting links to text files, linking to ipas hosted at services that pay you for downloads.  These people have been getting banned with all their links deleted.  We've recently upgraded Appulous to lend itself to faster detection of those who try to make money off of this site.  Now, in addition to deleting such links and banning accounts, accounts will be reported to the filesharing sites so they can cancel payments.  We don't take kindly to people who try to trash our site for their own profit.</p>
		<p class="continuelink"><a href="?page=submit&bypass=true&sawmsg=true">Aye aye, Cap'n!</a></p>
	</div>
	<?php 
        } else {
            if (!UserSession::getUserBean()) {
                echo '<div id="nosubmit"><span class="formmessage formfailure">You must be logged in to submit applications.</span></div>';
            } else {
                echo '<div id="nosubmit"><span class="formmessage formfailure">You do not have permission to submit iTunes applications.</span></div>';
            }
        }
    }
}
?>
</div>