コード例 #1
0
ファイル: lib.php プロジェクト: sumitnegi933/Moodle_lms_New
/**
 * Given an object containing all the necessary data,
 * (defined by the form in mod_form.php) this function
 * will update an existing instance with new data.
 *
 * @global object
 * @param object $label
 * @return bool
 */
function label_update_instance($label)
{
    global $DB;
    $label->name = get_label_name($label);
    $label->timemodified = time();
    $label->id = $label->instance;
    return $DB->update_record("label", $label);
}
コード例 #2
0
ファイル: lib.php プロジェクト: edwinphillips/moodle-485cb39
function label_update_instance($label)
{
    /// Given an object containing all the necessary data,
    /// (defined by the form in mod.html) this function
    /// will update an existing instance with new data.
    $label->name = get_label_name($label);
    $label->timemodified = time();
    $label->id = $label->instance;
    return update_record("label", $label);
}
コード例 #3
0
ファイル: posts.php プロジェクト: karlomikus/CometCI
 public function archive($label = 0)
 {
     $this->load->model('posts_m');
     $this->load->model('labels/labels_m');
     if (!empty($label)) {
         $posts = $this->posts_m->get_many_by('label', $label);
     } else {
         $posts = $this->posts_m->get_all();
     }
     $currentLabel = !empty($label) ? get_label_name($label) : 'all';
     $this->template->set('posts', $posts)->set('currentlabel', $currentLabel)->set('labels', $this->labels_m->get_all())->build('archive.twig');
 }
コード例 #4
0
ファイル: main.php プロジェクト: karlomikus/CometCI
        echo $post->state == 0 ? '<span class="label label-info">Draft</span>' : '';
        ?>
</td>
			<td><?php 
        echo cms_date($post->date);
        ?>
 - <?php 
        echo cms_time($post->date);
        ?>
</td>
			<td><?php 
        echo $this->ion_auth->user($post->author)->row()->username;
        ?>
</td>
			<td><?php 
        echo get_label_name($post->label);
        ?>
</td>
			<td class="action">
				<a class="action-icon" href="#">Action</a>
				<ul class="action-list" style="display: none;">
					<li><a class="confirm-delete" href="<?php 
        echo site_url('admin/posts/delete/' . $post->id);
        ?>
"><i class="icon-trash icon-large"></i></a></li>
					<li><a href="<?php 
        echo site_url('admin/posts/edit/' . $post->id);
        ?>
"><i class="icon-edit icon-large"></i></a></li>
				</ul>
			</td>
コード例 #5
0
ファイル: PanelFormHelper.php プロジェクト: kotow/work
function panel_gallery($objId, $options = array())
{
    $paramsStr = "";
    if (isset($options['width'])) {
        //$code .= panel_hidden('gw', $options['width']);
        $paramsStr .= "gw-" . $options['width'] . "-";
    }
    if (isset($options['height'])) {
        //$code .= panel_hidden('gh', $options['height']);
        $paramsStr .= "gh-" . $options['height'] . "-";
    }
    if (isset($options['path'])) {
        //$code .= panel_hidden('gp', $options['path']);
        $paramsStr .= "gp-" . $options['path'] . "-";
    }
    if (isset($options['thumb_width'])) {
        //$code .= panel_hidden('gtw', $options['thumb_width']);
        $paramsStr .= "gtw-" . $options['thumb_width'] . "-";
    }
    if (isset($options['thumb_height'])) {
        //$code .= panel_hidden('gth', $options['thumb_height']);
        $paramsStr .= "gth-" . $options['thumb_height'] . "-";
    }
    if (isset($options['thumb_path'])) {
        //$code .= panel_hidden('gtp', $options['thumb_path']);
        $paramsStr .= "gtp-" . $options['thumb_path'] . "-";
    }
    if (isset($options['crop_width'])) {
        //$code .= panel_hidden('gw', $options['width']);
        $paramsStr .= "gcw-" . $options['crop_width'] . "-";
    }
    if (isset($options['crop_height'])) {
        //$code .= panel_hidden('gh', $options['height']);
        $paramsStr .= "gch-" . $options['crop_height'] . "-";
    }
    $paramsStr = str_replace("/", "_", $paramsStr);
    $paramsStr = str_replace("-", DIRECTORY_SEPARATOR, $paramsStr);
    $code = '
<div class="field">
	<label>' . get_label_name($options['labelname'], '') . '</label>
	<a class="support" id="add_gallery_image" href="javascript:void(0);" onclick="upload_gallery(' . $objId . ',\'' . $paramsStr . '\')">Add image to gallery</a>
	<input id="gallery_params" type="hidden" value="' . $paramsStr . '">
</div>

<div class="field">
	<p class="text-highlight">Please note that the maximum allowable size of each file is 4 MB. Allowed file formats are JPG, JPEG, GIF, PNG.</p>
</div>
<input type="hidden" id="usedImage" value="" />
<div class="images-holder" id="galleryPicsList">
	&nbsp;
</div>
';
    return $code;
}
コード例 #6
0
ファイル: main.php プロジェクト: karlomikus/CometCI
	</thead>
	<tbody>
		<?php 
if (!empty($forums)) {
    ?>
		<?php 
    $i = 1;
    foreach ($forums as $forum) {
        ?>
		<tr>
			<td><?php 
        echo $forum->name;
        ?>
</td>
			<td><?php 
        echo get_label_name($forum->label);
        ?>
</td>
			<td><span class="label label-info">Private</span></td>
			<td class="action">
				<a class="action-icon" href="#">Action</a>
				<ul class="action-list" style="display: none;">
					<li><a class="confirm-delete" href="<?php 
        echo site_url('admin/forums/delete/' . $forum->id);
        ?>
"><i class="icon-trash icon-large"></i></a></li>
					<li><a href="<?php 
        echo site_url('admin/forums/edit/' . $forum->id);
        ?>
"><i class="icon-edit icon-large"></i></a></li>
				</ul>