Ejemplo n.º 1
0
				<th align="left" nowrap="nowrap">&nbsp;</th>
			</tr>
		<?php 
        while ($attachmentrecord = $db->fetchArray($attchmentsquery)) {
            ?>
			<tr>
				<td nowrap="nowrap"><?php 
            echo $attachmentrecord["displayname"];
            ?>
</td>
				<td><?php 
            echo $attachmentrecord["recordid"];
            ?>
</td>
				<td align="right" nowrap="nowrap"><?php 
            echo formatFromSQLDatetime($attachmentrecord["creationdate"]);
            ?>
</td>
				<td>
					<button class="graphicButtons buttonEdit" type="button" onclick="document.location='<?php 
            echo APP_PATH . $attachmentrecord["editfile"] . "?id=" . $attachmentrecord["recordid"];
            ?>
'"><span>edit</span></button>
				</td>
			</tr>
	<?php 
        }
        ?>
</table></div></div><?php 
    }
}
Ejemplo n.º 2
0
    function showGeneralInfo($phpbms, $therecord)
    {
        ?>
<div id="createmodifiedby" >
    <table>
        <tbody>
            <tr class="topRows">
                <td class="cmTitles">
                        <input name="createdby" type="hidden" value="<?php 
        $therecord["createdby"];
        ?>
" />
                        <input name="creationdate" type="hidden" value="<?php 
        echo formatFromSQLDatetime($therecord["creationdate"]);
        ?>
"/>
                        created
                </td>
                <td><?php 
        echo htmlQuotes($phpbms->getUserName($therecord["createdby"]));
        ?>
</td>
                <td><?php 
        echo formatFromSQLDatetime($therecord["creationdate"]);
        ?>
</td>
                <td id="cmButtonContainer" rowspan="3">
                    <?php 
        showSaveCancel(2);
        ?>
                </td>
            </tr>
            <tr class="topRows">
                <td class="cmTitles">
                        <input name="modifiedby" type="hidden" value="<?php 
        $therecord["modifiedby"];
        ?>
" />
                        <input id="cancelclick" name="cancelclick" type="hidden" value="0" />
                        <input name="modifieddate" type="hidden" value="<?php 
        echo formatFromSQLDatetime($therecord["modifieddate"]);
        ?>
"/>
                        modified
                </td>
                <td><?php 
        echo htmlQuotes($phpbms->getUserName($therecord["modifiedby"]));
        ?>
</td>
                <td><?php 
        echo formatFromSQLDatetime($therecord["modifieddate"]);
        ?>
</td>
            </tr>
            <tr>
                <td class="cmTitles">
                        uuid / id
                        <input name="uuid" id="uuid" type="hidden" value="<?php 
        if (isset($therecord["uuid"])) {
            echo $therecord["uuid"];
        }
        ?>
" />
                        <input id="id" name="id" type="hidden" value="<?php 
        echo $therecord["id"];
        ?>
" />
                </td>
                <td colspan="2" id="cmIds"><span><?php 
        echo isset($therecord["uuid"]) ? $therecord["uuid"] : '&nbsp;';
        ?>
</span><span id="cmId"><?php 
        echo $therecord["id"];
        ?>
</span></td>
            </tr>
        </tbody>
    </table>
</div>
        <?php 
    }
Ejemplo n.º 3
0
function formatVariable($value, $format = NULL)
{
    switch ($format) {
        case "real":
            $value = number_format($value, 2);
            break;
        case "currency":
            $value = htmlQuotes(numberToCurrency($value));
            break;
        case "boolean":
            $value = booleanFormat($value);
            break;
        case "date":
            $value = formatFromSQLDate($value);
            break;
        case "time":
            $value = formatFromSQLTime($value);
            break;
        case "datetime":
            $value = formatFromSQLDatetime($value);
            break;
        case "filelink":
            $value = "<button class=\"graphicButtons buttonDownload\" type=\"button\" onclick=\"document.location='" . APP_PATH . "servefile.php?i=" . $value . "'\"><span>download</span></button>";
            //$value="<a href=\"".APP_PATH."servefile.php?i=".$value."\" style=\"display:block;\"><img src=\"".APP_PATH."common/stylesheet/".STYLESHEET."/image/button-download.png\" align=\"middle\" alt=\"view\" width=\"16\" height=\"16\" border=\"0\" /></a>";
            break;
        case "invoice":
            if ($value > 0 and $value != 9999999) {
                $value = "<a href=\"" . APP_PATH . "modules/bms/invoices_addedit.php?id={$value}\">{$value}</a>";
            }
            break;
        case "client":
            $value = "<a href=\"" . APP_PATH . "modules/bms/clients_addedit.php?id={$value}\">{$value}</a>";
            break;
        case "noencoding":
            $value = $value;
            break;
        case "bbcode":
            $value = htmlQuotes($value);
            // This list needs to be expanded
            $bbcodelist["[b]"] = "<strong>";
            $bbcodelist["[/b]"] = "</strong>";
            $bbcodelist["[br]"] = "<br />";
            $bbcodelist["[space]"] = "&nbsp;";
            foreach ($bbcodelist as $bbcode => $translation) {
                $value = str_replace($bbcode, $translation, $value);
            }
            break;
        default:
            $value = htmlQuotes($value);
    }
    return $value;
}
Ejemplo n.º 4
0
 function getRecord($id = 0, $useUuid = false)
 {
     $therecord = parent::getRecord($id, $useUuid);
     if ($therecord["job"]) {
         $therecord["scripttype"] = "job";
     } else {
         $therecord["scripttype"] = "pushrecord";
     }
     $datearray = explode(" ", $therecord["startdatetime"]);
     $therecord["startdate"] = $datearray[0];
     if (isset($datearray[1])) {
         $therecord["starttime"] = $datearray[1];
     } else {
         $therecord["starttime"] = "";
     }
     $datearray = explode(" ", $therecord["enddatetime"]);
     $therecord["enddate"] = $datearray[0];
     if (isset($datearray[1])) {
         $therecord["endtime"] = $datearray[1];
     } else {
         $therecord["endtime"] = "";
     }
     $cronarray = explode("::", $therecord["crontab"]);
     if (isset($cronarray[0])) {
         $therecord["min"] = $cronarray[0];
     } else {
         $therecord["min"] = "*";
     }
     if (isset($cronarray[1])) {
         $therecord["hrs"] = $cronarray[1];
     } else {
         $therecord["hrs"] = "*";
     }
     if (isset($cronarray[2])) {
         $therecord["date"] = $cronarray[2];
     } else {
         $therecord["date"] = "*";
     }
     if (isset($cronarray[3])) {
         $therecord["mo"] = $cronarray[3];
     } else {
         $therecord["mo"] = "*";
     }
     if (isset($cronarray[4])) {
         $therecord["day"] = $cronarray[4];
     } else {
         $therecord["day"] = "*";
     }
     $therecord["lastrun"] = formatFromSQLDatetime($therecord["lastrun"]);
     return $therecord;
 }
Ejemplo n.º 5
0
    echo formatFromSQLDatetime($therecord["creationdate"]);
    ?>
</td>
		</tr>
		<tr>
			<td class="cmTitles">
				<input name="modifiedby" type="hidden" value="<?php 
    $therecord["modifiedby"];
    ?>
" />
				<input id="cancelclick" name="cancelclick" type="hidden" value="0" />
				<input name="modifieddate" type="hidden" value="<?php 
    echo formatFromSQLDatetime($therecord["modifieddate"]);
    ?>
"/>
				modified
			</td>
			<td><?php 
    echo htmlQuotes($phpbms->getUserName($therecord["modifiedby"]));
    ?>
</td>
			<td><?php 
    echo formatFromSQLDatetime($therecord["modifieddate"]);
    ?>
</td>
		</tr>
	</table>
</div>
<?php 
}
//endif