include "../include/apply_submit.php"; include "../include/apply_gen.php"; if (isset($_SESSION['user_id'])) { if (isset($_REQUEST['club_id']) && isset($_REQUEST['action'])) { if (!isset($_REQUEST['cat_id'])) { $clubGet = "club_id=" . $_REQUEST['club_id']; } else { $clubGet = "club_id=" . $_REQUEST['club_id'] . "&cat_id=" . $_REQUEST['cat_id']; } if ($_REQUEST['action'] == "view") { $applicationId = getApplication($_SESSION['user_id'], $_REQUEST['club_id']); } else { if ($_REQUEST['action'] == "submit" && isset($_REQUEST['app_id'])) { $data = processSubmission($_REQUEST); $data += processFileSubmission($_FILES); $result = saveApplication($_SESSION['user_id'], $_REQUEST['app_id'], $data); $applicationId = $_REQUEST['app_id']; if ($result === TRUE) { $inform["success"] = "Your application to has been saved!"; } else { $inform["error"] = "Sorry! There seems to have been some error while saving your application."; $inform["detail"] = $result; } } else { echo $_REQUEST['action'] . "<br />"; } } if ($applicationId !== FALSE) { $inform["info"] = "Be sure to save often!"; if ($_REQUEST['club_id'] == 0) { if (isset($_REQUEST['cat_id'])) {
* * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ /* * Part of this code is referred from Partuza * http://code.google.com/p/partuza */ require 'chkuser.php'; require_once 'Config/config.php'; $app_url = trim($_POST['app_url']); $error_gadget = false; $response = saveApplication($app_url); if ($response['error']) { header("Location:addApplications.php?error=" . $response['error']); } else { $sql_getApp = sprintf("select application_id from `user_applications` where user_id=%d", $_SESSION['user_id']); $resultGetApp = mysql_query($sql_getApp, $esprit_conn) or die("Error inserting record(s) into the database: " . mysql_error()); while ($row = mysql_fetch_assoc($resultGetApp)) { if ($row['application_id'] == $response['id']) { $app_present = true; } } if (!$app_present) { $sql_addApp = sprintf("INSERT INTO `user_applications` (`user_id`,`application_id`) values(%d,%d)", $_SESSION['user_id'], $response['id']); $resultAddApp = mysql_query($sql_addApp, $esprit_conn) or die("Error inserting record(s) into the database: " . mysql_error()); } header("Location:addApplications.php?app_present=" . $app_present);
* @copyright Copyright (C) 2008 Edvard Ananyan. All rights reserved. * @license GNU/GPL, see LICENSE.php */ defined("_VALID_MOS") or die("Restricted access"); if (!($acl->acl_check('administration', 'edit', 'users', $my->usertype, 'components', 'all') | $acl->acl_check('administration', 'edit', 'users', $my->usertype, 'components', 'com_jumi'))) { mosRedirect('index2.php', _NOT_AUTH); } require_once $mainframe->getPath('admin_html'); switch ($task) { case 'add': case 'edit': editApplication(); break; case 'save': case 'apply': saveApplication(); break; case 'remove': removeApplication(); break; case 'publish': case 'unpublish': publishApplications(); break; case 'cancel': cancelApplication(); break; case 'accesspublic': accessApplication(0); break; case 'accessregistered':