예제 #1
0
 static function radio_select($value, $current)
 {
     if ($radio_select = strval($value)) {
         self::$radio_select = $radio_select;
     }
     if ($radio_select_current = strval($current)) {
         self::$radio_select_current = $radio_select_current;
     }
 }
예제 #2
0
MPut::_html_attr($data->title);
?>
" />
										</div>

										<br />

										<div class="well">

												<p class="text-info">Contents in this category:</p>

												<?php 
MTable::init(mapi_2stdclass($data->contents, array('id' => 'get_id', 'title' => 'get_title', 'address' => 'get_address')), 'category_contents');
MTable::columns(array('id', 'title', 'address'));
MTable::links(array('title' => 'index.php?module=mcontent&task=content_edit&object=*[id]'));
MTable::radio_select('id', $data->flagship);
MTable::show();
?>

												<?php 
if (sizeof($data->contents) > 0) {
    ?>
														<script type="text/javascript">
																new MContent().nosort_column( 'category_contents', 0 , 1 );
														</script>
												<?php 
}
?>
											
										</div>
예제 #3
0
			        			<?php 
if (sizeof($categories) > 0) {
    foreach ($categories as $category) {
        if (isset($category->contents)) {
            $contents_array = explode(';', $category->contents);
            $category->objects = sizeof($contents_array);
        } else {
            $category->objects = 0;
        }
    }
}
MTable::init($categories, 'category_list');
MTable::columns(array('id', 'title', 'objects'));
MTable::badges(array('objects'));
MTable::radio_select('id', null);
MTable::show();
?>
								<?php 
if (sizeof($categories) > 0) {
    ?>
										<script type="text/javascript">
												new MContent().nosort_column( 'category_list', 0 , 1 );
										</script>
								<?php 
}
?>
			      		</div>
			      		
			      		<div class="modal-footer">
			        			<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>