<?php
/**********************************************************************
    Copyright (C) FrontAccounting, LLC.
	Released under the terms of the GNU General Public License, GPL, 
	as published by the Free Software Foundation, either version 3 
	of the License, or (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
// Author: Joe Hunt, 17/11/2015. Upgraded to release 2.4. 10/11/2015.

	class renderer
	{
		function wa_get_apps($title, $applications, $sel_app)
		{
			foreach($applications as $app)
			{
				foreach ($app->modules as $module)
				{
					$apps = array();
					foreach ($module->lappfunctions as $appfunction)
						$apps[] = $appfunction;
					foreach ($module->rappfunctions as $appfunction)
						$apps[] = $appfunction;
					$application = array();	
					foreach ($apps as $application)	
					{
						$url = explode('?', $application->link);
						$app_lnk = $url[0];					
						$pos = strrpos($app_lnk, "/");
						if ($pos > 0)
						{
							$app_lnk = substr($app_lnk, $pos + 1);
							$lnk = $_SERVER['REQUEST_URI'];
							$url = explode('?', $lnk);
							$asset = false;
							if (isset($url[1]))
								$asset = strstr($url[1], "FixedAsset");
							$lnk = $url[0];					
							$pos = strrpos($lnk, "/");
							$lnk = substr($lnk, $pos + 1);
							if ($app_lnk == $lnk)  
							{
								$acc = access_string($app->name);
								$app_id = ($asset != false ? "assets" : $app->id);
								return array($acc[0], $module->name, $application->label, $app_id);
							}	
						}	
					}
				}
			}
			return array("", "", "", $sel_app);
		}
		
		function wa_header()
		{
			page(_($help_context = "Main Menu"), false, true);
		}

		function wa_footer()
		{
			end_page(false, true);
		}
		function shortcut($url, $label) 
		{
			echo "<li>";
			echo menu_link($url, $label);
			echo "</li>";
		}
		function menu_header($title, $no_menu, $is_index)
		{
			global $path_to_root, $SysPrefs, $version;
			?>

			<!-- Bootstrap CSS -->

    
        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/vendors/css/bootstrap.css"/>
        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/vendors/css/jquery-ui.css"/>
        <link rel="stylesheet" href="https://advocate.infixdev.com/public/frontend/vendors/text_editor/summernote-bs4.css" />
        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/vendors/css/jquery.data-tables.css">
        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/vendors/css/buttons.dataTables.min.css">
        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/vendors/css/rowReorder.dataTables.min.css">
        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/vendors/css/responsive.dataTables.min.css">
        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/vendors/css/bootstrap-datepicker.min.css"/>
        <link rel="stylesheet" href="https://advocate.infixdev.com/public/frontend/vendors/font_awesome/css/all.min.css" />

        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/vendors/css/themify-icons.css"/>
        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/vendors/css/flaticon.css"/>
        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/vendors/css/font-awesome.min.css"/>
        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/vendors/css/nice-select.css"/>
        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/vendors/css/magnific-popup.css"/>
        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/vendors/css/fastselect.min.css"/>
        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/vendors/css/toastr.min.css"/>
        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/vendors/js/select2/select2.css"/>

        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/vendors/css/fullcalendar.min.css">


        <!-- color picker  -->

        <!-- metis menu  -->
        <link rel="stylesheet" href="https://advocate.infixdev.com/public/frontend/css/metisMenu.css">

        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/css/loade.css"/> 



        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/css/style.css"/>
        <link rel="stylesheet" href="https://advocate.infixdev.com/public/backEnd/css/infix.css"/>

        <link rel="stylesheet" href="https://advocate.infixdev.com/public/frontend/css/style.css" />
        <!--  -->

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" integrity="sha512-9usAa10IRO0HhonpyAIVpjrylPvoDwiPUiKdWk5t3PyolY1cOd4DSE0Ga+ri4AuTroPR5aQvXU9xC6qOPnzFeg==" crossorigin="anonymous" referrerpolicy="no-referrer" />

        <script>
        const SET_DOMAIN="https://advocate.infixdev.com"
        </script>
	

			<?php

// echo ' <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
//   <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
//   <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
//   <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js"></script>';
			$sel_app = $_SESSION['sel_app'];
			// echo "<div class='fa-main'>\n";
          ?>
          <div class="main-wrapper" style="min-height: 600px">
         <?php 
			if (!$no_menu)
			{
				$applications = $_SESSION['App']->applications;
				$local_path_to_root = $path_to_root;
				$pimg = "<img src='$local_path_to_root/themes/".user_theme()."/images/preferences.gif' style='width:14px;height:14px;border:0;vertical-align:middle;padding-bottom:3px;' alt='"._('Preferences')."'>&nbsp;&nbsp;";
				$limg = "<img src='$local_path_to_root/themes/".user_theme()."/images/lock.gif' style='width:14px;height:14px;border:0;vertical-align:middle;padding-bottom:3px;' alt='"._('Change Password')."'>&nbsp;&nbsp;";
				$img = "<img src='$local_path_to_root/themes/".user_theme()."/images/on_off.png' style='width:14px;height:14px;border:0;vertical-align:middle;padding-bottom:3px;' alt='"._('Logout')."'>&nbsp;&nbsp;";
				$himg = "<img src='$local_path_to_root/themes/".user_theme()."/images/help.gif' style='width:14px;height:14px;border:0;vertical-align:middle;padding-bottom:3px;' alt='"._('Help')."'>&nbsp;&nbsp;";
				// echo "<div id='header'>\n";
				// echo "<ul>\n";
				// echo "  <li><a href='$local_path_to_root/admin/display_prefs.php?'>$pimg" . _("Preferences") . "</a></li>\n";
				// echo "  <li><a href='$local_path_to_root/admin/change_current_user_password.php?selected_id=" . $_SESSION["wa_current_user"]->username . "'>$limg" . _("Change password") . "</a></li>\n";
				// if ($SysPrefs->help_base_url != null)
				// 	echo "  <li><a target = '_blank' onclick=" .'"'."javascript:openWindow(this.href,this.target); return false;".'" '. "href='". 
				// 		help_url()."'>$himg" . _("Help") . "</a></li>";
				// echo "  <li><a href='$path_to_root/access/logout.php?'>$img" . _("Logout") . "</a></li>";
				// echo "</ul>\n";
				// $indicator = "$path_to_root/themes/".user_theme(). "/images/ajax-loader.gif";
				// echo "<h1>$SysPrefs->power_by $version<span style='padding-left:300px;'><img id='ajaxmark' src='$indicator' align='center' style='visibility:hidden;'></span></h1>\n";
				// echo "</div>\n"; // header


				
								
				// echo "<div id='cssmenu'>\n";
				// echo "<ul>\n";
				// $i = 0;
				// $account = $this->wa_get_apps($title, $applications, $sel_app);
				// foreach($applications as $app)
				// {
    //                 if ($_SESSION["wa_current_user"]->check_application_access($app))
    //                 {
				// 		$acc = access_string($app->name);
				// 		$class = ($account[3] == $app->id ? "active" : "");
				// 		$n = count($app->modules);
				// 		if ($n)
				// 			$class .= " has-sub";
				// 		$dashboard = "";	
				// 	    $u_agent = $_SERVER['HTTP_USER_AGENT']; 
    // 					if (preg_match('/android/i', $u_agent) && preg_match('/mobile/i', $u_agent)) {
    // 						$link = "#'";
				// 			$dashboard = "$local_path_to_root/index.php?application=$app->id";
				// 		}
    // 					else
    // 						$link = "$local_path_to_root/index.php?application=$app->id '$acc[1]";
				// 		echo "  <li class ='$class'><a href='$link><span>" . $acc[0] . "</span></a>\n";
				// 		if (!$n)
				// 		{
				// 			echo "  </li>\n";
				// 			continue;
				// 		}	
				// 		echo "    <ul>\n";
   	// 					if ($dashboard !="")
				// 			echo "      <li><a href='$dashboard'><span><font color='red'>"._("Dashboard")."</font></span></a></li>\n";
				// 		foreach ($app->modules as $module)
				// 		{
	   //  					if (!$_SESSION["wa_current_user"]->check_module_access($module))
    //     						continue;
 			// 				echo "      <li class='has-sub'><a href='#'><span>$module->name</span></a>\n"; 
 			// 				$apps2 = array();
 			// 				foreach ($module->lappfunctions as $appfunction)
				// 				$apps2[] = $appfunction;
				// 			foreach ($module->rappfunctions as $appfunction)
				// 				$apps2[] = $appfunction;
				// 			$application = array();	
    //    						$n = count($apps2);
    //    						$class = "";
    //    						if ($i > 5)
    //    							$class = "class='align_right'";
				// 			if ($n)
				// 				echo "        <ul $class>\n";
				// 			else
				// 			{
				// 				echo "      </li>\n";
				// 				continue;
				// 			}	
				// 			foreach ($apps2 as $application)	
				// 			{
				// 				$lnk = access_string($application->label);
				// 				if ($_SESSION["wa_current_user"]->can_access_page($application->access))
				// 				{
				// 					if ($application->label != "")
				// 					{
				// 						echo "          <li><a href='$path_to_root/$application->link'><span>$lnk[0]</span></a></li>\n";
				// 					}
				// 				}
				// 				elseif (!$_SESSION["wa_current_user"]->hide_inaccessible_menu_items())	
				// 					echo "          <li><a href='#'><span><font color='gray'>$lnk[0]</font></span></a></li>\n";
				// 			}
				// 			if ($n)
				// 				echo "        </ul>\n";	
				// 			echo "      </li>\n";
				// 		}
				// 		echo "    </ul>\n"; // menu
				// 	}
				// 	echo"  </li>\n";
				// 	$i++;
				// }	
				// echo "</ul>\n"; 
				// echo "</div>\n"; // menu
                  

                 ?>
                

    				<nav id="sidebar" class="sidebar">

					<div class="sidebar-header update_sidebar">
						<a class="large_logo" href="https://advocate.infixdev.com/home">
						   <img src="https://advocate.infixdev.com/public/uploads/settings/logo.png" alt="">
						</a>
						<a class="mini_logo" href="https://advocate.infixdev.com/home">
						   <img src="https://advocate.infixdev.com/public/uploads/settings/logo.png" alt="">
						</a>
						   <a id="close_sidebar" class="d-lg-none">
						   <i class="ti-close"></i>
						</a>
					</div>
					<ul id="sidebar_menu" class="metismenu">

						<!-- <li class="">
							   <a href="javascript:;" class="has-arrow" aria-expanded="">
							  <div class="nav_icon_small">
							   <span class="far fa-address-book"></span>
							   </div>
							 <div class="nav_title">
							    <span>Contact</span>
							</div>
							</a>
							<ul class="mm-collapse">
							  <li>
							    <a href="https://advocate.infixdev.com/contact" class="">  Contact List</a>
							  </li>
							   <li>
							       <a href="https://advocate.infixdev.com/category/contact" class="">Contact  Category</a>
							    </li>
							</ul>
						</li>	 -->	

						<?php
						$account = $this->wa_get_apps($title, $applications, $sel_app);
						foreach($applications as $app)
						{
							if ($_SESSION["wa_current_user"]->check_application_access($app))
                           {
                           	$acc = access_string($app->name);
                           	// echo $acc[0]."<br>";
							echo "<li class=''>
								<a href='javascript:;' class='has-arrow' aria-expanded=''>
									<div class='nav_icon_small'>
									  <span class='far fa-address-book'></span>
									</div>
									<div class='nav_title'>
									   <span>".$acc[0]."</span>
									</div>
								</a>

							";

                        echo "<ul class='mm-collapse'>";
						// echo "<li>
						// <a href='https://advocate.infixdev.com/contact' class=''>  Contact List</a>
						// </li>";
						
                       

                            
                            	foreach ($app->modules as $module)
						{
	    					if (!$_SESSION["wa_current_user"]->check_module_access($module))
        						continue;
 							echo "      <li  class='has-arrow' aria-expanded=''><a href='#'><span>$module->name</span></a>\n"; 
 							$apps2 = array();
 							foreach ($module->lappfunctions as $appfunction)
								$apps2[] = $appfunction;
							foreach ($module->rappfunctions as $appfunction)
								$apps2[] = $appfunction;
							$application = array();	
       						$n = count($apps2);
       						$class = "";
       						// if ($i > 5)
       						// 	$class = "class='align_right'";
							if ($n)
								echo "        <ul $class>\n";
							else
							{
								echo "      </li>\n";
								continue;
							}	
							foreach ($apps2 as $application)	
							{
								$lnk = access_string($application->label);
								if ($_SESSION["wa_current_user"]->can_access_page($application->access))
								{
									if ($application->label != "")
									{
										echo "          <li><a href='$path_to_root/$application->link'><span>$lnk[0]</span></a></li>";
									}
								}
								elseif (!$_SESSION["wa_current_user"]->hide_inaccessible_menu_items())	
									echo "          <li><a href='#'><span><font color='gray'>$lnk[0]</font></span></a></li>";
							}
							if ($n)
								echo "        </ul>\n";	
							echo "      </li>\n";
						}

                       echo "</ul>";
						echo "</li>";





                           }

						}


						?>


						<li class="">
	                     <a href="javascript:;" class="has-arrow" aria-expanded="">
							<div class="nav_icon_small">
							<span class="fas fa-users"></span>
							</div>
							<div class="nav_title">
							<span>Client</span>
							</div>
						</a>
						<ul class="mm-collapse">
							<li>
							<a href="https://advocate.infixdev.com/client" class="">  Client List</a>
							</li>
							<li>
							<a href="https://advocate.infixdev.com/category/client" class="">Client Category</a>
							</li>
						</ul>
						</li>


					</ul>

					</nav>

             
             <div id="main-content" class="">
<div class="container-fluid no-gutters d-print-none">
    <div class="row">
        <div class="col-lg-12 p-0">
            <div class="header_iner d-flex justify-content-between align-items-center">
                <div class="small_logo_crm d-lg-none">
                   <a href="https://advocate.infixdev.com/home"> <img src="https://advocate.infixdev.com/public/uploads/settings/logo.png" alt=""></a>
                </div>
                <div id="sidebarCollapse" class="sidebar_icon  d-lg-none">
                    <i class="ti-menu"></i>
                </div>
                <div class="collaspe_icon open_miniSide">
                <i class="ti-menu"></i>
                </div>
                <div class="serach_field-area ml-40">
                        <div class="search_inner">
                            <form action="#">
                                <div class="search_field">
                                    <input type="text" placeholder="SEARCH" id="search" onkeyup="showResult(this.value)">
                                </div>
                                <button type="button"> <i class="ti-search"></i> </button>
                            </form>
                        </div>
                        <div id="livesearch" style="display: none;"></div>
                    </div>
                <div class="header_middle d-none d-md-block">
                    <div class="select_style d-flex">
                       
                                                
                        <select name="code" id="language_code" class="nice_Select bgLess mb-0" onchange="change_Language()" style="display: none;">
                                                            <option value="ar">Arabic</option>
                                                            <option value="bn">Bengali</option>
                                                            <option value="en" selected="">English</option>
                                                            <option value="pt">Portuguese</option>
                                                    </select><div class="nice-select nice_Select bgLess mb-0" tabindex="0"><span class="current">English</span><div class="nice-select-search-box"><input type="text" class="nice-select-search" placeholder="Search..."></div><ul class="list"><li data-value="ar" class="option">Arabic</li><li data-value="bn" class="option">Bengali</li><li data-value="en" class="option selected">English</li><li data-value="pt" class="option">Portuguese</li></ul></div>
                    </div>
                </div>
                <div class="header_right d-flex justify-content-between align-items-center">
                    <div class="header_notification_warp d-flex align-items-center">

                  
                    </div>


                    <div class="profile_info">
                        <img src="https://advocate.infixdev.com/public\backEnd/img/staff.jpg" alt="#">

                        <div class="profile_info_iner">
                                <div class="use_info d-flex align-items-center">
                                <div class="thumb">
                                <img src="https://advocate.infixdev.com/public\backEnd/img/staff.jpg" alt="#">
                                </div>
                                <div class="user_text">
                                <h5><a href="https://advocate.infixdev.com/profile-view">Super admin</a></h5>
                                <span>support@spondonit.com</span>
                                
                                </div>
                                </div>

                                <div class="profile_info_details">
                                                                <a href="https://advocate.infixdev.com/setting"> <i class="ti-settings"></i>
                                <span>Setting</span>
                                </a>
                                
                                <a href="https://advocate.infixdev.com/logout" id="logout">
                                    <i class="ti-unlock"></i>
                                    <span>Logout</span>
                                </a>

                                </div>
                            </div>

                    </div>


                </div>
            </div>
        </div>
    </div>
</div>
<!-- </div> -->



<div class="container-fluid p-0  white_box_50px box_shadow_white">



              <?php

			}
			// echo "<div class='main-wrapper'>\n";

              echo "<br> <div class='main-title d-md-flex'>
                            <h3 class='mb-0 mr-30 mb_xs_15px mb_sm_20px'>   &nbsp $title</h3>
                        </div><br>";

			echo "<div class=' row justify-content-center'>
                <div class='col-12'>";
			// if ($no_menu)
			// 	echo "<br>";
			// elseif ($title && !$no_menu && !$is_index)
			// {
			// 	echo "<div class='fa-content'>\n";
			// 	echo "<center><table id='title'><tr><td width='100%' class='titletext'>$title</td>"
			// 	."<td align=right>"
			// 	.(user_hints() ? "<span id='hints'></span>" : '')
			// 	."</td>"
			// 	."</tr></table></center>";
			// }
		}

		function menu_footer($no_menu, $is_index)
		{
			global $path_to_root, $SysPrefs, $version, $db_connections;
			include_once($path_to_root . "/includes/date_functions.inc");

			if (!$no_menu && !$is_index)
				echo "</div>\n"; // fa-content

			// echo "</div></div></div>\n"; // fa-body
			// if (!$no_menu)
			// {
   // 				echo "<script type='text/javascript'>if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))
   // 				       {document.getElementById('cssmenu').style.position = 'fixed';}</script>\n";
			// 	echo "<div class='fa-footer'>\n";
			// 	if (isset($_SESSION['wa_current_user']))
			// 	{
			// 		echo "<span class='power'><a target='_blank' href='$SysPrefs->power_url'>$SysPrefs->power_by $version</a></span>\n";
			// 		echo "<span class='date'>".Today() . "&nbsp;" . Now()."</span>\n";
			// 		echo "<span class='date'>" . $db_connections[$_SESSION["wa_current_user"]->company]["name"] . "</span>\n";
			// 		echo "<span class='date'>" . $_SERVER['SERVER_NAME'] . "</span>\n";
			// 		echo "<span class='date'>" . $_SESSION["wa_current_user"]->name . "</span>\n";
			// 		echo "<span class='date'>" . _("Theme:") . " " . user_theme() . "</span>\n";
			// 		echo "<span class='date'>".show_users_online()."</span>\n";
			// 	}
			// 	echo "</div>\n"; // footer
			// }
			// echo "</div>\n"; // fa-main

			echo "</div>\n"; // fa-main

			echo "</div>\n"; // fa-main

			?>
				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/jquery-3.4.1.min.js"></script>

				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/jquery-ui.js">
				</script>

				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/popper.js">
				</script>

				<script src="https://advocate.infixdev.com/public/backEnd/css/rtl/bootstrap.min.js"></script>

				<script src="https://advocate.infixdev.com/public/frontend/vendors/text_editor/summernote-bs4.js"></script>


				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/jquery.data-tables.js">
				</script>
				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/dataTables.buttons.min.js">
				</script>
				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/buttons.flash.min.js">
				</script>
				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/jszip.min.js">
				</script>
				<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js">
				</script>
				<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js">
				</script>
				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/buttons.html5.min.js">
				</script>
				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/buttons.print.min.js">
				</script>
				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/dataTables.rowReorder.min.js">
				</script>
				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/dataTables.responsive.min.js">
				</script>
				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/buttons.colVis.min.js">
				</script>

				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/nice-select.min.js"></script>
				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/jquery.magnific-popup.min.js">
				</script>
				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/fastselect.standalone.min.js">
				</script>
				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/raphael-min.js">
				</script>
				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/morris.min.js">
				</script>

				<script type="text/javascript" src="https://advocate.infixdev.com/public/backEnd/vendors/js/toastr.min.js"></script>

				<script type="text/javascript" src="https://advocate.infixdev.com/public/backEnd/vendors/js/moment.min.js"></script>

				<!-- <script
				</script> -->
				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/bootstrap-datepicker.min.js">
				</script>
				<!-- tagsinput  -->
				<script src="https://advocate.infixdev.com/public/frontend/vendors/tagsinput/tagsinput.js"></script>
				<!-- summernote  -->
				<!--  -->

				<!-- nestable  -->
				<script src="https://advocate.infixdev.com/public/frontend/vendors/nestable/jquery.nestable.js"></script>

				<!-- chage  -->

				<!-- metisMenu js  -->
				<script src="https://advocate.infixdev.com/public/frontend/js/metisMenu.js"></script>


				<!-- progressbar  -->
				<script src="https://advocate.infixdev.com/public/frontend/vendors/progressbar/circle-progress.min.js"></script>
				<!-- color picker  -->


				<script type="text/javascript" src="https://advocate.infixdev.com/public/backEnd/js/jquery.validate.min.js"></script>
				<script src="https://advocate.infixdev.com/public/backEnd/vendors/js/select2/select2.min.js"></script>
				 <script defer src="https://use.fontawesome.com/releases/v5.15.4/js/solid.js" integrity="sha384-/BxOvRagtVDn9dJ+JGCtcofNXgQO/CCCVKdMfL115s3gOgQxWaX/tSq5V8dRgsbc" crossorigin="anonymous"></script>
  <script defer src="https://use.fontawesome.com/releases/v5.15.4/js/fontawesome.js" integrity="sha384-dPBGbj4Uoy1OOpM4+aRGfAOc0W37JkROT+3uynUgTHZCHZNMHfGXsmmvYTffZjYO" crossorigin="anonymous"></script>


				<script src="https://advocate.infixdev.com/public/backEnd/js/sweetalert.min.js"></script>
				<script src="https://advocate.infixdev.com/public/backEnd/js/custom.js"></script>
				<script src="https://advocate.infixdev.com/public/backEnd/js/main.js"></script>
				<script src="https://advocate.infixdev.com/public/backEnd/js/developer.js"></script>
				<script src="https://advocate.infixdev.com/public/js/main.js"></script>
				<script src="https://advocate.infixdev.com/public/js/parsley.min.js"></script>
				<script type="text/javascript"></script>
			<?php
		}

		function display_applications(&$waapp)
		{
			global $path_to_root;

			$sel = $waapp->get_selected_application();
			meta_forward("$path_to_root/admin/dashboard.php", "sel_app=$sel->id");	
        	end_page();
        	exit;
		}	
	}
	
