<?php include "../classes/project_contributor.php"; include "../classes/user.php"; $obj = new project_contributor(); $obj2 = new project_contributor(); $obj3 = new user(); if (isset($_REQUEST['contributor'])) { $contributor = $_REQUEST['contributor']; $row = $obj->get_user_contributions($contributor); if ($row == null) { echo " <br> <br> <br> <br> <br> <br> <br>\n\t\t <h1>You have no group projects</h1>\n\t\t <br> <br> <br> <br> <br> <br> <br>"; } else { while ($row) { $creator = $row['creator']; $project = $row['project_name']; $html = '<div class="col-lg-4" onclick = groupview("'; $html .= $creator; $html .= '","'; $html .= "'{$row['project_name']}'"; $html .= '")>'; $html .= "<div class='panel panel-success'>\n\t\t\t <div class='panel-heading'>\n\t\t\t\t<h3 class='panel-title'>{$row['project_name']}</h3>\n\t\t\t </div>\n\t\t\t <div class='panel-body'>\n\t\t\t <div class = 'col-lg-6'>\n\t\t\t <h3>Contributors:</h3>\n\t\t\t\t<img class='img-responsive' src='img/people.png' alt='troye' >\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div class = 'col-lg-6'>\n\t\t\t\t<br><br><br>"; $row2 = $obj2->get_contributors($creator, $project); while ($row2) { $email = $row2['contributor']; $row3 = $obj3->get_user_by_email($email); $html .= "{$row3['name']}<br>"; $row2 = $obj2->fetch(); } $html .= "</div>\n\t\t\t\t\n\t\t\t </div>\n\t\t\t</div>\n\t\t\t\t</div>"; echo utf8_encode($html);
<?php include "../classes/project.php"; include "../classes/project_contributor.php"; $obj = new project(); $objC = new project_contributor(); $name = $_REQUEST['name']; if (isset($_REQUEST['name']) && strcmp($name, "") != 0) { $creator = $_REQUEST['creator']; $start = $_REQUEST['start']; $end = $_REQUEST['end']; $row = $obj->add_project($creator, $name, $start, $end, "Ongoing"); $rowC = $objC->add_contributor($creator, $name, $creator); echo "dashboard.html"; }
<?php include "../classes/project.php"; include "../classes/project_contributor.php"; $obj = new project(); $objC = new project_contributor(); $con1 = $_REQUEST['input1']; $con1 = $_REQUEST['input1']; $con2 = $_REQUEST['input2']; $con3 = $_REQUEST['input3']; $con4 = $_REQUEST['input4']; $con5 = $_REQUEST['input5']; $con6 = $_REQUEST['input6']; $con7 = $_REQUEST['input7']; $creator = $_REQUEST['creator']; $name = $_REQUEST['name']; if (isset($_REQUEST['input1']) && strcmp($con1, "") != 0) { if (strcmp($con1, "") != 0) { $rowC = $objC->add_contributor($creator, $name, $con1); } if (strcmp($con2, "") != 0) { $rowC = $objC->add_contributor($creator, $name, $con2); } if (strcmp($con3, "") != 0) { $rowC = $objC->add_contributor($creator, $name, $con3); } if (strcmp($con4, "") != 0) { $rowC = $objC->add_contributor($creator, $name, $con4); } if (strcmp($con5, "") != 0) { $rowC = $objC->add_contributor($creator, $name, $con5);