<td width="50"><input type="checkbox" class="ids" name="id[]" value="<?php echo $row->id; ?> " /> </td> <?php foreach ($tableGrid as $j => $field) { ?> <?php if ($field['view'] == '1') { ?> <td> <?php if ($field['attribute']['image']['active'] == '1') { ?> <?php echo SiteHelpers::showUploadedFile($row->{$field}['field'], $field['attribute']['image']['path']); ?> <?php } else { ?> <?php $conn = isset($field['conn']) ? $field['conn'] : array(); echo SiteHelpers::gridDisplay($row->{$field}['field'], $field['field'], $conn); ?> <?php } ?> </td> <?php } ?>
</div> <div class="form-group " > <label for="Avatar" class=" control-label col-md-4 text-left"><?php echo $this->lang->line('core.avatar'); ?> </label> <div class="col-md-8"> <input type='file' name='avatar' id='avatar' <?php if ($row['avatar'] == '') { echo "class='required'"; } ?> style='width:150px !important;' /> <?php echo SiteHelpers::showUploadedFile($row['avatar'], '/uploads/users/'); ?> <br /> <i> <small></small></i> </div> </div> </fieldset> <fieldset> <legend><?php echo $this->lang->line('core.password'); ?> </legend> <div class="form-group"> <label for="ipt" class=" control-label col-md-4"><?php echo $this->lang->line('core.password');
public static function gridFormater($val, $row, $attribute = array(), $arr = array()) { if ($attribute['image']['active'] == '1' && $attribute['image']['active'] != '') { $val = SiteHelpers::showUploadedFile($val, $attribute['image']['path']); } // Handling Quick Display As if (isset($arr['valid']) && $arr['valid'] == 1) { $fields = str_replace("|", ",", $arr['display']); if (isset($arr['multiple']) && $arr['multiple'] == '1') { $Q = DB::select(" SELECT " . $fields . " FROM " . $arr['db'] . " WHERE " . $arr['key'] . " IN (" . $val . ") "); if (count($Q) >= 1) { $fields = explode("|", $arr['display']); $val = array(); foreach ($Q as $values) { $v = ''; $v .= isset($fields[0]) && $fields[0] != '' ? $values->{$fields}[0] . ' ' : ''; $v .= isset($fields[1]) && $fields[1] != '' ? $values->{$fields}[1] . ' ' : ''; $v .= isset($fields[2]) && $fields[2] != '' ? $values->{$fields}[2] . ' ' : ''; $val[] = $v; } $val = implode(", ", $val); } } else { $Q = DB::select(" SELECT " . $fields . " FROM " . $arr['db'] . " WHERE " . $arr['key'] . " = '" . $val . "' "); if (count($Q) >= 1) { $rowObj = $Q[0]; $fields = explode("|", $arr['display']); $v = ''; $v .= isset($fields[0]) && $fields[0] != '' ? $rowObj->{$fields}[0] . ' ' : ''; $v .= isset($fields[1]) && $fields[1] != '' ? $rowObj->{$fields}[1] . ' ' : ''; $v .= isset($fields[2]) && $fields[2] != '' ? $rowObj->{$fields}[2] . ' ' : ''; $val = $v; } } } // Handling format function if (isset($attribute['formater']['active']) and $attribute['formater']['active'] == 1) { $val = $attribute['formater']['value']; foreach ($row as $k => $i) { if (preg_match("/{$k}/", $val)) { $val = str_replace($k, $i, $val); } } $c = explode("|", $val); if (isset($c[0]) && class_exists($c[0])) { $val = call_user_func(array($c[0], $c[1]), str_replace(":", ",", $c[2])); //$val = $c[2]; } } // Handling Link function if (isset($attribute['hyperlink']['active']) && $attribute['hyperlink']['active'] == 1 && $attribute['hyperlink']['link'] != '') { $attr = ''; $linked = $attribute['hyperlink']['link']; foreach ($row as $k => $i) { if (preg_match("/{$k}/", $attribute['hyperlink']['link'])) { $linked = str_replace($k, $i, $linked); } } if ($attribute['hyperlink']['target'] == 'modal') { $attr = "onclick='SximoModal(this.href); return false'"; } $val = "<a href='" . URL::to($linked) . "' {$attr} style='display:block' >" . $val . " <span class='fa fa-arrow-circle-right pull-right'></span></a>"; } return $val; }
?> " /> </div> </div> <div class="form-group " > <label for="ipt" class=" control-label col-md-4 text-right"> Avatar </label> <div class="col-md-8"> <input type="file" name="avatar"> <br /> <?php echo $this->lang->line('core.pge_imgdim'); ?> 80 x 80 px <br /> <?php echo SiteHelpers::showUploadedFile($info->avatar, '/uploads/users/'); ?> </div> </div> <div class="form-group"> <label for="ipt" class=" control-label col-md-4"> </label> <div class="col-md-8"> <button class="btn btn-success" type="submit"><?php echo $this->lang->line('core.sb_savechanges'); ?> </button> </div> </div>