/**
  * Save thesis. 
  */
 function execute()
 {
     $thesisPlugin =& PluginRegistry::getPlugin('generic', $this->parentPluginName);
     $thesisPlugin->import('Thesis');
     $thesisDao =& DAORegistry::getDAO('ThesisDAO');
     $journal =& Request::getJournal();
     $journalId = $journal->getId();
     $thesis = new Thesis();
     $thesis->setJournalId($journalId);
     $thesis->setStatus(THESIS_STATUS_INACTIVE);
     $thesis->setDegree($this->getData('degree'));
     $thesis->setDegreeName($this->getData('degreeName'));
     $thesis->setDepartment($this->getData('department'));
     $thesis->setUniversity($this->getData('university'));
     $thesis->setTitle($this->getData('title'));
     $thesis->setDateApproved($this->getData('dateApprovedYear') . '-' . $this->getData('dateApprovedMonth') . '-' . $this->getData('dateApprovedDay'));
     $thesis->setUrl(strtolower($this->getData('url')));
     $thesis->setAbstract($this->getData('abstract'));
     $thesis->setComment($this->getData('comment'));
     $thesis->setStudentFirstName($this->getData('studentFirstName'));
     $thesis->setStudentMiddleName($this->getData('studentMiddleName'));
     $thesis->setStudentLastName($this->getData('studentLastName'));
     $thesis->setStudentEmail($this->getData('studentEmail'));
     $thesis->setStudentEmailPublish($this->getData('studentEmailPublish') == null ? 0 : 1);
     $thesis->setStudentBio($this->getData('studentBio'));
     $thesis->setSupervisorFirstName($this->getData('supervisorFirstName'));
     $thesis->setSupervisorMiddleName($this->getData('supervisorMiddleName'));
     $thesis->setSupervisorLastName($this->getData('supervisorLastName'));
     $thesis->setSupervisorEmail($this->getData('supervisorEmail'));
     $thesis->setDiscipline($this->getData('discipline'));
     $thesis->setSubjectClass($this->getData('subjectClass'));
     $thesis->setSubject($this->getData('keyword'));
     $thesis->setCoverageGeo($this->getData('coverageGeo'));
     $thesis->setCoverageChron($this->getData('coverageChron'));
     $thesis->setCoverageSample($this->getData('coverageSample'));
     $thesis->setMethod($this->getData('method'));
     $thesis->setLanguage($this->getData('language'));
     $thesis->setDateSubmitted(Core::getCurrentDate());
     $thesisDao->insertThesis($thesis);
     // Send supervisor confirmation email
     if (!empty($this->uploadCodeEnabled)) {
         $uploadCode = $thesisPlugin->getSetting($journalId, 'uploadCode');
         $submittedUploadCode = $this->getData('uploadCode');
     }
     if (empty($uploadCode) || $uploadCode != $submittedUploadCode) {
         $journalName = $journal->getLocalizedTitle();
         $thesisName = $thesisPlugin->getSetting($journalId, 'thesisName');
         $thesisEmail = $thesisPlugin->getSetting($journalId, 'thesisEmail');
         $thesisPhone = $thesisPlugin->getSetting($journalId, 'thesisPhone');
         $thesisFax = $thesisPlugin->getSetting($journalId, 'thesisFax');
         $thesisMailingAddress = $thesisPlugin->getSetting($journalId, 'thesisMailingAddress');
         $thesisContactSignature = $thesisName;
         if (!empty($thesisMailingAddress)) {
             $thesisContactSignature .= "\n" . $thesisMailingAddress;
         }
         if (!empty($thesisPhone)) {
             $thesisContactSignature .= "\n" . Locale::Translate('user.phone') . ': ' . $thesisPhone;
         }
         if (!empty($thesisFax)) {
             $thesisContactSignature .= "\n" . Locale::Translate('user.fax') . ': ' . $thesisFax;
         }
         $thesisContactSignature .= "\n" . Locale::Translate('user.email') . ': ' . $thesisEmail;
         $studentName = $thesis->getStudentFirstName() . ' ' . $thesis->getStudentLastName();
         $supervisorName = $thesis->getSupervisorFirstName() . ' ' . $thesis->getSupervisorLastName();
         $paramArray = array('journalName' => $journalName, 'thesisName' => $thesisName, 'thesisEmail' => $thesisEmail, 'title' => $thesis->getTitle(), 'studentName' => $studentName, 'degree' => Locale::Translate($thesis->getDegreeString()), 'degreeName' => $thesis->getDegreeName(), 'department' => $thesis->getDepartment(), 'university' => $thesis->getUniversity(), 'dateApproved' => $thesis->getDateApproved(), 'supervisorName' => $supervisorName, 'abstract' => $thesis->getAbstract(), 'thesisContactSignature' => $thesisContactSignature);
         import('classes.mail.MailTemplate');
         $mail = new MailTemplate('THESIS_ABSTRACT_CONFIRM');
         $mail->setFrom($thesisEmail, "\"" . $thesisName . "\"");
         $mail->assignParams($paramArray);
         $mail->addRecipient($thesis->getSupervisorEmail(), "\"" . $supervisorName . "\"");
         $mail->addCc($thesis->getStudentEmail(), "\"" . $studentName . "\"");
         $mail->send();
     }
 }
 /**
  * Internal function to return a Thesis object from a row.
  * @param $row array
  * @return Thesis
  */
 function &_returnThesisFromRow(&$row)
 {
     $thesisPlugin =& PluginRegistry::getPlugin('generic', $this->parentPluginName);
     $thesisPlugin->import('Thesis');
     $thesis = new Thesis();
     $thesis->setId($row['thesis_id']);
     $thesis->setJournalId($row['journal_id']);
     $thesis->setStatus($row['status']);
     $thesis->setDegree($row['degree']);
     $thesis->setDegreeName($row['degree_name']);
     $thesis->setDepartment($row['department']);
     $thesis->setUniversity($row['university']);
     $thesis->setDateApproved($this->dateFromDB($row['date_approved']));
     $thesis->setTitle($row['title']);
     $thesis->setAbstract($row['abstract']);
     $thesis->setUrl($row['url']);
     $thesis->setComment($row['comment']);
     $thesis->setStudentFirstName($row['student_first_name']);
     $thesis->setStudentMiddleName($row['student_middle_name']);
     $thesis->setStudentLastName($row['student_last_name']);
     $thesis->setStudentEmail($row['student_email']);
     $thesis->setStudentEmailPublish($row['student_email_publish']);
     $thesis->setStudentBio($row['student_bio']);
     $thesis->setSupervisorFirstName($row['supervisor_first_name']);
     $thesis->setSupervisorMiddleName($row['supervisor_middle_name']);
     $thesis->setSupervisorLastName($row['supervisor_last_name']);
     $thesis->setSupervisorEmail($row['supervisor_email']);
     $thesis->setDiscipline($row['discipline']);
     $thesis->setSubjectClass($row['subject_class']);
     $thesis->setSubject($row['subject']);
     $thesis->setCoverageGeo($row['coverage_geo']);
     $thesis->setCoverageChron($row['coverage_chron']);
     $thesis->setCoverageSample($row['coverage_sample']);
     $thesis->setMethod($row['method']);
     $thesis->setLanguage($row['language']);
     $thesis->setDateSubmitted($row['date_submitted']);
     return $thesis;
 }
<?php

require_once '../inc/initialize.php';
$thesis = new Thesis();
if ($_FILES['attach_thesis_proposal']['error'] == 2) {
    sleep(2);
    echo '<h4 class="alert alert-error">Error</h4>';
    echo '<hr>';
    echo 'Your thesis attachment is bigger than the maximum file size of 2MB';
    die;
}
$thesis->comment_on_field = $_POST['proposed_field_brief'];
$thesis->applicant_id = $session->applicant_id;
$thesis->thesis_topic = $_POST['proposed_thesis_topic'];
$thesis->proposal_on_thesis = $_POST['thesis_proposal'];
$initiafilename = $_FILES['attach_thesis_proposal']['name'];
$thesis_details = $thesis->find_by_id($session->applicant_id);
if (!empty($thesis_details)) {
    $thesis->thesis_id = $thesis_details->thesis_id;
}
if ($thesis->save()) {
    if (!empty($_FILES['attach_thesis_proposal'])) {
        $files = new Files();
        //$file_details = $files->find_by_id($session->applicant_id);
        /*find file record for proposed thesis*/
        $sql_thesis_upload_file = "SELECT * FROM files WHERE applicant_id=" . $session->applicant_id . " AND caption='Thesis Proposal'";
        $result_thesis_upload_file = Files::find_by_sql($sql_thesis_upload_file);
        foreach ($result_thesis_upload_file as $row) {
            $thesis_file_id = $row->file_id;
            $thesis_filename = $row->filename;
        }
        echo 'Full Time';
        break;
    case 'PT':
        echo 'Part Time';
        break;
}
?>
</td>                     
                    </tr>
			  	</tbody>
			</table>
			
			<!-- table for programme applied details-->
            <h4 align="center" class="alert alert-success">Programme Applied Details</h4>
            <?php 
$thesis_details = Thesis::find_by_id($applicant_id);
?>
            <table class="table table-bordered table-hover">
            	<tbody>
                	<tr>
                    	<td>Programme: </td>
                        <td><?php 
echo $personal_details['faculty_name'];
?>
</td>
                    </tr>
                    <tr>
                    	<td>Course: </td>
                        <td><?php 
echo $personal_details['department_name'];
?>
Example #5
0
 /**
  * Save thesis. 
  */
 function execute()
 {
     $thesisPlugin =& PluginRegistry::getPlugin('generic', $this->parentPluginName);
     $thesisPlugin->import('Thesis');
     $thesisDao =& DAORegistry::getDAO('ThesisDAO');
     $journal =& Request::getJournal();
     $journalId = $journal->getId();
     if (isset($this->thesisId)) {
         $thesis =& $thesisDao->getThesis($this->thesisId);
     }
     if (!isset($thesis)) {
         $thesis = new Thesis();
     }
     $thesis->setJournalId($journalId);
     $thesis->setStatus($this->getData('status'));
     $thesis->setDegree($this->getData('degree'));
     $thesis->setDegreeName($this->getData('degreeName'));
     $thesis->setDepartment($this->getData('department'));
     $thesis->setUniversity($this->getData('university'));
     $thesis->setTitle($this->getData('title'));
     $thesis->setDateApproved($this->getData('dateApprovedYear') . '-' . $this->getData('dateApprovedMonth') . '-' . $this->getData('dateApprovedDay'));
     $thesis->setUrl(strtolower($this->getData('url')));
     $thesis->setAbstract($this->getData('abstract'));
     $thesis->setComment($this->getData('comment'));
     $thesis->setStudentFirstName($this->getData('studentFirstName'));
     $thesis->setStudentMiddleName($this->getData('studentMiddleName'));
     $thesis->setStudentLastName($this->getData('studentLastName'));
     $thesis->setStudentEmail($this->getData('studentEmail'));
     $thesis->setStudentEmailPublish($this->getData('studentEmailPublish') == null ? 0 : 1);
     $thesis->setStudentBio($this->getData('studentBio'));
     $thesis->setSupervisorFirstName($this->getData('supervisorFirstName'));
     $thesis->setSupervisorMiddleName($this->getData('supervisorMiddleName'));
     $thesis->setSupervisorLastName($this->getData('supervisorLastName'));
     $thesis->setSupervisorEmail($this->getData('supervisorEmail'));
     $thesis->setDiscipline($this->getData('discipline'));
     $thesis->setSubjectClass($this->getData('subjectClass'));
     $thesis->setSubject($this->getData('keyword'));
     $thesis->setCoverageGeo($this->getData('coverageGeo'));
     $thesis->setCoverageChron($this->getData('coverageChron'));
     $thesis->setCoverageSample($this->getData('coverageSample'));
     $thesis->setMethod($this->getData('method'));
     $thesis->setLanguage($this->getData('language'));
     $thesis->setDateSubmitted(Core::getCurrentDate());
     // Update or insert thesis
     if ($thesis->getId() != null) {
         $thesisDao->updateThesis($thesis);
     } else {
         $thesisDao->insertThesis($thesis);
     }
 }
            <?php } else { ?>
                <p>
                    <span class="fb ml20">文件名称:</span><?=$typeDesc['name']?>
                    <a href="<?=$patientAttachment->getBingLiUrl()?>" class="previewBtn blue f12 unl ml5 vm2" target="_blank">预览</a>
                </p>
            <?php }?>
            </div>
        </div>                                                                     
    </div>
<?php
}
?>
                </div>

                <div class="addMsg pr mt40 zoom" id="addMsgdiv">
                <p><a href="javascript:" class="addMsg-btn blue" id="addAttMsg-btn">新增检查报告</a>&nbsp;&nbsp;&nbsp;&nbsp;<a target="_blank" href="<?=Thesis::getUrlForHowToTakeABetterPhoto()?>" class="unl orange">(拍摄影像片子的技巧)</a></p>
                <p class="orange mt15 clearfix">
                    <span class="prompt-bg fl"></span><span class="ml15 fl">1. 为保证上传结果的准确性,推荐把检查结果及影像资料拍照后的图片上传</span>
                </p>
                <p class="orange">
                    <span class="ml64">2. 您上传的图片仅在您和医生登录后可见</span>
                </p>
                    <div class="addMsg-Box pr mt20 none" id="addDateMsg-Box">
                        <p>
                            <label class="fb">检查时间:</label>
                            <select name="dateyear" id="dateyear"
                                onchange="changedate('dateyear','datemonth','dateday');"
                                class="display_tip" defMSG="succ" check_function="check_dateyear">
                                <?=isset($year) ? "<option value='".$year."'>".$year."</option>" : "" ?>
                                <option value="">未选</option>
                            </select> 年
Example #7
0
        echo 'Full Time';
        break;
    case 'PT':
        echo 'Part Time';
        break;
}
?>
</td>                     
                    </tr>
			  	</tbody>
			</table>
            
            <!-- table for programme applied details-->
            <h4 align="center" class="alert alert-success">Programme Applied Details</h4>
            <?php 
$thesis_details = Thesis::find_by_id($session->applicant_id);
?>
            <table class="table table-bordered table-hover">
            	<tbody>
                	<tr>
                    	<td>Programme: </td>
                        <td><?php 
echo $personal_details['faculty_name'];
?>
</td>
                    </tr>
                    <tr>
                    	<td>Course: </td>
                        <td><?php 
echo $personal_details['department_name'];
?>
 public function run()
 {
     DB::table('theses')->delete();
     Thesis::create(array('subject' => 'Aplikacja na smartfona do planowania zakupów', 'date' => '2015', 'descr' => 'Aplikacja umożliwia dodawanie, edycje i obabianie zdjęć oraz pozwala na dowolne..', 'field_id' => 1));
     Thesis::create(array('subject' => 'Rozmieszczenie kwarcu z okresu kredy w tatrach niskich', 'date' => '2015', 'descr' => 'Celem pracy jest zbadanie i przedstawienie dokładnych spisów i wykresów..', 'field_id' => 2));
 }
 public function remove($id)
 {
     $user = User::findOrFail($id);
     $thes_id = $user->thesis_id;
     $user->thesis_id = NULL;
     $thesis = Thesis::findOrFail($thes_id);
     $thesis->student_id = NULL;
     $thesis->fileName = NULL;
     $thesis->save();
     $user->save();
     return $thesis;
 }
Example #10
0
if (Auth::check()) {
    //$students = DB::table('users')->where('access','=',0)->get();
    $accesses = Auth::user()->access;
    //$names = Auth::user()->name;
    ?>
														
<!--.................................   Zalogowany jako student    ......................................-->
						<?php 
    if ($accesses == 0) {
        if (Auth::user()->thesis_id == NULL) {
            ?>
							<h3>Twoja praca dyplomowa </h3>
							<br>Nie masz jeszcze wybranego tematu pracy. Idz do panelu z lewej strony, aby wybrać temat.
						<?php 
        } else {
            $thesis = Thesis::findOrFail(Auth::user()->thesis_id);
            //$subj = $thesis->subject;
            //$desc = $thesis->descr;
            $lect = $thesis->lecturer_id;
            $lect_name = User::findOrFail($lect)->name;
            //$rec = User::findOrFail($thesis->reviewer)->name
            ?>
							<h3>Twoja praca dyplomowa </h3>
							<?php 
            if ($thesis->docum == 1) {
                ?>
						     	<br><br><font size="3"><div align="left">Temat Twojej pracy: <div><span class="showHide btn btn-success" style="cursor:pointer; font-size: 10px">Rozwiń</span>
						     	<a href="/showThesis_{{$thesis->id}}" > {{ $thesis->subject }} </a> 
						     	<div class="extendableText">{{ $thesis->descr }}</div>
						     	<font size="3"><div align="left">Twój promotor: </font><?php 
                echo $lect_name;
 public function actionManual()
 {
     $book = new Book();
     $thesis = new Thesis();
     $journal = new Journal();
     $proceeding = new Proceeding();
     if (isset($_POST['Book'])) {
         $book->attributes = $_POST['Book'];
         if ($book->validate()) {
             $data['citation'] = $book->formatCitation();
             $data['inline'] = $book->formatInlineCitation();
             $data['oid'] = $this->saveSubmission('book-manual', $book);
         }
     }
     if (isset($_POST['Thesis'])) {
         $thesis->attributes = $_POST['Thesis'];
         if ($thesis->validate()) {
             $data['citation'] = $thesis->formatCitation();
             $data['inline'] = $thesis->formatInlineCitation();
             $data['oid'] = $this->saveSubmission('thesis-manual', $thesis);
         }
     }
     if (isset($_POST['Journal'])) {
         $journal->attributes = $_POST['Journal'];
         if ($journal->validate()) {
             $data['citation'] = $journal->formatCitation();
             $data['inline'] = $journal->formatInlineCitation();
             $data['oid'] = $this->saveSubmission('journal-article-manual', $journal);
         }
     }
     if (isset($_POST['Proceeding'])) {
         $proceeding->attributes = $_POST['Proceeding'];
         if ($proceeding->validate()) {
             $data['citation'] = $proceeding->formatCitation();
             $data['inline'] = $proceeding->formatInlineCitation();
             $data['oid'] = $this->saveSubmission('proceedings-article-manual', $proceeding);
         }
     }
     $data['book'] = $book;
     $data['thesis'] = $thesis;
     $data['journal'] = $journal;
     $data['proceeding'] = $proceeding;
     $this->render('form', $data);
 }
Example #12
0
    <div id="el_my_attachment2" style="padding: 0px 0px 10px 10px;"></div>
    <ul>
    <li><!--<span>上传总进度100%&nbsp;&nbsp;已上传989k,总文件989k</span>--></li>
    </ul>
    </td>
  </tr>
  <tr>
  <tr>
  <td>
    <div class="redNotice">温馨提示:病历资料仅医生和患者本人登录状态下可见,请放心上传。</div>
    </td>
  </tr>
    <td style="padding:10px; border-top:1px dotted #cccccc;"></br><span class="bold">·如何拍摄检查报告:</span>请将报告单平铺,相机调整到“微距模式”,拍摄时相机不要抖动。<br>
    <span class="bold">·如何拍摄X光/CT/MRI:</span>以显示器或者窗户为背景,保证背景光源为白色均一光线,相机调到“微距模式”,关闭闪光灯,拍摄时相机不要抖动。&nbsp;&nbsp;
&gt;&gt;<a href="<?=Thesis::getUrlForHowToTakeABetterPhoto()?>" target="_blank"><font color="#186db4">详细</font></a><br>
 <a href="<?=Thesis::getUrlForHowToTakeABetterPhoto()?>" target="_blank"><img style="padding-top:20px;padding-left:15px;" src="http://i1.hdfimg.com/zixun/images/photo_tips.jpg"></a> 
	</td> </tr> </table>
</form>
<script type="text/javascript">
function chkUploadAttach(oa) {
	if ($('#input_attach').val()=='') {
		alert('没有选择文件');
		return false;
	}
	document.form_attach.submit();
	$('#upload').show();
	$('#uploading').show();
}
$(function(){
    $('#TB_closeWindowButton').bind('click', function(){
        $('#hosInnerAttachErr').find('.showErr').remove();