Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Something
Wednesday, July 26th, 2006 at 4:42:16am MDT 

  1. <?php
  2. /**
  3. * Joomla Your DKP Module
  4. *
  5. * @version 1.1
  6. * @copyright (C) 2006 by Thumann <Brianm@thumann.dk>
  7. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
  8. * Mambo is Free Software
  9. *
  10. * Credits to: The loveable dev team of wowroster
  11. * And special shout outs to my trousted mentor, The crazy Aussie! ;>
  12. */
  13.  
  14. defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
  15. //start added by thumann
  16. $link = mysql_connect("localhost", "user", "pass");
  17. if (!$link) {
  18.    die('Not connected : ' . mysql_error());
  19. }
  20. // select the database
  21. $db_selected = mysql_select_db("database", $link);
  22. if (!$db_selected) {
  23.    die ('Can\'t select the database : ' . mysql_error());
  24. }
  25. //end added by thumann
  26.  
  27. global $ueConfig, $my, $mosConfig_lang, $mosConfig_absolute_path, $mosConfig_live_site;
  28.  
  29.         $more_dkp  = intval( $params->get( 'what_moredkp' ) );
  30.         $dkp_number1 = $params->get( 'dkp_number1' );
  31.         $dkp_number2 =   $params->get( 'dkp_number2' );
  32.         $dkp_number3 =   $params->get( 'dkp_number3' );
  33.         $dkp_number4 =    $params->get( 'dkp_number4' );
  34.        
  35.         if ($more_dkp == 1){
  36.         $dkp_count = intval( $params->get( 'dkp_number' ) );
  37.         $dkp_nr    = array($dkp_number1, $dkp_number2, $dkp_number3, $dkp_number4);
  38.         $dkp_url    = array(
  39.      $params->get( 'dkp_url1' ),
  40.            $params->get( 'dkp_url2' ),
  41.            $params->get( 'dkp_url3' ),
  42.            $params->get( 'dkp_url4' ),
  43.            );
  44.           
  45.         }else{
  46.       $dkp_nr    = array($dkp_number1);
  47.       $dkp_url   = array("eqdkp/");
  48.       $dkp_count = 1;
  49.      }
  50. $username = $my->username;
  51. if(empty($username)){
  52.    echo "Login to see your DKP";
  53. }
  54. else{
  55. $content ="";
  56. for ($i = 0; $i < $dkp_count; $i++) {
  57. $database->setQuery("SELECT member_earned, member_spent, member_adjustment FROM ".$dkp_nr[$i]."members"
  58. . "\n WHERE member_name='$username'");
  59. $dbArray = $database->loadAssocList();
  60. $dbArray = $dbArray[0];
  61. $total_dkp = $dbArray['member_earned']-$dbArray['member_spent']+$dbArray['member_adjustment'];
  62. $total_dkp = number_format($total_dkp, 2, '.', '');
  63. $eqdkplist = $database->loadObjectList();
  64. $database->setQuery("SELECT config_value FROM `".$dkp_nr[$i]."config` where config_name = 'main_title'");
  65. $eqname = $database->loadResult();
  66. if(empty($eqdkplist)){
  67.    echo "No Data found <br>";
  68. }
  69. else{
  70. $content .="<table cellpadding=\"1\" border=\"0\">";
  71. $content .="<tr><td>";
  72. $content .="<center><b>".$eqname."</b></center>";
  73. if ($total_dkp == 0.00) {
  74. $content .= "<span style=\"color: #dddddd;\">$total_dkp</span><br>";
  75. }
  76.  
  77. foreach ($eqdkplist as $meseqdkp){
  78. if ($total_dkp < 0) {
  79. $content .= "<span style=\"color: #d11719;\">$total_dkp</span><br>";
  80. }
  81. if ($total_dkp > 0) {
  82. $content .= "<span style=\"color: #0ae11e;\">$total_dkp</span><br>";
  83. }
  84. if ($total_dkp == 0) {
  85. $content .= "<span style=\"color: #dddddd;\">$total_dkp</span><br>";
  86. }
  87. $content .="</td></tr>";
  88. }
  89. $content.="</table>";
  90. }
  91. }
  92. }
  93. ?>

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.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



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.

worth-right fantasy-obligation