Skip to content

Instantly share code, notes, and snippets.

@LaocheXe
Created May 3, 2015 20:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LaocheXe/60f38595b93743c87eca to your computer and use it in GitHub Desktop.
Save LaocheXe/60f38595b93743c87eca to your computer and use it in GitHub Desktop.
voice.php
<?php
require_once('../../class2.php');
require_once(HEADERF);
include_lan(e_PLUGIN.'voice/languages/'.e_LANGUAGE.'.php');
$spacer = '<p><p/><br />';
$endTable = '</table>';
function voice_type_header($tableU,$tableBle,$tableTs3,$tableVent)
{
$sql = e107::getDB();
$sql->select('voice_exesystem', 'voice_type');
while($row = $sql->fetch())
{
$sType = $row['voice_type'];
$ListType;
if($sType == 0)
{
$ListType = LAN_VOI_TYPE_UNK; // MUMBLE
$tableU .= '
<table>
<tr>
<td><h3>'.$ListType.'</h3></td>
<td></td>
</tr>';
}
elseif($sType == 1)
{
$ListType = LAN_VOI_TYPE_MUM; // MUMBLE
$tableBle .= '
<table>
<tr>
<td><h3>'.$ListType.'</h3></td>
<td></td>
</tr>';
}
elseif($sType == 2)
{
$ListType = LAN_VOI_TYPE_TS3; // TeamSpeak3
$tableTs3 .= '
<table>
<tr>
<td><h3>'.$ListType.'</h3></td>
<td></td>
</tr>';
}
elseif($sType == 3)
{
$ListType = LAN_VOI_TYPE_VEN; // Ventrilo
$tableVent .= '
<table>
<tr>
<td><h3>'.$ListType.'</h3></td>
<td></td>
</tr>';
}
}
}
function get_list($unknown,$ble,$ts3,$vent)
{
$sql = e107::getDB();
$sql->select('voice_exesystem', 'voice_id, voice_name, voice_type');
while($row = $sql->fetch())
{
$sID = $row['voice_id'];
$sName = $row['voice_name'];
$sType = $row['voice_type'];
if($sType == 0)
{
$unknow .= '
<tr>
<td>'.$sID.'</td>
<td>'.$sName.'</td>
</tr>
';
}
elseif($sType == 1)
{
$ble .= '
<tr>
<td>'.$sID.'</td>
<td><a href="#">'.$sName.'</a></td>
</tr>
';
}
elseif($sType == 2)
{
$ts3 .= '
<tr>
<td>'.$sID.'</td>
<td><a href="#">'.$sName.'</a></td>
</tr>
';
}
elseif($sType == 3)
{
$vent .= '
<tr>
<td>'.$sID.'</td>
<td><a href="#">'.$sName.'</a></td>
</tr>
';
}
}
/*
$text .= $spaces;
$text .= $tableBle; // Mumble
$text .= $spaces;
$text .= $tableTs3; // TeamSpeak3
$text .= $spaces;
$text .= $tableVent; // Ventrilo
$text .= $spaces;
$text .= $tableU;
*/
}
function show_list()
{
$text .= $space;
$text .= $tableBle;
$text .= $ble;
$text .= $endTable;
$text .= $space;
$text .= $tableTs3;
$text .= $ts3;
$text .= $endTable;
$text .= $space;
$text .= $tableVent;
$text .= $vent;
$text .= $endTable;
$text .= $space;
$text .= $tableU;
$text .= $unknown;
$text .= $endTable;
}
e107::getRender()->tablerender(LAN_VOI_VIEWERS, $text);
require_once(FOOTERF);
exit;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment