Esempio n. 1
0
/* * ************************************************
 * PluginLotto.com                                 *
 * Copyrights (c) 2005-2010. iZAP                  *
 * All rights reserved                             *
 * **************************************************
 * @author iZAP Team "<*****@*****.**>"
 * @link http://www.izap.in/
 * @version 1.0
 * Under this agreement, No one has rights to sell this script further.
 * For more information. Contact "Tarun Jangra<*****@*****.**>"
 * For discussion about corresponding plugins, visit http://www.pluginlotto.com/pg/forums/
 * Follow us on http://facebook.com/PluginLotto and http://twitter.com/PluginLotto
 */
// here the new challlenge that created by the user is being saved
IzapBase::gatekeeper();
if (IzapBase::hasFormError()) {
    if (sizeof(IzapBase::getFormErrors())) {
        foreach (IzapBase::getFormErrors() as $error) {
            register_error(elgg_echo($error));
        }
    }
    forward(REFERRER);
}
//get all form attributes
$challenge_form = IzapBase::getPostedAttributes();
$_SESSION['zcontest']['challenge'] = $challenge_form;
$challenge_entity = new IzapChallenge((int) $challenge_form['guid']);
IzapBase::updatePostedAttribute('tags', string_to_tag_array($challenge_form['tags']));
$challenge_entity->setAttributes();
if ($challenge_entity->max_quizzes < 2) {
    $challenge_entity->max_quizzes = 2;