Friday, 13 September 2013

how i change paging class format

how i change paging class format

i want to edit this form . but i don't know how
---->
I want to change the format
this the css file:
@charset "windows-1256";
<!--body { font-family:tahoma, Arial, Helvetica, sans-serif; font-size:
12px;
background: url(/images/topic/bg1.png) no-repeat center center fixed;
margin: 0;
padding: 0;
color: #000;
direction: rtl;
text-align:center;
}
/* ~~ Element/tag selectors ~~ */
ul, ol, dl { /* Due to variations between browsers, it's best
practices to zero padding and margin on lists. For consistency, you
can either specify the amounts you want here, or on the list items
(LI, DT, DD) they contain. Remember that what you do here will cascade
to the .nav list unless you write a more specific selector. */
padding: 0;
margin: 0;
}
h1, h2, h3, h4, h5, h6, p {
margin-top: 0; /* removing the top margin gets around an issue where
margins can escape from their containing div. The remaining bottom
margin will hold it away from any elements that follow. */
padding-right: 15px;
padding-left: 15px; /* adding the padding to the sides of the elements
within the divs, instead of the divs themselves, gets rid of any box
model math. A nested div with side padding can also be used as an
alternate method. */
}
a:link {
color:#470076;
text-decoration: underline; /* unless you style your links to look
extremely unique, it's best to provide underlines for quick visual
identification */
}
a img { /* this selector removes the default blue border displayed in
some browsers around an image when it is surrounded by a link */
border: none;
}/* ~~ Styling for your site's links must remain in this order -
including the group of selectors that create the hover effect. ~~ *//*
~~ this container surrounds all other divs giving them their
percentage-based width ~~ */
.container {
font-family:tahoma, Arial, Helvetica, sans-serif;
font-size: 10px;
width: 1014px;
max-width: 1260px; /* a max-width may be desirable to keep this layout
from getting too wide on a large monitor. This keeps line length more
readable. IE6 does not respect this declaration. */
min-width: 780px;/* a min-width may be desirable to keep this layout
from getting too narrow. This keeps line length more readable in the
side columns. IE6 does not respect this declaration. */
background: #ffffff;
margin: 0 auto; /* the auto value on the sides, coupled with the
width, centers the layout. It is not needed if you set the
.container's width to 100%. */
border-left: 6px solid #ff2cf0 ;
border-right:6px solid #2cefff ;
}/* ~~ the header is not given a width. It will extend the full width
of your layout. It contains an image placeholder that should be
replaced with your own linked logo ~~ */
.header {
background: #transparent;
}/* ~~ These are the columns for the layout. ~~ 1) Padding is only
placed on the top and/or bottom of the divs. The elements within these
divs have padding on their sides. This saves you from any "box model
math". Keep in mind, if you add any side padding or border to the div
itself, it will be added to the width you define to create the *total*
width. You may also choose to remove the padding on the element in the
div and place a second div within it with no width and the padding
necessary for your design.2) No margin has been given to the columns
since they are all floated. If you must add margin, avoid placing it
on the side you're floating toward (for example: a right margin on a
div set to float right). Many times, padding can be used instead. For
divs where this rule must be broken, you should add a "display:inline"
declaration to the div's rule to tame a bug where some versions of
Internet Explorer double the margin.3) Since classes can be used
multiple times in a document (and an element can also have multiple
classes applied), the columns have been assigned class names instead
of IDs. For example, two sidebar divs could be stacked if necessary.
These can very easily be changed to IDs if that's your preference, as
long as you'll only be using them once per document.4) If you prefer
your nav on the left instead of the right, simply float these columns
the opposite direction (all left instead of all right) and they'll
render in reverse order. There's no need to move the divs around in
the HTML source.*/
.sidebar1 {
float: right;
width: 180px;
background: #transparent;
padding-bottom: 0px;
padding: 5px 5px 0px 5px;
}
.content {
font-family: tahoma;
font-size: 12px;
padding: 8px 0;
width: 80%;
float: center;
margin-right : 5px;
}
/* ~~ This grouped selector gives the lists in the .content area space ~~
.content ul, .content ol {
padding: 0 15px 15px 40px;
/* this padding mirrors the right padding in the headings and
paragraph rule above. Padding was placed on the bottom for space
between other elements on the lists and on the left to create the
indention. These may be adjusted as you wish. */
}
/* ~~ The navigation list styles (can be removed if you choose to use
a premade flyout menu like Spry) ~~ */
ul.nav
{ list-style: none;
/* this removes the list marker */
border-top: 1px solid #666; /* this creates the top border for the
links - all others are placed using a bottom border on the LI */
margin-bottom: 15px; /* this creates the space between the navigation
on the content below */
}
ul.nav li {
border-bottom: 1px solid #666; /* this creates the button separation */
}
ul.nav a, ul.nav a:visited {
/* grouping these selectors makes sure that your links retain their
button look even after being visited */
padding: 5px 5px 5px 15px;
display: block;
/* this gives the link block properties causing it to fill the whole
LI containing it. This causes the entire area to react to a mouse
click. */
text-decoration: none;
background: #transparent;
color: #000;
}
ul.nav a:hover, ul.nav a:active, ul.nav a:focus { /* this changes the
background and text color for both mouse and keyboard navigators */
background: #transparent;
color: #FFF;
}
/* ~~ The footer ~~ */
.footer {
padding: 10px 0;
background: #transparent;
margin-bottom:0px;
padding-bottom:0px;
clear: both; /* this clear property forces the .container to
understand where the columns end and contain them */
}
/* ~~ miscellaneous float/clear classes ~~ */
.fltrt {
/* this class can be used to float an element right in your page. The
floated element must precede the element it should be next to on the
page. */
float: right;
margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your
page. The floated element must precede the element it should be next
to on the page. */
float: left;
margin-right: 8px;}
.clearfloat { /* this class can be placed on a <br /> or empty div as
the final element following the last floated div (within the
#container) if the #footer is removed or taken out of the #container
*/
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
}
--></style><!--[if lte IE 7]><style>
.content {
margin-right: -1px;
} /* this 1px negative margin can be placed on any of the columns in
this layout with the same corrective effect. */
ul.nav a {
zoom: 1;
} /* the zoom property gives IE the hasLayout trigger it needs to
correct extra whiltespace between the links */
<![endif]-->
a {
font-family: tahoma;
font-size: 12px;
color: #a33131;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #006700;
}
a:hover {
text-decoration: underline;
color: #1c529c;
}
a:active {
text-decoration: none;
color: #1F6B94;
}
.table {
font-family: tahoma;
font-size: 12px;
background-color: #transparent;
border: 1px solid #c2c2c2;
}
.td1 {
font-family: tahoma;
font-size: 12px;
color: #FFFFFF;
background-color: #transparent;
}
.td2
{ font-family: tahoma;
color: #333333;
background-color: #transparent;
}
.msg-box-head {
font-family: tahoma;
font-size: 12px;
font-style: normal;
background-color: #transparent;
background-image: url(images/table/head-table-bg.gif);
background-repeat: repeat-x;
font-weight: bold;
color: #fff;
padding:6px;
}
.head-2 {
font-family: tahoma;
font-size: 12px;
font-style: normal;
background-color: #transparent;
background-image: url(images/table/head-table-bg-2.gif);
background-repeat: repeat-x;
font-weight: bold;
color: #333333;
bottom: 1px;
padding: 2px;
}
.msg-box {
font-family: tahoma;
font-size: 12px;
font-style: normal;
background-color: #transparent;
background-image: url(images/table/table-content-bg.gif);
background-repeat: repeat-x;
margin-left: 0px;
padding:3px;
}
.no-effect {
font-family: tahoma;
font-size: 12px;
font-style: normal;
left: 0px;
right: 0px;
}
.footer_head {
font-family: tahoma;
font-size: 12px;
font-style: normal;
background-color: #transparent;
background-image: url(images/footer/footer-bg.gif);
background-repeat: repeat-x;
font-weight: bold;
color: #666666;
bottom: 1px;
padding: 5px 0px 5px 0px;
border: 1px solid #CCCCCC;
}
.topic_content {
font-family: tahoma;
font-size: 12px;
background-color: #transparent;
color: #19618b;
}
.sections { font-family: tahoma;
font-size: 12px;
background-color: #transparent;
}/* Topic images proparties */
.image {border: none ;
border: 4px solid #d4d4d4;
}/* Topic images hover proparties */
#search {
}
#search input[type="text"] {
background: url(/images/search-dark.png) no-repeat 10px 6px #444;
border: 0 none;
font: bold 12px Arial,Helvetica,Sans-serif;
color: #777;
width: 150px;
padding: 6px 15px 6px 35px;
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
text-shadow: 0 2px 2px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px
rgba(0, 0, 0, 0.2) inset;
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px rgba(0,
0, 0, 0.2) inset;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px rgba(0, 0, 0,
0.2) inset;
-webkit-transition: all 0.7s ease 0s;
-moz-transition: all 0.7s ease 0s;
-o-transition: all 0.7s ease 0s;
transition: all 0.7s ease 0s;
}
#search input[type="text"]:focus {
width: 200px;
}
a.tooltip {outline:none;text-decoration:none;border-bottom:dotted 1px
blue;}
a.tooltip strong {line-height:30px;}
a.tooltip > span
{
width:200px;
padding: 10px 20px;
margin-top: 20px;
margin-left: -85px;
opacity: 0;
visibility: hidden;
z-index: 10;
position: absolute;
font-family: Arial;
font-size: 12px;
font-style: normal;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 2px 2px 2px #999;
-moz-box-shadow: 2px 2px 2px #999;
box-shadow: 2px 2px 2px #999;
-webkit-transition-property:opacity, margin-top, visibility,
margin-left;
-webkit-transition-duration:0.4s, 0.3s, 0.4s, 0.3s;
-webkit-transition-timing-function: ease-in-out, ease-in-out,
ease-in-out, ease-in-out;
-moz-transition-property:opacity, margin-top, visibility,
margin-left;
-moz-transition-duration:0.4s, 0.3s, 0.4s, 0.3s;
-moz-transition-timing-function: ease-in-out, ease-in-out,
ease-in-out, ease-in-out;
-o-transition-property:opacity, margin-top, visibility, margin-left;
-o-transition-duration:0.4s, 0.3s, 0.4s, 0.3s;
-o-transition-timing-function: ease-in-out, ease-in-out,
ease-in-out, ease-in-out;
transition-property:opacity, margin-top, visibility, margin-left;
transition-duration:0.4s, 0.3s, 0.4s, 0.3s;
transition-timing-function: ease-in-out, ease-in-out, ease-in-out,
ease-in-out;
}
and this is the form file (paging-class.php)
<?php
class paging
{
var $koneksi;
var $p;
var $page;
var $q;
var $query;
var $next;
var $prev;
var $number;
function paging($baris=5, $langkah=5, $prev="[prev]", $next="[next]",
$number="[%%number%%]")
{
$this->next=$next;
$this->prev=$prev;
$this->number=$number;
$this->p["baris"]=$baris;
$this->p["langkah"]=$langkah;
$_SERVER["QUERY_STRING"]=preg_replace("/&page=[0-9]*/","",$_SERVER["QUERY_STRING"]);
if (empty($_GET["page"])) {
$this->page=1;
} else {
$this->page=$_GET["page"];
}
}
function db($host,$username,$password,$dbname)
{
$this->koneksi=mysql_connect($host, $username, $password) or
die("Connection Error");
mysql_select_db($dbname);
return $this->koneksi;
}
function query($query)
{
$kondisi=false;
// only select
if (!preg_match("/^[\s]*select*/i",$query)) {
$query="select ".$query;
}
$querytemp = mysql_query($query);
$this->p["count"]= mysql_num_rows($querytemp);
// total page
$this->p["total_page"]=ceil($this->p["count"]/$this->p["baris"]);
// filter page
if ($this->page<=1)
$this->page=1;
elseif ($this->page>$this->p["total_page"])
$this->page=$this->p["total_page"];
// awal data yang diambil
$this->p["mulai"]=$this->page*$this->p["baris"]-$this->p["baris"];
$query=$query." limit ".$this->p["mulai"].",".$this->p["baris"];
$query=mysql_query($query) or die("Query Error");
$this->query=$query;
}
function result()
{
return $result=mysql_fetch_object($this->query);
}
function result_assoc()
{
return mysql_fetch_assoc($this->query);
}
function print_no()
{
$number=$this->p["mulai"]+=1;
return $number;
}
function print_color($color1,$color2)
{
if (empty($this->p["count_color"]))
$this->p["count_color"] = 0;
if ( $this->p["count_color"]++ % 2 == 0 ) {
return $color=$color1;
} else {
return $color=$color2;
}
}
function print_info()
{
$page=array();
$page["start"]=$this->p["mulai"]+1;
$page["end"]=$this->p["mulai"]+$this->p["baris"];
$page["total"]=$this->p["count"];
$page["total_pages"]=$this->p["total_page"];
if ($page["end"] > $page["total"]) {
$page["end"]=$page["total"];
}
if (empty($this->p["count"])) {
$page["start"]=0;
}
return $page;
}
function print_link()
{
//generate template
function number($i,$number)
{
return ereg_replace("^(.*)%%number%%(.*)$","\\1$i\\2",$number);
}
$print_link = false;
if ($this->p["count"]>$this->p["baris"]) {
// print prev
if ($this->page>1)
$print_link .= "<td align=\"center\" width='80px'
class=\"table\"><a
href=\"".$_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]."&page=".($this->page-1)."\">".$this->prev."</a></td>\n";
// set number
$this->p["bawah"]=$this->page-$this->p["langkah"];
if ($this->p["bawah"]<1) $this->p["bawah"]=1;
$this->p["atas"]=$this->page+$this->p["langkah"];
if ($this->p["atas"]>$this->p["total_page"])
$this->p["atas"]=$this->p["total_page"];
// print start
if ($this->page<>1)
{
for ($i=$this->p["bawah"];$i<=$this->page-1;$i++)
$print_link .="<td align=\"center\" width='20px'
class=\"table\"><a
href=\"".$_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]."&page=$i\">".number($i,$this->number)."</a></td>\n";
}
// print active
if ($this->p["total_page"]>1)
$print_link .= "<td align=\"center\" width='20px'
class=\"table\"><b>".number($this->page,$this->number)."</b></td>\n";
// print end
for ($i=$this->page+1;$i<=$this->p["atas"];$i++)
$print_link .= "<td align=\"center\" width='20px'
class=\"table\"><a
href=\"".$_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]."&page=$i\">".number($i,$this->number)."</a></td>\n";
// print next
if ($this->page<$this->p["total_page"])
$print_link .= "<td align=\"center\" width='80px'
class=\"table\"><a
href=\"".$_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]."&page=".($this->page+1)."\">".$this->next."</a></td>\n";
return $print_link;
}
}
}
?>
please someone change it to me / you can choose the new format
:)

No comments:

Post a Comment