Change support desk contact information (#7561)
[openemr.git] / library / custom_template / upgrade_version.php
blob692a7b393531c632349b9e87c71fcfc0249263fd
1 <?php
3 // +-----------------------------------------------------------------------------+
4 // Copyright (C) 2011 Z&H Consultancy Services Private Limited <sam@zhservices.com>
5 //
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License
9 // as published by the Free Software Foundation; either version 2
10 // of the License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
19 // A copy of the GNU General Public License is included along with this program:
20 // openemr/interface/login/GnuGPL.html
21 // For more information write to the Free Software
22 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 // Author: Eldho Chacko <eldho@zhservices.com>
25 // Jacob T Paul <jacob@zhservices.com>
27 // +------------------------------------------------------------------------------+
31 include_once('../../interface/globals.php');
32 $sql = "select distinct tu_user_id from template_users";
33 $rs = SqlStatement($sql);
34 while ($row = SqlFetchArray($rs)) {
35 $sql = "select * from template_users join customlists on cl_list_slno=tu_template_id where
36 cl_deleted=0 and tu_user_id=?";
37 $rs2 = SqlStatement($sql, array($row['tu_user_id']));
38 while ($row2 = SqlFetchArray($rs2)) {
39 $sql = "select cl_list_slno from customlists where cl_deleted=0 and cl_list_id=?";
40 $rs3 = SqlStatement($sql, array($row2['cl_list_slno']));
41 while ($row3 = SqlFetchArray($rs3)) {
42 SqlStatement("insert into template_users (tu_template_id,tu_user_id) values(?,?)", array($row3['cl_list_slno'],$row['tu_user_id']));