function renderInsertReport()
{
    $wysacSavedReportVisibleClass = '';
    $wysacDropzoneClass = '';
    $saved_report_id = getReport();
    // Check if a report has already been uploaded.
    if ($saved_report_id) {
        // If report exist, make detail info visible, hide upload functionality
        // make report information box visible
        $wysacSavedReportVisibleClass = 'class="visible"';
        // hide the upload report box. One PDf per post.
        $wysacDropzoneClass = 'class="hideDropzone"';
    }
    // hidden unless report exists
    echo "<div id=\"wysacSavedReport\" {$wysacSavedReportVisibleClass}>\n" . "<input type=\"hidden\" name=\"saved_report_id\" value=\"{$saved_report_id}\" id=saved_report_id=\"saved_report_id\" />" . "<p>The saved report link for this post: <a href=\"http://wysac.uwyo.edu/wysac/ReportView.aspx?DocId={$saved_report_id}&A=1\">Link</a></p>" . "<p><a id=\"deleteReport\" rel=\"{$saved_report_id}\" id=\"reportLink\">Click here to delete this report.</a></p>" . "</div>";
    // visible unless report exists
    echo "<div id=\"wysacDropzone\" {$wysacDropzoneClass}>";
    ?>

	<div id="uploadReportContainer">
        <div style="clear: both">
        	<p>After finalizing your report, upload a PDF of your report exported from Word. Upload your PDF file when you are ready to publish this post. If you are not ready to publish this post, skip this step for now.</p>
        	<p class="reportNotice" style="color: #900">This final should be the absolute, final version of your report.</p>
        		<label for="upload_report_publication_number">Publication Number</label><br>
        		<input type="text" name="upload_report_publication_number" id="upload_report_publication_number" value="">
        	</p>
        </div>

        <div style="clear: both; min-height: 100px">	
        	<p style="float: left; width: 200px;">
        		<label for="upload_report_document_category">Document Category</label><br>
        		<select name="report_type_id" id="report_type_id">
        			<option value="2">Fact Sheet</option>
        			<option value="3">Issue Brief</option>
        			<option value="4">Technical Report</option>
        			<option value="5">Other Resources</option>
        		</select>
        	</p>	
        	<p style="float: left; width: 100px;">
        		<label for="report_scope_id">Scope of Data</label><br>
        		<select name="report_scope_id" id="report_scope_id">
        			<option value="1">State</option>
        			<option value="2">Region</option>
        			<option value="3">County</option>
        		</select>
        	</p>
        	<p style="float: left; width: 200px;">
        		<label for="report_owner_author_id">Author(s)</label><br/>
        		<?php 
    echo wysac_show_all_authors();
    ?>
        </div>
        <div id="dropzoneContainer">
        	<div id="dropzone"></div>
        </div>
	</div>
</div>
<?php 
}
Пример #2
0
function getAllActiveReportsByBatch($obj)
{
    $conn = getConnection();
    $list = array();
    $query = "SELECT * FROM report WHERE batchID='" . $obj->getID() . "' AND activeflag = 1 ORDER BY type DESC, datereport DESC";
    //echo $query;
    $result = mysql_query($query);
    while ($member = mysql_fetch_array($result)) {
        $temp = getReport($member['ID']);
        array_push($list, $temp);
    }
    if (count($list) != 0) {
        return $list;
    }
    return NULL;
}
 function getBalance()
 {
     getReport();
     return $this->balance;
 }
Пример #4
0
$p->addTab($prefix . "tab{$i}", _T($tab, 'inventory'), "", "modules/inventory/inventory/view_part.php", array('uuid' => $_GET['uuid'], 'hostname' => $_GET['hostname'], 'part' => $tab, 'gid' => $gid, 'groupname' => $groupname));
$tab = 'Hardware';
$i = 0;
$p->addTab($prefix . "tab{$i}", _T($tab, 'inventory'), "", "modules/inventory/inventory/view_part.php", array('uuid' => $_GET['uuid'], 'hostname' => $_GET['hostname'], 'part' => $tab, 'gid' => $gid, 'groupname' => $groupname));
$tab = 'Storage';
$i = 8;
$p->addTab($prefix . "tab{$i}", _T($tab, 'inventory'), "", "modules/inventory/inventory/view_part.php", array('uuid' => $_GET['uuid'], 'hostname' => $_GET['hostname'], 'part' => $tab, 'gid' => $gid, 'groupname' => $groupname));
/* $tab = 'Bios';
  $i = 5;
  $p->addTab($prefix . "tab$i", _T($tab, 'inventory'), "", "modules/inventory/inventory/view_part.php", array('uuid' => $_GET['uuid'], 'hostname' => $_GET['hostname'], 'part' => $tab, 'gid' => $gid, 'groupname' => $groupname));
 */
$i = 1;
foreach (array('Network', 'Software', 'Registry') as $tab) {
    // , 'Administrative'
    $p->addTab($prefix . "tab{$i}", _T($tab, 'inventory'), "", "modules/inventory/inventory/view_part.php", array('uuid' => $_GET['uuid'], 'hostname' => $_GET['hostname'], 'part' => $tab, 'gid' => $gid, 'groupname' => $groupname));
    $i++;
}
$tab = 'History';
$i++;
$p->addTab($prefix . "tab{$i}", _T('History', 'inventory'), "", "modules/inventory/inventory/history.php", array('uuid' => $_GET['uuid'], 'hostname' => $_GET['hostname'], 'part' => $tab, 'gid' => $gid, 'groupname' => $groupname));
$p->display();
$uuid = $_GET['uuid'];
if (isset($uuid)) {
    $f = new ValidatingForm();
    print "<br><br>";
    $result['xls_path'] = getReport($uuid, $_SESSION['lang']);
    $link = new SpanElement(sprintf('<br /><a class="btn btn-primary" href="%s">%s</a>&nbsp;&nbsp;', urlStrRedirect("base/computers/get_file", array('path' => $result['xls_path'])), _T("Get XLS Report", "inventory")));
    $f->add($link);
    $f->pop();
    $f->display();
}
Пример #5
0
$client = new Client($gwUrl, $serialNumber, $password, $sessionKey, $proxyhost, $proxyport, $proxyusername, $proxypassword, $connectTimeOut, $readTimeOut);
/**
 * 发送向服务端的编码,如果本页面的编码为GBK,请使用GBK
 */
$client->setOutgoingEncoding("GBK");
// login();   //激活序列号
// updatePassword();  //修改密码
// logout();          //注销序列号
// registDetailInfo();//注册企业信息
// getEachFee();      //得到单价
// getMO();           //接收短信
// getVersion();      //得到版本号
//sendSMS();         //发送短信
// getBalance();      //得到余额
// chargeUp();        //充值
getReport();
//----------------------------------------------------------------------
// 注:
// 1. 下面是各接口的使用用例,Client.php 还有每一个接口更详细的参数说明
// 2. 凡是返回 $statusCode 的, 都是相关操作的状态码
// 3. 由于php是弱类型语言,当服务端没返回时,也会等同认为 $statusCode=='0', 所以在判断时应该使用 if ($statusCode!=null && $statusCode==0)
//----------------------------------------------------------------------
/**
 * 得到上行短信 用例
 */
function getMO()
{
    global $client;
    $moResult = $client->getMO();
    echo "返回数量:" . count($moResult);
    foreach ($moResult as $mo) {
Пример #6
0
 $studentsAppointmentData = Appointment::getAllStudentsWithAppointment($appointmentId);
 $terms = TermFetcher::retrieveCurrTerm();
 $students = StudentFetcher::retrieveAll();
 $courses = CourseFetcher::retrieveForTerm($studentsAppointmentData[0][AppointmentFetcher::DB_COLUMN_TERM_ID]);
 $instructors = InstructorFetcher::retrieveAll();
 $tutors = TutorFetcher::retrieveAll();
 $startDateTime = new DateTime($studentsAppointmentData[0][AppointmentFetcher::DB_COLUMN_START_TIME]);
 $endDateTime = new DateTime($studentsAppointmentData[0][AppointmentFetcher::DB_COLUMN_END_TIME]);
 $nowDateTime = new DateTime();
 // load reports if they have been created
 if (reportsHaveBeenCrtd($studentsAppointmentData)) {
     $reports = Report::getAllWithAppointmentId($appointmentId);
 }
 if (isBtnUpdateReportPrsd() || isBtnCompleteReportPrsd()) {
     $formReportId = isset($_POST['form-update-report-id']) ? $_POST['form-update-report-id'] : '';
     $reportUpdate = getReport($formReportId, $reports);
     $projectTopicOtherNew = isset($_POST['project-topic-other']) ? $_POST['project-topic-other'] : '';
     $otherTextArea = isset($_POST['other_text_area']) ? $_POST['other_text_area'] : '';
     $studentsConcernsTextArea = isset($_POST['students-concerns-textarea']) ? $_POST['students-concerns-textarea'] : '';
     $studentBroughtAlong = isset($_POST['student-brought-along']) ? $_POST['student-brought-along'] : null;
     $conclusionAdditionalComments = isset($_POST['conclusion-additional-comments']) ? $_POST['conclusion-additional-comments'] : '';
     $studentBroughtAlongNew = isset($_POST['student-brought-along']) ? $_POST['student-brought-along'] : null;
     $primaryFocusOfConferenceNew = isset($_POST['primary-focus-of-conference']) ? $_POST['primary-focus-of-conference'] : null;
     $relevantFeedbackGuidelines = isset($_POST['relevant-feedback-guidelines']) ? $_POST['relevant-feedback-guidelines'] : null;
     $conclusionWrapUpNew = isset($_POST['conclusion-wrap-up']) ? $_POST['conclusion-wrap-up'] : null;
     $studentBroughtAlongOld = [StudentBroughtAlongFetcher::DB_COLUMN_ASSIGNMENT_GRADED => $reportUpdate[StudentBroughtAlongFetcher::DB_COLUMN_ASSIGNMENT_GRADED], StudentBroughtAlongFetcher::DB_COLUMN_DRAFT => $reportUpdate[StudentBroughtAlongFetcher::DB_COLUMN_DRAFT], StudentBroughtAlongFetcher::DB_COLUMN_INSTRUCTORS_FEEDBACK => $reportUpdate[StudentBroughtAlongFetcher::DB_COLUMN_INSTRUCTORS_FEEDBACK], StudentBroughtAlongFetcher::DB_COLUMN_TEXTBOOK => $reportUpdate[StudentBroughtAlongFetcher::DB_COLUMN_TEXTBOOK], StudentBroughtAlongFetcher::DB_COLUMN_NOTES => $reportUpdate[StudentBroughtAlongFetcher::DB_COLUMN_NOTES], StudentBroughtAlongFetcher::DB_COLUMN_ASSIGNMENT_SHEET => $reportUpdate[StudentBroughtAlongFetcher::DB_COLUMN_ASSIGNMENT_SHEET], StudentBroughtAlongFetcher::DB_COLUMN_EXERCISE_ON => $reportUpdate[StudentBroughtAlongFetcher::DB_COLUMN_EXERCISE_ON], StudentBroughtAlongFetcher::DB_COLUMN_OTHER => $reportUpdate[StudentBroughtAlongFetcher::DB_COLUMN_OTHER]];
     $primaryFocusOfConferenceOld = [PrimaryFocusOfConferenceFetcher::DB_COLUMN_DISCUSSION_OF_CONCEPTS => $reportUpdate[PrimaryFocusOfConferenceFetcher::DB_COLUMN_DISCUSSION_OF_CONCEPTS], PrimaryFocusOfConferenceFetcher::DB_COLUMN_ORGANIZATION_THOUGHTS_IDEAS => $reportUpdate[PrimaryFocusOfConferenceFetcher::DB_COLUMN_ORGANIZATION_THOUGHTS_IDEAS], PrimaryFocusOfConferenceFetcher::DB_COLUMN_EXPRESSION_GRAMMAR_SYNTAX_ETC => $reportUpdate[PrimaryFocusOfConferenceFetcher::DB_COLUMN_EXPRESSION_GRAMMAR_SYNTAX_ETC], PrimaryFocusOfConferenceFetcher::DB_COLUMN_EXERCISES => $reportUpdate[PrimaryFocusOfConferenceFetcher::DB_COLUMN_EXERCISES], PrimaryFocusOfConferenceFetcher::DB_COLUMN_ACADEMIC_SKILLS => $reportUpdate[PrimaryFocusOfConferenceFetcher::DB_COLUMN_ACADEMIC_SKILLS], PrimaryFocusOfConferenceFetcher::DB_COLUMN_CITATIONS_REFERENCING => $reportUpdate[PrimaryFocusOfConferenceFetcher::DB_COLUMN_CITATIONS_REFERENCING], PrimaryFocusOfConferenceFetcher::DB_TABLE . "_" . PrimaryFocusOfConferenceFetcher::DB_COLUMN_OTHER => $reportUpdate[PrimaryFocusOfConferenceFetcher::DB_TABLE . "_" . PrimaryFocusOfConferenceFetcher::DB_COLUMN_OTHER]];
     $conclusionWrapUpOld = [ConclusionWrapUpFetcher::DB_COLUMN_QUESTIONS_ADDRESSED => $reportUpdate[ConclusionWrapUpFetcher::DB_COLUMN_QUESTIONS_ADDRESSED], ConclusionWrapUpFetcher::DB_COLUMN_ANOTHER_SCHEDULE => $reportUpdate[ConclusionWrapUpFetcher::DB_COLUMN_ANOTHER_SCHEDULE], ConclusionWrapUpFetcher::DB_COLUMN_CLARIFY_CONCERNS => $reportUpdate[ConclusionWrapUpFetcher::DB_COLUMN_CLARIFY_CONCERNS]];
     if (isBtnUpdateReportPrsd()) {
         $updateDone = Report::updateProjectTopicOtherText($reportUpdate[ReportFetcher::DB_COLUMN_ID], $reportUpdate[ReportFetcher::DB_COLUMN_PROJECT_TOPIC_OTHER], $projectTopicOtherNew);
         $updateDone = Report::updateOtherText($reportUpdate[ReportFetcher::DB_COLUMN_ID], $reportUpdate[ReportFetcher::DB_COLUMN_OTHER_TEXT_AREA], $otherTextArea) || $updateDone;
Пример #7
0
 function getCommonReportByBatch()
 {
     $conn = getConnection();
     $list = array();
     if ($this->getType() == 1) {
         $query = "SELECT * FROM report WHERE type = 1 AND indentifier = '" . $this->getIndentifier() . "' AND activeflag = 1 ORDER BY ID ASC";
         //echo $query;
         $result = mysql_query($query);
         while ($member = mysql_fetch_array($result)) {
             $temp = getReport($member['ID']);
             array_push($list, $temp);
         }
         if (count($list) != 0) {
             return $list;
         }
         return NULL;
     } else {
         $temp = getReport($this->ID);
         array_push($list, $temp);
         return $list;
     }
 }
Пример #8
0
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/
//MAKE SURE THE ID IS SET AND IS A NUMBER
if (isset($_GET["id"]) && is_numeric($_GET["id"])) {
    $id = $_GET["id"];
} else {
    //STOP EXECUTION IF THERE IS A PROBLEM
    die("Error: Invalid ID.");
}
//REPORTS ARE IN XML FORMAT SO MAKE SURE THE USER'S BROWSER KNOWS THAT
header("Content-Type:text/xml");
//INCLUDE FUNCTION getReport() FOR READING REPORT FROM WEB SERVICE
include "includes/wsutils.php";
//GET THE REPORT FROM THE WEB SERVICE
try {
    $result = getReport($id);
} catch (SoapFault $fault) {
    header("Content-Type:text");
    if ($fault->faultstring == "Not Found") {
        echo "<h1>" . $fault->faultstring . "</h1>";
        header('HTTP/1.0 404 Not Found');
        echo "<p>The requested report (" . $id . ") does not exist.</p>";
    } else {
        if ($fault->faultstring == "Internal Server Error") {
            echo "<h1>" . $fault->faultstring . "</h1>";
            header('HTTP/1.0 500 Internal Server Error');
            echo "<p>An error occurred while retrieving requested report (" . $id . ").</p>";
        } else {
            echo "<h1>SOAP Exception</h1>";
            echo "<p>" . $fault->faultstring . "</p>";
        }
Пример #9
0
 function getContent($modus)
 {
     global $db_game, $params;
     $content = "";
     switch ($modus) {
         case 'questionnaire_create':
             $template = tmpl_open("modules/Module_Questionnaire/templates/create.ihtml");
             // Form Submitted
             if (isset($params->creator)) {
                 $laufzeit = max(0, intval($params->laufzeit));
                 $credits = max(0, intval($params->credits));
                 $choices = array();
                 for ($i = 1; $i <= sizeof($params->choiceID); ++$i) {
                     if ($params->choiceID[$i] == "") {
                         break;
                     }
                     $choices[$i] = strval($params->choiceID[$i]);
                 }
                 if (!sizeof($choices)) {
                     tmpl_set($template, "MESSAGE/message", "Keine Antworten!");
                 } else {
                     $query = "INSERT INTO Questionnaire_questions " . "(questionText, expiresOn, credits) " . "VALUES ('{$params->questionText}', " . "(NOW() + INTERVAL {$laufzeit} DAY) + 0, {$credits})";
                     if (!$db_game->query($query)) {
                         die("Datenbankfehler beim Eintragen der Frage!");
                     }
                     $questionID = $db_game->insertID();
                     foreach ($choices as $key => $value) {
                         $query = "INSERT INTO Questionnaire_choices " . "(questionID, choiceID, choiceText) " . "VALUES ({$questionID}, {$key}, '{$value}')";
                         if (!$db_game->query($query)) {
                             die("Datenbankfehler beim Eintragen der Antwort [{$key}]!");
                         }
                     }
                     tmpl_set($template, "MESSAGE/message", "Frage eingetragen!");
                 }
             } else {
                 $numChoices = intval(3 + $params->moreChoices);
                 tmpl_set($template, "FORM/moreChoices", $numChoices);
                 for ($i = 1; $i <= $numChoices; ++$i) {
                     tmpl_iterate($template, 'FORM/CHOICE');
                     tmpl_set($template, 'FORM/CHOICE/choiceID', $i);
                 }
             }
             $content = tmpl_parse($template);
             break;
         case 'questionnaire_report':
             $template = tmpl_open("modules/Module_Questionnaire/templates/report.ihtml");
             if (sizeof($questions = getQuestions($db_game))) {
                 tmpl_set($template, 'QUESTIONS/QUESTION', $questions);
             }
             if (isset($params->questionID)) {
                 if (sizeof($report = getReport($db_game, $questions[$params->questionID]))) {
                     tmpl_set($template, 'RESULT', $report);
                 }
             }
             $content = tmpl_parse($template);
             break;
         case 'questionnaire_snails':
             $template = tmpl_open("modules/Module_Questionnaire/templates/snails.ihtml");
             // Form Submitted
             if (isset($params->creator)) {
                 // TODO snailNumber checken
                 $credits = (int) $params->snailNumber;
                 // TODO Namen checken.. zB auf %
                 $player = $params->snailPlayer;
                 $query = "UPDATE Player " . "SET questionCredits = questionCredits + {$credits} " . "WHERE name = '{$player}' LIMIT 1";
                 if (!$db_game->query($query)) {
                     die("Datenbankfehler beim Eintragen der Schnecken!: {$query}");
                 }
                 if ($db_game->affected_rows() == 1) {
                     tmpl_set($template, 'MESSAGE/message', "'{$player}' got {$credits} more snails.");
                 } else {
                     tmpl_set($template, 'MESSAGE/message', "No such player: '{$player}' ?");
                 }
             }
             $content = tmpl_parse($template);
             break;
         case 'questionnaire_cross':
             $template = tmpl_open("modules/Module_Questionnaire/templates/cross.ihtml");
             // Form Submitted
             if (isset($params->crossing)) {
                 $sql = "SELECT a1.choiceID, a2.choiceID, COUNT(*) " . "FROM Questionnaire_answers a1 " . "LEFT JOIN Questionnaire_answers a2 " . "ON a1.playerID = a2.playerID AND " . "a2.questionID = 10 " . "WHERE a1.questionID = 20 GROUP BY a1.choiceID, a2.choiceID";
             }
             if (sizeof($questions = getQuestions($db_game))) {
                 tmpl_set($template, 'QUESTIONONE', $questions);
                 tmpl_set($template, 'QUESTIONTWO', $questions);
             }
             $content = tmpl_parse($template);
             break;
     }
     return $content;
 }
Пример #10
0
    ?>
                        </td>
                    </tr>
                <?php 
}
?>
                </tbody>
            </table>
            <div class="text-right">
                <ul class="pagination"></ul>
            </div>
        </fieldset>
    </div>
    <?php 
require_once SG_PUBLIC_INCLUDE_PATH . '/footer.php';
?>
    <?php 
if (time() - SGConfig::get('SG_LAST_REPORT_DATE') > SG_REPORT_INTERVAL && SGConfig::get('SG_SEND_ANONYMOUS_STATISTICS') !== '0') {
    $report = base64_encode(getReport());
    SGConfig::set('SG_LAST_REPORT_DATE', time());
    ?>
        <script type="text/javascript">jQuery.post('https://backup-guard.com/tms/api', {report: "<?php 
    echo $report;
    ?>
"});</script>
    <?php 
}
?>
</div>
<div class="clearfix"></div>