<?php include_once 'config.php'; include_once 'app/projects.php'; include_once 'app/users.php'; $projects = getProjectsInTrend(); if ($projects) { $added_array = array(); foreach ($projects as $p) { if (in_array($p['project_id'], $added_array)) { continue; } $added_array[] = $p['project_id']; $project = getProjectById($p['project_id']); $title = $project['project_title']; $startup_amount = $project['startup_amount']; $raised_amount = 1500; $mark = $raised_amount * 100 / $startup_amount; $color_mark = 100 - $mark; $user = getUserData($project['created_by']); $reward = $project['reward']; $ppc = $project['per_product_cost']; $eq_pc = $project['equity_pc']; if (strlen($title) < 20) { $short_title = $title; } else { $short_title = substr($title, 0, 19) . '...'; } ?> <div> <div class="recent-project-item" style="float: left; margin:inherit">
<div class="inner-page-wrapper"> <div class="project inner-page content"> <?php include DIR_INCLUDE . 'left_nav.php'; ?> <div class="main-content"> <?php if (isset($_GET['pid'])) { $id = intval($_GET['pid']); $project = getProjectById($id); if (!empty($project)) { require DIR_INCLUDE . 'project_details.php'; } else { ?> <div class="content-block"><div class="content-title">Project not found</div> <?php } } ?> </div> </div> <!-- account inner-page content -->
</form> </div> <div class="content-block right-home-border"> <?php if (!isset($_GET['pid']) && !isset($_GET['iid'])) { $project = getLastActiveProject(); $user = getUserData($_SESSION['uid']); if (empty($project)) { echo '<div class="content-title">You have no projects yet.</div>'; } else { $showProject = true; } } else { if (isset($_GET['pid'])) { $project = getProjectById(intval($_GET['pid'])); $user = getUserData($project['created_by']); if (!empty($project)) { $showProject = true; } } } if (isset($_GET['pid']) && empty($project)) { echo '<div class="content-title">Invalid URL</div>'; $showProject = false; } if (isset($_GET['iid'])) { include 'includes/idea_details.php'; } if ($showProject) { ?>
<form name="project-action" method="post"> <input type="radio" name="type_project[]" id="add_project_radio" value="project"> <label for="add_project_radio">Project</label> <input type="radio" style="margin-left:15%" name="type_project[]" id="add_ideaThread_radio" value="ideaThread"> <label for="add_ideaThread_radio">IdeaThread</label> <input type="submit" class="disabled" name="add_project" value="Upload"> </form> </div> <div class="content-block right-home-border"> <?php global $showProject; if (isset($_GET['pid'])) { $project = getProjectById($_GET['pid']); $user = getUserData($project['created_by']); if (!empty($project)) { $showProject = true; } } if (isset($_GET['pid']) && empty($project)) { echo '<div class="content-title">Invalid URL</div>'; $showProject = false; } if (isset($_GET['iid'])) { include 'includes/idea_details.php'; } if ($showProject) { ?> <div class="content-title">
<?php require_once dirname(__FILE__) . "/../include/master.inc.php"; if (!isLogin()) { redirect("login.php"); } $user = getUserInfo(); if (isset($_GET['action']) && $_GET['action'] == 'delete') { deleteMap((int) $_GET['id'], $user['id']); } $maps = getMapsByProjectId((int) $_GET['projects_id']); $project = getProjectById((int) $_GET['projects_id']); $PAGE = "PROJECT_MAPS"; $directoryList = array(); $dirs = scandir("map/html-template/"); rsort($dirs); foreach ($dirs as $dir) { if ($dir != '.' && $dir != '..') { $directoryList[] = $dir; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>View Maps (Project : <?php echo $project['name']; ?> )</title>
function checkMonetize($project_id) { global $db_con; $project = getProjectById($project_id); $query = "SELECT `project_id` FROM `payments` WHERE `type` = 'Royalty' AND `created_by` = " . $_SESSION['uid'] . " AND `project_id` = " . $project_id; $res = $db_con->query($query); $txn = $db_con->fetch_array($res); $monetize = intval($project['monetize']); if ($monetize > 0 && !$txn && $project['created_by'] != $_SESSION['uid']) { return true; } else { return false; } }