Beispiel #1
0
function module_css($module, $uri, $tag = false)
{
    if ($tag) {
        $media = false;
        if (is_string($tag)) {
            $media = 'media="' . $tag . '"';
        }
        return '<link href="' . module_url($module, 'assets/css/' . $uri) . '" type="text/css" rel="stylesheet" ' . $media . '/>';
    }
    return module_url($module, 'assets/css/' . $uri);
}
Beispiel #2
0
 public function admin_context()
 {
     $this->salaire_personnel = new PostType(array('namespace' => 'posts', 'label' => __('Posts')));
     $this->salaire_personnel->run();
     // Creating Menu 1.4
     create_admin_menu('blogster', 'after', 'dashboard');
     add_admin_menu('blogster', array('title' => __('Posts'), 'href' => module_url(array('index'), 'blogster')));
     add_admin_menu('blogster', array('title' => __('Write a new post'), 'href' => module_url(array('publish'), 'blogster')));
     add_admin_menu('blogster', array('title' => __('Create a new category'), 'href' => module_url(array('category', 'create'), 'blogster')));
     add_admin_menu('blogster', array('title' => __('Categories'), 'href' => module_url(array('category'), 'blogster')));
     add_admin_menu('blogster', array('title' => __('Comments'), 'href' => module_url(array('comments'), 'blogster')));
     add_admin_menu('blogster', array('title' => __('Tags'), 'href' => module_url(array('tags'), 'blogster')));
     add_admin_menu('blogster', array('title' => __('Settings'), 'href' => module_url(array('setting'), 'blogster')));
     declare_admin_widget(array("module_namespace" => "blogster", "widget_namespace" => "articles_stats", "widget_title" => __('Blogster statistics'), "widget_content" => $this->load->view(MODULES_DIR . $this->module['encrypted_dir'] . '/views/widgets/articles_stats', null, true, true), "widget_description" => __('Displays blogster stats')));
     declare_admin_widget(array("module_namespace" => "blogster", "widget_namespace" => "recents_commentaires", "widget_title" => __('Recents comments'), "widget_content" => $this->load->view(MODULES_DIR . $this->module['encrypted_dir'] . '/views/widgets/recents_comments', null, true, true), "widget_description" => __('Displays recents comments'), "action_control" => module_action('blogster', 'blogster_manage_comments')));
 }
Beispiel #3
0
 public function index($page = 1)
 {
     notice('push', tendoo_info(__('Page childs wont be available on frontend it that page is set as draft')));
     if (isset($_POST['page_id']) && return_if_array_key_exists('action', $_POST) == 'delete') {
         if (is_array($_POST['page_id'])) {
             foreach ($_POST['page_id'] as $_page_id) {
                 $this->lib->delete_page($_page_id);
             }
             notice(fetch_notice_output('done'));
         }
     }
     $totalPerPages = isset($_GET['limit']) ? $_GET['limit'] : 10;
     set_core_vars('totalPages', $totalPages = count($this->lib->get_pages('all_available')));
     $paginate = pagination_helper($totalPerPages, $totalPages, $page, module_url(array('index')), $RedirectUrl = array('error', 'code', 'page-404'));
     set_core_vars('paginate', $paginate);
     $get_pages = $this->lib->get_pages('all_limited', $paginate['start'], $paginate['end']);
     set_core_vars('get_pages', $get_pages);
     set_page('title', __('Page Creator'));
     $this->load->view($this->opened_module['uri_path'] . 'views/main', $this->data, false, TRUE);
 }
Beispiel #4
0
    }
    
    function stop_process(){
    	
    	
    	openWait('Stopping process, please wait..');
    	
    	clearInterval(interval_monitor);
        clearInterval(interval_trace);
        clearInterval(interval_timer);
    	
    	
    	$.ajax({
    			type: "POST",
    			url: "<?php 
echo module_url('objectmanager') . 'ajax/stop_process.php';
?>
/",
                data: {task_id: task_id},
                dataType: 'json'
    		}).done(function(response) {
    		    	waitTitle("Reload page");    
                   	document.location.href=document.location.href;
    		});
    	
    }
    
    function manage_task_monitor(obj){
    			
		if(obj.content != ""){
			var monitor = jQuery.parseJSON(obj.content);
Beispiel #5
0
}

function new_create(){
	document.location.href = '<?php 
echo site_url('make/' . strtolower($label));
?>
';
}

function save_z_override(){

	
	$.ajax({
		type: "POST",
		url : "<?php 
echo module_url('maintenance') . 'ajax/override_probe_lenght.php';
?>
",
		data : {over : z_override},
		dataType: "json"
	}).done(function( data ) {
		
		$(".z-override-alert").slideUp('slow', function(){
			
			$.smallBox({
				title : "Z Height",
				content : 'New value saved',
				color : "#5384AF",
				timeout : 10000,
				icon : "fa fa-check"
			});
Beispiel #6
0
',
            "fnRowCallback": function ( row, data, index ){
                
                $('td', row).eq(1).addClass('hidden-xs');
                $('td', row).eq(2).addClass('hidden-xs');
                $('td', row).eq(3).addClass('hidden-xs');
                $('td', row).eq(4).addClass('text-right');
            }
		});
        */
        
       oTable = $('#objects_table').dataTable({
            "aaSorting": [],
            "bProcessing": true,
            "sAjaxSource": '<?php 
echo module_url('objectmanager') . 'ajax/all_objects_for_table.php';
?>
',
            "fnDrawCallback" : fnCallBack,
            "aoColumns": [
  					{ "bSortable": false },
  					null,
 	 				null,
  					null,
  					null,
  					{"bSortable": false}]
            
       });
        
       $("[rel=tooltip]").tooltip();
        
Beispiel #7
0
echo site_url("updates");
?>
';
				});
                
            }
            
            
            
            function start_update(){
            	
                IS_TASK_ON = true;
                
                $.ajax({
					  url: "<?php 
echo module_url('updates');
?>
ajax/update.php",
					  type: "POST",
                      dataType: 'json', 
                      data: {type: type}
				}).done(function( data ) {
						  
                        json_uri = data.json_uri;
                        id_task = data.id_task;
                        $('.progress-container').show();
					    interval_monitor  = setInterval(monitor, 1000);
					    $('#download-container').slideDown('slow', function() {});
				});

                
Beispiel #8
0
        
        var remote = $('#send-report').is(':checked') ? 1 : 0 ;
        $(".console").html(''); 
        
        trace_file = '';
        monitor_file = '';
        
        finished = false;
        
        $("#start").addClass("disabled");
        $("#send-report").attr("disabled", 'disabled');
        
        $.ajax({
              type: "POST",
              url: "<?php 
echo module_url("maintenance") . 'ajax/self_test.php';
?>
",
              data: { remote : remote },
              dataType: 'json'
        }).done(function( response ) {
            
            monitor_file     = response.json_uri;
            trace_file       = response.trace_uri;
            interval_monitor = setInterval(do_monitor, 250);
            interval_trace   = setInterval(do_trace, 250);
            $(".console").slideDown('slow', function () {});
               
        });
        
        
Beispiel #9
0
	    $(".status").html(' <i class="fa fa-spin fa-spinner fa-2x"></i>');
	    $(".btn").addClass('disabled');
	    var timestamp = new Date().getTime();        
	    /*ticker_url = 'http://<?php 
echo $_SERVER['HTTP_HOST'];
?>
/temp/pre_jog_' + timestamp + '.trace';*/
	    ticker_url = 'http://<?php 
echo $_SERVER['HTTP_HOST'];
?>
/temp/macro_trace';
	   
	    
	    $.ajax({
	              url : '<?php 
echo module_url('jog') . 'ajax/pre_jog.php';
?>
',
				  dataType : 'json',
				  type: 'post',
	              data: {time : timestamp}
			}).done(function(response) {
			  
	             ticker_url = '';
	             refresh_temperature();
	             $(".btn").removeClass('disabled');
	             $(".status").html('');
	        });
	    
	}
		
Beispiel #10
0
            <?php 
if (!$is_stl) {
    ?>
            var file_content = encodeURIComponent($.trim(editor.getSession().getValue()));
            <?php 
}
?>
            var note         = encodeURIComponent($.trim($("#note").val()));
            var name         = encodeURIComponent($.trim($("#name").val()));
            
        
            
            $.ajax({
              type: "POST",
              url: "<?php 
echo module_url("objectmanager") . 'ajax/save_file.php';
?>
",
              data: { <?php 
if (!$is_stl) {
    ?>
file_content: file_content,<?php 
}
?>
 file_id: <?php 
echo $_file->id;
?>
,  file_path : '<?php 
echo $_file->full_path;
?>
', note: note, name: name},
Beispiel #11
0
					</div>

				</div>
				
				

				<div class="col-sm-12">

					<div class="well">

						<div class="row">

							<div class="col-sm-6 text-center">
								<img style="max-width: 25%; display: inline;" class="img-responsive" src="<?php 
echo module_url('maintenance') . 'assets/img/spool/unload-filament.png';
?>
" />
							</div>

							<div class="col-sm-6 text-center">
								<h1><span class="badge bg-color-blue txt-color-white">3</span></h1>
								<h1 class="text-primary">Unload filament</h1>
								<h2>Press start and assist the filament by gently pulling it out of the tube until the procedure has been completed</h2>
							</div>

						</div>

					</div>

				</div>
Beispiel #12
0
            echo $pseudo;
            ?>
 <?php 
            _e('Says :');
            ?>
 <a style="text-decoration:underline" href="<?php 
            echo module_url(array('comments_manage', $g['ID']));
            ?>
"><?php 
            echo word_limiter($g['CONTENT'], 10);
            ?>
</a> <?php 
            _e('On');
            ?>
 <a style="text-decoration:underline" href="<?php 
            echo module_url(array('edit', $news_concerned[0]['ID']));
            ?>
"><?php 
            echo $news_concerned[0]['TITLE'];
            ?>
</a> </h5></td>
                                                </tr>
                                                <?php 
        }
    }
} else {
    ?>
                                                <tr>
                                                    <td colspan="5"><?php 
    _e('No comment available');
    ?>
Beispiel #13
0
 function module_redirect($uri = '', $method = 'location', $http_response_code = 302)
 {
     if (!preg_match('#^https?://#i', $uri)) {
         $uri = module_url($uri);
     }
     // call "parent"
     redirect($uri, $method, $http_response_code);
 }
Beispiel #14
0
            
        });
        
       
          
    }
    
    function pre_unload(){
    	
    	IS_MACRO_ON = true;
    	openWait("Plese wait");
    	
    	$.ajax({
    		type:"POST",
    		url: "<?php 
echo module_url("maintenance") . 'ajax/spool.php';
?>
",
    		data: {action: choice},
    		dataType: "json"
    		
    	}).done(function(response){
    		choice = 'unload';
    		
    		closeWait();
    		 
    		 
    		$(".pre_unload-choice").slideUp( "slow", function() {});
    		$( ".choice" ).slideUp( "slow", function() {});
            $("." + choice + "-choice").slideDown('slow');
            $(".re-choice").slideDown('slow');
Beispiel #15
0
	
	
	
	function do_calibration(){
		
		openWait('Calibration in process');
		IS_MACRO_ON = true;
		var now = jQuery.now();
		ticker_url = '/temp/macro_trace';
		
		
		
		$.ajax({
			type: "POST",
			url : "<?php 
echo module_url('maintenance') . 'ajax/bed_calibration.php';
?>
",
			data : {time: now, num_probes : num_probes, skip_homing: skip_homing},
			dataType: "html"
		}).done(function( data ) {
			
			
			num_probes++;
			skip_homing = 1;
			closeWait();
			ticker_url = '';
			
			if($(".step-1").is(":visible") ){
				
				$(".step-1").slideUp('fast', function(){
Beispiel #16
0
                </div>
            
            </div>
        </div>
    </div>
    <div class="col-sm-6 text-center">
        
        <div class="well">
            <div class="row">
            
                 <div class="col-sm-6">
                    <a href="<?php 
    echo site_url('scan') . '?obj=' . $obj_id;
    ?>
" class="add-scan"><img style="max-width: 50%; display: inline;" class="img-responsive" src="<?php 
    echo module_url('objectmanager') . 'assets/img/add-scan.png';
    ?>
" /></a>
                </div>
                <div class="col-sm-6">
                    <h1 class="text-primary">Add a new scan</h1>
                    <h2>Add a new scan to the existing object. Merge the scans to increase the final model quality.</h2>
                </div>
            
            </div>
        </div>
    </div>
</div>
-->
<?php 
}
Beispiel #17
0
 public function manage($obj, $file_id)
 {
     $this->load->database();
     $this->load->model('files');
     $_file = $this->files->get_file_by_id($file_id);
     $data['obj_id'] = $obj;
     $data['file'] = $_file;
     $_extension = str_replace('.', '', strtolower($_file->file_ext));
     switch ($_extension) {
         case 'asc':
             $data['first_box_title'] = 'Reconstruction';
             $data['first_box_desc'] = 'This experimental feature takes the selected cloud data and process it into a solid STL file that can be printed.';
             $data['first_box_img'] = '<img style="max-width: 50%; display: inline;" class="img-responsive" src="' . module_url('objectmanager') . '/assets/img/reconstruction.png" />';
             $data['first_box_action'] = 'asc';
             break;
         case 'stl':
             $data['first_box_title'] = 'Slicing';
             $data['first_box_desc'] = 'This experimental feature takes the selected STL file and turns it into a printable model (additive manufacturing only).';
             $data['first_box_img'] = '<img style="max-width: 50%; display: inline;" class="img-responsive" src="' . module_url('objectmanager') . '/assets/img/slicing.png" />';
             $data['first_box_action'] = 'stl';
             break;
         case 'gcode':
         case 'gc':
         case 'nc':
             $data['first_box_title'] = 'Print';
             $data['first_box_desc'] = 'Print the file';
             $data['first_box_img'] = '<i class="img-responsive icon-fab-print" style="font-size: 189px;"></i>';
             $data['first_box_action'] = 'print';
             break;
     }
     $_is_asc = strtolower($_file->file_ext) == '.asc';
     $this->layout->view('manage/index', $data);
 }
Beispiel #18
0
function module_css($uri, $tag = true)
{
    $path_css = module_url(assets_dir('css') . '/' . $uri);
    return _css($path_css, $tag);
}
Beispiel #19
0
	 	$(".prepare-engage").on('click', prepare);
	 	
	 	
	 	
	 });
	 
	 
	 
	 function prepare(){
	 	
	 	
	 	openWait('Preparing procedure');
	 	$.ajax({
              type: "POST",
              url: "<?php 
echo module_url("maintenance") . 'ajax/feeder.php';
?>
",
              dataType: 'json'
        }).done(function( response ) { 

			
			
			var status = response.status;
                
                if(status == 200){
                	
                	
                	$(".step-1").hide();
                	$(".step-2").show();
                   
        _e('By');
        ?>
 <strong>
                                                        <a href="<?php 
        echo get_instance()->url->site_url(array('account', 'profile', $user['PSEUDO']));
        ?>
"><?php 
        echo $user['PSEUDO'];
        ?>
</a></strong></small> | 
                                                        <small><?php 
        echo get_instance()->date->timespan($g['DATE']);
        ?>
</small> | 
                                                        <small><a data-doAction style="color:#FF7F7F" href="<?php 
        echo module_url(array('delete', $g['ID']), 'blogster');
        ?>
"><?php 
        _e('Delete');
        ?>
</a></small> <small>
                                                        <input style="display:none;" type="checkbox" name="art_id[]" value="<?php 
        echo $g['ID'];
        ?>
">
                                                        </small></td>
                                                </tr>
                                                <?php 
    }
} else {
    ?>
Beispiel #21
0
 private function config()
 {
     setup_admin_left_menu('File Manager', 'file');
     add_admin_left_menu('Accueil', module_url(array('index')));
     add_admin_left_menu('Ajouter un fichier', module_url(array('upload')));
 }
Beispiel #22
0
}



function mdi(){
	var gcode = jQuery.trim($(this).attr("data-value"));
    make_call('mdi', gcode, true);
}


function make_call(func, value, take){

    	$.ajax({
    		type: "POST",
    		url :'<?php 
echo module_url('jog');
?>
ajax/exec.php',
    		data : {function: func, value: value, feedrate: 1000, step:10},
    		dataType: "json"
    	}).done(function( data ) {
            if(take){
				take_photo();
			}
    	});
	
}

function default_all(){
	
	$( "#encoding" ).val('jpg');
 function site_url($value, $extend = "", $format = true, $format_type_ext = "&amp;")
 {
     $app = sys_init();
     if (!$value) {
         return $app->url();
     }
     if (!$format || $app->sys_config["site_type"] != "html" && $app->sys_config["site_type"] != "rewrite") {
         return $app->url($value, $extend, $format_type_ext);
     }
     if ($app->sys_config["site_type"] == "html" && !$app->sys_config["sitehtml"]) {
         $app->sys_config["sitehtml"] = $app->sys_config["siteurl"] . "html/" . $app->langid . "/";
     }
     $format_type = $app->sys_config["site_type"];
     //切分地址
     $ext = explode(",", $value);
     $c = $ext[0];
     if (!$c) {
         return false;
     }
     if (!$c != "list" || $c != "msg") {
         return $app->url($value, $extend, $format_type_ext);
     }
     $f = $ext[1] ? $ext[1] : "";
     $d = $ext[2] ? $ext[2] : "";
     if ($extend) {
         $array = explode("&", $extend);
         foreach ($array as $k => $v) {
             $tmp_array = explode("=", $v);
             ${$tmp_array}[0] = $tmp_array[1];
         }
     }
     if ($c == "list" && $extend) {
         if ($cid || $cs) {
             if ($format_type == "rewrite") {
                 $url = $cid ? "cid-" . $cid : "cs-" . $cs;
                 if ($pageid && $pageid > 1) {
                     $url .= "-" . $pageid;
                 }
                 $url .= ".html";
                 return $url;
             } else {
                 $app->load_model("cate");
                 if (!$cid && $cs) {
                     $cid = $app->cate_m->get_cid_from_code($cs);
                 }
                 if ($cid) {
                     $rs = $app->cate_m->get_one($cid);
                     return list_url($rs);
                 }
             }
         } else {
             if ($format_type == "rewrite") {
                 $url = $mid ? "mid-" . $mid : "ms-" . $ms;
                 if ($pageid && $pageid > 1) {
                     $url .= "-" . $pageid;
                 }
                 $url .= ".html";
                 return $url;
             } else {
                 $app->load_model("module");
                 if ($ms && !$mid) {
                     $mid = $app->module_m->get_mid_from_code($ms);
                 }
                 if ($mid) {
                     $rs = $app->module_m->get_one($mid);
                     return module_url($rs);
                 }
             }
         }
     } elseif ($c == "msg" && $extend) {
         if ($format_type == "rewrite") {
             $url = $id ? "c" . $id . ".html" : $ts . ".html";
             return $url;
         } else {
             $app->load_model("msg");
             if ($id) {
                 $rs = $app->msg_m->get_one($id);
             } else {
                 $rs = $app->msg_m->get_one_fromtype($ts, $_SESSION["sys_lang_id"]);
             }
             return msg_url($rs);
         }
     }
     return $app->url($value, $extend, $format_type_ext);
 }
Beispiel #24
0
*
*/
function stop_scan(message){
    
    openWait(message);
    _stop_monitor();
    _stop_timer();
    
    $.ajax({
		  type: "POST",
		  /*url: "<?php 
echo site_url('scan/stop');
?>
",*/
          url: "<?php 
echo module_url('scan') . 'ajax/stop.php';
?>
", 
		  data: {task_id: task_id},
	      dataType: 'json'
		}).done(function( data ) {
		  
          if(data.status == 'ok'){
                setTimeout(function(){document.location.href = '<?php 
echo site_url('make/scan');
?>
';}, 1000); 
          }			
    });
    
}
Beispiel #25
0
		           
		});
		
		
	}
	
	
	function save_password(){
		
		$("#save-button").addClass('disabled');
		$("#save-button").html('Saving..');
		
		
		$.ajax({
          url: '<?php 
echo module_url('profile') . 'ajax/save_password.php';
?>
',
          data:{ old_password: $("#old_password").val(), new_password: $("#new_password").val(), confirm_new_password: $("#confirm_new_password").val()},
          type: "POST",
          dataType: 'json'
		}).done(function( response ) {
			
			
			
			$.smallBox({
				title : response.title,
				content : response.message,
				color : response.color,
				iconSmall : response.icon,
                timeout : 4000
Beispiel #26
0
$after = get_option('after', $params['id']);
$rand = uniqid();
?>
<script>


    mw.moduleCSS('<?php 
print module_url();
?>
css/twentytwenty.css');
    mw.moduleJS('<?php 
print module_url();
?>
js/jquery.event.move.js');
    mw.moduleJS('<?php 
print module_url();
?>
js/jquery.twentytwenty.js');

    $(document).ready(function(){
         mw.$("#mw-before-after-<?php 
print $rand;
?>
").twentytwenty({default_offset_pct:0});
    });

</script>

<div class="mw-before-after" id="mw-before-after-<?php 
print $rand;
?>
Beispiel #27
0
        });
        $('#usb_files').val(usb_files.toString());
        
    }
    
}


function check_usb(){
    
   
    
    $.ajax({
    	   type: "POST",
    	   url: "<?php 
echo module_url('objectmanager/ajax/check_usb.php');
?>
",
    	   dataType: 'json'
   	}).done(function(response) {
        
   	    
   	    $("#usb").html(response.content);
   	    
   	    if(response.inserted == true){
        	init_tree();
        }else{
        	$(".check-usb").on('click', function() {
           		check_usb();
        	});
        }
Beispiel #28
0
       			if($(this).is(":checked") != state){
       				$(this).trigger("click");
       			}
       		});
       });


function save_object(){
	
	$("#save-object").addClass('disabled');
	$('#save-object').html('<i class="fa fa-save"></i> Saving...');
	
	$.ajax({
		type: "POST",
		url: "<?php 
echo module_url('objectmanager') . 'ajax/save_object.php';
?>
",
		data: {object_id : <?php 
echo $_object->id;
?>
, name: $("#obj_name").val(), description: $("#obj_description").val(), private: $("#private").is(':checked') ? 1 : 0},
		dataType: 'json'
	}).done(function(response) {

		$("#save-object").removeClass('disabled');
		$('#save-object').html('<i class="fa fa-save"></i> Save');
		
		
		$.smallBox({
			title : "Object saved with success",
Beispiel #29
0
					<i class="fa fa-user"></i>
					<b class="badge">0</b>
				</span>
				<!-- AJAX DROPDOWN -->
				<div class="ajax-dropdown">
					<div class="btn-group btn-group-justified" data-toggle="buttons">
						<label class="btn btn-default update-list  notification">
							<input type="radio" name="activity" id="<?php 
echo site_url('controller/updates');
?>
">
							<span>Updates (0)</span>
						</label>
						<label class="btn btn-default task-list notification">
							<input type="radio"  name="activity" id="<?php 
echo module_url('controller') . 'ajax/tasks.php';
?>
">
							<span>Tasks (0)</span>
						</label>
					</div>
					<div class="ajax-notifications custom-scroll">
						<div class="alert alert-transparent"></div>
					</div>
					<span>
						<button id="refresh-notifications" type="button" data-loading-text="<i class='fa fa-refresh fa-spin'></i> Loading..." class="btn btn-xs btn-default pull-right">
							<i class="fa fa-refresh"></i>
						</button>
					</span>
				</div>
				<!-- END AJAX DROPDOWN -->
Beispiel #30
0
    
    
    
    function save_file(){
        
       
        var file_content = encodeURIComponent($.trim(editor.getSession().getValue()));
        
        $('#submit').addClass("disabled");
        $('#submit').html('<i class="fa fa-spin fa-spinner"></i> Saving');
        
        
        $.ajax({
              type: "POST",
              url: "<?php 
echo module_url("settings") . 'ajax/save_file.php';
?>
",
              data: { file_content: file_content, file_path : '<?php 
echo $_boot_script_file;
?>
'},
              dataType: 'json'
        }).done(function( response ) {
            
            $.smallBox({
				title : "Success",
				content : "<i class='fa fa-check'></i> The file was saved",
				color : "#659265",
				iconSmall : "fa fa-thumbs-up bounce animated",
                timeout : 4000