2 // +-----------------------------------------------------------------------------+
3 // Copyright (C) 2011 Z&H Consultancy Services Private Limited <sam@zhservices.com>
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
18 // A copy of the GNU General Public License is included along with this program:
19 // openemr/interface/login/GnuGPL.html
20 // For more information write to the Free Software
21 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 // Author: Eldho Chacko <eldho@zhservices.com>
24 // Jacob T Paul <jacob@zhservices.com>
26 // +------------------------------------------------------------------------------+
28 //SANITIZE ALL ESCAPES
29 $sanitize_all_escapes=true;
32 //STOP FAKE REGISTER GLOBALS
33 $fake_register_globals=false;
36 require_once("../../interface/globals.php");
37 $res=sqlStatement("SELECT * FROM customlists as cl left outer join users as u on cl_creator=u.id WHERE cl_list_type=3 AND cl_deleted=0");
41 <title
><!-- Insert your title here
--></title
>
42 <link rel
="stylesheet" type
="text/css" href
="<?php echo $GLOBALS['webroot'] ?>/library/js/fancybox/jquery.fancybox-1.2.6.css" media
="screen" />
43 <script type
="text/javascript" src
="ckeditor/ckeditor.js"></script
>
44 <script src
="ckeditor/_samples/sample.js" type
="text/javascript"></script
>
45 <link href
="ckeditor/_samples/sample.css" rel
="stylesheet" type
="text/css" />
46 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
47 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/dialog.js?v=<?php echo $v_js_includes; ?>"></script
>
48 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-1-3-2/index.js"></script
>
49 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/js/jquery-ui-1.7.1.custom.min.js"></script
>
50 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/js/common.js"></script
>
51 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/js/fancybox/jquery.fancybox-1.2.6.js"></script
>
52 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/js/jquery-ui.js"></script
>
53 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/js/jquery.easydrag.handler.beta2.js"></script
>
54 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/js/ajax_functions_writer.js"></script
>
55 <script type
='text/javascript'>
56 function delete_full_category(id
){
64 source
: "delete_full_category"
66 success
: function(thedata
){
67 alert("<?php echo addslashes(xl('Deleted Successfully.'));?>");
68 document
.location
.reload();
75 function delete_category(id
){
77 if(confirm("<?php echo addslashes(xl('Do you want to delete?'));?>")){
84 source
: "delete_category"
86 success
: function(thedata
){
88 alert("<?php echo addslashes('There are currently other users of the category you are trying to delete. Please contact them and ask them to delete it. Categories may not be deleted while in use. This Categories are currently used by \n');?>"+thedata
);
91 delete_full_category(id
);
103 <body
class="body_top">
105 <table align
="center">
106 <tr
class="text reportTableHeadRow">
107 <th
><?php
echo htmlspecialchars('Sl.No',ENT_QUOTES
);?
></th
>
108 <th
><?php
echo htmlspecialchars(xl('Category'),ENT_QUOTES
);?
></th
>
109 <th
><?php
echo htmlspecialchars(xl('Context'),ENT_QUOTES
);?
></th
>
110 <th
><?php
echo htmlspecialchars(xl('Creator'),ENT_QUOTES
);?
></th
>
111 <th
><?php
echo htmlspecialchars(xl('Delete'),ENT_QUOTES
);?
></th
>
115 while($row=sqlFetchArray($res)){
116 $context=sqlQuery("SELECT * FROM customlists WHERE cl_list_slno=?",array($row['cl_list_id']));
118 $class = ($class=='reportTableOddRow') ?
'reportTableEvenRow' : 'reportTableOddRow';
119 echo "<tr class='text ".htmlspecialchars($class,ENT_QUOTES
)."'>";
120 echo "<td>".$i."</td>";
121 echo "<td>".htmlspecialchars($row['cl_list_item_long'],ENT_QUOTES
)."</td>";
122 echo "<td>".htmlspecialchars($context['cl_list_item_long'],ENT_QUOTES
)."</td>";
123 echo "<td>".htmlspecialchars($row['fname']." ".$row['mname']." ".$row['lname'],ENT_QUOTES
)."</td>";
124 echo "<td><a href=#>";
125 echo "<img src='../../interface/pic/Delete.gif' border=0 title='Delete This Row' onclick=delete_category('".htmlspecialchars($row['cl_list_slno'],ENT_QUOTES
)."')>";