function getCaptchaCode($id) { $ecCaptchaData = dbSelect('*', 1, 'captcha', 'captchaId=' . $id); while ($captcha = mysql_fetch_object($ecCaptchaData)) { return $captcha->captchaCode; } }
public function getEdgesForBox($bottom_left, $top_right, $middle, $count, $countries = null, $edge_types = null) { $country_one = $this->_buildBounder('country_one', $bottom_left, $top_right, $middle); $country_two = $this->_buildBounder('country_two', $bottom_left, $top_right, $middle); $sql = "SELECT country_one.id as country_one_id, country_one.name as country_one_name, country_one.lat as country_one_lat, country_one.long as country_one_long, " . "country_two.id as country_two_id, country_two.name as country_two_name, country_two.lat as country_two_lat, country_two.long as country_two_long, " . "SQRT(POW(ABS(country_one.lat-country_two.lat), 2)+POW(ABS(country_one.long-country_two.long), 2)) * edge_type.weight distance " . "FROM edge " . "JOIN countries AS country_one ON (edge.country_one=country_one.id) " . "JOIN countries AS country_two ON (edge.country_two=country_two.id) " . "JOING edge_type on (edge.edge_type=edge_type.id) " . "WHERE " . $country_one . ' and ' . $country_two . ' ' . ($countries ? 'and (edge.country_one in (' . implode(',', $countries) . ') or edge.country_two in (' . implode(',', $countries) . ')) ' : '') . ($edge_types ? 'and edge.edge_type IN (' . implode(',', $edge_types) . ') ' : '') . "group by country_one_id, country_two_id, country_one_name, country_one_lat, country_one_long, country_two_name, country_two_lat, country_two_long, distance " . "order by distance desc limit {$count}"; $items = dbSelect($sql); $return = array(); foreach ($items as $item) { $sql = 'SELECT edge.url, edge.title, edge_type.name as type ' . 'FROM edge JOIN edge_type ON (edge.edge_type=edge_type.id) ' . 'WHERE edge.country_one=' . $item['country_one_id'] . ' ' . 'and edge.country_two=' . $item['country_two_id']; $edges = dbSelect($sql); $types = array(); $colours = array('angry' => '#c8050c', 'happy' => '#00b495', 'sport' => '#00a235', 'business' => '#538aad', 'pirates' => '#1a5690'); foreach ($edges as $i => $edge) { if (!isset($types[$edge['type']])) { $types[$edge['type']] = 1; } else { $types[$edge['type']]++; } $edges[$i]['source'] = $this->_getSource($edge['url']); } list($type, $count) = each($types); $return_item = array('countries' => array(array('id' => $item['country_one_id'], 'name' => $item['country_one_name'], 'lat' => $item['country_one_lat'], 'long' => $item['country_one_long']), array('id' => $item['country_two_id'], 'name' => $item['country_two_name'], 'lat' => $item['country_two_lat'], 'long' => $item['country_two_long'])), 'colour' => $colours[$type], 'edges' => $edges); $return[] = $return_item; } return $return; }
function dbConnect() { //Connection to database $dbHost = 'localhost'; $dbUser = '******'; $dbPass = '******'; $dbName = 'hot_thess'; $connection = mysqli_connect($dbHost, $dbUser, $dbPass, $dbName) or die('Error Connecting to MySQL DataBase'); mysqli_set_charset($connection, "utf8"); $data = file_get_contents('php://input'); $data = json_decode($data, true); dbSelect($connection, $data); }
function ecBBBodeField($name, $textfield, $fieldvalue) { global $ecSettings; $i = 0; $maxsmileyscount = $ecSettings['bbcode']['smileycount'] - 1; $GLOBALS['bbSmileys'] = ''; $ecBBCodeData = dbSelect('*', 1, 'bbcode', "view = 1"); while ($bbcode = mysql_fetch_object($ecBBCodeData)) { $GLOBALS['code'] = $bbcode->code; $GLOBALS['bbSmileys'] .= ecTemplate('bbcode', 'textfield', 'smiley'); if ($i == $maxsmileyscount) { $i = 0; $GLOBALS['bbSmileys'] .= '<br />'; } else { $i++; } } return ecTemplate('bbcode', 'textfield', 'textfield'); }
/** * Sets meta information about the student * * Collects any meta information for the student from the meta database table, so that it can * be shown on the box at the top of the window. This information is stored in an array, which * can be accessed as and when by the getMeta function * * @see getMeta * @param int $studentID The ID of the student passed to this file * @param mixed $databaseConnection A link to the current database connection * @returns array An array of student meta information */ function setMeta($studentID, $databaseConnection) { // Array to hold the information about the student, which is returned when the function ends $metaInformation = array(); // Making sure that there is an ID for the student passed if (!empty($studentID)) { // Sanitising the query $studentID = $databaseConnection->real_escape_string($studentID); $metaInformation["studentID"] = $studentID; // Getting the name of the student $sqlStudentName = "SELECT StudentForename, StudentSurname FROM `sen_info`.`tbl_students` WHERE (studentID = {$studentID})"; $queryResultStudentName = dbSelect($sqlStudentName, $databaseConnection); // Seeing if any results were found, and filling in the meta information array if (dbSelectCountRows($queryResultStudentName) > 0) { foreach (dbSelectGetRows($queryResultStudentName) as $row) { $metaInformation["studentForename"] = $row['StudentForename']; $metaInformation["studentSurname"] = $row['StudentSurname']; } } // Getting additional meta information about the student $sqlStudentMeta = "SELECT * FROM `sen_info`.`tbl_student_meta` WHERE (studentID = {$studentID})"; $queryResultStudentMeta = dbSelect($sqlStudentMeta, $databaseConnection); // Seeing if any results were found, and filling in the meta information array if (dbSelectCountRows($queryResultStudentMeta) > 0) { foreach (dbSelectGetRows($queryResultStudentMeta) as $row) { $metaInformation["yearGroup"] = $row['YearGroup']; $metaInformation["house"] = $row['House']; $metaInformation["form"] = $row['Form']; $metaInformation["dob"] = $row['DoB']; $metaInformation["comment"] = $row['Comment']; // Note: Any additional rows added to the meta table should be added here } } } // Return any meta information that has been collected return $metaInformation; }
<?php require_once '../includes/config.php'; $location = $_SESSION['location']; if (isset($_POST['search_button'])) { $keyword = $_POST['search_keyword']; $jobResult = dbSelect(JOB_TABLE, "WHERE job_title LIKE '%" . $keyword . "%' or job_keyword LIKE '%" . $keyword . "%' or job_description LIKE '%" . $keyword . "%'"); $num_rows = mysql_num_rows($jobResult); if ($num_rows == 0) { echoNoResult(); } else { echoDiv($jobResult); } } else { if (strrpos($location, "jobPortal.php")) { $jobResult = dbSelect(JOB_TABLE, "ORDER BY job_id DESC"); $num_rows = mysql_num_rows($jobResult); if ($num_rows == 0) { echoNoResult(); } else { echoDiv($jobResult); } } } function echoDiv($jobResult) { echo "<div class=\"jobList\">\r\n <table class=\"jobTable\" style=\"width:100%;\">\r\n <tr class=\"tableLabel\">\r\n <td class=\"jobTitle\">POSITION</td>\r\n <td class=\"jobCompany\">COMPANY</td>\r\n <td class=\"jobDescription\">DESCRIPTION</td>\r\n <td class=\"jobStatus\">CLOSE DATE</td>\r\n </tr>"; $count = 0; while ($row = mysql_fetch_assoc($jobResult)) { $today = date("Y-m-d"); $today = intval(str_replace('-', '', $today));
function fieldPlays($method, $target, $payload) { switch ($method) { case "GET": checkNULL($target, 'device'); checkDevice($target, 'has_device'); $result = dbSelect('devices', 'devicetime', "tag='" . $target . "'"); $response = $result->fetch_assoc(); httpResponse($response, 200); break; case "POST": checkNULL($target, 'room'); checkRoom($target, 'has_room'); checkNULL($payload['user'], 'user'); checkOnline($payload['user']); dbUpdate('devices', "command='" . $payload['cmd'] . "', timestamp='" . $payload['ts'] . "'", "location='" . $target . "'"); echoSuccess("set_play"); break; case "PUT": checkNULL($target, 'device'); checkDevice($target, 'has_device'); dbUpdate('devices', "devicetime='" . $payload['dt'] . "'", "tag='" . $target . "'"); $result = dbSelect('devices', 'command, timestamp', "tag='" . $target . "'"); $response = $result->fetch_assoc(); httpResponse($response, 200); dbUpdate('devices', "command=''", "tag='" . $target . "'"); break; case "DELETE": checkNULL($target, 'room'); checkRoom($target, 'has_room'); dbUpdate('devices', "command='', timestamp=''", "location='" . $target . "'"); echoSuccess("reset_play"); break; default: echoError('Invalid Method'); break; } }
$description = $groups->groupsName; $checked = ''; if ($_POST['usersGroupId'] == $groups->groupsId) { $checked = ' selected="selected"'; } $dataGroups .= ecTemplate('users', 'edit', 'select'); } echo ecTemplate('users', 'edit', 'usersEdit'); } } else { $ecUsersData = dbSelect('*', 1, 'users', "usersId = {$id}"); while ($users = mysql_fetch_object($ecUsersData)) { $usersUsername = $users->usersUsername; $usersEmail = $users->usersEmail; $usersFirstname = $users->usersFirstname; $usersLastname = $users->usersLastname; $dataGroups = ''; $ecGroupsData = dbSelect('groupsName,groupsId', 1, 'groups'); while ($groups = mysql_fetch_object($ecGroupsData)) { $value = $groups->groupsId; $description = $groups->groupsName; $checked = ''; if ($users->usersGroupId == $groups->groupsId) { $checked = ' selected="selected"'; } $dataGroups .= ecTemplate('users', 'edit', 'select'); } $errorMsg = ''; echo ecTemplate('users', 'edit', 'usersEdit'); } }
$ecAccessData = dbSelect('*', 1, 'access', 'accessGroupId=' . $id); while ($access = mysql_fetch_object($ecAccessData)) { array_push($tmpAccess, $access->accessSiteId); } $ecSitesData = dbSelect('*', 1, 'sites'); while ($sites = mysql_fetch_object($ecSitesData)) { $sitesId = $sites->sitesId; if (!in_array($sitesId, $tmpAccess)) { $insert['accessGroupId'] = $id; $insert['accessSiteId'] = $sitesId; $insert['accessLevel'] = 0; dbInsert(1, 'access', $insert); } } echo ecTemplate('groups', 'access', 'accessHead'); $ecAccessData = dbSelect('pluginsId, pluginsPath, pluginsName, sitesName, accessSiteId, sitesPluginId, sitesId, accessLevel', 1, 'plugins,sites,access', "(sitesId = accessSiteId) AND (sitesPluginId = pluginsId) AND (accessGroupId = {$id})", 'pluginsId'); while ($access = mysql_fetch_object($ecAccessData)) { $pluginId = $access->pluginsId; $plugin = $access->pluginsName; $pluginPath = $access->pluginsPath; if (!isset($actPlug)) { $actPlug = $pluginId; echo ecTemplate('groups', 'access', 'accessPluginHead'); } if ($pluginId != $actPlug) { echo ecTemplate('groups', 'access', 'accessPluginFoot'); $plugin = $access->pluginsName; $actPlug = $pluginId; echo ecTemplate('groups', 'access', 'accessPluginHead'); } $site = $access->sitesName;
public static function create() { $finder = new self(); $finder->setCountryTags(dbSelect("SELECT * FROM countries JOIN country_tags ON (countries.id=country_tags.country_id)")); return $finder; }
<!DOCTYPE html> <html> <body> <?php require_once '../model/db.php'; $CV_id = $_GET['cv']; $job_id = $_GET['job']; # Fetch the job keywords $result = dbSelect(JOB_TABLE, "WHERE job_id = " . $job_id); $row = mysql_fetch_assoc($result); $job_keyword = $row['job_keyword']; $job_keyword_string = explode(",", $job_keyword); $importance = $row['keyword_importance']; $importance_string = explode(",", $importance); $fullMark = 0; foreach ($job_keyword_string as $index => $keyword) { $job_keyword_arr[$keyword] = $importance_string[$index]; $fullMark += $importance_string[$index]; } # Extract the cv information $cv_description = $_SESSION['cv_description'][$CV_id]; $cv_email = findEmail($cv_description); $cv_phone = findPhoneNumber($cv_description); $cv_name = findName($cv_description); $result = matchingJobAndCV($cv_description, $job_keyword_arr); foreach ($result as $key => $value) { $matched_keyword = $key; $grade = $value; } $percentage = round($grade / $fullMark * 100, 2); # Update the cv information in database
Unbrechtigte Nutzung (Verkauf, Weiterverbreitung, Nutzung ohne Urherberrechtsvermerk, kommerzielle Nutzung) ist strafbar. Die Nutzung des Scriptes erfolgt auf eigene Gefahr. Schäden die durch die Nutzung entstanden sind, trägt allein der Nutzer des Programmes. */ $ecFile = 'plugins/squads/taskedit.php'; echo ecTemplate('squads', 'taskedit', 'siteHead'); $ecLang = ecGetLang('squads', 'taskedit'); $id = $_REQUEST['id']; if (isset($_POST['save'])) { if (!empty($_POST['taskName'])) { $update['squadtaskName'] = $_POST['taskName']; $update['squadtaskPriority'] = $_POST['taskPriority']; dbUpdate(1, 'squadtask', $update, "squadtaskId = {$id}"); $next = ecReferer('index.php?view=squads&site=manage'); echo ecTemplate('squads', 'taskedit', 'taskEdited'); } else { $errorMsg = $ecLang['errorEmpty']; echo ecTemplate('squads', 'taskedit', 'taskEdit'); } } else { $ecTaskData = dbSelect('*', 1, 'squadtask', "squadtaskId = {$id}"); while ($tasks = mysql_fetch_object($ecTaskData)) { $taskName = $tasks->squadtaskName; $taskPriority = $tasks->squadtaskPriority; $errorMsg = ''; echo ecTemplate('squads', 'taskedit', 'taskEdit'); } }
Dieses Programm ist urheberrechtlich geschützt. Die Verwendung für private Zwecke ist gesattet. Unbrechtigte Nutzung (Verkauf, Weiterverbreitung, Nutzung ohne Urherberrechtsvermerk, kommerzielle Nutzung) ist strafbar. Die Nutzung des Scriptes erfolgt auf eigene Gefahr. Schäden die durch die Nutzung entstanden sind, trägt allein der Nutzer des Programmes. */ $ecFile = 'plugins/users/changepassword.php'; echo ecTemplate('users', 'changepassword', 'siteHead'); $ecLang = ecGetLang('users', 'changepassword'); if (isset($_POST['save'])) { if (!empty($_POST['usersOldPassword']) && !empty($_POST['usersNewPassword']) && !empty($_POST['usersNewPassword2'])) { if ($_POST['usersNewPassword'] == $_POST['usersNewPassword2']) { $ecUsersData = dbSelect('*', 1, 'users', "usersId=" . $ecUser['userId']); while ($users = mysql_fetch_object($ecUsersData)) { if ($users->usersPassword == ecCrypt($_POST['usersOldPassword'])) { $update['usersPassword'] = ecCrypt($_POST['usersNewPassword']); dbUpdate(1, 'users', $update, "usersId = " . $ecUser['userId']); $next = ecReferer('index.php?view=users&site=usercenter'); echo ecTemplate('users', 'changepassword', 'usersEdited'); } else { $errorMsg = $ecLang['errorOldPassword']; echo ecTemplate('users', 'changepassword', 'usersEdit'); } } } else { $errorMsg = $ecLang['errorPassword']; echo ecTemplate('users', 'changepassword', 'usersEdit'); }
$clanwarsSquadImg = !empty($clanwar['squadsPic']) ? $clanwar['squadsPic'] : 'default.png'; $clanwarsGameId = $clanwar['gamesId']; $clanwarsGameName = $clanwar['gamesName']; $clanwarsGameImg = $clanwar['gamesIcon']; $clanwarsEnemyId = $clanwar['clandbId']; $clanwarsEnemyName = $clanwar['clandbName']; $clanwarsInfo = $clanwar['clanwarsInfo']; $clanwarsEnemyImg = !empty($clanwar['clandbImage']) ? $clanwar['clandbImage'] : 'default.png'; $cwTypes = array(1 => 'Clanwar', 2 => 'Funwar', 3 => 'Friendlywar', 4 => 'Trainwar', 5 => 'Ligawar', 6 => 'Other'); $clanwarsTyp = $cwTypes[$clanwar['clanwarsTypId']]; $clanwarsSquadNation = $ecSettings['squads']['clanNation']; $clanwarsEnemyNation = $clanwar['clandbCountry']; $squadLineup = ''; $clanwarsSquadPlayerCount = 0; $squadPlayer = explode("|µ|", $clanwar['clanwarsSquadListId']); $ecSquadData = dbSelect('squadplayerId,usersId,usersUsername,squadsTag,usersNation', 1, 'squadplayer,squadtask,users,squads', "(squadplayerTaskId = squadtaskID) AND (squadplayerUserId = usersId) AND (squadsId = squadplayerSquadId)"); while ($player = mysql_fetch_object($ecSquadData)) { if (in_array($player->squadplayerId, $squadPlayer)) { $name = $player->squadsTag . $player->usersUsername; $nation = $player->usersNation; $userId = $player->usersId; $squadLineup .= ecTemplate('clanwars', 'details', 'squadLineup'); $clanwarsSquadPlayerCount++; } } $clanwarsEnemyPlayerCount = 0; $enemyLineup = ''; $enemySquadPlayer = explode("|µ|", $clanwar['clanwarsListEnemy']); foreach ($enemySquadPlayer as $nick) { if (!empty($nick)) { $name = $clanwar['clandbTag'] . $nick;
while ($clans = mysql_fetch_object($ecEnemyClanData)) { $name = $clans->clandbName; $value = $clans->clandbId; $clanwarsEnemyClans .= ecTemplate('clanwars', 'add', 'select'); } // Squads $clanwarsSquads = ''; $clanwarsSquadPlayer = ''; $ecSquadsData = dbSelect('*', 1, 'squads'); while ($squads = mysql_fetch_object($ecSquadsData)) { $value = $squads->squadsId; $name = $squads->squadsName; $clanwarsSquads .= ecTemplate('clanwars', 'add', 'select'); // Players $squadNames = ''; $ecPlayerData = dbSelect('*', 1, 'squadplayer,users', "(squadplayerSquadId = {$value}) AND (squadplayerUserId = usersId)"); while ($player = mysql_fetch_object($ecPlayerData)) { $playerId = $player->squadplayerId; $playerName = $player->usersUsername; $squadNames .= ecTemplate('clanwars', 'add', 'squadPlayer'); } $clanwarsSquadPlayer .= ecTemplate('clanwars', 'add', 'squadView'); } // Years $clanwarsYears = ''; foreach (ecMakeYear() as $value) { $name = $value; $clanwarsYears .= ecTemplate('clanwars', 'add', 'select'); } // Upload Filetypes $uploadPictures = $ecSettings['clanwars']['pics'] == 1 ? $ecLang['picturesTypes'] : '';
<div class="myAccountInfoPane"> <p class="myAccountHeading">My Account Information</p> <table> <tr> <td class="label">User Name:</td> <td class="info"><?php echo $row["username"]; ?> </td> </tr> <tr> <td class="label">Email Address:</td> <td class="info"><?php echo $row["email"]; ?> </td> </tr> <tr> <td class="label">No. of Job Posted:</td> <td class="info"> <?php $jobResult = dbSelect(JOB_TABLE, "WHERE owner_id = {$userID}"); $num_rows = mysql_num_rows($jobResult); echo $num_rows; $today = date("Y-m-d"); ?> </td> </tr> </table> </div>
function dbGetRoleName($RID) { $result = dbSelect('roles', array('RID' => $RID), '', '', 'displayName'); if (!empty($result)) { return $result[0]['displayName']; } return false; }
<?php /* (C) 2006 EZEMS.NET Alle Rechte vorbehalten. Dieses Programm ist urheberrechtlich geschützt. Die Verwendung für private Zwecke ist gesattet. Unbrechtigte Nutzung (Verkauf, Weiterverbreitung, Nutzung ohne Urherberrechtsvermerk, kommerzielle Nutzung) ist strafbar. Die Nutzung des Scriptes erfolgt auf eigene Gefahr. Schäden die durch die Nutzung entstanden sind, trägt allein der Nutzer des Programmes. */ $ecFile = 'plugins/users/usercenter.php'; echo ecTemplate('users', 'usercenter', 'siteHead'); echo ecTemplate('users', 'usercenter', 'usercenterHead'); $ecUsercenterData = dbSelect('sitesName,sitesPluginId', 1, 'sites', "sitesTyp=7"); while ($usersites = mysql_fetch_object($ecUsercenterData)) { $sitePath = $usersites->sitesName; $pluginPath = $ecLocal['pluginsList'][$usersites->sitesPluginId]; if (ecGetAccessLevel($pluginPath, $sitePath)) { $ecLang = ecGetLang($pluginPath, $sitePath); $usersiteName = isset($ecLang['usercenterName']) ? $ecLang['usercenterName'] : '-'; $usersiteDescription = isset($ecLang['usercenterDescription']) ? $ecLang['usercenterDescription'] : '-'; echo ecTemplate('users', 'usercenter', 'usercenterData'); } } echo ecTemplate('users', 'usercenter', 'usercenterFoot');
// return 'no results found' if (isset($_POST['query'])) { // Sanitising the query $searchQuery = $databaseConnection->real_escape_string($_POST['query']); // Splitting the search query on spaces, if they exist $searchTerms = explode(" ", $searchQuery); // Seeing if there's anything in searchTerms[1]. If not, make it the same as // searchTerms[0], to prevent undefined offset errors. if (strpos($searchQuery, ' ') === FALSE) { $searchTerms[1] = $searchTerms[0]; } $studentResults = array(); // Generating the search query and running it // Note: searchTerms[0] should be the forename, searchTerms[1] the surname $sql = "SELECT * FROM `sen_info`.`tbl_students` WHERE (studentForename LIKE '%{$searchTerms['0']}%') OR (studentSurname LIKE '%{$searchTerms['1']}%')"; $queryResult = dbSelect($sql, $databaseConnection); // Seeing if any results were found if (dbSelectCountRows($queryResult) > 0) { echo createDetailLink(dbSelectGetRows($queryResult)); } else { echo "No results found"; } // Showing the add button, with the name parts filled in echo addStudentButton($searchTerms[0], $searchTerms[1]); } else { echo "No results found"; // Showing the add button, without the name parts filled in echo addStudentButton(); } // Closing the connection to the database dbClose($databaseConnection);
<?php /* (C) 2006 EZEMS.NET Alle Rechte vorbehalten. Dieses Programm ist urheberrechtlich geschützt. Die Verwendung für private Zwecke ist gesattet. Unbrechtigte Nutzung (Verkauf, Weiterverbreitung, Nutzung ohne Urherberrechtsvermerk, kommerzielle Nutzung) ist strafbar. Die Nutzung des Scriptes erfolgt auf eigene Gefahr. Schäden die durch die Nutzung entstanden sind, trägt allein der Nutzer des Programmes. */ $ecFile = 'system/core/settings.php'; // no direct access defined('_VALID_EC') or die('Restricted access'); // Userip $ecLocal['userIP'] = getenv("REMOTE_ADDR"); // Load Settings $ecSettingsData = dbSelect('*', 1, 'settings'); while ($setting = mysql_fetch_object($ecSettingsData)) { $ecSettings[$setting->settingsPlugin][$setting->settingsKey] = $setting->settingsValue; } // Set Timestamp $ecLocal['timestamp'] = time();
exit; } // Load config require_once 'config.php'; // Load errorsubs require_once 'system/subs/errors.php'; // Connect to database & Load subs require_once 'system/database/' . $ecDb['typ'] . '/subs.php'; require_once 'system/database/' . $ecDb['typ'] . '/backup.php'; // Load settings require_once 'system/core/settings.php'; // Initalize plugins require_once 'system/core/plugins.php'; // Load other subs require_once 'system/core/access.php'; require_once 'system/subs/languages.php'; require_once 'system/subs/date.php'; require_once 'system/subs/files.php'; require_once 'system/subs/tools.php'; require_once 'system/subs/icons.php'; require_once 'system/subs/templates.php'; // Load autoexecuting pluginfiles $ecAutoexecData = dbSelect('sitesPluginId,sitesName', 1, 'sites', "sitesTyp=3"); while ($sites = mysql_fetch_object($ecAutoexecData)) { if (ecGetAccessLevel($ecLocal['pluginsList'][$sites->sitesPluginId], $sites->sitesName)) { include 'plugins/' . $ecLocal['pluginsList'][$sites->sitesPluginId] . '/' . $sites->sitesName . '.php'; } } // Parse Theme & Create Website require_once 'system/core/themes.php'; echo $html;
$gameId = $games->gamesId; $gameName = $games->gamesName; $gameOption .= ecTemplate('squads', 'squadedit', 'gameOption'); } $memberOptions = ''; //Users auslesen $ecUserData = dbSelect('*', 1, 'users'); while ($users = mysql_fetch_object($ecUserData)) { $userId = $users->usersId; $userNick = $users->usersUsername; $memberOptions .= ecTemplate('squads', 'squadedit', 'memberOption'); } $taskOptions = ''; //Tasks auslesen $ecTaskData = dbSelect('*', 1, 'squadtask', '', 'squadtaskPriority', 1); while ($task = mysql_fetch_object($ecTaskData)) { $taskId = $task->squadtaskId; $taskName = $task->squadtaskName; $taskOptions .= ecTemplate('squads', 'squadedit', 'taskOption'); } $squadPlayer = ''; $ecSquadMemberData = dbSelect('*', 1, 'squadplayer,users,squadtask', "(squadplayerSquadId = {$id}) AND (squadplayerUserID = usersId) AND (squadplayerTaskId = squadtaskId)", 'squadtaskPriority', 1); while ($squadMember = mysql_fetch_object($ecSquadMemberData)) { $squadPlayerId = $squadMember->squadplayerId; $squadPlayerName = $squadMember->usersUsername; $squadPlayerTaskId = $squadMember->squadplayerTaskId; $squadPlayerTaskName = $squadMember->squadtaskName; $squadPlayer .= ecTemplate('squads', 'squadedit', 'squadPlayer'); } echo ecTemplate('squads', 'squadedit', 'squadEdit'); }
Unbrechtigte Nutzung (Verkauf, Weiterverbreitung, Nutzung ohne Urherberrechtsvermerk, kommerzielle Nutzung) ist strafbar. Die Nutzung des Scriptes erfolgt auf eigene Gefahr. Schäden die durch die Nutzung entstanden sind, trägt allein der Nutzer des Programmes. */ $ecFile = 'plugins/users/changetemplate.php'; echo ecTemplate('users', 'changetemplate', 'siteHead'); if (isset($_POST['save'])) { $update['usersTemplateId'] = $_POST['usersTemplateId']; dbUpdate(1, 'users', $update, "usersId = " . $ecUser['userId']); $next = ecReferer('index.php?view=users&site=usercenter'); echo ecTemplate('users', 'changetemplate', 'usersEdited'); } else { echo ecTemplate('users', 'changetemplate', 'usersEditHead'); $ecTemplatesData = dbSelect('templatesId,templatesPath,templatesName,templatesInfo', 1, 'templates'); while ($templates = mysql_fetch_object($ecTemplatesData)) { $templatesId = $templates->templatesId; $templatesName = $templates->templatesName; $templatesPath = $templates->templatesPath; $templatesInfo = $templates->templatesInfo; if ($templatesId == $ecUser['templateId']) { $checked = 'checked="checked"'; } else { $checked = ''; } echo ecTemplate('users', 'changetemplate', 'usersEditData'); } echo ecTemplate('users', 'changetemplate', 'usersEditFoot'); }
if (isset($_REQUEST['view'])) { $ecLocal['plugin'] = $_REQUEST['view']; if (isset($_REQUEST['site'])) { $ecLocal['site'] = $_REQUEST['site']; } else { $ecLocal['site'] = 'list'; } } else { $ecLocal['plugin'] = $ecSettings['system']['defaultPlugin']; $ecLocal['site'] = $ecSettings['system']['defaultSite']; } // Set Contentwidth $contentTyp = $ecSettings['system']['contentTyp'] == 1 ? '%' : 'px'; $ecLocal['tableWidth'] = $ecSettings['system']['contentWidth'] . $contentTyp; // Plugins $ecPluginsData = dbSelect('pluginsId,pluginsPath', 1, 'plugins'); while ($plugins = mysql_fetch_object($ecPluginsData)) { $ecLocal['pluginsList'][$plugins->pluginsId] = $plugins->pluginsPath; if ($plugins->pluginsPath == $ecLocal['plugin']) { $pluginRegistred = 1; } } // Check Plugin & Site if (isset($pluginRegistred)) { $viewPath = 'plugins/' . $ecLocal['plugin'] . '/' . $ecLocal['site'] . '.php'; if (!file_exists($viewPath)) { ecError($ecFile, 'File not found ' . $viewPath); $ecLocal['plugin'] = 'errors'; $ecLocal['site'] = '404'; } } else {
<?php /* (C) 2006 EZEMS.NET Alle Rechte vorbehalten. Dieses Programm ist urheberrechtlich geschützt. Die Verwendung für private Zwecke ist gesattet. Unbrechtigte Nutzung (Verkauf, Weiterverbreitung, Nutzung ohne Urherberrechtsvermerk, kommerzielle Nutzung) ist strafbar. Die Nutzung des Scriptes erfolgt auf eigene Gefahr. Schäden die durch die Nutzung entstanden sind, trägt allein der Nutzer des Programmes. */ $ecFile = 'plugins/users/manage.php'; echo ecTemplate('users', 'manage', 'siteHead'); echo ecTemplate('users', 'manage', 'usersHead'); $ecUsersData = dbSelect('usersId,usersUsername,usersFirstname,usersLastname', 1, 'users'); while ($users = mysql_fetch_object($ecUsersData)) { $usersId = $users->usersId; $usersUsername = $users->usersUsername; $usersFirstname = $users->usersFirstname; $usersLastname = $users->usersLastname; echo ecTemplate('users', 'manage', 'usersData'); } echo ecTemplate('users', 'manage', 'usersFoot'); echo ecTemplate('users', 'manage', 'usersNew');
function dbWrite() { if (!dbEnabled()) { return TRUE; } global $dbSchemas, $dbFixtures; $db = dbHandle(); if (!dbSelect($db)) { return FALSE; } dbDoMigration($db); foreach ($dbFixtures as $fixture) { $result = mysqli_multi_query($db, file_get_contents($fixture)); if ($result === FALSE || mysqli_errno($db) != 0) { userMessage("error", "Problem loading fixture {$fixture} - " . mysqli_error($db)); return FALSE; } dbFlush($db); } mysqli_close($db); return TRUE; }
<div class="postedJobPane"> <p class="myAccountHeading">My Job List</p> <table class="myJobListTable"> <tr class="myJobLabel"> <td class="myJobPosition">POSITION</td> <td class="myJobDescription">DESCRIPTION</td> <td class="myJobDate">POST DATE</td> <td class="myJobCandidates">CANDIDATES</td> <td class="myJobStatus">STATUS</td> </tr> <?php $count = 0; while ($row = mysql_fetch_assoc($jobResult)) { $jobID = $row["job_id"]; $result = dbSelect(CV_TABLE, "WHERE cv_job_id = {$jobID}"); $numrows = mysql_num_rows($result); if ($count % 2 == 0) { // oddLine echo "<tr class=\"myJobEntry oddLine\">"; } else { // evenLine echo "<tr class=\"myJobEntry evenLine\">"; } echo "<td class=\"myJobPosition\"><a href=\"jobPage.php?job=" . $row["job_id"] . "\" target=\"_blank\">" . $row["job_title"] . "</a></td>\r\n <td class=\"myJobDescription\">" . $row["job_description"] . "</td>\r\n <td class=\"myJobDate\">" . $row['job_postdate'] . "</td>\r\n <td class=\"myJobCandidates\">" . $numrows . "</td>\r\n <td class=\"myJobStatus\">"; $today = intval(str_replace('-', '', $today)); $dueDate = intval(str_replace('-', '', $row['job_duedate'])); if ($today <= $dueDate) { echo "Open"; } else { echo "Closed"; }
<?php require_once '../model/db.php'; require_once '../includes/fpdf17/fpdf.php'; $result = dbSelect(CV_TABLE, "WHERE cv_id = " . $_GET['id']); $row = mysql_fetch_assoc($result); $cv_description = $row['cv_description']; $text_file = "testFile.txt"; $fh = fopen($text_file, 'w') or die("can't open file"); fwrite($fh, $cv_description); fclose($fh); class PDF extends FPDF { function Footer() { // Position at 1.5 cm from bottom $this->SetY(-15); // Arial italic 8 $this->SetFont('Arial', 'I', 8); // Text color in gray $this->SetTextColor(128); // Page number $this->Cell(0, 10, 'Page ' . $this->PageNo(), 0, 0, 'C'); } function ChapterTitle($num, $label) { // Arial 12 $this->SetFont('Arial', '', 12); // Background color $this->SetFillColor(200, 220, 255); // Title
// Refresh Paths $refreshImages = "=link href\\=\"(?!http)(.*?)\"=si"; $html = preg_replace($refreshImages, "link href=\"themes/" . $ecLocal['theme'] . "/\\1\"", $html); $refreshBackgrounds = "=background\\=\"(?!http)(.*?)\"=si"; $html = preg_replace($refreshBackgrounds, "background=\"themes/" . $ecLocal['theme'] . "/\\1\"", $html); $refreshSources = "=src\\=\"(?!http)(.*?)\"=si"; $html = preg_replace($refreshSources, "src=\"themes/" . $ecLocal['theme'] . "/\\1\"", $html); // Load Template Stylesheet $refreshCss = "<link href=\"templates/" . $ecLocal['template'] . "/style.css\" rel=\"stylesheet\" type=\"text/css\" /> \n</head>"; $html = preg_replace("=</head>=si", $refreshCss, $html); // Load Theme Stylesheet $refreshCss2 = "<link href=\"themes/" . $ecLocal['theme'] . "/style.css\" rel=\"stylesheet\" type=\"text/css\" /> \n</head>"; $html = preg_replace("=</head>=si", $refreshCss2, $html); // Javaskripte laden $javaScript = implode('', file("system/subs/javascript.js")); $ecJsData = dbSelect('sitesName,sitesPluginId', 1, 'sites', "sitesTyp=5"); while ($sites = mysql_fetch_object($ecJsData)) { $sitePath = 'plugins/' . $ecLocal['pluginsList'][$sites->sitesPluginId] . '/' . $sites->sitesName . '.js'; $javaScript .= " \n"; $javaScript .= implode('', file($sitePath)); } $html = preg_replace("=</head>=si", "<script language=\"javascript\" type=\"text/javascript\"> \n<!-- \n" . $javaScript . " \n//--> \n</script> \n</head>", $html, 1); // Plugins includen foreach ($tmpReplaces as $themeRow => $themeIncls) { ob_start(); include $themeIncls; $themeIncls = ob_get_contents(); ob_end_clean(); $themeIncls = str_replace('{', "{", $themeIncls); $themeIncls = str_replace('}', "}", $themeIncls); $html = str_replace('{' . $themeRow . '}', $themeIncls, $html);
$description = $languages->languagesName; $checked = ''; if ($ecSettings['system']['defaultLanguageId'] == $languages->languagesId) { $checked = ' selected="selected"'; } $dataLanguages .= ecTemplate('system', 'settings', 'select'); } $dataTemplates = ''; $ecSettingsData = dbSelect('templatesName,templatesId', 1, 'templates'); while ($templates = mysql_fetch_object($ecSettingsData)) { $value = $templates->templatesId; $description = $templates->templatesName; $checked = ''; if ($ecSettings['system']['defaultTemplateId'] == $templates->templatesId) { $checked = ' selected="selected"'; } $dataTemplates .= ecTemplate('system', 'settings', 'select'); } $dataStartPlugins = ''; $ecSettingsData = dbSelect('pluginsPath', 1, 'plugins'); while ($plugins = mysql_fetch_object($ecSettingsData)) { $value = $plugins->pluginsPath; $description = $plugins->pluginsPath; $checked = ''; if ($ecSettings['system']['defaultPlugin'] == $plugins->pluginsPath) { $checked = ' selected="selected"'; } $dataStartPlugins .= ecTemplate('system', 'settings', 'select'); } echo ecTemplate('system', 'settings', 'settingsSkript'); }