public function showExtras($extras)
 {
     $colors = new colors();
     if ($extras) {
         $success = $this->success;
         $messageColor = $this->success ? 'cyan' : 'light_red';
         if (is_array($extras)) {
             foreach ($extras as $key => $value) {
                 echo $colors->getColoredString($key . ' => ' . $value, $messageColor) . "\n";
             }
         } else {
             echo $colors->getColoredString($extras, $messageColor) . "\n";
         }
     }
     unset($colors);
 }
Example #2
0
 public static function getColors($pack)
 {
     $sql_colors = dbconnection::queryObject("SELECT * FROM colors WHERE colors_id = '{$pack->colors_id}' LIMIT 1");
     if (!$sql_colors) {
         return new return_package(2, NULL, "The colors you've requested do not exist");
     }
     return new return_package(0, colors::colorsObjectFromSQL($sql_colors));
 }
Example #3
0
 public function error($str)
 {
     die(colors::color("ERROR: {$str} EXITING.", "red", "yellow") . "\n");
 }
Example #4
0
echo $form->labelEx($model, 'color_id');
?>
 
            
		<?php 
echo $form->textField($model, 'color_id');
?>
		<?php 
echo $form->error($model, 'color_id');
?>
                -->
            <?php 
echo 'لــون السيارة';
?>
            <?php 
echo $form->dropDownList($model, 'color_id', CHtml::listData(colors::model()->findAll(), 'color_id', 'color_name'));
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'chass_no');
?>
		<?php 
echo $form->textField($model, 'chass_no', array('size' => 60, 'maxlength' => 255));
?>
		<?php 
echo $form->error($model, 'chass_no');
?>
	</div>