浏览代码

trying to keep profession background color consistent

development
mauirixxx 8 年前
父节点
当前提交
3795c6d3b3
共有 2 个文件被更改,包括 3 次插入0 次删除
  1. +2
    -0
      gw-history.php
  2. +1
    -0
      gw-toon.php

+ 2
- 0
gw-history.php 查看文件

@@ -12,6 +12,7 @@ include_once 'gw-connect.php';
$con = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME);
//$cnameid = mysqli_real_escape_string($con, $_POST['cnameid']); //need to sanitize & validate this input somehow
$cnameid = $_SESSION['playerid'];
$profcolor = $_SESSION['profcolor'];
if ($con->connect_errno > 0){
die ('Unable to connect to database [' . $db->connect_errno . ']');
}
@@ -20,6 +21,7 @@ if (!$result = $con->query($sql)){
die ('There was an error running the query [' . $con->error . ']');
}
if (mysqli_num_rows($result) > 0) {
echo '<STYLE TYPE="TEXT/CSS" MEDIA="SCREEN">body { background-color: ' . $profcolor . '; }</STYLE>';
while ($row = $result->fetch_array()){
echo '<TR><TD>On ' . $row['historydate'] . ', "' . $row['charname'] . '" got ' . $row['goldrec'] . 'GP and ';
if ($row['itemtype'] == 16) { //this would be a rune


+ 1
- 0
gw-toon.php 查看文件

@@ -41,6 +41,7 @@ if (!$_SESSION['userid']){
while ($row2 = $result2->fetch_array()){
$charactername = $row2['charname'];
$profcolor = $row2['profcolor'];
$_SESSION['profcolor'] == $profcolor;
echo '<TITLE>' . $charactername . '</TITLE><BODY>';
echo '<STYLE TYPE="TEXT/CSS" MEDIA="SCREEN">body { background-color: ' . $profcolor . '; }</STYLE>';
}


正在加载...
取消
保存