コード例 #1
0
ファイル: bt.php プロジェクト: sotarok/sandbox
 public function testHoge()
 {
     ae(1, 1);
     ae(1, 2);
     ae(array(1, 2, 3), array(1, 2, 3));
     ae(array(1, 2, 2), array(1, 2, 3));
 }
コード例 #2
0
/**
 * Hide menu links by functions and/or by 
 * permissions.
 * 
 * @since 1.0.0
 */
function hl($f, $p = NULL)
{
    if (function_exists($f)) {
        return ' style="display:none"';
    }
    if ($p !== NULL) {
        return ae($p);
    }
}
コード例 #3
0
ファイル: index.php プロジェクト: parkerj/eduTrac-SIS
><a href="<?php 
            echo get_base_url();
            ?>
nae/role/<?php 
            echo _h($v['personID']);
            ?>
/<?php 
            echo bm();
            ?>
"><?php 
            echo _t('Role');
            ?>
</a></li>
                                
                                <li<?php 
            echo ae('access_user_permission_screen');
            ?>
><a href="<?php 
            echo get_base_url();
            ?>
nae/perms/<?php 
            echo _h($v['personID']);
            ?>
/<?php 
            echo bm();
            ?>
"><?php 
            echo _t('Permissions');
            ?>
</a></li>
                            </ul>
コード例 #4
0
    echo ae('access_dashboard');
    ?>
 class="single"><a href="<?php 
    echo get_base_url();
    ?>
dashboard/" class="no-ajaxify glyphicons dashboard"><i></i> <?php 
    echo _t('Dashboard');
    ?>
</a></li>
							</ul>
						</li>
						<?php 
}
?>
						<li<?php 
echo ae('access_myet_admin');
echo ml('myet_module');
?>
 class="glyphs2 hidden-xs">
							<ul>
								<li class="single"><a href="<?php 
echo get_base_url();
?>
admin/" class="no-ajaxify glyphicons keys"><i></i> <?php 
echo _t('Admin');
?>
</a></li>
							</ul>
						</li>
						<?php 
if (is_user_logged_in()) {
コード例 #5
0
function get_stu_header($stu_id)
{
    $student = get_student($stu_id);
    ?>

<!-- List Widget -->
<div class="relativeWrap">
    <div class="widget">
        <div class="widget-head">
            <h4 class="heading glyphicons user"><i></i><?php 
    echo get_name(_h($student->stuID));
    ?>
</h4>&nbsp;&nbsp;
            <?php 
    if (!isset($_COOKIE['SWITCH_USERBACK']) && _h($student->stuID) != get_persondata('personID')) {
        ?>
            <span<?php 
        echo ae('login_as_user');
        ?>
 class="label label-inverse"><a href="<?php 
        echo get_base_url();
        ?>
switchUserTo/<?php 
        echo _h($student->stuID);
        ?>
/"><font color="#FFFFFF"><?php 
        echo _t('Switch To');
        ?>
</font></a></span>
            <?php 
    }
    ?>
            <?php 
    if (get_persondata('personID') == $student->stuID && !hasPermission('access_dashboard')) {
        ?>
            <a href="<?php 
        echo get_base_url();
        ?>
profile/" class="heading pull-right"><?php 
        echo _h($student->stuID);
        ?>
</a>
            <?php 
    } else {
        ?>
            <a href="<?php 
        echo get_base_url();
        ?>
stu/<?php 
        echo _h($student->stuID);
        ?>
/" class="heading pull-right"><?php 
        echo _h($student->stuID);
        ?>
</a>
            <?php 
    }
    ?>
        </div>
        <div class="widget-body">
            <!-- 4 Column Grid / One Third -->
            <div class="row">

                <!-- One Fifth's Column -->
                <div class="col-md-2">
                    <?php 
    echo getSchoolPhoto($student->stuID, $student->email1, '90');
    ?>
                </div>
                <!-- // One Fifth's Column END -->

                <!-- Two Fifth's Column -->
                <div class="col-md-2">
                    <p><?php 
    echo _h($student->address1);
    ?>
 <?php 
    echo _h($student->address2);
    ?>
</p>
                    <p><?php 
    echo _h($student->city);
    ?>
 <?php 
    echo _h($student->state);
    ?>
 <?php 
    echo _h($student->zip);
    ?>
</p>
                    <p><strong><?php 
    echo _t('Phone:');
    ?>
</strong> <?php 
    echo _h($student->phone1);
    ?>
</p>
                </div>
                <!-- // Two Fifth's Column END -->

                <!-- Three Fifth's Column -->
                <div class="col-md-2">
                    <p><strong><?php 
    echo _t('Email:');
    ?>
</strong> <a href="mailto:<?php 
    echo _h($student->email1);
    ?>
"><?php 
    echo _h($student->email1);
    ?>
</a></p>
                    <p><strong><?php 
    echo _t('Birth Date:');
    ?>
</strong> <?php 
    echo _h($student->dob) > '0000-00-00' ? date('D, M d, o', strtotime(_h($student->dob))) : '';
    ?>
</p>
                    <p><strong><?php 
    echo _t('Status:');
    ?>
</strong> <?php 
    echo _h($student->stuStatus) == 'A' ? _t('Active') : _t('Inactive');
    ?>
</p>
                </div>
                <!-- // Three Fifth's Column END -->

                <!-- Four Fifth's Column -->
                <div class="col-md-2">
                    <p><strong><?php 
    echo _t('FERPA:');
    ?>
</strong> <?php 
    echo is_ferpa(_h($student->stuID));
    ?>
 
                            <?php 
    if (is_ferpa(_h($student->stuID)) == 'Yes') {
        ?>
                            <a href="#FERPA" data-toggle="modal"><img style="vertical-align:top !important;" src="<?php 
        echo get_base_url();
        ?>
static/common/theme/images/exclamation.png" /></a>
                            <?php 
    } else {
        ?>
                            <a href="#FERPA" data-toggle="modal"><img style="vertical-align:top !important;" src="<?php 
        echo get_base_url();
        ?>
static/common/theme/images/information.png" /></a>
                        <?php 
    }
    ?>
                    </p>
                    <p><strong><?php 
    echo _t('Restriction(s):');
    ?>
</strong> 
                        <?php 
    $rstr = '';
    foreach (get_stu_restriction($student->stuID) as $v) {
        ?>
                            <?php 
        echo $rstr;
        ?>
<span data-toggle="popover" data-title="<?php 
        echo _h($v['description']);
        ?>
" data-content="Contact: <?php 
        echo _h($v['deptName']);
        ?>
 <?php 
        echo _h($v['deptEmail']) != '' ? ' | ' . $v['deptEmail'] : '';
        echo _h($v['deptPhone']) != '' ? ' | ' . $v['deptPhone'] : '';
        echo _h($v['severity']) == 99 ? _t(' | Restricted from registering for courses.') : '';
        ?>
" data-placement="bottom"><a href="#"><?php 
        echo _h($v['Restriction']);
        ?>
</a></span>
                        <?php 
        $rstr = ', ';
    }
    ?>
                    </p>
                    <p><strong><?php 
    echo _t('Entry Date:');
    ?>
</strong> <?php 
    echo date('D, M d, o', strtotime(_h($student->stuAddDate)));
    ?>
</p>
                </div>
                <!-- // Four Fifth's Column END -->
                
                <!-- Five Fifth's Column -->
                <div class="col-md-2">
                    <p><strong><?php 
    echo _t('SACP:');
    ?>
</strong> 
                         <?php 
    $sacp = '';
    foreach (get_sacp($student->stuID) as $v) {
        ?>
                            <?php 
        echo $sacp;
        ?>
<span data-toggle="popover" data-title="<?php 
        echo _h($v['acadProgTitle']);
        ?>
 (<?php 
        echo _h($v['currStatus']) == 'A' ? _t('Active') : _t('Graduated');
        ?>
)" data-content="<?php 
        echo _h($v['programDesc']);
        ?>
" data-placement="bottom"><a href="#"><?php 
        echo _h($v['SACP']);
        ?>
</a></span>
                        <?php 
        $sacp = ', ';
    }
    ?>
                    </p>
                    <p><strong><?php 
    echo _t('Admit Status:');
    ?>
</strong> 
                        
                    </p>
                    <p><strong><?php 
    echo _t('Hiatus:');
    ?>
</strong> 
                        <span data-toggle="popover" data-title="<?php 
    echo get_shis_name(get_stu_shis(_h($student->stuID), 'shisCode'));
    ?>
" data-content="Start Date: <?php 
    echo get_stu_shis(_h($student->stuID), 'startDate');
    ?>
 | End Date: <?php 
    echo get_stu_shis(_h($student->stuID), 'endDate') <= '0000-00-00' ? '' : get_stu_shis(_h($student->stuID), 'endDate');
    ?>
" data-placement="bottom"><a href="#"><?php 
    echo get_stu_shis(_h($student->stuID), 'shisCode');
    ?>
</a></span>
                    </p>
                </div>
                <!-- // Five Fifth's Column END -->

            </div>
            <!-- // 4 Column Grid / One Third END -->
        </div>
    </div>
</div>
<!-- // List Widget END -->

<!-- Modal -->
<div class="modal fade" id="FERPA">
    <div class="modal-dialog">
        <div class="modal-content">
            <!-- Modal heading -->
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h3 class="modal-title"><?php 
    echo _t('Family Educational Rights and Privacy Act (FERPA)');
    ?>
</h3>
            </div>
            <!-- // Modal heading END -->
            <!-- Modal body -->
            <div class="modal-body">
                <p><?php 
    echo _t('"FERPA gives parents certain rights with respect to their children\'s education records. 
                These rights transfer to the student when he or she reaches the age of 18 or attends a school beyond 
                the high school level. Students to whom the rights have transferred are \'eligible students.\'"');
    ?>
</p>
                <p><?php 
    echo _t('If the FERPA restriction states "Yes", then the student has requested that none of their 
                information be given out without their permission. To get a better understanding of FERPA, visit 
                the U.S. DOE\'s website @ ') . '<a href="http://www2.ed.gov/policy/gen/guid/fpco/ferpa/index.html">http://www2.ed.gov/policy/gen/guid/fpco/ferpa/index.html</a>.';
    ?>
</p>
            </div>
            <!-- // Modal body END -->
            <!-- Modal footer -->
            <div class="modal-footer">
                <a href="#" class="btn btn-default" data-dismiss="modal"><?php 
    echo _t('Close');
    ?>
</a> 
            </div>
            <!-- // Modal footer END -->
        </div>
    </div>
</div>
<!-- // Modal END -->

<?php 
}
コード例 #6
0
                                    <input type="text" name="screen" placeholder="Type for suggestions . . ." data-toggle="screen" />
                                    <button type="button" class="glyphicons search"><i></i></button>
                                </form>
                            </li>
                        <?php 
}
?>

                        <li class="glyphs">
                            <ul>
                                <li><a href="<?php 
echo get_base_url();
?>
" class="glyphicons globe"><i></i></a></li>
                                <li<?php 
echo ae('clear_screen_cache');
?>
><a href="<?php 
echo get_base_url();
?>
dashboard/flushCache/" class="glyphicons circle_minus"><i></i></a></li>
                            </ul>
                        </li>
                    </ul>
                    <!-- // Top Menu END -->


                    <!-- Top Menu Right -->
                    <ul class="topnav pull-right hidden-xs hidden-sm">

                        <!-- Themer -->
コード例 #7
0
ファイル: header.php プロジェクト: jmcismail/tinyPHP
permission/"><?php 
    echo _t('Permissions');
    ?>
</a></li>
				<li<?php 
    echo ae('manage_roles');
    ?>
><a href="<?php 
    echo BASE_URL;
    ?>
role/"><?php 
    echo _t('Roles');
    ?>
</a></li>
				<li<?php 
    echo ae('manage_users');
    ?>
><a href="<?php 
    echo BASE_URL;
    ?>
user/"><?php 
    echo _t('Users');
    ?>
</a></li>
				<li><a href="<?php 
    echo BASE_URL;
    ?>
dashboard/logout/"><?php 
    echo _t('Logout');
    ?>
</a></li>
コード例 #8
0
ファイル: stac.php プロジェクト: parkerj/eduTrac-SIS
                            <ul role="menu" class="dropdown-menu dropup-text pull-right">
                                <li><a href="<?php 
        echo get_base_url();
        ?>
stu/sacd/<?php 
        echo _h($v['stuAcadCredID']);
        ?>
/<?php 
        echo bm();
        ?>
"><?php 
        echo _t('View (SACD)');
        ?>
</a></li>
                                <li<?php 
        echo ae('delete_student');
        ?>
><a href="#modal<?php 
        echo _h($v['stuAcadCredID']);
        ?>
" data-toggle="modal"><?php 
        echo _t('Delete');
        ?>
</a></li>
                            </ul>
                        </div>
                    </td>
                </tr>
                <?php 
    }
}
コード例 #9
0
ファイル: index.php プロジェクト: parkerj/eduTrac-SIS
</a></li>
                                <li<?php 
            echo ae('add_course');
            ?>
><a href="#crse<?php 
            echo _h($v['courseID']);
            ?>
" data-toggle="modal"><?php 
            echo _t('Clone');
            ?>
</a></li>
                                <?php 
            if (_h($v['currStatus']) == _t('A') && _h($v['endDate']) == '0000-00-00') {
                ?>
                                <li<?php 
                echo ae('add_course_sec');
                ?>
><a href="<?php 
                echo get_base_url();
                ?>
sect/add/<?php 
                echo _h($v['courseID']);
                ?>
/<?php 
                echo bm();
                ?>
"><?php 
                echo _t('Create Section');
                ?>
</a></li>
                                <?php 
コード例 #10
0
ファイル: view.php プロジェクト: parkerj/eduTrac-SIS
		                    </div>
	                   	</div>
                  	</div>
                </div>
				
				<!-- Form actions -->
				<div class="form-actions">
					<button type="submit"<?php 
echo pids();
?>
 class="btn btn-icon btn-primary glyphicons circle_ok"><i></i><?php 
echo _t('Save');
?>
</button>
					<button type="button"<?php 
echo ae('reset_person_password');
?>
 class="btn btn-icon btn-primary glyphicons refresh" onclick="window.location='<?php 
echo get_base_url();
?>
nae/resetPassword/<?php 
echo _h($nae[0]['personID']);
?>
'"><i></i><?php 
echo _t('Reset Password');
?>
</button>
                    <button type="button" class="btn btn-icon btn-primary glyphicons circle_minus" onclick="window.location='<?php 
echo get_base_url();
?>
nae/<?php 
コード例 #11
0
ファイル: Database.php プロジェクト: clagiordano/weblibs
 /**
  * Metodo che estrae dalla tabella indicata la lista dei campi disponibili
  * per validare le operazioni sul db, ed esclude dalla lista determinati
  * campi se fortniti dall'utente.
  *
  * Nota: rifacimento della funzione globale gears_get_field_allowed($obj,$deleteKey='id')
  */
 private final function getTableFields()
 {
     // Verifico se è presente in APC la struttura della tabella attuale
     if (!ae()->get_memory(self::TABLE_APC_PREFIX . $this->Table)) {
         // I dati non sono presenti, rigenero l'informazione sull'APC
         $this->TableColumns = $this->runQuery("SHOW COLUMNS FROM `" . $this->Table . "`");
         foreach ($this->TableColumns as $value) {
             $list[] = $value['Field'];
         }
         // Memorizzo la struttura con chiave univoca in APC
         ae()->load_memory(self::TABLE_APC_PREFIX . $this->Table . "_field_list", $list, 3600);
         ae()->load_memory(self::TABLE_APC_PREFIX . $this->Table, $this->TableColumns, 3600);
     } else {
         // I dati sono presenti, li prendo da APC e non eseguo la query
         $list = ae()->get_memory(self::TABLE_APC_PREFIX . $this->Table . "_field_list");
         $this->TableColumns = ae()->get_memory(self::TABLE_APC_PREFIX . $this->Table);
         //pr($this->TableColumns);
     }
     $this->TableFieldsAllowed = $list;
     unset($list);
     return $this;
 }
コード例 #12
0
ファイル: view.php プロジェクト: parkerj/eduTrac-SIS
</a></li>
                    <li<?php 
echo ae('access_human_resources');
?>
 class="glyphicons folder_open tab-stacked"><a href="<?php 
echo get_base_url();
?>
hr/positions/<?php 
echo _h($staff->staffID);
?>
/"><i></i> <?php 
echo _t('View Positions');
?>
</a></li>
                    <li<?php 
echo ae('access_human_resources');
?>
 class="glyphicons circle_plus tab-stacked"><a href="<?php 
echo get_base_url();
?>
hr/add/<?php 
echo _h($staff->staffID);
?>
/"><i></i> <span><?php 
echo _t('Add Position');
?>
</span></a></li>
                </ul>
            </div>
            <!-- // Tabs Heading END -->
			
コード例 #13
0
ファイル: lib.php プロジェクト: piter65/spilldec
function am($e)
{
    return ae($e);
}
コード例 #14
0
ファイル: index.php プロジェクト: parkerj/eduTrac-SIS
			<div class="separator bottom"></div>
		
			<div class="widget widget-heading-simple widget-body-white">
				<div class="widget-body">
					<div class="row">	
						<div class="col-md-12">
							<h5 class="strong"><?php 
echo get_met_welcome_message_title();
?>
</h5>
							<div class="separator bottom"></div>
							<?php 
echo _escape(the_myet_welcome_message());
?>
							<p<?php 
echo ae('edit_myet_welcome_message');
?>
 class="margin-none strong">
								<a href="#welcome" data-toggle="modal" class="glyphicons single edit"><i></i><?php 
echo _t('Edit');
?>
</a>
							</p>
						</div>
					</div>
				</div>
			</div>
			<?php 
if (function_exists('myet_module')) {
    ?>
			<?php 
コード例 #15
0
ファイル: Upload.php プロジェクト: clagiordano/weblibs
 private function create_upload_jscript()
 {
     // ae.addFullLib('media_upload');
     $temp_script = "\n                function arrotonda(numero, numeroDecimali)\n                {\n                    var modificatore = '1';\n                    for (var i=0; i<numeroDecimali; i++)\n                    {\n                        modificatore += '0';\n                    }\n\n                    numero = numero * (parseInt(modificatore,10));\n                    numero = Math.round((numero*100)/100);\n\n                    var risultato = numero / modificatore;\n                    return risultato;\n                };\n\n                function format_filesize(size)\n                {\n                    var fSExt = new Array('Bytes', 'KB', 'MB', 'GB');\n                    fSize = size;\n                    i = 0;\n\n                    while (fSize > 1000) {\n                        fSize /= 1024; i++;\n                    }\n\n                    return Math.round((fSize * 100) / 100) + ' ' + fSExt[i];\n                }\n\n                function toggleToolbar() {\n                    //Scambio la visualizzazione dei link";
     if ($this->params['controls'] == true) {
         $temp_script .= "\n                            \$('#media_upload_resumebutton').toggle();\n                            \$('#media_upload_pausebutton').toggle();\n                            \$('#media_upload_cancelbutton').toggle();";
     }
     $temp_script .= "\n                }\n\n                /**\n                 * Crea l'oggetto resumable e ne imposta la configurazione\n                 * @type Resumable\n                 */\n                if (typeof r == 'undefined') { // verifico che l'oggetto non esista\n                    var r = new Resumable({\n                        target: '" . $this->params['target'] . "',\n                        // chunkSize: 3*1024*1024,\n                        simultaneousUploads: " . $this->params['simultaneousUploads'] . ",\n                        testChunks: " . $this->params['testChunks'] . ",\n                        throttleProgressCallbacks: " . $this->params['throttleProgressCallbacks'] . ",\n                        maxFiles: " . $this->params['maxFilesforsession'] . ",\n                        fileType: ['" . join("', '", $this->params['fileType']) . "']\n                    });\n                }\n                ";
     /**
      * Se i controlli sono nascosti non bindare l'evento.
      */
     if ($this->params['controls'] == true) {
         $temp_script .= "\n                        \$('#media_upload_browsebutton').bind('change', function() {\n                            if ((match = this.value.match(/mpg|mp4|ts|mov|avi|wmv/gi)) == null) {\n                                // Verifica che le api utilizzate siano supportate dal browser\n                                if (window.File && window.FileReader && window.FileList && window.Blob) {\n\n                                } else {\n                                    \$('#media_upload_statusbar').append('File api NON supportate.<br />');\n                                    return;\n                                }\n                                \$('#media_upload_statusbar').append(ae.l('UPLOADER_ERR_FILE_TYPE'));\n                                // file non valido resetto il campo input\n                                this.value = null;\n                                \$('#media_upload_resumebutton').hide();\n                            }\n                        });";
     }
     if ($this->params['filelist'] == true) {
         $temp_script .= "\n                        /**\n                         * Intercetta il click sull'elemento da eliminare e ne estrae l'uniqueid\n                         * per rimuoverlo dal container e dalla lista dei file\n                         * @param {type} file\n                         * @param {type} event\n                         * @returns {undefined}\n                         */\n                        \$(document).on('click', '.removeFile', function () {\n                            identifier = \$(this).data('uniqueid');\n                            file_container = \$('#resumable-file-' + identifier);\n                            file = r.getFromUniqueIdentifier(identifier);\n\n                            r.removeFile(file);\n                            file_container.remove();\n                        });";
     }
     if ($this->params['progress'] == true) {
         $temp_script .= "\n                        /**\n                         * Crea l'oggetto loader per la progress bar di caricamento,\n                         * le dimensioni devono essere uguali, quindi il loader\n                         * deve essere quadrato altrimenti i bordi vengono tagliati.\n                         * @type @call;\$@call;percentageLoader\n                         */\n\n                       /*sizeX = parseInt(\$(window).width() * 0.55);\n                       sizeY = parseInt(\$(window).height() * 0.6);*/\n                       ";
         if ($this->params['method'] == "platform") {
             $temp_script .= "contWidth = \$('#media_upload_loader').parent().parent().width();\n                                        contHeight = \$('#media_upload_loader').parent().parent().height();";
         } else {
             $temp_script .= "contWidth  = \$(window).width();\n                                         contHeight = \$(window).height();";
         }
         if ($this->params['filelist'] == false && $this->params['controls'] == false) {
             $temp_script .= "sizeX = ((contWidth > contHeight) ? contHeight : contWidth);\n                                         sizeY = ((contWidth > contHeight) ? contHeight : contWidth);";
         } else {
             $temp_script .= "\n                            // trovo il lato piu' corto per impostare le dimensioni massime del loader\n                            if (contWidth > contHeight) {\n                                sizeX = parseInt(contHeight * 0.7)\n                                sizeY = parseInt(contHeight * 0.7)\n                            } else {\n                                sizeX = parseInt(contWidth * 0.7)\n                                sizeY = parseInt(contWidth * 0.7)\n                            }";
         }
         $temp_script .= "\n                        if (typeof loader == 'undefined') { // verifico che l'oggetto non esista\n                            var loader = \$('#media_upload_loader').percentageLoader({\n                                width : sizeX,\n                                height : sizeY,\n                                progress : 0,\n                                //value : '0%',\n                                //value: '- / -'\n                                value: ''\n                            });\n                        } else {\n                            console.log(loader);\n                        }\n                    ";
     }
     if ($this->params['controls'] == true) {
         $temp_script .= "r.assignBrowse(document.getElementById('media_upload_browsebutton'));";
     }
     $temp_script .= "\n                    r.on('fileSuccess', function(file){\n                        //console.log('on fileSuccess');\n                        \$('#resumable-file-' + file.uniqueIdentifier + ' .resumable-file-name').css({\n                                background: 'linear-gradient(to right, #6AFA71, #6AFA71)'\n                        });\n\n                        ae.cmd({\n                            command: 'match_action',\n                            type: 'html',\n                            target: 'ae_updater',\n                            params: {\n                                event: 'fileSuccess',\n                                fileName: r.files[0].fileName,\n                                matchType: '" . $this->params['matchType'] . "',\n                                matchId: " . $this->params['matchId'] . ",\n                                size: r.files[0].size\n                            }\n                        });";
     // riassemblo la stringa di completamento.
     $this->params['completestring'] .= "?path=" . dirname($this->params['target']) . "/temp/";
     if ($this->params['method'] == "platform") {
         //$temp_script .= "ae.cmd(" . json_encode($this->params['completestring']) . ");";
         $temp_script .= "ae.getCmp('upload').destroyDialog({state: 'success'});";
         unset($this);
         // distrugge se stesso
     } elseif ($this->params['method'] == "api") {
         $temp_script .= "\$.ajax('" . $this->params['completestring'] . "' + file.fileName + '&title=' + encodeURIComponent(\$('#media_upload_filetitle').val()));";
     }
     $temp_script .= "\n                    });\n\n                    r.on('fileProgress', function(file){\n                        //console.log('on fileProgress');\n                        percent = arrotonda(file.progress() * 100.0, 2);\n\n                        \$('#resumable-file-' + file.uniqueIdentifier + ' .resumable-file-progress').html(\n                                percent + '%');    // + '% ( 0 / ' + file.chunks.length + ' chunks ) '\n\n                        \$('#resumable-file-' + file.uniqueIdentifier + ' .resumable-file-name').css({\n                                background: 'linear-gradient(to right, #6AFA71 0%, #FECF4D ' + percent + '%, #FECF4D ' + percent + '%, #FC2708 100%)'\n                        });\n                        ";
     if ($this->params['method'] == "platform") {
         $temp_script .= "ae.show('current_upload_bar');\n                                             \$('.upload-bar .bar').width(percent +'%');\n                                             \$('.upload-bar .percentage').html(percent +'%');";
     }
     $temp_script .= "\n                            ae.cmd({\n                                command: 'match_action',\n                                type: 'html',\n                                target: 'ae_updater',\n                                params: {\n                                    event: 'fileProgress',\n                                    fileName: file.fileName,\n                                    matchType: '" . $this->params['matchType'] . "',\n                                    matchId: " . $this->params['matchId'] . ",\n                                    size: file.size\n                                }\n                            });\n                    });";
     if ($this->params['method'] == "api") {
         $temp_script .= "\n                        r.on('fileAdded', function(file, event){\n                            console.log('api fileAdded');\n                            file.fileName = '" . ae()->get_store()->get_key() . "_'" . " + file.fileName;\n\n                            ae.cmd({\n                                command: 'match_action',\n                                type: 'html',\n                                target: 'ae_updater',\n                                params: {\n                                    event: 'fileAdded',\n                                    fileName: r.files[0].fileName,\n                                    matchType: '" . $this->params['matchType'] . "',\n                                    matchId: " . $this->params['matchId'] . ",\n                                    size: r.files[0].size\n                                }\n                            });";
         if ($this->params['filelist'] == true) {
             $temp_script .= "\n                            var rowFile = '<div id=\"resumable-file-' + file.uniqueIdentifier + '\" class=\"resumable-file-container\">'\n                                + '<div class=\"resumable-file-progress\"></div> '\n                                    + '<div class=\"resumable-file-name\"></div> '\n                                    + '<div class=\"resumable-file-cancel\">'\n                                        + '<a href=\"#\" class=\"removeFile\"'\n                                            + ' data-uniqueid=\"' + file.uniqueIdentifier + '\">\n                                                <img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAANCAYAAACdKY9CAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYKBzMFhVNFAQAAANlJREFUKM+N0j1KQ0EUBeBv4tPCPogKlraCqOtwDwFdgS7AfbgC66zALthY2YmV4A9YiCQhJs/C82AIog5cznDnnnPnnpniexW06OMEh/jEB87x1NU0WMcRZtjEMQ4iNMUQjyE8wF7U/xMXDSZ4xrvf1wpeChpsYR/zHwpL8D5BCH9d5xR6IXR4E0ducZfcVXBRF5YkruPIKCS4xNiSchvSWoZbzWxie1kmdA83r3CRs1ntQFPte9iIYj8Iu+laauJ2lCfBab5Gi9fgoO7whjPspLBUdjYZeghfi09GL12G2DgAAAAASUVORK5CYII=\" /></a>'\n                                    + '</div>'\n                                + '</div>'\n                                ;\n\n                            \$('#media_upload_filelist').append(rowFile);\n\n                            \$('#resumable-file-' + file.uniqueIdentifier + ' .resumable-file-name').html(file.fileName);\n                            \$('#resumable-file-' + file.uniqueIdentifier\n                                    + ' .resumable-file-progress').html('0%');    //( 0 / ' + file.chunks.length + ' chunks )'";
         }
         $temp_script .= "\n                        \$('#media_upload_resumebutton').show();\n                    });\n                    ";
     }
     $temp_script .= "\n                    r.on('filesAdded', function(array) {\n                        console.log('on filesAdded');\n\n                        setTimeout(function() {\n                        ae.cmd({\n                            command: 'match_action',\n                            type: 'html',\n                            target: 'ae_updater',\n                            params: {\n                                event: 'fileAdded',\n                                fileName: r.files[0].fileName,\n                                matchType: '" . $this->params['matchType'] . "',\n                                matchId: " . $this->params['matchId'] . ",\n                                size: r.files[0].size\n                            }\n                        }), 200 });\n                    });\n\n                r.on('fileRetry', function(file) {\n                    //console.log('on fileRetry');\n\n                    ae.cmd({\n                        command: 'match_action',\n                        type: 'html',\n                        target: 'ae_updater',\n                        params: {\n                            event: 'fileRetry',\n                            fileName: file.fileName,\n                            matchType: '" . $this->params['matchType'] . "',\n                            matchId: " . $this->params['matchId'] . ",\n                            size: file.size\n                        }\n                    });\n                });\n\n                r.on('fileError', function(file, message) {\n                    //console.log('on fileError');\n\n                    ae.cmd({\n                        command: 'match_action',\n                        type: 'html',\n                        target: 'ae_updater',\n                        params: {\n                            event: 'fileError',\n                            fileName: file.fileName,\n                            matchType: '" . $this->params['matchType'] . "',\n                            matchId: " . $this->params['matchId'] . ",\n                            size: file.size\n                        }\n                    });\n                });\n\n                r.on('chunkingComplete', function(file) {\n                    //console.log('on chunkingComplete');\n\n//                    setTimeout(function() {\n//                        ae.cmd({\n//                            command: 'match_action',\n//                            type: 'html',\n//                            target: 'ae_updater',\n//                            params: {\n//                                event: 'chunkingComplete',\n//                                fileName: file.fileName,\n//                                matchType: '" . $this->params['matchType'] . "',\n//                                matchId: " . $this->params['matchId'] . ",\n//                                size: file.size\n//                            }\n//                        }), 200\n//                    });\n                });\n\n                r.on('chunkingProgress', function(file, ratio) {\n                    //console.log('on chunkingProgress');\n\n//                    setTimeout(function() {\n//                        ae.cmd({\n//                            command: 'match_action',\n//                            type: 'html',\n//                            target: 'ae_updater',\n//                            params: {\n//                                event: 'chunkingProgress',\n//                                fileName: file.fileName,\n//                                matchType: '" . $this->params['matchType'] . "',\n//                                matchId: " . $this->params['matchId'] . ",\n//                                size: file.size\n//                            }\n//                        }), 200\n//                    });\n                    });\n\n                r.on('chunkingStart', function(file) {\n                    //console.log('on chunkingStart');\n\n//                    setTimeout(function() {\n//                        ae.cmd({\n//                            command: 'match_action',\n//                            type: 'html',\n//                            target: 'ae_updater',\n//                            params: {\n//                                event: 'chunkingStart',\n//                                fileName: file.fileName,\n//                                matchType: '" . $this->params['matchType'] . "',\n//                                matchId: " . $this->params['matchId'] . ",\n//                                size: file.size\n//                            }\n//                        }), 200\n//                    });\n                    });\n\n                r.on('uploadStart', function(){\n                    //console.log('on uploadStart');\n                    toggleToolbar();\n\n                    ae.cmd({\n                        command: 'match_action',\n                        type: 'html',\n                        target: 'ae_updater',\n                        params: {\n                            event: 'uploadStart',\n                            fileName: r.files[0].fileName,\n                            matchType: '" . $this->params['matchType'] . "',\n                            matchId: " . $this->params['matchId'] . ",\n                            size: r.files[0].size\n                        }\n                    });\n                });\n\n                // il cancel genera anche l'evento complete\n                r.on('complete', function(){\n                    //console.log('on complete');\n                    toggleToolbar();\n\n                    ae.cmd({\n                        command: 'match_action',\n                        type: 'html',\n                        target: 'ae_updater',\n                        params: {\n                            event: 'complete',\n                            //fileName: r.files[0].fileName,\n                            matchType: '" . $this->params['matchType'] . "',\n                            matchId: " . $this->params['matchId'] . ",\n                            //size: r.files[0].size\n                        }\n                    });\n                });\n\n                r.on('progress', function(){\n                    //console.log('on progress');\n\n                    loader.setProgress(arrotonda(r.progress(), 2));\n                    //loader.setValue(arrotonda(r.progress() * 100.0, 2) + '%');\n                    //console.log(format_filesize(file.size*file.progress()) + ' / ' + format_filesize(file.size));\n                    /*if (r.files.length > 0) {\n                        loader.setValue(format_filesize(r.files[0].size*r.progress()) + ' / ' + format_filesize(r.files[0].size));\n                    } else {\n                        loader.setValue('- / -');\n                    }*/\n                    loader.setValue('');\n                });\n\n                r.on('error', function(message, file){\n                    //onsole.log('on error');\n                });\n\n                r.on('pause', function(){\n                    //console.log('on pause');\n\n                    ae.cmd({\n                        command: 'match_action',\n                        type: 'html',\n                        target: 'ae_updater',\n                        params: {\n                            event: 'pause',\n                            fileName: r.files[0].fileName,\n                            matchType: '" . $this->params['matchType'] . "',\n                            matchId: " . $this->params['matchId'] . ",\n                            size: r.files[0].size\n                        }\n                    });\n                    toggleToolbar();\n                });\n\n                r.on('cancel', function(){\n                    //console.log('on cancel');\n\n                    ae.cmd({\n                        command: 'match_action',\n                        type: 'html',\n                        target: 'ae_updater',\n                        params: {\n                            event: 'cancel',\n                            fileName: '',\n                            matchType: '" . $this->params['matchType'] . "',\n                            matchId: " . $this->params['matchId'] . ",\n                            size: 0\n                        }\n                    });\n\n                    // svuoto la lista dei file in coda\n                    \$('#media_upload_filelist').html('');\n                    toggleToolbar();\n                    toggleToolbar();\n                    \$('#media_upload_resumebutton').hide();\n                });\n            ";
     // restituisce la stringa generata fra tag script
     return print_js($temp_script, false);
 }
コード例 #16
0
ファイル: add.php プロジェクト: parkerj/eduTrac-SIS
						<!-- Group -->
						<div class="form-group">
                            <label class="col-md-3 control-label"><font color="red">*</font> <?php 
echo _t('Subject');
?>
</label>
							<div class="col-md-8" id="divSubj">
								<select name="subjectCode" id="subjectCode" class="selectpicker form-control" data-style="btn-info" data-size="10" data-live-search="true" required>
									<option value="">&nbsp;</option>
	                        		<?php 
table_dropdown('subject', 'subjectCode <> "NULL"', 'subjectCode', 'subjectCode', 'subjectName');
?>
	                        	</select>
	                       </div>
	                       <a<?php 
echo ae('access_forms');
?>
 href="#subj" data-toggle="modal" title="Subject" class="btn btn-primary"><i class="fa fa-plus"></i></a>
						</div>
						<!-- // Group END -->
						
						<!-- Group -->
                        <div class="form-group">
                            <label class="col-md-3 control-label"><font color="red">*</font> <?php 
echo _t('Course Level');
?>
</label>
                            <div class="col-md-8">
                                <?php 
echo course_level_select();
?>
コード例 #17
0
ファイル: ObjectActions.php プロジェクト: clagiordano/weblibs
 /**
  * Metodo che estrae dalla tabella indicata la lista dei campi disponibili
  * per validare le operazioni sul db, ed esclude dalla lista determinati
  * campi se fortniti dall'utente.
  *
  * Nota: rifacimento della funzione globale gears_get_field_allowed($obj,$deleteKey='id')
  */
 private final function getTableFields()
 {
     // Verifico se è presente in APC la struttura della tabella attuale
     if (!ae()->get_memory(self::TABLE_APC_PREFIX . $this->Table)) {
         // I dati non sono presenti, rigenero l'informazione sull'APC
         $qColumns = "SHOW COLUMNS FROM `" . $this->Table . "`";
         $query = new aeq($qColumns, true);
         while ($row = $query->fetch()) {
             $list[] = $row['Field'];
             array_push($this->TableColumns, $row);
         }
         // Memorizzo la struttura con chiave univoca in APC
         ae()->load_memory(self::TABLE_APC_PREFIX . $this->Table . "_field_list", $list, 3600);
         ae()->load_memory(self::TABLE_APC_PREFIX . $this->Table, $this->TableColumns, 3600);
     } else {
         // I dati sono presenti, li prendo da APC e non eseguo la query
         $list = ae()->get_memory(self::TABLE_APC_PREFIX . $this->Table . "_field_list");
         $this->TableColumns = ae()->get_memory(self::TABLE_APC_PREFIX . $this->Table);
         //pr($this->TableColumns);
     }
     /**
      * Utilizza l'array ExcludeFields per escludere dalla lista
      * i campi corrispondenti mediante una ricerca.
      */
     foreach ($this->ExcludeFields as $keyToDelete) {
         $keyId = array_search($keyToDelete, $list);
         if (is_numeric($keyId)) {
             unset($list[$keyId]);
         }
     }
     $this->TableFieldsAllowed = $list;
     unset($list);
     unset($query);
     return $this;
 }