- Something
- Wednesday, July 26th, 2006 at 4:42:16am MDT
- <?php
- /**
- * Joomla Your DKP Module
- *
- * @version 1.1
- * @copyright (C) 2006 by Thumann <Brianm@thumann.dk>
- * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
- * Mambo is Free Software
- *
- * Credits to: The loveable dev team of wowroster
- * And special shout outs to my trousted mentor, The crazy Aussie! ;>
- */
- defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
- //start added by thumann
- $link = mysql_connect("localhost", "user", "pass");
- if (!$link) {
- die('Not connected : ' . mysql_error());
- }
- // select the database
- $db_selected = mysql_select_db("database", $link);
- if (!$db_selected) {
- die ('Can\'t select the database : ' . mysql_error());
- }
- //end added by thumann
- global $ueConfig, $my, $mosConfig_lang, $mosConfig_absolute_path, $mosConfig_live_site;
- $more_dkp = intval( $params->get( 'what_moredkp' ) );
- $dkp_number1 = $params->get( 'dkp_number1' );
- $dkp_number2 = $params->get( 'dkp_number2' );
- $dkp_number3 = $params->get( 'dkp_number3' );
- $dkp_number4 = $params->get( 'dkp_number4' );
- if ($more_dkp == 1){
- $dkp_count = intval( $params->get( 'dkp_number' ) );
- $dkp_nr = array($dkp_number1, $dkp_number2, $dkp_number3, $dkp_number4);
- $dkp_url = array(
- $params->get( 'dkp_url1' ),
- $params->get( 'dkp_url2' ),
- $params->get( 'dkp_url3' ),
- $params->get( 'dkp_url4' ),
- );
- }else{
- $dkp_nr = array($dkp_number1);
- $dkp_url = array("eqdkp/");
- $dkp_count = 1;
- }
- $username = $my->username;
- if(empty($username)){
- echo "Login to see your DKP";
- }
- else{
- $content ="";
- for ($i = 0; $i < $dkp_count; $i++) {
- $database->setQuery("SELECT member_earned, member_spent, member_adjustment FROM ".$dkp_nr[$i]."members"
- . "\n WHERE member_name='$username'");
- $dbArray = $database->loadAssocList();
- $dbArray = $dbArray[0];
- $total_dkp = $dbArray['member_earned']-$dbArray['member_spent']+$dbArray['member_adjustment'];
- $total_dkp = number_format($total_dkp, 2, '.', '');
- $eqdkplist = $database->loadObjectList();
- $database->setQuery("SELECT config_value FROM `".$dkp_nr[$i]."config` where config_name = 'main_title'");
- $eqname = $database->loadResult();
- if(empty($eqdkplist)){
- echo "No Data found <br>";
- }
- else{
- $content .="<table cellpadding=\"1\" border=\"0\">";
- $content .="<tr><td>";
- $content .="<center><b>".$eqname."</b></center>";
- if ($total_dkp == 0.00) {
- $content .= "<span style=\"color: #dddddd;\">$total_dkp</span><br>";
- }
- foreach ($eqdkplist as $meseqdkp){
- if ($total_dkp < 0) {
- $content .= "<span style=\"color: #d11719;\">$total_dkp</span><br>";
- }
- if ($total_dkp > 0) {
- $content .= "<span style=\"color: #0ae11e;\">$total_dkp</span><br>";
- }
- if ($total_dkp == 0) {
- $content .= "<span style=\"color: #dddddd;\">$total_dkp</span><br>";
- }
- $content .="</td></tr>";
- }
- $content.="</table>";
- }
- }
- }
- ?>
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.