Renamed 'auth' model, controller and views to 'user'
这个提交包含在:
父节点
98476f67d3
当前提交
ae7a90be71
共有 7 个文件被更改,包括 114 次插入 和 174 次删除
|
|
@ -1,70 +0,0 @@
|
|||
<h2>Add Note</h2>
|
||||
<div class="wrap_content">
|
||||
<?php echo validation_errors(); ?>
|
||||
<form method="post" action="<?php echo site_url('notes/add'); ?>" name="notes_add" id="notes_add">
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="title">Title</label></td>
|
||||
<td><input type="text" name="title" value="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="category">Category</label></td>
|
||||
<td><select name="category">
|
||||
<option value="General" selected="selected">General</option>
|
||||
<option value="Antennas">Antennas</option>
|
||||
<option value="Satellites">Satellites</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><textarea name="content" id="markItUp" rows="10" cols="10"></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div><input type="submit" value="Submit" /></div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
$(document).ready(function() {
|
||||
// Add markItUp! to your textarea in one line
|
||||
// $('textarea').markItUp( { Settings }, { OptionalExtraSettings } );
|
||||
$('#markItUp').markItUp(mySettings);
|
||||
|
||||
// You can add content from anywhere in your page
|
||||
// $.markItUp( { Settings } );
|
||||
$('.add').click(function() {
|
||||
$.markItUp( { openWith:'<opening tag>',
|
||||
closeWith:'<\/closing tag>',
|
||||
placeHolder:"New content"
|
||||
}
|
||||
);
|
||||
return false;
|
||||
});
|
||||
|
||||
// And you can add/remove markItUp! whenever you want
|
||||
// $(textarea).markItUpRemove();
|
||||
$('.toggle').click(function() {
|
||||
if ($("#markItUp.markItUpEditor").length === 1) {
|
||||
$("#markItUp").markItUpRemove();
|
||||
$("span", this).text("get markItUp! back");
|
||||
} else {
|
||||
$('#markItUp').markItUp(mySettings);
|
||||
$("span", this).text("remove markItUp!");
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
-->
|
||||
</script>
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>markitup/jquery.markitup.js"></script>
|
||||
<!-- markItUp! toolbar settings -->
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>markitup/sets/html/set.js"></script>
|
||||
<!-- markItUp! skin -->
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>markitup/skins/markitup/style.css" />
|
||||
<!-- markItUp! toolbar skin -->
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>markitup/sets/html/style.css" />
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
<?php foreach ($note->result() as $row) { ?>
|
||||
<h2>Edit Note - <?php echo $row->title; ?></h2>
|
||||
<div class="wrap_content">
|
||||
<?php echo validation_errors(); ?>
|
||||
<form method="post" action="<?php echo site_url('notes/edit'); ?>/<?php echo $id; ?>" name="notes_add" id="notes_add">
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="title">Title</label></td>
|
||||
<td><input type="text" name="title" value="<?php echo $row->title; ?>" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="category">Category</label></td>
|
||||
<td><select name="category">
|
||||
<option value="General" selected="selected">General</option>
|
||||
<option value="Antennas">Antennas</option>
|
||||
<option value="Satellites">Satellites</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><input type="hidden" name="id" value="<?php echo $id; ?>" /></td>
|
||||
<td><textarea name="content" id="markItUp" rows="10" cols="10"><?php echo $row->note; ?></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div><input type="submit" value="Submit" /></div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<?php } ?>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
$(document).ready(function() {
|
||||
// Add markItUp! to your textarea in one line
|
||||
// $('textarea').markItUp( { Settings }, { OptionalExtraSettings } );
|
||||
$('#markItUp').markItUp(mySettings);
|
||||
|
||||
// You can add content from anywhere in your page
|
||||
// $.markItUp( { Settings } );
|
||||
$('.add').click(function() {
|
||||
$.markItUp( { openWith:'<opening tag>',
|
||||
closeWith:'<\/closing tag>',
|
||||
placeHolder:"New content"
|
||||
}
|
||||
);
|
||||
return false;
|
||||
});
|
||||
|
||||
// And you can add/remove markItUp! whenever you want
|
||||
// $(textarea).markItUpRemove();
|
||||
$('.toggle').click(function() {
|
||||
if ($("#markItUp.markItUpEditor").length === 1) {
|
||||
$("#markItUp").markItUpRemove();
|
||||
$("span", this).text("get markItUp! back");
|
||||
} else {
|
||||
$('#markItUp').markItUp(mySettings);
|
||||
$("span", this).text("remove markItUp!");
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
-->
|
||||
</script>
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>markitup/jquery.markitup.js"></script>
|
||||
<!-- markItUp! toolbar settings -->
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>markitup/sets/html/set.js"></script>
|
||||
<!-- markItUp! skin -->
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>markitup/skins/markitup/style.css" />
|
||||
<!-- markItUp! toolbar skin -->
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>markitup/sets/html/style.css" />
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
<h2>Note</h2>
|
||||
<div class="wrap_content note">
|
||||
|
||||
<?php
|
||||
|
||||
if ($notes->num_rows() > 0)
|
||||
{
|
||||
echo "<ul class=\"notes_list\">";
|
||||
foreach ($notes->result() as $row)
|
||||
{
|
||||
echo "<li>";
|
||||
echo "<a href=\"".site_url()."/notes/view/".$row->id."\">".$row->title."</a>";
|
||||
echo "</li>";
|
||||
}
|
||||
echo "</ul>";
|
||||
} else {
|
||||
echo "<p>You have no notes, why not create one!</p>";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<p><a href="<?php echo site_url('notes/add'); ?>" title="Add Note">Create a Note</a></p>
|
||||
|
||||
</div>
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<?php foreach ($note->result() as $row) { ?>
|
||||
<h2>Note - <?php echo $row->title; ?></h2>
|
||||
<div class="wrap_content note">
|
||||
<?php echo nl2br($row->note); ?>
|
||||
|
||||
<p>Options: <a href="<?php echo site_url('notes/edit'); ?>/<?php echo $row->id; ?>"><img src="<?php echo base_url(); ?>images/application_edit.png" width="16" height="16" alt="Edit" /></a> <a href="<?php echo site_url('notes/delete'); ?>/<?php echo $row->id; ?>"><img src="<?php echo base_url(); ?>images/delete.png" width="16" height="16" alt="Delete" /></a></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
38
application/views/user/edit.php
普通文件
38
application/views/user/edit.php
普通文件
|
|
@ -0,0 +1,38 @@
|
|||
<h2>Edit user</h2>
|
||||
<div class="wrap_content user">
|
||||
<?php echo validation_errors(); ?>
|
||||
|
||||
<form method="post" action="<?php echo site_url('user/edit')."/".$this->uri->segment(3); ?>" name="users">
|
||||
<table>
|
||||
<tr>
|
||||
<td>Username</td>
|
||||
<td><input type="text" name="user_name" value="<?php echo $user_name; ?>" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>E-mail</td>
|
||||
<td><input type="text" name="user_email" value="<?php echo $user_email; ?>" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Password</td>
|
||||
<td><input type="text" name="user_password" /><br><div class="small">Leave blank to keep existing password</div><div class="small">For testing: <i><?php echo $user_password; ?></i></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Type</td>
|
||||
<td><select name="user_type">
|
||||
<option value="99" <?php if($user_type == "99") { echo "selected=\"selected\""; } ?>>Owner</option>
|
||||
<option value="3" <?php if($user_type == "3") { echo "selected=\"selected\""; } ?>>Editor</option>
|
||||
<option value="2" <?php if($user_type == "2") { echo "selected=\"selected\""; } ?>>API User</option>
|
||||
<option value="1" <?php if($user_type == "1") { echo "selected=\"selected\""; } ?>>Viewer</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="id" value="<?php echo $this->uri->segment(3); ?>" />
|
||||
<div><input type="submit" value="Submit" /></div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
23
application/views/user/login.php
普通文件
23
application/views/user/login.php
普通文件
|
|
@ -0,0 +1,23 @@
|
|||
<h2>Log in</h2>
|
||||
<div class="wrap_content user">
|
||||
<?php echo validation_errors(); ?>
|
||||
|
||||
<form method="post" action="<?php echo site_url('user/login'); ?>" name="users">
|
||||
<table>
|
||||
<tr>
|
||||
<td>Username</td>
|
||||
<td><input type="text" name="user_name" value="<?php echo $this->input->post('user_name'); ?>"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Password</td>
|
||||
<td><input type="text" name="user_password" /></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<input type="hidden" name="id" value="<?php echo $this->uri->segment(3); ?>" />
|
||||
<div><input type="submit" value="Log in" /></div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
53
application/views/user/main.php
普通文件
53
application/views/user/main.php
普通文件
|
|
@ -0,0 +1,53 @@
|
|||
<h2>Users</h2>
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url() ;?>/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url() ;?>/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo base_url() ;?>/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".qsobox").fancybox({
|
||||
'width' : '75%',
|
||||
'height' : '50%',
|
||||
'autoScale' : false,
|
||||
'transitionIn' : 'none',
|
||||
'transitionOut' : 'none',
|
||||
'type' : 'iframe'
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<div class="wrap_content">
|
||||
|
||||
|
||||
<?php if($this->session->flashdata('notice')) { ?>
|
||||
<div id="message" >
|
||||
<?php echo $this->session->flashdata('notice'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<table class="users" width="100%">
|
||||
<tr class="user_title titles">
|
||||
<td>User</td>
|
||||
<td>E-mail</td>
|
||||
<td>Type</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
$i = 0;
|
||||
foreach ($results->result() as $row) { ?>
|
||||
<?php echo '<tr class="tr'.($i & 1).'">'; ?>
|
||||
<td><a href="<?php echo site_url('user/edit')."/".$row->user_id; ?>"><?php echo $row->user_name; ?></a></td>
|
||||
<td><?php echo $row->user_email; ?></td>
|
||||
<td><?php echo $row->user_type; ?></td>
|
||||
</tr>
|
||||
<?php $i++; } ?>
|
||||
</table>
|
||||
</div>
|
||||
正在加载…
在新工单中引用