示例#1
0
function RenderAppendedData($a)
{
    global $wid;
    $author = "";
    $date = "";
    $text = "";
    $picid = 0;
    $picurl_thumb = "";
    $sys = false;
    if (!empty($a["AuthorName"])) {
        $author = $a["AuthorName"];
    }
    if (!empty($a["DateCreated"])) {
        $date = $a["DateCreated"];
    }
    if (!empty($a["TextInfo"])) {
        $text = $a["TextInfo"];
    }
    if (!empty($a["PicID"])) {
        $picid = intval($a["PicID"]);
    }
    if (empty($a["UserID"])) {
        $sys = true;
    }
    if ($picid > 0) {
        $picfile_thumb = PicPathName($picid, "thumb");
        if (file_exists($picfile_thumb)) {
            $picurl_thumb = PicUrl($picid, "thumb");
        }
    }
    echo '<div class="wo_ap_block">';
    echo '<div class="wo_ap_header">';
    if (!$sys) {
        echo '<div class="wo_ap_author">' . $author . '</div>' . "\n";
    }
    echo '<div class="wo_ap_date">' . $date . '</div>' . "\n";
    echo '</div>' . "\n";
    echo '<div class="wo_ap_body">';
    if (!empty($picurl_thumb)) {
        echo '<div class="wo_ap_image">';
        echo '<a href="display_image.php?picid=' . $picid . "&wid=" . $wid . '"><img src="' . $picurl_thumb . '"></a>';
        echo '</div>';
        echo '<div class="wo_ap_text_i">' . $text . '</div>' . "\n";
    } else {
        if (!$sys) {
            echo '<div class="wo_ap_text">' . $text . '</div>' . "\n";
        } else {
            echo '<div class="wo_ap_text_sys">' . $text . '</div>' . "\n";
        }
    }
    echo '</div>' . "\n";
    echo '</div>' . "\n";
    echo '<div style="clear: both;"></div>' . "\n";
}
示例#2
0
    $data["AuthorID"] = $userid;
    $data["DateNeedBy"] = $dtt;
    $data["DateCreated"] = date('Y-m-d');
    $data["Assigned"] = false;
    $data["Approved"] = false;
    $data["ApprovedByCap"] = false;
    $data["Finished"] = false;
    $data["Closed"] = false;
    $data["Active"] = true;
    $r = CreateNewWorkOrder($data);
    if ($r[1] !== true) {
        $error_msg = $r[1];
        $doform = true;
        goto GenerateHtml;
    }
    $wid = $r[0];
    PopulateParamList($param_list, $data);
    $success_msg = "New work order " . WIDStrHtml($wid, 0, false) . " created!";
    $link_to_view = "wo_display.php?wid=" . $wid;
    $doform = false;
}
GenerateHtml:
$picid = GetPicIDForUserID($userid);
if ($picid > 0) {
    $picurl = PicUrl($picid, "thumb");
}
$stylesheet = array("../css/global.css", "../css/nav.css", "../css/wo_new.css");
include "forms/header.php";
include "forms/nav_form.php";
include "forms/wo_new_form.php";
include "forms/footer.php";
示例#3
0
    if (empty($_GET["wid"])) {
        DieWithMsg($loc, "No WID given.");
    }
    if (empty($_GET["picid"])) {
        DieWithMsg($loc, "No picid given.");
    }
    $wid = intval($_GET["wid"]);
    $wo = GetWO($wid);
    $picid = intval($_GET["picid"]);
    $pagetabtitle = "Epic " . $wo["WIDStr"];
    $pagetitle = "Picture for Work Order";
    $piccaption = GetPicCaption($wid, $picid);
    if ($picid > 0) {
        $picfile = PicPathName($picid, "orig");
        if (file_exists($picfile)) {
            $picurl = PicUrl($picid, "orig");
        }
    }
    if (empty($picurl)) {
        $error_msg = "Unable to find Pic... Sorry.";
    }
    goto GenerateHtml;
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $error_msg = "You should not be able to access this page in this way.";
    goto GenerateHtml;
}
GenerateHtml:
$stylesheet = array("../css/global.css", "../css/nav.css", "../css/wo_head.css", "../css/display_image.css");
include "forms/header.php";
include "forms/nav_form.php";
示例#4
0
 public function BestPicUrl()
 {
     if ($this->BestPicID == 0) {
         return "img/nopic.jpg";
     } else {
         return PicUrl($this->BestPicID, "thumb");
     }
 }
示例#5
0
    if (!$wo) {
        $doform = false;
        $error_msg = "This Work Order doesn't seem to exist.";
        goto GenerateHtml;
    }
    $pagetabtitle = "Epic " . $wo["WIDStr"];
    $pagetitle = "Work Order";
    $ap = GetAppendedData($wid);
    $assigned_workers = GetAssignedWorkers($wid);
    $wo["Description"] = wordwrap($wo["Description"], 65, "\n", true);
    $picinfo = GetPrimaryPicInfo($wid);
    if ($picinfo) {
        $picid = $picinfo["PicID"];
        $primarypic = PicPathName($picid, "tiny");
        if (file_exists($primarypic)) {
            $primarypic_url = PicUrl($picid, "tiny");
            $primarypic_ref = 'display_image.php?picid=' . $picid . '&wid=' . $wid;
        }
    }
    goto GenerateHtml;
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    goto GenerateHtml;
}
GenerateHtml:
$stylesheet = array("../css/global.css", "../css/nav.css", "../css/wo_head.css", "../css/wo_display.css");
include "forms/header.php";
include "forms/nav_form.php";
include "forms/wo_display_menubar.php";
include "forms/wo_display_form.php";
include "forms/footer.php";