Example #1
0
 public function lists($group = "active", $sort = "id", $desc = "asc", $start = -1)
 {
     if ($start < 0) {
         redirect("/clients/lists/{$group}/{$sort}/{$desc}/0");
     }
     $this->load->library("pagination");
     $per_page = $this->preference->get($this->view['user']->id, "per_page");
     $this->view["start"] = $start;
     $this->view["group"] = $group;
     $this->view["sort"] = $sort;
     $this->view["desc"] = $desc == "desc" ? "desc" : "asc";
     $in_list = general("in_list");
     $this->view['in_list'] = empty($in_list) ? array() : explode("|", $in_list);
     $this->view['meta'] = $this->clientdbmodel->get_meta();
     $this->view["clients"] = $this->clientdb->retrieve($this->view['in_list'], $start, $per_page, array("status" => $group), $sort, $desc, $group);
     $this->view["total_clients"] = $this->clientdb->total($group);
     $this->pagination->initialize(array("base_url" => base_url("/clients/lists/{$group}/{$sort}/{$desc}/"), "total_rows" => $this->view["total_clients"], "per_page" => $per_page));
     $this->view["pagination"] = $this->pagination->create_links();
     $this->__run("clients/lists");
 }
Example #2
0
 public function index()
 {
     $this->form_validation->set_error_delimiters('', '');
     $user = $this->ion_auth->user()->row();
     $this->form_validation->set_rules("per_page", "Per Page", "required|numeric");
     $this->form_validation->set_rules("site_title", "Site Title", "required");
     if ($this->form_validation->run() == true) {
         general("per_page", $this->input->post("per_page"));
         general("site_title", $this->input->post("site_title"));
         general("show_unset", $this->input->post("show_unset") == "true" ? "true" : "false");
         $in_list = $this->input->post("in_list");
         general("in_list", !empty($in_list) ? implode("|", $this->input->post("in_list")) : "");
         $gravatar = $_FILES["gravatar"];
         if (isset($gravatar) && $gravatar['error'] != 4) {
             $this->upload->initialize(array("upload_path" => ASSETS . "/img", "allowed_types" => "jpg|jpeg|png", "max_size" => 1024 * 2));
             if (!$this->upload->do_upload("gravatar")) {
                 die($this->upload->display_errors());
             } else {
                 $data = $this->upload->data();
                 unlink(ASSETS . '/img/' . general("gravatar"));
                 general("gravatar", $data['file_name']);
                 $this->image_lib->initialize(array("source_image" => $data['full_path'], "width" => 100, "height" => 100));
                 if (!$this->image_lib->resize()) {
                     die($this->image_lib->display_errors());
                 }
             }
         }
         $this->session->set_flashdata('message', "Update General Settings Successfully!");
         redirect("settings/general", "refresh");
     } else {
         $this->data["per_page"] = array("name" => "per_page", "id" => "per_page", "type" => "text", "value" => general("per_page"));
         $this->data["site_title"] = array("name" => "site_title", "id" => "site_title", "type" => "text", "value" => general("site_title"));
         $this->data["show_unset"] = array("name" => "show_unset", "id" => "show_unset", "type" => "checkbox", "value" => "true");
         $this->data["gravatar"] = array("name" => "gravatar", "id" => "gravatar", "type" => "file");
         general("show_unset") == "true" && ($this->data["show_unset"]["checked"] = "");
         $this->data["in_list"] = array("options" => $this->Clientdbmodel->get_meta(), "selected" => explode("|", general("in_list")));
         $this->data['message'] = $this->session->flashdata("message");
         $this->load->view("settings/general", $this->data);
         $this->load->view("footer");
     }
 }
Example #3
0
}
</script>

  <tr>
  	<td><div style="margin-left:30px; margin-top:20px;"><?php 
menu('b_areas');
?>
</div></td>
  </tr>
  <tr>
    <td><?php 
submenu('b_areas', 'lineas');
?>
</td>
    <td background="../imagenes/barra_gris.png" width="285" height="37"><?php 
general();
?>
</td>
  </tr>
</table>

<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
	<td width="5" valign="top"></td><td></td><td width="5"></td>
</tr>
<tr height="600" valign="top">
    <td background="../imagenes/borde_izq_tabla.png">&nbsp;</td>
    <td>&nbsp;
	<!--Todo el contenido de cada página--->
	<?php 
menu_interno();
Example #4
0
 public function get($user, $key)
 {
     $result = $this->db->get_where($this->tblname, array("user_id" => $user, "key" => $key))->result();
     return isset($result[0]->value) ? $result[0]->value : general("per_page");
 }
Example #5
0
				<th>Last Update</th>
				<?php 
foreach ($in_list as $column) {
    echo '<th>' . $meta[$column] . '</th>';
}
?>
				<th>Actions</th>
			</tr>
		</thead>
		<tbody>
			<?php 
foreach ($clients as $row) {
    echo "<tr>";
    foreach ($row as $key => $col) {
        if ($key == "gravatar") {
            $col = "<img src='" . base_url("assets/img/" . (!empty($col) ? "gravatars/" . $col : general("gravatar"))) . "' class='gravatar' />";
        } elseif ($key == "status") {
            continue;
        }
        echo "<td>" . $col . "</td>";
    }
    echo "<td><a href='" . site_url("clients/profile/" . $row->id) . "'><i class=\"icon-eye-open\"></i> View</a> ";
    if ($permits) {
        echo "<br><a href='" . site_url("clients/edit/" . $row->id) . "'><i class=\"icon-edit\"></i> Edit</a><br> <a href='" . site_url("/clients/" . ($row->status == "active" ? "trash" : "recover") . "/" . $row->id) . "'><i class=\"icon-trash\"></i> " . ($row->status == "active" ? "Trash" : "Recover") . "</a><br> <a href='" . site_url("/attachments/download_all/" . $row->id) . "'><i class=\"icon-file\"></i> Attachments</a></td>";
    }
    echo "</tr>";
}
?>
		</tbody>
	</table>
	<div class="pagination pull-right">
Example #6
0
			}
			#loginform {
				padding: 10px 0 20px 0;
				margin: 0 auto;
				width: 220px;
			}
			#loginform input[type=text], #loginform input[type=password]{
				width: 180px;
				font-size: 16px;
			}
			</style>
	</head>
	<body>
		<div class="well" id="container">
			<h1 id="title"><?php 
echo general("site_title");
?>
 Login</h1>
				<?php 
if (!empty($message)) {
    ?>
				<div class="alert alert-error"><?php 
    echo $message;
    ?>
</div>
				<?php 
}
?>
						
				<?php 
echo form_open("login", array('id' => 'loginform'));
Example #7
0
    echo "error";
}
?>
">
	    		<label class="control-label" for="gravatar">Gravatar: <br>( 100x100 jpg or png max: 5mb )</label>
	    		<div class="controls">
	    			<?php 
echo form_input(array("name" => "gravatar", "id" => "gravatar", "type" => "file"));
?>
	    			<span class="help-inline"><?php 
echo form_error("gravatar");
?>
</span>
	    			<span class="help-block">    			
	    				<img style="height: 100px; width: 100px;" src="<?php 
echo base_url("assets/img/" . (!isset($brief) ? general("gravatar") : ($brief->gravatar ? "gravatars/" . $brief->gravatar : general("gravatar"))));
?>
" class="img-polaroid" />
	    			</span>
	    		</div>
	    	</div>
		    <?php 
foreach ($fields as $field) {
    ?>
	   		<div class="control-group <?php 
    if (form_error($field->Field)) {
        echo "error";
    }
    ?>
">
	    		<label class="control-label" for="<?php 
Example #8
0
 private function _brand()
 {
     return '<a class="brand" href="' . site_url("") . '">' . general("site_title") . '</a>';
 }
Example #9
0
 /**
  * Profile
  * 
  * @uses set $filter to true to turn 1 into Yes
  * @param int $id
  * @param bool  $filter
  */
 public function profile($id, $filter = true)
 {
     //get all stored data
     $brief = $this->db->get_where($this->tblname['brief'], array("id" => $id))->result();
     $data = $this->db->get_where($this->tblname['data'], array("id" => $id))->result();
     foreach ($data[0] as $key => $value) {
         $profile[$key] = $value;
     }
     //build return data
     $return = array();
     $meta = $this->clientdbmodel->get_fields();
     foreach ($meta as $field) {
         $value =& $profile[$field->Field];
         if ($filter === true) {
             if ($field->Type == "int" && $value == 0) {
                 $value = null;
             } elseif ($field->Type == "tinyint") {
                 $value = $value == "1" ? "Yes" : "No";
             }
             if (empty($value) && general("show_unset") != "true") {
                 continue;
             }
         }
         $return[$field->Field] = array("slug" => $field->slug, "value" => $value);
     }
     return array("brief" => $brief[0], "data" => $return);
 }
Example #10
0
} elseif ($getrpg == 'rank') {
    require_once './RPG/rank/rank.php';
} elseif ($getrpg == 'clan') {
    require_once './RPG/clan/clan.php';
} elseif ($getrpg == 'pet') {
    require_once './RPG/pet.php';
} elseif ($getrpg == 'request') {
    require_once './RPG/request.php';
} elseif ($getrpg == 'pick') {
    $check = "SELECT * FROM " . TABLE_PREFIX . "rpg_user WHERE userid LIKE  '{$userid}'";
    $check = $vbulletin->db->query_read($check);
    if (!(list($userid) = $vbulletin->db->fetch_array($check))) {
        $petid = $_POST['petidset'];
        $vbulletin->input->clean_array_gpc('p', array('namepet' => TYPE_NOHTML, 'titlepet' => TYPE_NOHTML));
        $petname = substr($db->escape_string($_POST['namepet']), 0, general(1));
        $pettitle = substr($db->escape_string($_POST['titlepet']), 0, general(2));
        if ($petname == "" || $petid == 0 || $petid == "") {
            eval('standard_error($rpgpetlang[rpg41n]);');
        }
        $getpets = "SELECT * FROM " . TABLE_PREFIX . "rpg_pet WHERE id ='{$petid}'";
        $getpets = $db->query_read($getpets);
        $getpet = $db->fetch_array($getpets);
        $db->query_write("INSERT INTO\r\n\t\t\t" . TABLE_PREFIX . "rpg_user\r\n\t\t\t\t(`userid`,\r\n\t\t\t\t`pet`)\r\n\t\t\tVALUES\r\n\t\t\t\t('" . addslashes($vbulletin->userinfo[userid]) . "',\r\n\t\t\t\t'" . addslashes($vbulletin->userinfo[userid]) . "')\r\n\t\t");
        $userid = $vbulletin->userinfo['userid'];
        $checkitemrows = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "rpg_itemuser WHERE userid ='{$userid}'");
        $checkitemrow = $db->fetch_array($checkitemrows);
        if (!$checkitemrow) {
            $db->query_write("INSERT INTO\r\n\t\t\t" . TABLE_PREFIX . "rpg_itemuser\r\n\t\t\t\t(`userid`\t\t)\r\n\t\t\tVALUES\r\n\t\t\t\t('" . addslashes($vbulletin->userinfo[userid]) . "')\r\n\t\t");
        }
        $db->query_write("INSERT INTO\r\n\t\t\t" . TABLE_PREFIX . "rpg_petuser\r\n\t\t\t\t(`petid`,\r\n\t\t\t\t`name`,\r\n\t\t\t\t`title`,\r\n\t\t\t\t`level`,\r\n\t\t\t\t`hp`,\r\n\t\t\t\t`hpdef`,\r\n\t\t\t\t`exp`,\r\n\t\t\t\t`expnext`,\r\n\t\t\t\t`att`,\r\n\t\t\t\t`def`,\r\n                `cri`,\r\n\t\t\t\t`luck`,\r\n\t\t\t\t`class`,\r\n\t\t\t\t`image`\r\n\t\t\t\t)\r\n\t\t\tVALUES\r\n\t\t\t\t('" . addslashes($vbulletin->userinfo[userid]) . "',\r\n\t\t\t\t'{$petname}',\r\n\t\t\t\t'{$pettitle}',\r\n\t\t\t\t'{$getpet['level']}',\r\n\t\t\t\t'{$getpet['hp']}',\r\n\t\t\t\t'{$getpet['hp']}',\r\n\t\t\t\t '0',\r\n                '{$getpet['expnext']}',\r\n\t\t\t\t'{$getpet['att']}',\r\n\t\t\t\t'{$getpet['def']}',\r\n                '{$getpet['cri']}',\r\n\t\t\t\t'{$getpet['luck']}',\r\n\t\t\t\t'{$getpet['class']}',\r\n\t\t\t\t'{$getpet['image']}')\r\n\t\t");
    }
Example #11
0
}
if ($_SESSION["TYPE"] == 'autorizador') {
    include '../autorizador/filtros.php';
}
switch ($op) {
    case "reporte_sap":
        reporte_sap($fechai, $fechaf);
        break;
    case "previo_sap":
        previo_sap($fechai, $fechaf, $aplica_oes, $buscar, $filtros, $stock, $f_material, $f_sub);
        break;
    case "preliminar":
        preliminar($fechai, $fechaf, $aplica_oes, $buscar, $filtros, $reporte);
        break;
    case "general":
        general($fechai, $fechaf, $buscar, $filtros, $reporte);
        break;
    case "definitivo":
        definitivo($fechai, $fechaf, $aplica_oes, $tipo, $division, $buscar, $filtros);
        break;
    case "historial_1":
        historial_1($anio, $fechai, $fechaf, $tipo, $division, $buscar, $filtros);
        break;
    case "historial_2":
        historial_2($anio, $fechai, $fechaf, $buscar, $filtros, $reporte);
        break;
    case "atrasos":
        atrasos($buscar, $filtros);
        break;
    case "grafico":
        grafico($consulta, $reason);
Example #12
0
function gravatar($path)
{
    return base_url("assets/img/" . (!empty($path) ? "gravatars/" . $path : general("gravatar")));
}
Example #13
0
		<a class="btn btn-large" href="<?php 
    echo site_url('clients/edit/' . $id);
    ?>
"><i class="icon-edit"></i></a>
		<a class="btn btn-large" href="<?php 
    echo site_url('clients/trash/' . $id);
    ?>
"><i class="icon-trash"></i></a>
	</div>
	<?php 
}
?>
</div>
<hr>
<img style="height: 100px; width: 100px;" src="<?php 
echo base_url("assets/img/" . (!isset($profile['brief']->gravatar) ? general("gravatar") : "gravatars/" . $profile['brief']->gravatar));
?>
" class="img-polaroid span2" />
<table class="table table-striped table-bordered span6">
	<tbody>
		<?php 
foreach ($profile['data'] as $key => $value) {
    echo "<tr><td>{$value['slug']}</td><td>{$value['value']}</td></tr>";
}
if (isset($attachments)) {
    echo "<tr><td>Attachments 附件 [ <a href='" . site_url("/attachments/download_all/" . $id) . "'>Download All</a> ]</td><td>";
    foreach ($attachments as $id => $row) {
        echo "<a href='" . site_url("/attachments/download/" . $row->id) . "'>" . $row->filename . "</a>";
        if (in_array($row->fileext, array(".pdf", ".jpeg", ".jpg", ".png", ".txt"))) {
            echo " [<a target='_blank' href='" . base_url("/attachments/view/" . $row->id) . "'>View Online</a>]";
        }