/**
  * Build Permissions Table
  */
 public function buildPermissionsTable($parent_id = 0)
 {
     $results = $this->permission->getPermissions($parent_id);
     if ($results) {
         $permissions = '';
         foreach ($results as $row) {
             if ($row->parent_id == $parent_id) {
                 if ($row->parent_id == 0) {
                     $permissions .= "<tr >";
                     $permissions .= "<td class=\"uppercase text-bold\"></td>";
                     $permissions .= "<td class=\"uppercase text-bold\"><i class=\"icon-folder6\"></i>&nbsp; {$row->display_name}</td>";
                     $permissions .= "<td class=\"border-right border-grey-100 uppercase text-bold\"></td>";
                     $permissions .= "<td class=\"border-right border-grey-100\">" . Date::showDateTime($row->updated_at, 'local', 'local') . "</td>";
                     $permissions .= "<td class=\"uppercase text-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t<ul class=\"icons-list\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"permissions/edit-group/{$row->id}\" data-popup=\"tooltip\" title=\"" . $this->language->show('edit', 'permissions') . "\"><i class=\"icon-pencil7 edit\"></i></a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t</ul>\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t</td>";
                     $permissions .= "</tr>";
                     $permissions .= $this->buildPermissionsTable($row->id);
                 } else {
                     $permissions .= "<tr class=\"\">";
                     $permissions .= "<td class=\"border-right border-grey-100\">{$row->id}</td>";
                     $permissions .= "<td class=\"border-right border-grey-100\">{$row->display_name}</td> ";
                     $permissions .= "<td class=\"border-right border-grey-100\">{$row->name}</td>";
                     $permissions .= "<td class=\"border-right border-grey-100\">" . Date::showDateTime($row->updated_at, 'local', 'local') . "</td>";
                     $permissions .= "<td>\n\t\t\t\t\t\t\t\t\t\t\t<ul class=\"icons-list\">\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"permissions/edit/{$row->id}\" data-popup=\"tooltip\" title=\"" . $this->language->show('edit', 'permissions') . "\"><i class=\"icon-pencil7 edit\"></i></a></li>\n\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t</td>";
                     $permissions .= "</tr>";
                     $permissions .= $this->buildPermissionsTable($row->id);
                 }
             }
         }
     }
     return $permissions;
 }
 public function buildDepartmentTable($parent_id = 0, $depth = 0)
 {
     $results = $this->department->getDepartments($parent_id);
     if ($results) {
         $departments = '';
         foreach ($results as $row) {
             if ($row->parent_id == $parent_id) {
                 if ($row->status == 1) {
                     $status = "<span class=\"label label-success\">" . $this->language->show('enabled', 'departments') . "</span>";
                 } else {
                     $status = "<span class=\"label label-danger\">" . $this->language->show('disabled', 'departments') . "</span>";
                 }
                 if ($row->parent_id == 0) {
                     $indent = '';
                 } else {
                     $indent = '<i class="icon-arrow-right13"></i>';
                 }
                 if (!is_null($row->color)) {
                     $color = '<div style="float: right; margin-top: 6px; width: 10px; height: 10px; background-color: ' . $row->color . '"></div>';
                 } else {
                     $color = '';
                 }
                 $departments .= "<tr>";
                 $departments .= "<td>{$row->id}</td>";
                 $departments .= "<td>";
                 $departments .= str_repeat('&nbsp;', $depth * 6);
                 $departments .= "{$indent} {$color} {$row->name}</td>";
                 $departments .= "<td>{$row->email}</td> ";
                 $departments .= "<td>{$status}</td>";
                 $departments .= "<td>" . Date::showDateTime($row->updated_at, 'local', 'local') . "</td>";
                 $departments .= "<td>\n\t\t\t\t\t\t\t<ul class=\"icons-list\">\n\t\t\t\t\t\t\t\t<li><a href=\"departments/edit/{$row->id}\" data-popup=\"tooltip\" title=\"" . $this->language->show('edit', 'departments') . "\"><i class=\"icon-pencil7 edit\"></i></a></li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</td>";
                 $departments .= "</tr>";
                 $departments .= $this->buildDepartmentTable($row->id, $depth + 1);
             }
         }
     }
     $i++;
     return $departments;
 }
示例#3
0
?>
                                </select>
                            </div>                            
                            <div class="form-group" id="publish_wrapper">
                                <label class="checkbox-inline">
                                    <input type="checkbox" class="schedule" name="schedule" id="schedule" value="1">
                                    <?php 
echo Language::show('Schedule', 'blog');
?>
                                </label>                                                                              
                                <input id="published_at" name="published_at" required="required" type="text" class="form-control datetimepicker mt-10" data-date-format="<?php 
echo Date::convertPHPToMomentFormat($_SESSION['dateformat'] . ' ' . $_SESSION['timeformat']);
?>
" value="<?php 
if (isset($error)) {
    echo Date::showDateTime($_POST['published_at'], 'local', 'local');
}
?>
">
                            </div>                                                                                     
                            <div class="form-group">
                                <label><?php 
echo Language::show('category', 'blog');
?>
<span class="text-danger">*</span></label>
                                <select tabindex="4" class="select" name="category" data-placeholder="" required>
	                                <option value=""><?php 
echo Language::show('none', 'blog');
?>
</option>
                                	<?php 
示例#4
0
    /**
     * Comments Add
     */
    public function commentsAdd()
    {
        $comment_id = $this->blog->insertComment(array('post_id' => $_POST['post_id'], 'comment' => $_POST['comment'], 'user_id' => $_SESSION['id']));
        Log::notice('log_comments_add', json_encode(array('post_id' => $_POST['post_id'], 'comment' => $_POST['comment'], 'user_id' => $_SESSION['id'])));
        $data = '       
                    <li class="media">
                        <div class="media-left">
                            <a href="/assets/images/placeholder.jpg">
                                <img src="/assets/images/placeholder.jpg" class="img-circle" alt="">
                            </a>
                        </div>

                        <div class="media-body">
                            <div class="media-content">' . $_POST['comment'] . '</div>
                            <span class="media-annotation display-block mt-10"><span class="text-semibold pr-10">' . $_SESSION['first_name'] . ' ' . $_SESSION['last_name'] . '</span> <span class="media-annotation dotted comment-datetime pr-10" data-date="' . Date::showDateTime(date("Y-m-d H:i:s"), 'local', 'local') . '">' . Date::showDateTime(date("Y-m-d H:i:s"), 'local', 'local') . '</span><a href="" data-comment="' . $comment_id . '" class="media-annotation dotted delete-comment">Delete</a></span>
                        </div>
                    </li>         
                ';
        echo $data;
    }
示例#5
0
if ($data['offices']) {
    foreach ($data['offices'] as $row) {
        if ($row->status == 1) {
            $status = "<span class=\"label label-success\">" . Language::show('enabled', 'offices') . "</span>";
        } else {
            $status = "<span class=\"label label-danger\">" . Language::show('disabled', 'offices') . "</span>";
        }
        echo "<tr>";
        echo "<td>{$row->id}</td>";
        echo "<td>{$row->company}</td>";
        echo "<td>{$row->name}</td>";
        echo "<td>{$row->address_1}</td>";
        echo "<td>{$row->city}</td> ";
        echo "<td>{$row->country}</td> ";
        echo "<td>{$status}</td>";
        echo "<td data-sort=\"{$row->updated_at}\">" . Date::showDateTime($row->updated_at, 'local', 'local') . "</td>";
        echo "<td>\n\t\t\t\t\t\t\t\t\t\t<ul class=\"icons-list\">\n\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"offices/edit/{$row->id}\" data-popup=\"tooltip\" title=\"" . Language::show('edit', 'offices') . "\"><i class=\"icon-pencil7 edit\"></i></a></li>\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t</td>";
        echo "</tr>";
    }
}
?>
                    </tbody>
                </table>

        </div>
        <!-- /panel -->

    </div>
    <!-- /content area -->

</div>
示例#6
0
                                    <input type="checkbox" class="schedule" name="schedule" id="schedule" <?php 
echo $checked;
?>
 value="1">
                                    <?php 
echo Language::show('Schedule', 'blog');
?>
                                </label>                                                                              
                                <input id="published_at" name="published_at" required="required" type="text" class="form-control datetimepicker mt-10" data-date-format="<?php 
echo Date::convertPHPToMomentFormat($_SESSION['dateformat'] . ' ' . $_SESSION['timeformat']);
?>
" value="<?php 
if (isset($error)) {
    echo Date::showDateTime($_POST['published_at'], 'local', 'local');
} else {
    echo Date::showDateTime($data['post'][0]->published_at, 'local', 'local');
}
?>
">
                            </div>                                                                                     
                            <div class="form-group">
                                <label><?php 
echo Language::show('category', 'blog');
?>
<span class="text-danger">*</span></label>
                                <select tabindex="4" class="select" name="category" data-placeholder="" required>
	                                <option value=""><?php 
echo Language::show('none', 'blog');
?>
</option>
                                	<?php 
示例#7
0
                                                        </a>
                                                    </div>
                
                                                    <div class="media-body">
                                                        <div class="media-content"><?php 
            echo $comment->comment;
            ?>
</div>
                                                        <span class="media-annotation display-block mt-10"><span class="text-semibold pr-10"><?php 
            echo $comment->first_name . ' ' . $comment->last_name;
            ?>
</span> <span class="media-annotation dotted comment-datetime pr-10" data-date="<?php 
            echo Date::showDateTime($comment->created_at, 'local', 'local');
            ?>
"><?php 
            echo Date::showDateTime($comment->created_at, 'local', 'local');
            ?>
</span><a href="" data-comment="<?php 
            echo $comment->id;
            ?>
" class="media-annotation dotted delete-comment">Delete</a></span>
                                                    </div>
                                                </li>                                               
                                            
                                            <?php 
        }
        ?>
                                                                                                                                                                      
                                        </ul>

                                        <textarea name="enter_comment" id="summernote-<?php 
示例#8
0
                    </thead>
                    <tbody>
                    	<?php 
if ($data['groups']) {
    foreach ($data['groups'] as $row) {
        if ($row->status == 1) {
            $status = "<span class=\"label label-success\">" . Language::show('enabled', 'groups') . "</span>";
        } else {
            $status = "<span class=\"label label-danger\">" . Language::show('disabled', 'groups') . "</span>";
        }
        echo "<tr>";
        echo "<td>{$row->id}</td>";
        echo "<td>{$row->name}</td>";
        echo "<td>{$row->email}</td> ";
        echo "<td>{$status}</td>";
        echo "<td>" . Date::showDateTime($row->updated_at, 'local', 'local') . "</td>";
        echo "<td>\n\t\t\t\t\t\t\t\t\t\t<ul class=\"icons-list\">\n\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"groups/edit/{$row->id}\" data-popup=\"tooltip\" title=\"" . Language::show('edit', 'groups') . "\"><i class=\"icon-pencil7 edit\"></i></a></li>\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t</td>";
        echo "</tr>";
    }
}
?>
                    </tbody>
                </table>

        </div>
        <!-- /panel -->

    </div>
    <!-- /content area -->

</div>
示例#9
0
                                        <th></th>
                                        <th></th>
                                    </tr>                                        
                                </thead>
                                <tbody>
                                    <?php 
if ($data['activity_log']) {
    foreach ($data['activity_log'] as $row) {
        $color = Log::colorLog($row->type);
        if (!empty($row->method)) {
            $method = "<li><i data-popup=\"popover\" data-placement=\"left\" title=\"" . Language::show('action_details', 'users') . "\" data-content=\"" . htmlentities($row->method, ENT_QUOTES, 'UTF-8') . "\" class=\"icon-database-insert cursor-pointer\"></i></li>";
        } else {
            $method = "";
        }
        echo "<tr>";
        echo "<td data-filter=\"" . Date::showDate($row->logged_at, 'local', 'local') . "\" data-sort=\"{$row->logged_at}\">" . Date::showDateTime($row->logged_at, 'local', 'local') . "</td>";
        echo "<td><span class=\"label label-{$color}\">{$row->type}</span></td>";
        echo "<td>" . Language::show($row->activity, 'log') . "</td>";
        echo "<td>{$row->ip_address}</td>";
        echo "<td>\n                                                    <ul class=\"icons-list\">\n                                                        <li><i data-popup=\"popover\" data-placement=\"left\" title=\"" . Language::show('user_agent', 'users') . "\" data-html=\"true\" data-content=\"" . Log::get_user_browser($row->details) . "\" class=\"icon-laptop cursor-pointer\"></i></li>\n                                                        {$method}\n                                                    </ul>\n                                                </td>";
        echo "</tr>";
    }
}
?>
                                </tbody>
                            </table>
                        
                        </div>
                        <!-- /Panel -->
                    
                    </div>