示例#1
0
 public static function get_list($_FORM)
 {
     /*
      *
      * Get a list of task history items with sophisticated filtering and somewhat sophisticated output
      *
      * (n.b., the output from this generally needs to be post-processed to handle the semantic meaning of changes in various fields)
      *
      */
     $filter = audit::get_list_filter($_FORM);
     if (is_array($filter) && count($filter)) {
         $where_clause = " WHERE " . implode(" AND ", $filter);
     }
     if ($_FORM["projectID"]) {
         $entity = new project();
         $entity->set_id($_FORM["projectID"]);
         $entity->select();
     } else {
         if ($_FORM["taskID"]) {
             $entity = new task();
             $entity->set_id($_FORM["taskID"]);
             $entity->select();
         }
     }
     $q = "SELECT *\n            FROM audit\n          {$where_clause}\n        ORDER BY dateChanged";
     $db = new db_alloc();
     $db->query($q);
     $items = array();
     while ($row = $db->next_record()) {
         $audit = new audit();
         $audit->read_db_record($db);
         $rows[] = $row;
     }
     return $rows;
 }
 function is_owner($person = "")
 {
     $project = new project();
     $project->set_id($this->get_value("projectID"));
     $project->select();
     return $project->is_owner($person);
 }
示例#3
0
 function get_rate($projectID, $personID)
 {
     // Try to get the person's rate from the following sources:
     // project.defaultTimeSheetRate
     // person.defaultTimeSheetRate
     // config.name == defaultTimeSheetRate
     // First check the project for a rate
     $project = new project($projectID);
     $row = array('rate' => $project->get_value("defaultTimeSheetRate"), 'unit' => $project->get_value("defaultTimeSheetRateUnitID"));
     if (imp($row['rate']) && $row['unit']) {
         return $row;
     }
     // Next check person, which is in global currency rather than project currency - conversion required
     $db = new db_alloc();
     $q = prepare("SELECT defaultTimeSheetRate as rate, defaultTimeSheetRateUnitID as unit FROM person WHERE personID = %d", $personID);
     $db->query($q);
     $row = $db->row();
     if (imp($row['rate']) && $row['unit']) {
         if ($project->get_value("currencyTypeID") != config::get_config_item("currency")) {
             $row['rate'] = exchangeRate::convert(config::get_config_item("currency"), $row["rate"], $project->get_value("currencyTypeID"));
         }
         return $row;
     }
     // Lowest priority: global
     $rate = config::get_config_item("defaultTimeSheetRate");
     $unit = config::get_config_item("defaultTimeSheetUnit");
     if (imp($rate) && $unit) {
         if (config::get_config_item("currency") && $project->get_value("currencyTypeID")) {
             $rate = exchangeRate::convert(config::get_config_item("currency"), $rate, $project->get_value("currencyTypeID"));
         }
         return array('rate' => $rate, 'unit' => $unit);
     }
 }
示例#4
0
文件: bug.php 项目: saji89/whube
 function getProject($pID)
 {
     $this->getAllByPK($pID);
     $row = $this->getNext();
     $p = new project();
     $p->getAllByPK($row['package']);
     return $p->getNext();
 }
 function display_category_usa($type = "all", $linkurl = 'subcategory.php', $selected = "")
 {
     $project = new project();
     $service = new service();
     $rentorhire = new rentorhire();
     $jobs = new jobs();
     $category = $this->getsubcategory(1);
     if (is_array($category)) {
         echo '<table cellspacing="4" class="sub_categories" width="100%">';
         echo '<tr>';
         $countTd = 0;
         foreach ($category as $row) {
             if ($countTd % 4 == 0 && $countTd > 1) {
                 echo "</tr><tr>";
             }
             $countTd++;
             echo '<td ';
             if ($type == "jobs" && $selected == $row['seo_url']) {
                 echo "class='redBg'";
             } else {
                 echo "class='whiteBg'";
             }
             echo ' ><div><div><a href="' . $linkurl . '?seo_url=' . $row['seo_url'] . '" style="text-decoration:none;">';
             if ($row['markbold'] == "yes") {
                 echo "<strong>" . $row['name'] . "</strong> &nbsp; ";
             } else {
                 echo $row['name'] . " &nbsp; ";
             }
             echo "<font color='green'>";
             if ($type == "services") {
                 echo $service->numofServicebysubCat($row['id']);
             } else {
                 if ($type == "rentorhire") {
                     echo $rentorhire->numofrentorhirebysubCat($row['id']);
                 } else {
                     if ($type = "jobs") {
                         echo $jobs->numofjobsbysubCat($row['id']);
                     } else {
                         if ($type == "all") {
                             echo $project->numOfProjectBySubCat($row['id']) . "," . $rentorhire->numofrentorhirebysubCat($row['id']) . "," . $jobs->numofjobsbysubCat($row['id']) . "," . $service->numofServicebysubCat($row['id']);
                         }
                     }
                 }
             }
             echo "</font>";
             echo '</a></div></div></td>';
             //if($countTd%4!=0) echo '<td width="20"></td>';
         }
         echo '</tr>';
         echo '</table>';
     } else {
         echo "No Sub Category Found!";
     }
 }
示例#6
0
 public static function GetCollection($projectRequest)
 {
     $projectData = new projectData();
     $resultSet = $projectData->GetCollection($projectRequest);
     $projectCollection = array();
     while ($dataRowAsArray = $resultSet->fetch_assoc()) {
         $project = new project($projectRequest);
         $project->Load($dataRowAsArray);
         $projectCollection[] = $project;
     }
     return $projectCollection;
 }
示例#7
0
 public function show($condition = '')
 {
     $sql = "SELECT * FROM " . DB_PREFIX . "bill WHERE 1 " . $condition;
     $q = $this->db->query($sql);
     $data = array();
     $user_id = $space = '';
     $project_id = $space_second = '';
     while ($row = $this->db->fetch_array($q)) {
         if ($row['user_id']) {
             $user_id .= $space . $row['user_id'];
             $space = ',';
         }
         if ($row['project_id']) {
             $project_id .= $space_second . $row['project_id'];
             $space_second = ',';
         }
         $row['cost_capital'] = hg_cny($row['cost']);
         $row['advice_capital'] = hg_cny($row['advice']);
         $data[] = $row;
     }
     if ($user_id) {
         include_once ROOT_PATH . 'lib/class/auth.class.php';
         $auth = new auth();
         $tmp = $auth->getMemberById($user_id);
         $user_info = array();
         foreach ($tmp as $k => $v) {
             $user_info[$v['id']] = $v['user_name'];
         }
     }
     if ($project_id) {
         include_once CUR_CONF_PATH . 'lib/project.class.php';
         $project = new project();
         $project_info = $tmp = array();
         $tmp = $project->show(' AND id IN(' . $project_id . ')');
         foreach ($tmp as $k => $v) {
             $project_info[$v['id']] = $v['name'];
         }
     }
     foreach ($data as $k => $v) {
         if ($user_info) {
             $data[$k]['user_name'] = $user_info[$v['user_id']];
         }
         if ($project_info) {
             $data[$k]['project_name'] = $project_info[$v['project_id']];
         }
         if (!$v['title']) {
             $data[$k]['title'] = date('Y-m-d', $v['business_time']) . '-' . $data[$k]['project_name'];
         }
     }
     return $data;
 }
 private function setReadWritePermissionsFromTemplate(array $ugroup_mapping)
 {
     $template = ProjectManager::instance()->getProject($this->project->getTemplate());
     $template_read_accesses = $this->mediawiki_manager->getReadAccessControl($template);
     $template_write_accesses = $this->mediawiki_manager->getWriteAccessControl($template);
     $this->mediawiki_manager->saveReadAccessControl($this->project, $this->getUgroupsForProjectFromMapping($template_read_accesses, $ugroup_mapping));
     $this->mediawiki_manager->saveWriteAccessControl($this->project, $this->getUgroupsForProjectFromMapping($template_write_accesses, $ugroup_mapping));
 }
 private function seedUGroupMapping()
 {
     if ($this->project->isPublic()) {
         db_query($this->seedProjectUGroupMappings($this->project->getID(), MediawikiUserGroupsMapper::$DEFAULT_MAPPING_PUBLIC_PROJECT));
     } else {
         db_query($this->seedProjectUGroupMappings($this->project->getID(), MediawikiUserGroupsMapper::$DEFAULT_MAPPING_PRIVATE_PROJECT));
     }
 }
示例#10
0
function show_filter()
{
    global $TPL;
    global $defaults;
    $_FORM = project::load_form_data($defaults);
    $arr = project::load_project_filter($_FORM);
    is_array($arr) and $TPL = array_merge($TPL, $arr);
    include_template("templates/projectListFilterS.tpl");
}
示例#11
0
function show_all_exp($template)
{
    global $TPL;
    global $expenseForm;
    global $db;
    global $transaction_to_edit;
    if ($expenseForm->get_id()) {
        if ($_POST["transactionID"] && ($_POST["edit"] || is_object($transaction_to_edit) && $transaction_to_edit->get_id())) {
            // if edit is clicked OR if we've rejected changes made to something so are still editing it
            $query = prepare("SELECT * FROM transaction WHERE expenseFormID=%d AND transactionID<>%d ORDER BY transactionID DESC", $expenseForm->get_id(), $_POST["transactionID"]);
        } else {
            $query = prepare("SELECT * FROM transaction WHERE expenseFormID=%d ORDER BY transactionID DESC", $expenseForm->get_id());
        }
        $db->query($query);
        while ($db->next_record()) {
            $transaction = new transaction();
            $transaction->read_db_record($db);
            $transaction->set_values();
            $transaction->get_value("quantity") and $TPL["amount"] = $transaction->get_value("amount") / $transaction->get_value("quantity");
            $TPL["lineTotal"] = $TPL["amount"] * $transaction->get_value("quantity");
            $tf = new tf();
            $tf->set_id($transaction->get_value("fromTfID"));
            $tf->select();
            $TPL["fromTfIDLink"] = $tf->get_link();
            $tf = new tf();
            $tf->set_id($transaction->get_value("tfID"));
            $tf->select();
            $TPL["tfIDLink"] = $tf->get_link();
            $projectID = $transaction->get_value("projectID");
            if ($projectID) {
                $project = new project();
                $project->set_id($transaction->get_value("projectID"));
                $project->select();
                $TPL["projectName"] = $project->get_value("projectName");
            }
            if ($transaction->get_value("fromTfID") == config::get_config_item("expenseFormTfID")) {
                $TPL['expense_class'] = "loud";
            } else {
                $TPL['expense_class'] = "";
            }
            include_template($template);
        }
    }
}
 function render()
 {
     $current_user =& singleton("current_user");
     global $TPL;
     if (isset($current_user->prefs["projectListNum"]) && $current_user->prefs["projectListNum"] != "all") {
         $options["limit"] = sprintf("%d", $current_user->prefs["projectListNum"]);
     }
     $options["projectStatus"] = "Current";
     $options["personID"] = $current_user->get_id();
     $TPL["projectListRows"] = project::get_list($options);
     return true;
 }
示例#13
0
function show_projects($template_name)
{
    global $TPL;
    global $default;
    $_FORM = task::load_form_data($defaults);
    $arr = task::load_task_filter($_FORM);
    is_array($arr) and $TPL = array_merge($TPL, $arr);
    if (is_array($_FORM["projectID"])) {
        $projectIDs = $_FORM["projectID"];
        foreach ($projectIDs as $projectID) {
            $project = new project();
            $project->set_id($projectID);
            $project->select();
            $_FORM["projectID"] = array($projectID);
            $TPL["graphTitle"] = urlencode($project->get_value("projectName"));
            $arr = task::load_task_filter($_FORM);
            is_array($arr) and $TPL = array_merge($TPL, $arr);
            include_template($template_name);
        }
    }
}
示例#14
0
function show_timeSheetItems($template_name)
{
    global $date_to_view;
    $current_user =& singleton("current_user");
    global $TPL;
    $query = prepare("SELECT * \n                      FROM timeSheetItem \n                           LEFT JOIN timeSheet ON timeSheetItem.timeSheetID = timeSheet.timeSheetID\n                           LEFT JOIN project ON timeSheet.projectID = project.projectID\n                      WHERE dateTimeSheetItem='%s'\n                            AND timeSheet.personID=%d", date("Y-m-d", $date_to_view), $current_user->get_id());
    $db = new db_alloc();
    $db->query($query);
    while ($db->next_record()) {
        $timeSheetItem = new timeSheetItem();
        $timeSheetItem->read_db_record($db);
        $timeSheetItem->set_values();
        if ($timeSheetItem->get_value("unit") == "Hour") {
            $TPL["daily_hours_total"] += $timeSheetItem->get_value("timeSheetItemDuration");
        }
        $project = new project();
        $project->read_db_record($db);
        $project->set_values();
        if ($project->get_value("projectShortName")) {
            $TPL["item_description"] = $project->get_value("projectShortName");
        } else {
            $TPL["item_description"] = $project->get_value("projectName");
        }
        include_template($template_name);
    }
}
示例#15
0
 public function beforeDelete()
 {
     $project = project::model()->findAll();
     $zone = Zone::model()->findAll();
     foreach ($project as $id => $item) {
         $projects = explode('|', $item->country_id);
         if (in_array($this->country_id, array_values($projects))) {
             Yii::app()->setFlashMessage('Can not delete, Country in use in project master', 'error');
             return false;
         }
     }
     foreach ($zone as $id => $item) {
         $zones = explode('|', $item->country_id);
         if (in_array($this->country_id, array_values($zones))) {
             Yii::app()->setFlashMessage('Can not delete, Country in use in zone master', 'error');
             return false;
         }
     }
     return parent::beforeDelete();
 }
示例#16
0
 *
 * Tuleap is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Tuleap. If not, see <http://www.gnu.org/licenses/>.
 */
require_once 'pre.php';
require_once 'vars.php';
require_once 'www/project/admin/project_admin_utils.php';
$group_id = $request->get('group_id');
session_require(array('group' => $group_id, 'admin_flags' => 'A'));
$descfieldsinfos = getProjectsDescFieldsInfos();
$currentproject = new project($group_id);
$descfieldsvalue = $currentproject->getProjectsDescFieldsValue();
// If this was a submission, make updates
// update info for page
$res_grp = db_query("SELECT * FROM groups WHERE group_id=" . db_ei($group_id));
if (db_numrows($res_grp) < 1) {
    exit_no_group();
}
$row_grp = db_fetch_array($res_grp);
$form_group_name = trim($request->get('form_group_name'));
$form_shortdesc = $request->get('form_shortdesc');
$Update = $request->get('Update');
$valid_data = 0;
if ($Update) {
    //data validation
    $valid_data = 1;
示例#17
0
  <?php 
$maincategory = new maincategory();
$maincategory->display_category_usa();
?>
</td>
</tr>
<tr>
	<td>&nbsp;</td>
</tr>
<tr>
  <td class="heading">OutSource</td>
</tr>
<tr>
<td>
  <?php 
$projects = new project();
$projects_status = $projects->display_projects("", 2, 0, 0, 10, "order by rand()");
?>
    </td>
</tr>
<tr>
<td align="right">
<?php 
if ($projects_status) {
    ?>
  <a href="view_projects.php">View More</a> <?php 
}
?>
</td></tr>
</table>
<?php 
示例#18
0

<table border="0" cellpadding="2" cellspacing="1" width="100%">

<tr>
<td class="dt">Rating</td>
<td class="dt" width="150">Programmer</td>
<td class="dt">Project Name</td>
<td class="dt">Review Date</td>
<td class="dt">Project Status</td>
</tr>

<?php 
if (is_array($reviews)) {
    foreach ($reviews as $review) {
        $objproject = new project();
        $pdetails = $objproject->getdetails($review['projectid']);
        $pstatus = $objproject->getstatus($review['projectid']);
        if ($pstatus == "open") {
            $pstatus = '<font style="color:green;">Open</font>';
        }
        if ($pstatus == "frozen") {
            $pstatus = '<font style="color:blue;">Frozen</font>';
        }
        if ($pstatus == "cancelled") {
            $pstatus = '<font style="color:red;">Cancelled</font>';
        }
        if ($pstatus == "closed") {
            $pstatus = '<font style="color:red;">Closed</font>';
        }
        ?>
示例#19
0
}
$TPL["clientCategoryOptions"] = page::select_options($cc, $client->get_value("clientCategory"));
$client->get_value("clientCategory") and $TPL["client_clientCategoryLabel"] = $cc[$client->get_value("clientCategory")];
// client contacts
if ($_POST["clientContact_save"] || $_POST["clientContact_delete"]) {
    $clientContact = new clientContact();
    $clientContact->read_globals();
    if ($_POST["clientContact_save"]) {
        #$clientContact->set_value('clientID', $_POST["clientID"]);
        $clientContact->save();
    }
    if ($_POST["clientContact_delete"]) {
        $clientContact->delete();
    }
}
if (!$clientID) {
    $TPL["message_help"][] = "Create a new Client by inputting the Client Name and other details and clicking the Create New Client button.";
    $TPL["main_alloc_title"] = "New Client - " . APPLICATION_NAME;
    $TPL["clientSelfLink"] = "New Client";
} else {
    $TPL["main_alloc_title"] = "Client " . $client->get_id() . ": " . $client->get_name() . " - " . APPLICATION_NAME;
    $TPL["clientSelfLink"] = sprintf("<a href=\"%s\">%d %s</a>", $client->get_url(), $client->get_id(), $client->get_name(array("return" => "html")));
}
if ($current_user->have_role("admin")) {
    $TPL["invoice_links"] .= "<a href=\"" . $TPL["url_alloc_invoice"] . "clientID=" . $clientID . "\">New Invoice</a>";
}
$projectListOps = array("showProjectType" => true, "clientID" => $client->get_id());
$TPL["projectListRows"] = project::get_list($projectListOps);
$TPL["client_clientPostalAddress"] = $client->format_address("postal");
$TPL["client_clientStreetAddress"] = $client->format_address("street");
include_template("templates/clientM.tpl");
示例#20
0
<?php

include $_SERVER['DOCUMENT_ROOT'] . "/header.php";
include $_SERVER['DOCUMENT_ROOT'] . "/subheader.php";
$projects = new project();
$projects->markProjectExpired();
include $_SERVER['DOCUMENT_ROOT'] . "/footer.php";
include $_SERVER['DOCUMENT_ROOT'] . "/subfooter.php";
示例#21
0
    exit;
}
$customerInst = new customer();
if (!$customerInst->getList()) {
    echo $lang['project_noCustomer1'] . $toolInst->encodeUrl("index.php?content=customers.php") . $lang['project_noCustomer2'] . "\n";
    exit;
}
?>

<h1><?php 
echo $lang['common_projects'];
?>
</h1>

<?php 
$projectInst = new project();
if (!$loginInst->isCustomer()) {
    #######################################################################
    ## perform action
    $status = 1;
    if (tool::securePost('action') == "save" && tool::securePost('id')) {
        # fill project with submitted data
        $projectInst->id = tool::securePost('id');
        $projectInst->fill(tool::securePostAll());
        $status = $projectInst->update();
    } elseif (tool::securePost('action') == "save") {
        $projectInst->fill(tool::securePostAll());
        $status = $projectInst->insert();
    }
    if (tool::securePost('action') == "delete") {
        $projectInst->id = tool::securePost('id');
示例#22
0
<?php

session_start();
$_SESSION['filename'] = "";
include "header.php";
include "subheader.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/display.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/project.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/maincategory.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/flashupload.class.php";
$objproject = new project();
$projects = $objproject->getdetails($_GET['pid']);
$objuser = new user();
?>
<h3 class="heading">Message Board</h3>
<div><b>Project: </b><a href='projects.php?id=<?php 
echo $_GET['pid'];
?>
'><?php 
echo $projects['project_title'];
?>
</a></div>
<br />

<table  cellpadding="0" cellspacing="0">
<tr><td><br /><input type="button" value="Post Message" onclick="
<?php 
if (!$objuser->checkLogin()) {
    echo "messageBox('Please Login to Post / Reply Message');";
} else {
    echo "loadPage('/ajax/project/form_postmessage.php?pid=" . $_GET['pid'] . "');";
示例#23
0
文件: bug-list.php 项目: saji89/whube
<?php

useScript("sorttable.js");
useScript("tablehover.js");
$Count = $PAGE_MAX_COUNT;
if (isset($argv[2])) {
    $class = htmlentities($argv[1], ENT_QUOTES);
    $id = htmlentities($argv[2], ENT_QUOTES);
    // echo "Getting $id bugs filtering by $class";
}
$b = new bug();
$b->getAll();
$u = new user();
$p = new project();
$TITLE = "Latest {$Count} bugs";
$i = 0;
$CONTENT .= "<h1>Last {$Count} bugs filed</h1>";
$CONTENT .= "\n<table class = 'sortable' >\n\t<tr class = 'nobg' >\n\t\t<th>ID</th> <th> Status </th> <th> Severity </th> <th>Owner</th> <th>Project</th> <th>Private</th> <th>Title</th>\n\t</tr>\n";
while ($row = $b->getNext()) {
    $u->getAllByPK($row['owner']);
    $owner = $u->getNext();
    if ($owner['uID'] <= 0) {
        $owner['real_name'] = "Nobody";
    }
    $p->getAllByPK($row['package']);
    $package = $p->getNext();
    if (isset($_SESSION['id'])) {
        $id = $_SESSION['id'];
    } else {
        $id = -1;
        // NOT -10000!!!!!!
示例#24
0
<?php

session_start();
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/common.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/project.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/user.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/config.class.php";
$objuser = new user();
$objuser->checkLoginAjax();
$objproject = new project();
$objproject->removefiles($_GET['fileid']);
//echo "";
//$objjobtype=new jobs();
/*$i=0;
		foreach ($_POST['jobtype'] as $data)
			{
			if($data!="")
			$i++;
			}
		if($i==0)
		{
		echo "script:wrongStatus(document.getElementById('jobtype'),\"Select at least one\");";
		exit();
		}*/
//$objjobtype->add($_POST);
//echo "script: messageBox('Job Posted',function() { window.location='index.php'; });";
示例#25
0
<?php

$p = new project();
$b = new bug();
$p->getByCol("project_name", $argv[1]);
// this is goddamn awesome
$row = $p->getNext();
$b->getByCol("package", $row['pID']);
// this is goddamn awesome
$booboos = $b->numrows();
$critical = 0;
// doh // $b->specialSelect( "bug_status != 1" );
if (isset($row['pID'])) {
    $TITLE = $row['project_name'] . ", one of the fantastic projects on Whube";
    $CONTENT = "\n<h1>" . $row['project_name'] . "</h1>\n" . $row['descr'] . "<br />\n<br />\nThere are " . $booboos . " bugs in the tracker on this package. " . $critical . " are critical.\n";
} else {
    $_SESSION['err'] = "Project " . $argv[1] . " does not exist!";
    header("Location: {$SITE_PREFIX}" . "t/home");
    exit(0);
}
示例#26
0
?>
</strong>&quot;</font>
</p>
<div class="lineBreak"></div>
<h3 class="heading">Services</h3>
<?php 
$service = new service();
$service->display_category();
?>
<br />



<h3 class="heading"> Featured Projects </h3>
<?php 
$projects = new project();
$projects_status = $projects->display_projects("featured", 1, $cat['id'], 0, 10, "order by rand()");
?>
<p align="right">
	<?php 
if ($user_check->checklogin() && strtoupper($_SESSION['foongigs_usertype']) == "SEEKER") {
    echo '<a href="post_project.php">Post Project</a>';
} else {
    if ($user_check->checklogin() && strtoupper($_SESSION['foongigs_usertype']) == "PROVIDER") {
        echo '<a href="post_project.php" onclick="javascript:messageBox(\'Only Seeker can post projects\'); return false;">Post Project</a>';
    } else {
        echo '<a href="post_project.php" onclick="javascript: messageBox(\'Please Login \'); return false;">Post Project</a>';
    }
}
if ($projects_status) {
    ?>
示例#27
0
<?php

session_start();
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/common.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/projectaccount.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/user.class.php";
$objuser = new user();
$objuser->checkLoginAjax();
$objproject = new project();
//$data=$objproject->getdetails($_GET['pid']);
$response = $objproject->cancelProject($_GET['pid']);
echo "script: messageBox('Your Project has been Cancelled',function() { window.location='account.php'; } );";
示例#28
0
<?php

session_start();
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/project.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/user.class.php";
$objuser = new user();
$objuser->checkLoginAjax();
$objproject = new project();
$data = $objproject->getdetails($_GET['pid']);
?>

<form method="post" action="ajax/project/placebid.php" onsubmit="if(validateForm(this)) submitFormOnFloat(this); return false;">
<input type="hidden" name="projectid" value="<?php 
echo $_GET['pid'];
?>
" >
<table width="100%">
<tr>
<td width="30%"></td>
<td width="70%"></td>
</tr>
<tr>
	<td colspan="2"><big><b>Bid on Project: <?php 
echo $data['project_title'];
?>
</b></big></td>
</tr>    

<tr>
<td colspan="2"><strong>Your bid details for the total project:</strong><br>
<small>(Project budget is $ <?php 
示例#29
0
<?php

/*
 * Copyright (C) 2006-2011 Alex Lance, Clancy Malcolm, Cyber IT Solutions
 * Pty. Ltd.
 * 
 * This file is part of the allocPSA application <*****@*****.**>.
 * 
 * allocPSA is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or (at
 * your option) any later version.
 * 
 * allocPSA is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
 * License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with allocPSA. If not, see <http://www.gnu.org/licenses/>.
*/
define("NO_REDIRECT", 1);
require_once "../alloc.php";
if ($_GET["projectStatus"]) {
    usleep(400000);
    $options = project::get_list_dropdown_options($_GET["projectStatus"]);
    echo "<select name=\"copy_projectID\">" . $options . "</select>";
}
?>

示例#30
0
{
	providerid=document.getElementById('provider_'+pid).value;
	loadPage('/ajax/project/selectprovider.php?projectid='+pid+'&providerid='+providerid);
}

function cancelprovider(pid)
{
	loadPage('/ajax/project/cancelprovider.php?projectid='+pid);
}


</script>
<div style="height:20px; clear:both;"></div>
<strong>List of All Projects You have Posted</strong>
<?php 
    $projectac = new project();
    $projectlist = $projectac->getAllProjectList();
    $objcommon = new common();
    if (is_array($projectlist)) {
        ?>
        <div id="account_open_projects" style="clear:both; width:100%;">
        <table width="100%">
        <tr class="heading"><td>Project Title</td><td>Date</td><td>Status</td><td>Edit</td><td>Option</td><td>Select Provider</td></tr>
            <?php 
        foreach ($projectlist as $data) {
            $pstatus = $projectac->getStatus($data['id']);
            if ($pstatus == "open") {
                $pstatus = '<font style="color:green;">Open</font>';
            }
            if ($pstatus == "frozen") {
                $pstatus = '<font style="color:blue;">Frozen</font>';