157 lines
3.8 KiB
Smarty
157 lines
3.8 KiB
Smarty
|
|
{*
|
|
@author Ermek
|
|
@copyright Hire-Experts LLC
|
|
@version UserNote 1.01
|
|
*}
|
|
|
|
{include file='header.tpl'}
|
|
|
|
<img src="./images/he_user_note_main.png" border="0" class="icon_big" height="32">
|
|
<div class="page_header">{lang_print id=690699007}</div>
|
|
<br />
|
|
|
|
{literal}
|
|
<script>
|
|
function confirmDelete(id)
|
|
{
|
|
video_id = id;
|
|
opendivmodal('confirmdelete'+id);
|
|
}
|
|
|
|
function deleteVideo(userid)
|
|
{
|
|
var request = new Request({
|
|
'url' : 'user_notes.php',
|
|
'method' : 'post',
|
|
'data' : {
|
|
'task' : 'deletenote',
|
|
'user_id' : userid
|
|
|
|
},
|
|
onComplete : function()
|
|
{
|
|
|
|
window.location = 'user_notes.php';
|
|
}
|
|
}).send();
|
|
}
|
|
|
|
|
|
|
|
function editVideo(userid, note)
|
|
{
|
|
|
|
content=jQuery("#editvideo").html();
|
|
jQuery("#myModal").html(content);
|
|
|
|
jQuery(".modal-content").css("background", "black")
|
|
|
|
$('user_id').value = userid;
|
|
note1 = note.replace(/(\r\n|\n|\r)/gm, "");
|
|
$('note').defaultValue = note1.replace(/<br\s*[\/]?>/gi, "\r\n");
|
|
note = note.replace(/(\r\n|\n|\r)/gm, "");
|
|
$('note').value = note.replace(/<br\s*[\/]?>/gi, "\r\n");
|
|
|
|
// opendivmodal('editvideo');
|
|
}
|
|
|
|
|
|
</script>
|
|
{/literal}
|
|
|
|
{foreach from=$user_notes item=note}
|
|
<div class="friends_result">
|
|
<table cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<td class="friends_result0">
|
|
<a href="{$url->url_create('profile', $note.user->user_info.user_username)}">
|
|
|
|
{assign var="profilepicture" value=$note.user->user_photo("./images/nophoto.png")}
|
|
{$note.user->userprofiledot($profilepicture, "90px", "90px")}
|
|
|
|
</a>
|
|
</td>
|
|
<td class="friends_result1" width="100%">
|
|
<div class="pull-left">
|
|
<font class="big"><a href="{$url->url_create('profile', $note.user->user_info.user_username)}">
|
|
<img src="./images/icons/user16.gif" border="0" class="icon">{$note.user->user_displayname}
|
|
</a></font>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="pull-right"><a href='javascript:void(0);' onClick="editVideo('{$note.user_id}', '{$note.note|regex_replace:"/[\r\n]/":"<br>"}');" data-toggle="modal" data-target="#myModal">Edit</a> |
|
|
<a href="javascript:void(0);" onclick="confirmDelete('{$note.user_id}');">Delete</a>
|
|
</div>
|
|
|
|
<div style='display: none;' id='confirmdelete{$note.user_id}'>
|
|
<div style='margin-top: 10px;'>
|
|
Are you sure you want to delete this note? </div>
|
|
<br>
|
|
<input type='button' class='button' value='Delete' onClick='deleteVideo("{$note.user_id}");closemodal();'> <input type='button' class='button' value='Cancel' onClick='closemodal();'>
|
|
</div>
|
|
|
|
|
|
<div class="clearfix"></div>
|
|
<br>
|
|
<table cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<td valign="top"><b>{lang_print id=690699015}</b> {$note.note|nl2br}</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
{/foreach}
|
|
|
|
{if !$user_notes}
|
|
<br/>
|
|
<div>{lang_print id=690699008}</div>
|
|
{/if}
|
|
|
|
<div style='display: none;' id='editvideo'>
|
|
|
|
<div class="modal-dialog"><button type="button" class="close main-bg-color alt-text-color orangebg" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i></button><div class="modal-content" style="text-align:left;">
|
|
|
|
<form action='user_notes.php' name='editForm' method='post' target='_parent' autocomplete="off">
|
|
|
|
<div style='margin-top: 10px;'>{lang_print id=5500082}</div>
|
|
|
|
<br />
|
|
|
|
|
|
|
|
|
|
<b>Note</b><br>
|
|
|
|
<textarea name='note' id='note' rows='6' cols='50'></textarea>
|
|
|
|
<br />
|
|
|
|
<br>
|
|
|
|
|
|
|
|
|
|
<input type='submit' class='button' value='{lang_print id=173}' />
|
|
|
|
<input type='button' class='button' value='{lang_print id=39}' onClick='closemodal();' />
|
|
|
|
<input type='hidden' name='task' value='editnote' />
|
|
|
|
<input type='hidden' name='user_id' id='user_id' value='' />
|
|
|
|
</form>
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
</div></div></div></div>
|
|
|
|
|
|
|
|
|
|
{include file='footer.tpl'} |