Skip to content

Commit

Permalink
Ajustes en javascript. Comentarios y acciones.
Browse files Browse the repository at this point in the history
  • Loading branch information
crishnakh committed May 7, 2022
1 parent d7782bd commit b0c4566
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
7 changes: 6 additions & 1 deletion igw_includes/actions/actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@
if($_GET["t"]!=""){
$url.='&t='.$_GET["t"].'';
}

if($_GET["st"]!=""){
$url.='&st='.$_GET["st"].'';
}
header('Location: index.php?1=1'.$url.'');
die();

Expand Down Expand Up @@ -285,6 +287,9 @@
if($_GET["c"]!=""){
$url.='&c='.$_GET["c"].'';
}
if($_GET["st"]!=""){
$url.='&st='.$_GET["st"].'';
}

if($_GET["t"]!=""){
$url.='&t='.$_GET["t"].'';
Expand Down
16 changes: 12 additions & 4 deletions igw_includes/actions/list_mails.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
if(
((int)$_GET["id"]==0)
){

//What type of emails are you listing?
if($_GET["tipo"]=="notes"){
$variable_notes="_notes";
$variable_tipo="AND FOLDER='NOTES'";
Expand All @@ -33,18 +33,25 @@
$variable_tipo="AND FOLDER='INBOX'";
}

//Do you selected a tag?
//Future: Two tag selection?
if((int)$_GET["t"]!="0"){
$tagurl = ' AND UDATE IN (
SELECT ID_MAIL FROM `igw_emails_tags` WHERE `ID_TAG` = '.(int)$_GET["t"].'
)';
}

//Show special tags or hide them on the list
if(clear($_GET["st"])=="archived"){
$tagurl = " AND ARCHIVE='1'";
}elseif(clear($_GET["st"])=="trash"){
$tagurl = " AND DELETED='1'";
}else{
$tagurl = " AND DELETED='0' AND ARCHIVE='0'";
}

//Did you select a mail account, year or month?
//Why not a day filter?
if(($_GET["c"]!="") && ((int)$_GET["y"]!=0) && ((int)$_GET["m"]!=0)){
$buscar= "WHERE FILE LIKE '%mailbackup".$variable_notes."/".$_GET["c"]."/".$_GET["y"]."/".$_GET["m"]."/MSG_ID_%' ".$tagurl." ".$variable_tipo."";
}elseif(($_GET["c"]!="") && ((int)$_GET["y"]!=0) && ((int)$_GET["m"]==0)){
Expand All @@ -58,6 +65,7 @@
}


//Query!
$admtotal = mysqli_fetch_array(DBSelect('igw_emails', 'COUNT(*) AS total', "".$buscar."",'ORDER BY UDATE DESC'));
$pages = new Paginator;
$pages->items_total = $admtotal['total'];
Expand All @@ -80,7 +88,7 @@

<div class="card-tools">
<div class="input-group input-group-sm">
<input type="text" class="form-control" placeholder="Search Mail">
<input type="text" class="form-control" placeholder="<?php echo $lang_content_title_search; ?>">
<div class="input-group-append">
<div class="btn btn-secondary">
<i class="fas fa-search"></i>
Expand Down Expand Up @@ -205,9 +213,9 @@
echo '</td>';
echo '<td class="mailbox-star" style="width: 24px;">';
if($list["ARCHIVE"]!="0"){
echo '<div class="email-checkbox"><a href="index.php?a=unarchive&u='.$list["UDATE"].'"><i class="fa fa-archive mr-2 text-warning"></i></a></div>';
echo '<div class="email-checkbox"><a href="index.php?a=unarchive&st=archived&u='.$list["UDATE"].'"><i class="fa fa-archive mr-2 text-warning"></i></a></div>';
}elseif($list["DELETED"]!="0"){
echo '<div class="email-checkbox"><a href="index.php?a=undelete&u='.$list["UDATE"].'"><i class="fa fa-trash mr-2 text-red"></i></a></div>';
echo '<div class="email-checkbox"><a href="index.php?a=undelete&st=trash&u='.$list["UDATE"].'"><i class="fa fa-trash mr-2 text-red"></i></a></div>';
}
echo '</td>';

Expand Down
1 change: 1 addition & 0 deletions igw_languages/en_US.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
$lang_content_title_drafts="Drafts";
$lang_content_title_notes="Notes";
$lang_content_title_tag="Tagged with";
$lang_content_title_search="Search...";


//Content footer
Expand Down
10 changes: 5 additions & 5 deletions igw_template/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
})

//Handle starring for glyphicon and font awesome
$('.mailbox-star').click(function (e) {
/*$('.mailbox-star').click(function (e) {
e.preventDefault()
//detect type
var $this = $(this).find('a > i')
Expand All @@ -84,11 +84,11 @@
$this.toggleClass('fa-star')
$this.toggleClass('fa-star-o')
}
})
})*/
})
</script>
<script type="text/javascript">
$(function() {
/*$(function() {
const Toast = Swal.mixin({
toast: true,
position: 'top-end',
Expand Down Expand Up @@ -239,8 +239,8 @@ class: 'bg-maroon',
body: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr.'
})
});
});

});*/
</script>
<!-- AdminLTE for demo purposes -->
<script src="vendor/almasaeed2010/adminlte/dist/js/demo.js"></script>
Expand Down

0 comments on commit b0c4566

Please sign in to comment.