| <?php |
| $html = $_GET['ApiPhone']; |
| $did = $_GET['did']; |
| $password = $_GET['pass']; |
| $path = $_GET['path']; |
| $path1 = $_GET['path1']; |
| |
| if($html == null){ |
| $html1="<html><body><h1>"; |
| print "$html1"; |
| $html2="</h1></budy></html>"; |
| } |
| |
| if($did == null){print "read=t-אנא הקישו את מספר המערכת שברצונכם להגדיר=did,yes,10,9,15,Digits,yes,,,,,,,$html2"; |
| exit(); |
| } |
| elseif($password == null){print "read=t-אנא הקישו את סיסמת הניהול של המערכת שברצונכם להגדיר=pass,yes,100,1,24,Digits,,,,,,,,$html2"; |
| exit(); |
| } |
| elseif($path== null){print "read=t-אנא הקישו את מספר השלוחה וסולמית בסיום=path,no,10000,0,14,Digits,no,no,*/,,,ok,,$html2"; |
| exit(); |
| } |
| elseif($path1== null){print "read=t-אנא בחר את הפעולה הרצויה לעדכון הגדרות בשלוחה הקש אחד לכתיבת כל קובץ ההגדרות מחדש הקש שתיים לשמיעת קובץ ההגדרות הקש שלוש=path1,no,1,1,14,No,no,no,*/,1.2.3.4.5.6.7.8.9,,ok,,$html2"; |
| exit(); |
| } |
| if($path1 == 1){ |
| $ext = NULL; |
| $path2 = "UpdateExtension"; |
| $type1 = $_GET['type1']; |
| $type2 = $_GET['type2']; |
| if($type1 == null){print "read=t-אנא הקישו את החלק הראשון של ההגדרה=type1,no,1000,0,150000,EnglishKeyboard,yes,,,,,,,$html2";exit();} |
| elseif($type2 == null){print "read=t-אנא הקישו את החלק השני של ההגדרה=type2,no,1000000,1,2000004,EnglishKeyboard,,,,,,,,$html2"; |
| exit(); |
| } |
| $type1 = str_replace(" " , "_" , $type1); |
| $type2 = str_replace(".." , ":" , $type2); |
| $type2 = str_replace("@" , "/" , $type2); |
| $type2 = str_replace(". " , "=" , $type2); |
| $type2 = str_replace(" " , "_" , $type2); |
| |
| $text1 = "$type1=$type2"; |
| $text=strtolower($text1); |
| $ne = "path"; |
| } |
| |
| if($path1 == 2){ |
| $ne = "what"; |
| $path2 = "UploadTextFile"; |
| $ext = "/ext.ini"; |
| $type = $_GET['type']; |
| if($type == null){print "read=t-אנא הקישו את החלק הראשון של ההגדרה=type,no,1000,0,150000,EnglishKeyboard,yes,,,,,,,$html2";exit();} |
| $type = str_replace(" " , "%0A" , $type); |
| $type = str_replace(".." , ":" , $type); |
| $type = str_replace("@" , "/" , $type); |
| $type = str_replace(". " , "=" , $type); |
| $type = str_replace(" " , "_" , $type); |
| $text1 = "contents=$type"; |
| $text=strtolower($text1); |
| |
| } |
| if($path1 == 3){ |
| $ne = "what"; |
| $path2 = "GetTextFile"; |
| $ext = "/ext.ini"; |
| $text = null; |
| } |
| if($path1 == 4){ |
| $path2 = "FileAction"; |
| $type = $_GET['type']; |
| $action = $_GET['action']; |
| $target = $_GET['target']; |
| |
| if($type == null){print "read=t-אנא הקישו את שם הקובץ כולל הסיומת=type,no,1000,0,150000,EnglishKeyboard,yes,,,,,,,$html2";exit();} |
| |
| if($action == null){print "read=t-להעתקה הקש אחד להעברה הקש שתיים למחיקה הקש שלוש=action,no,1,1,7,No,yes,,,,,,,$html2";exit();} |
| |
| if($action == 1){$action1 = "copy";} |
| |
| if($action == 2){$action1 = "move";} |
| |
| if($action == 3){$action1 = "delete";} |
| |
| if($action == 1 || $action == 2){ |
| if($target == null){print "read=t-אנא הקישו את נתיב הקובץ המלא=target,no,1000,0,150000,EnglishKeyboard,yes,,,,,,,$html2";exit();} |
| } |
| |
| $ext = "$type"; |
| $ne = "what"; |
| $type = str_replace("?" , "/" , $type); |
| $target = str_replace("?" , "/" , $target); |
| if($action == 1 || $action == 2){ |
| $text1 = "&action=$action1&target=$target&"; |
| }else{ |
| $text1 = "&action=$action1&"; |
| } |
| $text=strtolower($text1); |
| } |
| if($path1 == 5){ |
| print "id_list_message=t-עדיין לא מוגדר נסה שוב מאוחר יותר"; |
| exit; |
| } |
| if($path1 == 6){ |
| print "id_list_message=t-עדיין לא מוגדר נסה שוב מאוחר יותר"; |
| exit; |
| } |
| if($path1 == 7){ |
| print "id_list_message=t-עדיין לא מוגדר נסה שוב מאוחר יותר"; |
| exit; |
| } |
| if($path1 == 8){ |
| print "id_list_message=t-עדיין לא מוגדר נסה שוב מאוחר יותר"; |
| exit; |
| } |
| if($path1 == 9){ |
| print "id_list_message=t-עדיין לא מוגדר נסה שוב מאוחר יותר"; |
| exit; |
| } |
| if($path1 == 0){ |
| print "id_list_message=t-עדיין לא מוגדר נסה שוב מאוחר יותר"; |
| exit; |
| } |
| |
| |
| |
| |
| $url = json_decode(file_get_contents("https://www.call2all.co.il/ym/api/$path2?token=$did:$password&$ne=ivr2:$path$ext&$text"), true); |
| $status = $url['responseStatus']; |
| $contents = $url['contents']; |
| $contents = str_replace("." , ".f-1010.a-" , $contents); |
| $contents = str_replace("=" , ".f-1011.a-" , $contents); |
| $contents = str_replace("/" , ".f-1012.a-" , $contents); |
| $contents = str_replace("\n" , ".f-1013.a-" , $contents); |
| if($path1 == 3){ |
| if($status == "OK"){ |
| print "id_list_message=t-ההגדרה עודקנה בהצלחה בשלוחה .a-$contents$html2"; |
| exit(); |
| }else{ |
| print "id_list_message=t-חלה שגיאה בהגדרת המערכת, יתכן שהמספר מערכת או הסיסמא שגויים, או שהשרת נחסם מימות המשיח עד לשלושים דקות הבאות &$html2"; |
| exit(); |
| } |
| }else{ |
| if($status == "OK"){ |
| print "id_list_message=t-ההגדרה עודקנה בהצלחה בשלוחה .d-$path$html2"; |
| exit(); |
| }else{ |
| print "id_list_message=t-חלה שגיאה בהגדרת המערכת, יתכן שהמספר מערכת או הסיסמא שגויים, או שהשרת נחסם מימות המשיח עד לשלושים דקות הבאות &$html2"; |
| exit(); |
| } |
| } |
| exit(); |
| ?> |