Exemplo n.º 1
0
    $project->select();
}
// Comments
$TPL["comment_buttons"] = "<input type=\"submit\" name=\"comment_save\" value=\"Save Comment\">";
// if someone uploads an attachment
if ($_POST["save_attachment"]) {
    move_attachment("project", $projectID);
    alloc_redirect($TPL["url_alloc_project"] . "projectID=" . $projectID . "&sbs_link=attachments");
}
$project->set_values("project_");
$db = new db_alloc();
$clientID = $project->get_value("clientID") or $clientID = $_GET["clientID"];
$client = new client();
$client->set_id($clientID);
$client->select();
$client->set_tpl_values("client_");
// If a client has been chosen
if ($clientID) {
    $query = prepare("SELECT * \n                      FROM clientContact\n                     WHERE clientContact.clientID = %d AND clientContact.primaryContact = true", $clientID);
    $db->query($query);
    $cc = new clientContact();
    $cc->read_db_record($db);
    $one = $client->format_address("postal");
    $two = $client->format_address("street");
    $thr = $cc->format_contact();
    $fou = $project->format_client_old();
    $temp = str_replace("<br>", "", $fou);
    $temp and $thr = $fou;
    $url = $TPL["url_alloc_client"] . "clientID=" . $clientID;
    if ($project->get_value("clientContactID")) {
        $cc = new clientContact();