$index++; } setPost('upload', addProfile($profile)); // TODO: Detect if there are collision of ID numbers if (getPost('upload') == 'success') { $addedProfiles++; } } setPost('upload', 'success'); } } } else { if (issetPost('add')) { $profileString = array('id', 'course', 'surname', 'firstname', 'mi', 'mobile', 'email'); $profileNull = array('birthday'); $profileNum = array('yr', 'gender', 'scholar', 'dormer', 'currentStatus', 'loawRecord', 'y1s1', 'y1s2', 'y2s0', 'y2s1', 'y2s2', 'y3s0', 'y3s1', 'y3s2', 'y4s0', 'y4s1', 'y4s2', 'y5s0', 'y5s1', 'y5s2', 'familyLivingSituation', 'atmosphereAtHome', 'parentsMaritalStatus', 'relFather', 'relMother', 'spiritualSubscale', 'godSubscale', 'problemSolving', 'seekingSocialSupport', 'avoidance', 'lvlDepression', 'lvlAnxiety', 'suicideBehavior', 'suicidalThoughts', 'hypochondriasis', 'depression', 'denial', 'interProblems', 'alienation', 'perseIdeas', 'anxiety', 'thinkingDisorder', 'impulseExp', 'socialIntroversion', 'selfDepreciation', 'deviation', 'mentalDisorder', 'alcoholUse', 'drugUse', 'hopelessness', 'traumaAbuse', 'physicalIllness', 'pastSuicidalActs', 'familyHistorySuicide', 'familyHistoryMental', 'stressfulLifeEvents', 'relationalSocialLoss', 'accessLethalMeans', 'disciplinaryCases', 'sexualOrientation'); $profile = array(); for ($i = 0; count($profileString) > $i; $i++) { $profile[$profileString[$i]] = getPost($profileString[$i]); } for ($i = 0; count($profileNull) > $i; $i++) { $profile[$profileNull[$i]] = parseString(getPost($profileNull[$i])); } for ($i = 0; count($profileNum) > $i; $i++) { $profile[$profileNum[$i]] = parseNumber(getPost($profileNum[$i])); } $addedProfile = addProfile($profile); } } } include 'add-profiles.html.php';
<?php session_start(); include 'library/config.php'; //include '../gl/a_gcash_sessions.php'; $method = $_GET['method']; switch ($method) { case 'addProfile': //FROM PROFILE API echo addProfile($conn); // --> break; case 'uppProfile': //FROM PROFILE API echo updateProfile($conn); // --> break; case 'addAccounts': //FROM ACCOUNTS API echo addToGcash_Accounts($conn); break; case 'updAccounts': //FROM ACCOUNTS API echo updateToGcash_Accounts($conn); break; case 'addLink': echo addLink($conn); break; case 'updLink': echo updLink($conn); break;
addLink(); break; case $lang["edit_link"]: editLink($id); break; case $lang["delete_link"]: deleteLink($id); break; case $lang["delete_user"]: deleteUser($id); break; case $lang["delete_event"]: deleteEvent($id); break; case $lang["add_profile"]: addProfile(); break; case $lang["update modules"]: updateModules(); break; case "approve": approve($id); break; case "install_module": installModule($dir, $file); break; default: header("Location: index.php"); break; } mysql_close($link);