GACHA12 Posted November 23, 2003 Report Share Posted November 23, 2003 Jaaa,daudzi uzreiz teiks offtopic... Bet veel neesmu atradis pilnu skriptu, vai vismaz puspabeigtu.... :P Taatad - SMS suutiitaajs, kas suuta uz TELE2 un LMT automaatiski nogriezhot saakumu un automaatiski suutot uz iisto.... ;) Pieraadat, ka esat apdir..anai cieniigi un paraadat scriptu... Tad varat mani droshi aplikt.... Esmu to pelniijis.... :blink: Link to comment Share on other sites More sharing options...
fassko Posted November 23, 2003 Report Share Posted November 23, 2003 nopeerc A.Ziivarta graamatu PHP soli pa solim ! Link to comment Share on other sites More sharing options...
GACHA12 Posted November 24, 2003 Author Report Share Posted November 24, 2003 A tai graamatai nav neta versija? :blink: Link to comment Share on other sites More sharing options...
sviesc Posted November 24, 2003 Report Share Posted November 24, 2003 (edited) Tajā grāmatā tas scripts nedaudz gļuko ar nelieliem uzlabojumiem to gan palaidu :blink: uzraxti parastu sms scriptu lai šķiro pēc tel OP <? //JA LMT if (($prefix =="91" || ($prefix =="92")){ $addr = "371".$telNR."@smsmail.lmt.lv"; send_sms($addr,"LMT",sms); } //JA Tele2 elseif (($prefix =="60" || ($prefix =="61")){ $addr = "371".$telNR."@sms.tele2.lv"; send_sms($addr,"Tele2",sms); } ?> Protams jatceras par to ka te ir tikai 2 no katra OP nummuru prefixiem :blink: Edited November 24, 2003 by sviesc Link to comment Share on other sites More sharing options...
GACHA12 Posted November 24, 2003 Author Report Share Posted November 24, 2003 aTRADU SHITAADU SKRIPTA GABALU <script> function checkStuff(){ var i,r=false,tmp = document.forms[0].elements[1].value; for(i=0;i<tmp.length;i++) if(tmp.charAt(i)!=' '){ r=true;break } if(!r){ alert('Lūdzu ievadiet īsziņu nosūtīšanai uz GSM mobilo tālruni !'); document.forms[0].elements[1].value=''; document.forms[0].elements[1].focus(); return false; } tmp = document.forms[0].elements[0].value; if(tmp.length==7) if('91 92 93 94 62 63 64 65 95 96 97 98 59 60 67 68'.indexOf(tmp.substring(0,2))!=-1) { for(i=1;i<7;i++) if(tmp.charAt(i)<'0' || tmp.charAt(i)>'9'){r=false;break;} if®{return true;} } alert('Lūdzu ievadiet pareizu mobilā telefona numuru !'); document.forms[0].elements[0].focus(); document.forms[0].elements[0].select(); return false; } function onTextKeyUp() { var el = document.forms[0].elements; if(el[1].value.length>146) el[1].value = el[1].value.substr(0,146); var sTmp = '' + (146-el[1].value.length) + ''; for(i=sTmp.length;i<3;i++) sTmp = ' ' + sTmp; el[2].value = sTmp; }; function onTextKeyDown() { var keyCode = event.keyCode; if(keyCode==9 || keyCode==37 || keyCode==38 || keyCode==39 || keyCode==40)return true; var el = document.forms[0].elements; if(keyCode!=46 && keyCode!=8) if(el[1].value.length>145)return false; if(keyCode==13 && el[1].value.length==145) return false; return true; } bet kaa to izveidot parpilnu skriptu ? (lame, lame, lame) :P Link to comment Share on other sites More sharing options...
GACHA12 Posted November 24, 2003 Author Report Share Posted November 24, 2003 UN vai tas nav JAVSCRIPC? :blink: Link to comment Share on other sites More sharing options...
sviesc Posted November 24, 2003 Report Share Posted November 24, 2003 Aha tā vismaz pa gabalu izskatās a vai tad Tev koda gablā Tajā vietā no kuras ņēmišito nebija norādīt tas java vai php? :blink: Link to comment Share on other sites More sharing options...
GACHA12 Posted November 24, 2003 Author Report Share Posted November 24, 2003 Jap tas ir JAVASCRIPT.... :wacko: Bet kaa ar PHP UN to SMS ? Please .... Link to comment Share on other sites More sharing options...
sviesc Posted November 25, 2003 Report Share Posted November 25, 2003 a ko tad es tur uzraxtiju? Pilnus koda gabalus neesmu spējīgs uzraxtīt paņem manuali un aiziet... :blink: Link to comment Share on other sites More sharing options...
GACHA12 Posted November 25, 2003 Author Report Share Posted November 25, 2003 Nee, to sadaliishanu saprotu vareetu buut taa: $a=substr($kam,0,2); $lmt=array(91,92,93,63,64); $tele=array(96,97,98,99,67,68,58,59); for($i=0;$i<=count($lmt);$i++) if($a==$lmt[$i]) $mailojam="+371$kam@smsmail.lmt.lv"; for($i=0;$i<=count($tele);$i++) if($a==$tele[$i]) $mailojam="+371$kam@sms.tele2.lv"; bet tieshi viss paareejais sagaadaa gruutiibas... <_< Link to comment Share on other sites More sharing options...
GACHA12 Posted November 25, 2003 Author Report Share Posted November 25, 2003 Nee, to sadaliishanu saprotu vareetu buut taa: <? $a=substr($kam,0,2); $lmt=array(91,92,93,63,64); $tele=array(96,97,98,99,67,68,58,59); for($i=0;$i<=count($lmt);$i++) if($a==$lmt[$i]) $mailojam="+371$kam@smsmail.lmt.lv"; for($i=0;$i<=count($tele);$i++) if($a==$tele[$i]) $mailojam="+371$kam@sms.tele2.lv"; ?> bet tieshi viss paareejais sagaadaa gruutiibas... Link to comment Share on other sites More sharing options...
GACHA12 Posted November 25, 2003 Author Report Share Posted November 25, 2003 ATRADU sheit http://paste.php.lv/512, bat nestraadaa... :angry: Link to comment Share on other sites More sharing options...
des Posted November 28, 2003 Report Share Posted November 28, 2003 Es domaaju, ka saakumaa select distinct * from table un tad katrai ieguutajai rindai uztaisiit select count(*) from table where field1=val1 and field2=val2..... :) Link to comment Share on other sites More sharing options...
Recommended Posts