chiter Posted December 17, 2005 Report Share Posted December 17, 2005 vai ir iespeejams daliit lapaas attieciigus ierakstus, ja man katrs ieraksts ir savaadaaks? es taa saprotu ka te jaaizmanto masiivi? Link to comment Share on other sites More sharing options...
Vebers Posted December 17, 2005 Report Share Posted December 17, 2005 Ja pareizi sapratu tad skaties te * http://php.lv/f/index.php?showtopic=2062 * http://php.lv/f/index.php?showtopic=765 * http://php.lv/f/index.php?showtopic=1330 * http://php.lv/f/index.php?showtopic=2881 * http://php.lv/f/index.php?showtopic=2788 Izmanto http://php.lv/f/index.php?showtopic=2935 Link to comment Share on other sites More sharing options...
bubu Posted December 17, 2005 Report Share Posted December 17, 2005 Ir iespējams. Link to comment Share on other sites More sharing options...
chiter Posted December 17, 2005 Author Report Share Posted December 17, 2005 (edited) man patiik shitais variantinsh $sakt = (isset($_GET['vestule']) ? intval($_GET['vestule']) : 0); // te piemēram dabū 10 vēstules sākot no $sakt skaita // parādi viņas // ja vēl palikušas vēl vēstules, tad jāizdrukā links uz nākoršajām: echo '<a href="?vestule=' . strval($sakt+10) . '">Nākamās vēstules</a>'; tikai es nezinu kur var dabuut pilno versiju, jo ts laikam nav viis pilnais? un veel es nesaprotu kas domaats zem taa 'vestule' ??? Edited December 17, 2005 by chiter Link to comment Share on other sites More sharing options...
Klez Posted December 17, 2005 Report Share Posted December 17, 2005 'vestule' = ir domaats GET mainiigais, lai skripts zina, kura lapse ir paaadiita! Link to comment Share on other sites More sharing options...
Vebers Posted December 18, 2005 Report Share Posted December 18, 2005 $sakt = (isset($_GET['vestule']) ? intval($_GET['vestule']) : 0); Ko šajā izteiksmē nozīmē '?' un ':' ? Tie ir kautkādi saīsinājumi? Laikam redzēju arī 'if' izteiksmes ar jautājuma zīmi un kolu.. Varbūt kāds var paskaidrot vai iedot URL ? ;) Link to comment Share on other sites More sharing options...
Grey_Wolf Posted December 18, 2005 Report Share Posted December 18, 2005 MakaTaNaw--> konstrukcijas IF / ELSE saiisinaatais varijants. Link to comment Share on other sites More sharing options...
Paulinjsh Posted December 18, 2005 Report Share Posted December 18, 2005 nosacījums ? ja patiess : citaadaak Link to comment Share on other sites More sharing options...
chiter Posted December 19, 2005 Author Report Share Posted December 19, 2005 A kaa to pareizi pierakstiit google, lai vinsh atrastu shito lapu daliishanu? Link to comment Share on other sites More sharing options...
KAC Posted December 19, 2005 Report Share Posted December 19, 2005 tev jau ir doti vairaaki paraugi, ko tev veel vajag? Link to comment Share on other sites More sharing options...
v3rb0 Posted December 19, 2005 Report Share Posted December 19, 2005 tā ar raksti: google, google, gribu paginate!!! Link to comment Share on other sites More sharing options...
Klez Posted December 19, 2005 Report Share Posted December 19, 2005 (edited) http://php.lv/f/index.php?showtopic=3509 Edited December 19, 2005 by Klez Link to comment Share on other sites More sharing options...
chiter Posted December 20, 2005 Author Report Share Posted December 20, 2005 man vēl viens jautājums par to php kodu, kas dala ierakstus pa lapām. Vai ar to kodu var sadalīt visu tāpat, ja nav sadalīts masīvos, jo ziņas (jaunā informācija) tiek rakstītas caur Dreamweaveru un tādējādi es nevaru to sadalīt pa masīviem. (laikam) kods: <?php @$lapuse=$_GET['lapuse']; @$id=$_GET ['id']; if (empty($id)){ $id="sakums";} if (empty($lapuse)){ $lapuse=1;} switch ($id){ case "sakums": $fich="scripts/yes.txt"; $fp=fopen("$fich","r"); $yes=fread($fp,10000); fclose($fp); $masivs=explode("&", $yes); $zinjas=count($masivs)-1; $lapuskaits=$zinjas /10; echo ceil($lapuskaits); echo ' lappuses <br>'; for($j=1;$j<=$lapuskaits+1;$j++){ echo "<a href=\"?lapuse=$j\">$j</a> "; } echo "viesu gramataa ir $zinjas ieraksts/i<br><br>"; for ($i=0;$i<$zinjas;$i++){ if($i>($lapuse*10-10)AND $i<($lapuse*10-1)){ $masivss=explode(";", $masivs[$i]); $masivss[3]=date("H:i:s d:n:Y",$masivss[3]); echo "<b>$i.</b> Vards: $masivss[0]<br>e-pasts: $masivss[1]<br>Zinja: $masivss[2]<br>Datums: $masivss[3]<p>"; } } ?> Link to comment Share on other sites More sharing options...
Kavacky Posted December 20, 2005 Report Share Posted December 20, 2005 LOL, tad moš uzreiz saraksti sadalītu? Link to comment Share on other sites More sharing options...
chiter Posted December 20, 2005 Author Report Share Posted December 20, 2005 kāpēc? nē bet nevar tā sadalīt? Link to comment Share on other sites More sharing options...
Recommended Posts