Exemple #1
0
    function main()
    {
        $this->PageSubtitle = "Send a Test Email";
        include_once "ddtable_adm_emails.php";
        Hidden("gp_page", "x_email");
        $table =& $GLOBALS["AG"]["tables"]["adm_emails"];
        $em = array("email_to" => CleanBox("email_to", "", false), "email_subject" => CleanBox("email_subject", "", false), "email_message" => CleanBox("email_message", "", false));
        // If this is postback, process the email before putting
        // the boxes back up.
        //
        if ($em["email_to"]) {
            X_EMAIL_SEND($em);
            echo "<p>The email to " . $em["email_to"] . " has been accepted " . "by the email server, please check your email system " . "to see if the server has successfully sent the email.</p>" . "You may also " . HTMLE_A_STD("View Sent Emails", 'adm_emails') . " or " . HTMLE_A_STD("Send another email", 'x_email') . "</p>";
            return;
        }
        // In this little trick we set "uino" to all of the columns
        // except the ones we are setting.
        foreach ($table["flat"] as $colname => $colinfo) {
            if ($colname == "email_to" || $colname == "email_subject" || $colname == "email_message") {
                continue;
            }
            $table["flat"][$colname]["uino"] = "Y";
        }
        ?>
		<?php 
        echo HTMLX_Errors();
        ?>
		<?php 
        echo ElementOut("msg", true);
        ?>
		
		
		<p>This is a very minimal page that can be used to verify that this system
			can send emails.  Enter a valid address, subject, and short message below
			and then click on the [SEND] button.</p>
			
		<table>
		<?php 
        echo $this->HTML_INPUTS($GLOBALS["AG"]["tables"]["adm_emails"], $em, "ins", true);
        ?>
		</table>
		
		
		<br>
		<br>
		<?php 
        echo HTMLE_A_JS("formSubmit()", "Send Email Now");
        ?>
		<?php 
    }
    function main()
    {
        echo "<h1>View Build Log</h1>";
        ?>
<p>Currently viewing the log for application code "
  <b><?php 
        echo gp('application');
        ?>
</b>".  Click any
   of the links below to see the logs for the particular application:</p>
<?php 
        // Run out list of apps they can see
        echo "<hr>\n";
        $results = SQL("select * from applications");
        while ($row = pg_fetch_array($results)) {
            echo HTMLE_A_STD($row["application"] . " - " . $row["description"], "a_builder_log", "gp_out=info&application=" . $row["application"]) . "<br>\n";
        }
        echo "<hr>\n";
        // Make up a filename
        global $AG;
        $t = pathinfo(__FILE__);
        $pLogDir = $t["dirname"];
        $pLogFile = "AndroDBB." . CleanGet("application") . ".log";
        $pLogPath = "{$pLogDir}/{$pLogFile}";
        if (!file_exists($pLogPath)) {
            echo "<p>There is no build log file for this application at this time.  This usually\n\t\t\t\tmeans that the application has not been built yet.  Try launching a build process\n\t\t\t\tand then coming back to this page.</p>";
            return;
        }
        //echo "<pre style=\"background-color: silver; color: blue\">";
        $fgc = file_get_contents($pLogPath);
        $fgc = str_replace("\n", "<br>", $fgc);
        echo "<div style=\"font: 10pt courier; color: navy;\">" . $fgc . "</div>";
        //echo file_get_contents($pLogPath);
        //echo "</pre>";
        return "View Build/Update Log for: " . CleanGet("application");
    }