<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. */ defined('_JEXEC') or die('Unauthorized Access'); if (isset($view)) { addView($title, $view); } if (isset($layout)) { addLayout($title, $view, $layout); }
if ($_SESSION["id"]) { addHistory($id, $mid); } $ip = getRealIpAddr(); $count = 0; $s = mysql_query("SELECT * FROM `IP_Address` WHERE mid='{$mid}'") or die(mysql_error()); while ($row1 = mysql_fetch_assoc($s)) { $ipc = $row1['userIP']; $i = strcmp($ip, $ipc); if ($i == 0) { $count = $count + 1; break; } } if ($count == 0) { addView($mid); } addIPAddress($mid); $r = mysql_query("SELECT uid,cvid,mid,comment FROM `Comments` WHERE mid='{$mid}'") or die(mysql_error()); $q = mysql_query("SELECT * FROM `Media` WHERE mid='{$mid}'") or die(mysql_error()); $row = mysql_fetch_assoc($q); $path = $row["MediaPath"]; $name = $row['Title']; $text = $row['Description']; $type = $row['Type']; if (isset($_POST['comment'])) { if ($_SESSION["username"]) { if (strlen($_POST['text']) > 0) { addComment($id, $mid, $_POST['text']); } } else {
if (isset($_POST["addmap"])) { $private = optional_param("private", "Y", PARAM_ALPHA); } else { $private = optional_param("private", $USER->privatedata, PARAM_ALPHA); } $groupset = getMyGroups(); $groups = $groupset->groups; if (isset($_POST["addmap"])) { if ($maptitle == "") { array_push($errors, $LNG->FORM_MAP_ENTER_SUMMARY_ERROR); } if (empty($errors)) { $r = getRoleByName("Map"); $roleMap = $r->roleid; // CREATE THE MAP NODE $mapview = addView($maptitle, $desc, $private, $roleMap, $groupid, 0, 0); $mapnode = $mapview->viewnode; if (!$mapview instanceof Error) { if ($_FILES['image']['error'] == 0) { $imagedir = $HUB_FLM->getUploadsNodeDir($mapnode->nodeid); $photofilename = uploadImageToFit('image', $errors, $imagedir); if ($photofilename == "") { $photofilename = $CFG->DEFAULT_ISSUE_PHOTO; } $mapnode->updateImage($photofilename); } if ($_FILES['background']['error'] == 0) { $imagedir = $HUB_FLM->getUploadsNodeDir($mapnode->nodeid); $backgroundfilename = uploadImage('background', $errors, 0, $imagedir); if ($backgroundfilename != "") { $target_path = $HUB_FLM->getUploadsWebPath($imagedir . "/");