Example #1
0
function print_start()
{
    global $hesk_settings, $hesklang;
    if ($hesk_settings['kb_enable']) {
        require HESK_PATH . 'inc/knowledgebase_functions.inc.php';
    }
    // Connect to database
    hesk_load_database_functions();
    hesk_dbConnect();
    /* Print header */
    require_once HESK_PATH . 'inc/header.inc.php';
    ?>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="3"><img src="img/headerleftsm.jpg" width="3" height="25" alt="" /></td>
<td class="headersm"><?php 
    hesk_showTopBar($hesk_settings['hesk_title']);
    ?>
</td>
<td width="3"><img src="img/headerrightsm.jpg" width="3" height="25" alt="" /></td>
</tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td><span class="smaller"><a href="<?php 
    echo $hesk_settings['site_url'];
    ?>
" class="smaller"><?php 
    echo $hesk_settings['site_title'];
    ?>
</a> &gt;
<?php 
    echo $hesk_settings['hesk_title'];
    ?>
</span>
</td>

	<?php 
    // Print small search box
    if ($hesk_settings['kb_enable']) {
        hesk_kbSearchSmall();
    }
    ?>
    
</tr>
</table>

</td>
</tr>
<tr>
<td>

	<?php 
    // Print large search box
    if ($hesk_settings['kb_enable']) {
        hesk_kbSearchLarge();
    } else {
        echo '&nbsp;';
    }
    // Service messages
    $res = hesk_dbQuery('SELECT `title`, `message`, `style` FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . "service_messages` WHERE `type`='0' ORDER BY `order` ASC");
    while ($sm = hesk_dbFetchAssoc($res)) {
        hesk_service_message($sm);
    }
    ?>

<table border="0" width="50%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="50%">
<!-- START SUBMIT -->
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td width="7" height="7"><img src="img/roundcornerslt.jpg" width="7" height="7" alt="" /></td>
		<td class="roundcornerstop"></td>
		<td><img src="img/roundcornersrt.jpg" width="7" height="7" alt="" /></td>
	</tr>
	<tr>
		<td class="roundcornersleft">&nbsp;</td>
		<td>
	    <table width="100%" border="0" cellspacing="0" cellpadding="0">
	    <tr>
	    	<td width="1"><img src="img/newticket.png" alt="" width="60" height="60" /></td>
	        <td>
	        <p><b><a href="index.php?a=add"><?php 
    echo $hesklang['sub_support'];
    ?>
</a></b><br />
            <?php 
    echo $hesklang['open_ticket'];
    ?>
</p>
	        </td>
	    </tr>
	    </table>
		</td>
		<td class="roundcornersright">&nbsp;</td>
	</tr>
	<tr>
		<td><img src="img/roundcornerslb.jpg" width="7" height="7" alt="" /></td>
		<td class="roundcornersbottom"></td>
		<td width="7" height="7"><img src="img/roundcornersrb.jpg" width="7" height="7" alt="" /></td>
	</tr>
	</table>
<!-- END SUBMIT -->
</td>
</tr>
<tr><td width="1"><img src="img/blank.gif" width="5" height="10" alt="" /></td></tr>
<tr>
<td width="50%">
<!-- START VIEW -->
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td width="7" height="7"><img src="img/roundcornerslt.jpg" width="7" height="7" alt="" /></td>
		<td class="roundcornerstop"></td>
		<td><img src="img/roundcornersrt.jpg" width="7" height="7" alt="" /></td>
	</tr>
	<tr>
		<td class="roundcornersleft">&nbsp;</td>
		<td>
	    <table width="100%" border="0" cellspacing="0" cellpadding="0">
	    <tr>
	    	<td width="1"><img src="img/existingticket.png" alt="" width="60" height="60" /></td>
	        <td>
	        <p><b><a href="ticket.php"><?php 
    echo $hesklang['view_existing'];
    ?>
</a></b><br />
            <?php 
    echo $hesklang['vet'];
    ?>
</p>
	        </td>
	    </tr>
	    </table>
		</td>
		<td class="roundcornersright">&nbsp;</td>
	</tr>
	<tr>
		<td><img src="img/roundcornerslb.jpg" width="7" height="7" alt="" /></td>
		<td class="roundcornersbottom"></td>
		<td width="7" height="7"><img src="img/roundcornersrb.jpg" width="7" height="7" alt="" /></td>
	</tr>
	</table>
<!-- END VIEW -->
</td>
</tr>
</table>

<?php 
    if ($hesk_settings['kb_enable']) {
        ?>
	<br />

	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td width="7" height="7"><img src="img/roundcornerslt.jpg" width="7" height="7" alt="" /></td>
		<td class="roundcornerstop"></td>
		<td><img src="img/roundcornersrt.jpg" width="7" height="7" alt="" /></td>
	</tr>
	<tr>
		<td class="roundcornersleft">&nbsp;</td>
		<td>

        <p><span class="homepageh3"><?php 
        echo $hesklang['kb_text'];
        ?>
</span></p>

        <?php 
        /* Get list of top articles */
        hesk_kbTopArticles($hesk_settings['kb_index_popart']);
        /* Get list of latest articles */
        hesk_kbLatestArticles($hesk_settings['kb_index_latest']);
        ?>

        <p>&raquo; <b><a href="knowledgebase.php"><?php 
        echo $hesklang['viewkb'];
        ?>
</a></b></p>

		</td>
		<td class="roundcornersright">&nbsp;</td>
	</tr>
	<tr>
		<td><img src="img/roundcornerslb.jpg" width="7" height="7" alt="" /></td>
		<td class="roundcornersbottom"></td>
		<td width="7" height="7"><img src="img/roundcornersrb.jpg" width="7" height="7" alt="" /></td>
	</tr>
	</table>

    <br />
	<?php 
    } else {
        ?>
	<p>&nbsp;</p>
	<p>&nbsp;</p>
	<p>&nbsp;</p>
	<p>&nbsp;</p>
	<p>&nbsp;</p>
	<p>&nbsp;</p>
	<?php 
    }
    // Show a link to admin panel?
    /*if ($hesk_settings['alink'])
    	{
    		?>
    		<p style="text-align:center"><a href="<?php echo $hesk_settings['admin_dir']; ?>/" class="smaller"><?php echo $hesklang['ap']; ?></a></p>
    		<?php
    	}*/
}
function hesk_kb_header($kb_link, $catid = 1)
{
    global $hesk_settings, $hesklang, $can_man_kb;
    /* Print admin navigation */
    require_once HESK_PATH . 'inc/show_admin_nav.inc.php';
    ?>

	</td>
	</tr>
	<tr>
	<td>

	<span class="smaller">
    <?php 
    if ($can_man_kb) {
        ?>
	    <a href="manage_knowledgebase.php" class="smaller"><?php 
        echo $hesklang['kb'];
        ?>
</a> &gt;
	    <?php 
    }
    ?>
	<?php 
    echo $kb_link;
    ?>
<br />&nbsp;</span>

	<!-- SUB NAVIGATION -->
	<?php 
    show_subnav('view', $catid);
    ?>
	<!-- SUB NAVIGATION -->

	<?php 
    hesk_kbSearchLarge(1);
    ?>

	</td>
	</tr>
	<tr>
	<td><?php 
}
Example #3
0
function hesk_kb_header($kb_link)
{
    global $hesk_settings, $hesklang;
    ?>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
	<td width="3"><img src="img/headerleftsm.jpg" width="3" height="25" alt="" /></td>
	<td class="headersm"><?php 
    hesk_showTopBar($hesklang['kb_text']);
    ?>
</td>
	<td width="3"><img src="img/headerrightsm.jpg" width="3" height="25" alt="" /></td>
	</tr>
	</table>

	<table width="100%" border="0" cellspacing="0" cellpadding="3">
	<tr>
	<td valign="top">
	<span class="smaller"><a href="<?php 
    echo $hesk_settings['site_url'];
    ?>
" class="smaller"><?php 
    echo $hesk_settings['site_title'];
    ?>
</a> &gt;
	<a href="<?php 
    echo $hesk_settings['hesk_url'];
    ?>
" class="smaller"><?php 
    echo $hesk_settings['hesk_title'];
    ?>
</a>
	&gt; <?php 
    echo $kb_link;
    ?>
</span>
	</td>

	<?php 
    /* Print small search box */
    hesk_kbSearchSmall();
    ?>

	</tr>
	</table>

	</td>
	</tr>
	<tr>
	<td>

    <?php 
    /* Print large search box */
    hesk_kbSearchLarge();
}
Example #4
0
function hesk_kb_header($kb_link)
{
    global $hesk_settings, $hesklang;
    ?>
    <ol class="breadcrumb">
      <li><a href="<?php 
    echo $hesk_settings['site_url'];
    ?>
"><?php 
    echo $hesk_settings['site_title'];
    ?>
</a></li>
      <li><a href="<?php 
    echo $hesk_settings['hesk_url'];
    ?>
"><?php 
    echo $hesk_settings['hesk_title'];
    ?>
</a></li>
      <li class="active"><?php 
    echo $hesklang['kb_text'];
    ?>
</li>
    </ol>

<?php 
    $columnWidth = 'col-md-8';
    $showRs = hesk_dbQuery("SELECT `show` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "quick_help_sections` WHERE `id` = 4");
    $show = hesk_dbFetchAssoc($showRs);
    if (!$show['show']) {
        $columnWidth = 'col-md-10 col-md-offset-1';
    }
    ?>
    <div class="row">
        <?php 
    if ($columnWidth == 'col-md-8') {
        ?>
        <div class="col-md-4">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <?php 
        echo $hesklang['quick_help'];
        ?>
                </div>
                <div class="panel-body">
                    <p style="text-align: justify;"><?php 
        echo $hesklang['kb_is'];
        ?>
</p>
                </div>
            </div>   
        </div>
        <?php 
    }
    ?>
        <div class="<?php 
    echo $columnWidth;
    ?>
">
            <?php 
    /* Print small search box */
    hesk_kbSearchSmall();
    /* Print large search box */
    hesk_kbSearchLarge();
}
function hesk_kb_header($kb_link, $catid = 1)
{
    global $hesk_settings, $hesklang, $can_man_kb;
    /* Print admin navigation */
    require_once HESK_PATH . 'inc/headerAdmin.inc.php';
    require_once HESK_PATH . 'inc/show_admin_nav.inc.php';
    ?>

	</td>
	</tr>
	<tr>
	<td>

	<ol class="breadcrumb">
    <?php 
    if ($can_man_kb) {
        ?>
	    <li><a href="manage_knowledgebase.php"><?php 
        echo $hesklang['kb'];
        ?>
</a></li>
	    <?php 
    }
    ?>
	<li class="active"><?php 
    echo $kb_link;
    ?>
</li>
    </ol>

	<!-- SUB NAVIGATION -->
	<?php 
    show_subnav('view', $catid);
    ?>
	<!-- SUB NAVIGATION -->

    <div style="margin-left:40px;margin-right:40px">

	<?php 
    hesk_kbSearchLarge(1);
    ?>


    <?php 
}
Example #6
0
function print_start()
{
    global $hesk_settings, $hesklang;
    if ($hesk_settings['kb_enable']) {
        require HESK_PATH . 'inc/knowledgebase_functions.inc.php';
    }
    // Connect to database
    hesk_dbConnect();
    /* Print header */
    require_once HESK_PATH . 'inc/header.inc.php';
    ?>

<ol class="breadcrumb">
  <li><a href="<?php 
    echo $hesk_settings['site_url'];
    ?>
"><?php 
    echo $hesk_settings['site_title'];
    ?>
</a></li>
  <li class="active"><?php 
    echo $hesk_settings['hesk_title'];
    ?>
</li>
</ol>
    <?php 
    // Service messages
    $res = hesk_dbQuery('SELECT `title`, `message`, `style`, `icon` FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . "service_messages` WHERE `type`='0' ORDER BY `order` ASC");
    if (hesk_dbNumRows($res) > 0) {
        ?>
    <div class="row">
        <div class="col-md-12">
            <?php 
        while ($sm = hesk_dbFetchAssoc($res)) {
            hesk_service_message($sm);
        }
        ?>
        </div>
    </div>
    <?php 
    }
    ?>
	<div class="row">
		<div class="col-md-4">
            <div class="panel panel-default">
                <div class="panel-heading"><?php 
    echo $hesklang['view_ticket'];
    ?>
</div>
                <div class="panel-body">
                    <form role="form" class="viewTicketSidebar" action="ticket.php" method="get" name="form2">
                        <div class="form-group">
                            <br/>
                            <label for="ticketID"><?php 
    echo $hesklang['ticket_trackID'];
    ?>
:</label>
                            <input type="text" class="form-control" name="track" id="ticketID" maxlength="20" size="35" value="" placeholder="<?php 
    echo htmlspecialchars($hesklang['ticket_trackID']);
    ?>
">
                        </div>
                        <?php 
    $tmp = '';
    if ($hesk_settings['email_view_ticket']) {
        $tmp = 'document.form1.email.value=document.form2.e.value;';
        ?>
                        <div class="form-group">
                            <label for="emailAddress"><?php 
        echo $hesklang['email'];
        ?>
:</label>
                            <?php 
        $my_email = '';
        $do_remember = '';
        if (isset($_COOKIE['hesk_myemail'])) {
            $my_email = $_COOKIE['hesk_myemail'];
            $do_remember = 'checked';
        }
        ?>
                            <input type="text" class="form-control" name="e" id="emailAddress" size="35" value="<?php 
        echo $my_email;
        ?>
" placeholder="<?php 
        echo htmlspecialchars($hesklang['email']);
        ?>
"/>
                        </div>
                        <div class="checkbox">
                            <label for="r">
                                <input type="checkbox" name="r" value="Y" <?php 
        echo $do_remember;
        ?>
> <?php 
        echo $hesklang['rem_email'];
        ?>
                            </label>
                        </div>
                        <?php 
    }
    ?>
                        <input type="submit" value="<?php 
    echo $hesklang['view_ticket'];
    ?>
" class="btn btn-default" /><input type="hidden" name="Refresh" value="<?php 
    echo rand(10000, 99999);
    ?>
"><input type="hidden" name="f" value="1">
                    </form>
                </div>
            </div>
		</div>
		<div class="col-md-8">
				<?php 
    // Print small search box
    if ($hesk_settings['kb_enable']) {
        hesk_kbSearchSmall();
        hesk_kbSearchLarge();
    } else {
        echo '&nbsp;';
    }
    ?>
            <div class="row default-row-margins">
                <div class="col-sm-6 col-xs-12">
                    <a href="index.php?a=add" class="button-link">
                        <div class="panel panel-default">
                            <div class="panel-body">
                                <div class="row">
                                    <div class="col-xs-1">
                                        <img src="img/newTicket.png" alt="<?php 
    echo $hesklang['sub_support'];
    ?>
">
                                    </div>
                                    <div class="col-xs-11">
                                        <b><?php 
    echo $hesklang['sub_support'];
    ?>
</b><br>
                                        <?php 
    echo $hesklang['open_ticket'];
    ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a>
                </div>
                <div class="col-sm-6 col-xs-12">
                    <a href="ticket.php" class="button-link">
                        <div class="panel panel-default">
                            <div class="panel-body">
                                <div class="row">
                                    <div class="col-xs-1">
                                        <img src="img/viewTicket.png" alt="<?php 
    echo $hesklang['view_existing'];
    ?>
">
                                    </div>
                                    <div class="col-xs-11">
                                        <b><?php 
    echo $hesklang['view_existing'];
    ?>
</b><br>
                                        <?php 
    echo $hesklang['vet'];
    ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a>
                </div>
            </div>
            <?php 
    if ($hesk_settings['kb_enable']) {
        ?>
                <div class="row default-row-margins">
                    <div class="col-sm-6 col-xs-12">
                        <a href="knowledgebase.php" class="button-link">
                            <div class="panel panel-default">
                                <div class="panel-body">
                                    <div class="row">
                                        <div class="col-xs-1">
                                            <img src="img/knowledgebase.png" alt="<?php 
        echo $hesklang['kb_text'];
        ?>
">
                                        </div>
                                        <div class="col-xs-11">
                                            <b><?php 
        echo $hesklang['kb_text'];
        ?>
</b><br>
                                            <?php 
        echo $hesklang['viewkb'];
        ?>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </a>
                    </div>
                </div>
            <?php 
        hesk_kbTopArticles($hesk_settings['kb_index_popart']);
        hesk_kbLatestArticles($hesk_settings['kb_index_latest']);
    }
    ?>
		</div>
	</div>
	<div class="blankSpace"></div>
	<div class="footerWithBorder"></div>
	<div class="blankSpace"></div>
</div>

<?php 
    // Show a link to admin panel?
    if ($hesk_settings['alink']) {
        ?>
		<p style="text-align:center"><a href="<?php 
        echo $hesk_settings['admin_dir'];
        ?>
/" ><?php 
        echo $hesklang['ap'];
        ?>
</a></p>
		<?php 
    }
}