Exemplo n.º 1
0
 function User($name, $age, $username, $password)
 {
     $this->clean_input(set_name($name));
     $this->clean_input(set_age($age));
     $this->clean_input(set_username($username));
     $this->clean_input(set_password($password));
 }
Exemplo n.º 2
0
function get_info() {
	reset_product_array();
	get_fields();
	cleanup();
	set_skus();
	set_vendor_code();
	set_sku_str();
	set_brand();
	set_name();
	set_type();
	set_price();
	set_features();
	set_description();
	set_keywords();
	set_main_image();
	output_product_str();
}
Exemplo n.º 3
0
function format_item_name_html($item)
{
    $displayname = $item['type'];
    $bold = $endbold = '';
    // just for testing
    if (isset($item['quantity'])) {
        $displayname = $item['quantity'] . " " . $displayname;
    }
    //  $qualitylist = array('', 'low', 'normal', 'high', 'magical', 'set', 'rare', 'unique', 'crafted');
    $qualitylist = array('', '', '', 'Superior ', '', '', '', '', '');
    $qualitycolors = array('', 'ffffff', 'ffffff', 'ffffff', '4850b8', '00c400', 'yellow', '908858', 'orange');
    if (!isset($item['quality'])) {
        $color = 'ffffff';
    } else {
        $displayname = $qualitylist[$item['quality']] . $displayname;
        $color = $qualitycolors[$item['quality']];
        if ($item['quality'] > 3 || $item['hasruneword'] == 1) {
            $bold = '<b>';
            $endbold = '</b>';
        }
        switch ($item['quality']) {
            case 1:
                // low quality
                switch ($item['quality2']) {
                    case 0:
                        $displayname = "Crude " . $displayname;
                        break;
                    case 1:
                        $displayname = "Cracked " . $displayname;
                        break;
                    case 2:
                        $displayname = "Damaged " . $displayname;
                        break;
                    case 3:
                        $displayname = "Low Quality " . $displayname;
                        break;
                }
                break;
            case 2:
            case 3:
                break;
            case 4:
                // magic
                if ($item['magicprefix'] > 0) {
                    $displayname = magic_prefix($item['magicprefix']) . " " . $displayname;
                }
                if ($item['magicsuffix'] > 0) {
                    $displayname = $displayname . " " . magic_suffix($item['magicsuffix']);
                }
                break;
            case 5:
                // set
                $displayname = set_name($item['setid'], $item['type']);
                break;
            case 6:
                // rare
                $displayname = rare_name($item['rareword1']) . " " . rare_name($item['rareword2']) . " " . $displayname;
                break;
            case 7:
                // unique
                $displayname = unique_name($item['uniqueid'], $item['type']);
                break;
            case 8:
                // crafted (same as rare)
                $displayname = rare_name($item['rareword1']) . " " . rare_name($item['rareword2']) . " " . $displayname;
                break;
        }
    }
    //  if ($item['isquest'] == 1) $color = '908858';
    if ($color == 'ffffff' && $item['issocketed'] == 1) {
        $color = 'gray';
    }
    if ($color == 'ffffff' && $item['isethereal'] == 1) {
        $color = 'darkgray';
    }
    if ($item['hasruneword'] == 1) {
        $displayname = $item['runeword'] . " " . $displayname;
        $color = '908858';
    } elseif ($item['issocketed'] == 1 && $item['quality'] < 4 && $item['itemsinsockets'] > 0) {
        $displayname = "Gemmed " . $displayname;
    }
    if ($item['isear'] == 1) {
        $color = 'ffffff';
        $displayname = $item['earname'] . "'s ear";
    }
    if ($item['ispersonalized'] == 1) {
        $displayname = $item['itemname'] . "'s " . $displayname;
    }
    $prefix = '';
    // just for testing
    if (isset($item['defense'])) {
        $displayname = $displayname . " " . $item['defense'];
    }
    /*
      if (isset($item['maxdurability'])) {
        if ($item['maxdurability'] == 0) {
          $displayname = $displayname ." Indestructable";
        } else {
          $displayname = $displayname ." ". $item['curdurability'] ." / ". $item['maxdurability'];
        }
      }
    */
    return $bold . "<font color=" . $color . ">" . $displayname . "</font>" . $endbold;
}