Jump to content

AzeS

Members
  • Content Count

    88
  • Joined

  • Last visited

Everything posted by AzeS

  1. As soon as i have generated proper income ill donate a little SOLVED BY BARAND BITCHES!
  2. Corrected and checked. I want to smash my head in to the keyboard untill it all stops ;-; Error: array(3) { ["lead"]=> string(15) "support@web.web" ["comment"]=> string(5) "send:" ["text"]=> string(4) "text" } PDOException: SQLSTATE[HY093]: Invalid parameter number in /var/www/html/**/**.php: 1732 Stack trace: #0 /var/www/html/**/**.php(1732): PDOStatement->execute(Array) #1 /var/www/html/**/**/**/**.php(23): **->crm(0, 1, Array) #2 /var/www/html/**/**.php(1): require_once('/var/www/html/C...') #3 {main} Fehler bei migration in die Datenbank, bitte informieren Sie einen Administrator. 05-20-2019 09:31:07 Error throwing, Adjusted Code: try { $sql = $this->Db->prepare("UPDATE ** SET data = CASE WHEN data IS NULL THEN :f ELSE (CONCAT(data,:f)) END WHERE lead=:e"); $preset = array(':e' => $data["lead"], ':f' => $data["comment"] . $data["text"]); $sql->execute(array(':e' => $data["lead"], ':f' => $data["comment"] . $data["text"])); } catch (PDOException $e) { $this->report("crm_err: " . $e); return $e . " Fehler bei migration in die Datenbank, bitte informieren Sie einen Administrator. " . $current_date_frep . var_dump($data); } Initiating Code: echo *->crm(0,1,array('lead' => "support@web.web", 'comment' => "send:",'text' => "text")) . "<br>"; echo *->crm(0,1,array('lead' => "support@web.web", 'comment' => "recv:",'text' => "text")) . "<br>"; The strange thing is, that there isnt even a number in transfer to the PDO execution, so where does it get the parameter?!
  3. Exception: PDOException: SQLSTATE[HY093]: Invalid parameter number in *.php:1732 Stack trace: #0 *.php(1732): PDOStatement->execute(Array) #1 crm_for.php(23): *->crm(0, 1, Array) #2 *.php(1): require_once('/var/www/html/C...') #3 {main} Hello fellow people, i need a rant. An error is appearing in my new CRM system. there are No Numeric values in transfer on the pdo statement but the compiler isn't on my side. the following SQL Statement is for concating an intitated Null value in the CRM table i have a workaround but its inefficiant and dataconsuming. I would like to estimate if there is an null value and overrite it with general text for later sentiment analysis. Error throwing Code: try { $sql = $this->Db->prepare("UPDATE *** SET data =(CASE WHEN (NULL) THEN :f ELSE (CONCAT(data,:f)) END) WHERE lead=:e"); $preset = array(':e' => $data["lead"], ':f' => $data["comment"] . $data["text"]); $sql->execute(array(':e' => $data["lead"], ':f' => $data["comment"] . $data["text"])); } catch (PDOException $e) { $this->report("crm_err: " . $e); return $e . " Fehler bei migration in die Datenbank, bitte informieren Sie einen Administrator." . $current_date_frep; } return "Ihr Text wurde erfolgreich in die Datenbank migriert, weiter so!" . var_dump($preset); break; Initiating Code: echo *->crm(0,1,array('lead' => "account", 'comment' => "send:",'text' => "text")) . "<br>"; echo *->crm(0,1,array('lead' => "account", 'comment' => "recv:",'text' => "text")) . "<br>";
  4. Thanks kicken, that solved it, i will concider to use the json encode
  5. I am working on a revision of the product cart in my shop, have found a suitable design and implement the required PHP snippets. So far so good, everything works, but somewhere an unexpected string has crept in. which i dont find because of an lack of experience in js. Shopping lists origin: https://codepen.io/bartveneman/pen/KHxLG?q=Cart%20&order=popularity&depth=everything&show_forks=false Generated HTML code: <script type="text/javascript"> /* jslint browser: true*/ /*global $*/ // https://github.com/jasonmoo/t.js (function(){function c(a){this.t=a}function l(a,b){for(var e=b.split(".");e.length;){if(!(e[0]in a))return!1;a=a[e.shift()]}return a}function d(a,b){return a.replace(h,function(e,a,i,f,c,h,k,m){var f=l(b,f),j="",g;if(!f)return"!"==i?d(c,b):k?d(m,b):"";if(!i)return d(h,b);if("@"==i){e=b._key;a=b._val;for(g in f)f.hasOwnProperty(g)&&(b._key=g,b._val=f[g],j+=d(c,b));b._key=e;b._val=a;return j}}).replace(k,function(a,c,d){return(a=l(b,d))||0===a?"%"==c?(new Option(a)).innerHTML.replace(/"/g,"""): a:""})}var h=/\{\{(([@!]?)(.+?))\}\}(([\s\S]+?)(\{\{:\1\}\}([\s\S]+?))?)\{\{\/\1\}\}/g,k=/\{\{([=%])(.+?)\}\}/g;c.prototype.render=function(a){return d(this.t,a)};window.t=c})(); // end of 't'; Number.prototype.to_$ = function () { return "$" + parseFloat( this ).toFixed(2); }; String.prototype.strip$ = function () { return this.split("$")[1]; }; var app = { shipping : 5.00, products : [ { "name" : "2.4GHz GPS WIFI Drone" "price" : "164.99" "img" : "IMG/COV/SHOP/IMG/REG/2017.10.2815.17.5925474Drone_SML.PNG" "desc" : "Flugzeit: 12 - 15 Minuten Ladezeit: 3- 4h" "pid" : "38" "qua" : "1" }, { "name" : "Dongguan Thermomixer" "price" : "349.89" "img" : "IMG/COV/SHOP/IMG/REG/2017.10.2612.04.3727212China-cheap-food-processor-dough-maker-with.png" "desc" : "Der Thermomixer feiert seit mehr als einem Jahrzehnt herausragende Erfolge. Schneiden, Zermahlen, Garen, Kochen, Mixen und Frittieren alles in einem Gerät, alles bald in Ihrer Küche." "pid" : "37" "qua" : "1" }, ], removeProduct: function () { "use strict"; var item = $(this).closest(".shopping-cart--list-item"); item.addClass("closing"); window.setTimeout( function () { item.remove(); app.updateTotals(); }, 500); // Timeout for css animation }, addProduct: function () { "use strict"; var qtyCtr = $(this).prev(".product-qty"), quantity = parseInt(qtyCtr.html(), 10) + 1; app.updateProductSubtotal(this, quantity); }, subtractProduct: function () { "use strict"; var qtyCtr = $(this).next(".product-qty"), num = parseInt(qtyCtr.html(), 10) - 1, quantity = num <= 0 ? 0 : num; app.updateProductSubtotal(this, quantity); }, updateProductSubtotal: function (context, quantity) { "use strict"; var ctr = $(context).closest(".product-modifiers"), productQtyCtr = ctr.find(".product-qty"), productPrice = parseFloat(ctr.data("product-price")), subtotalCtr = ctr.find(".product-total-price"), subtotalPrice = quantity * productPrice; productQtyCtr.html(quantity); subtotalCtr.html( subtotalPrice.to_$() ); app.updateTotals(); }, updateTotals: function () { "use strict"; var products = $(".shopping-cart--list-item"), subtotal = 0, shipping; for (var i = 0; i < products.length; i += 1) { subtotal += parseFloat( $(products[i]).find(".product-total-price").html().strip$() ); } shipping = (subtotal > 0 && subtotal < (100 / 1.06)) ? app.shipping : 0; $("#subtotalCtr").find(".cart-totals-value").html( subtotal.to_$() ); $("#taxesCtr").find(".cart-totals-value").html( (subtotal * 0.06).to_$() ); $("#totalCtr").find(".cart-totals-value").html( (subtotal * 1.06 + shipping).to_$() ); $("#shippingCtr").find(".cart-totals-value").html( shipping.to_$() ); }, attachEvents: function () { "use strict"; $(".product-remove").on("click", app.removeProduct); $(".product-plus").on("click", app.addProduct); $(".product-subtract").on("click", app.subtractProduct); }, setProductImages: function () { "use strict"; var images = $(".product-image"), ctr, img; for (var i = 0; i < images.length; i += 1) { ctr = $(images[i]), img = ctr.find(".product-image--img"); ctr.css("background-image", "url(" + img.attr("src") + ")"); img.remove(); } }, renderTemplates: function () { "use strict"; var products = app.products, content = [], template = new t( $("#shopping-cart--list-item-template").html() ); for (var i = 0; i < products.length; i += 1) { content[i] = template.render(products[i]); } $("#shopping-cart--list").html(content.join("")); } }; app.renderTemplates(); app.setProductImages(); app.attachEvents(); </script> Internal PHP Code: <script type="text/javascript"> /* jslint browser: true*/ /*global $*/ // https://github.com/jasonmoo/t.js (function(){function c(a){this.t=a}function l(a,b){for(var e=b.split(".");e.length;){if(!(e[0]in a))return!1;a=a[e.shift()]}return a}function d(a,b){return a.replace(h,function(e,a,i,f,c,h,k,m){var f=l(b,f),j="",g;if(!f)return"!"==i?d(c,b):k?d(m,b):"";if(!i)return d(h,b);if("@"==i){e=b._key;a=b._val;for(g in f)f.hasOwnProperty(g)&&(b._key=g,b._val=f[g],j+=d(c,b));b._key=e;b._val=a;return j}}).replace(k,function(a,c,d){return(a=l(b,d))||0===a?"%"==c?(new Option(a)).innerHTML.replace(/"/g,"""): a:""})}var h=/\{\{(([@!]?)(.+?))\}\}(([\s\S]+?)(\{\{:\1\}\}([\s\S]+?))?)\{\{\/\1\}\}/g,k=/\{\{([=%])(.+?)\}\}/g;c.prototype.render=function(a){return d(this.t,a)};window.t=c})(); // end of 't'; Number.prototype.to_$ = function () { return "$" + parseFloat( this ).toFixed(2); }; String.prototype.strip$ = function () { return this.split("$")[1]; }; var app = { shipping : 5.00, products : [ <?php if (isset($_SESSION['cart'])) { foreach ($_SESSION['cart'] as $row) { if ($row > 0) { #var_dump($_SESSION['quant']); #echo $row; $cur_pro_on_car = $Shop->product_get($row); echo "{\n"; echo '"name" : "' . $crud->word($cur_pro_on_car['prdname'], 'UTF-8') . '"' . "\n"; echo '"price" : "' . $crud->word($cur_pro_on_car['price'] / 100, 'UTF-8') . '"' . "\n"; echo '"img" : "' . $crud->word($cur_pro_on_car['prdpicsml'], 'UTF-8') . '"' . "\n"; echo '"desc" : "' . $crud->word($cur_pro_on_car['detailsstr'], 'UTF-8') . '"' . "\n"; echo '"pid" : "' . $crud->word($cur_pro_on_car['PID'], 'UTF-8') . '"' . "\n"; echo '"qua" : "'; if (in_array($cur_pro_on_car['PID'], array_keys($_SESSION['quant']))) { echo $crud->word($_SESSION['quant'][$cur_pro_on_car['PID']], 'UTF-8') . '"' . "\n"; } else { echo "1". '"' . "\n"; } echo "},\n"; } } } ?> ], removeProduct: function () { "use strict"; var item = $(this).closest(".shopping-cart--list-item"); item.addClass("closing"); window.setTimeout( function () { item.remove(); app.updateTotals(); }, 500); // Timeout for css animation }, addProduct: function () { "use strict"; var qtyCtr = $(this).prev(".product-qty"), quantity = parseInt(qtyCtr.html(), 10) + 1; app.updateProductSubtotal(this, quantity); }, subtractProduct: function () { "use strict"; var qtyCtr = $(this).next(".product-qty"), num = parseInt(qtyCtr.html(), 10) - 1, quantity = num <= 0 ? 0 : num; app.updateProductSubtotal(this, quantity); }, updateProductSubtotal: function (context, quantity) { "use strict"; var ctr = $(context).closest(".product-modifiers"), productQtyCtr = ctr.find(".product-qty"), productPrice = parseFloat(ctr.data("product-price")), subtotalCtr = ctr.find(".product-total-price"), subtotalPrice = quantity * productPrice; productQtyCtr.html(quantity); subtotalCtr.html( subtotalPrice.to_$() ); app.updateTotals(); }, updateTotals: function () { "use strict"; var products = $(".shopping-cart--list-item"), subtotal = 0, shipping; for (var i = 0; i < products.length; i += 1) { subtotal += parseFloat( $(products[i]).find(".product-total-price").html().strip$() ); } shipping = (subtotal > 0 && subtotal < (100 / 1.06)) ? app.shipping : 0; $("#subtotalCtr").find(".cart-totals-value").html( subtotal.to_$() ); $("#taxesCtr").find(".cart-totals-value").html( (subtotal * 0.06).to_$() ); $("#totalCtr").find(".cart-totals-value").html( (subtotal * 1.06 + shipping).to_$() ); $("#shippingCtr").find(".cart-totals-value").html( shipping.to_$() ); }, attachEvents: function () { "use strict"; $(".product-remove").on("click", app.removeProduct); $(".product-plus").on("click", app.addProduct); $(".product-subtract").on("click", app.subtractProduct); }, setProductImages: function () { "use strict"; var images = $(".product-image"), ctr, img; for (var i = 0; i < images.length; i += 1) { ctr = $(images[i]), img = ctr.find(".product-image--img"); ctr.css("background-image", "url(" + img.attr("src") + ")"); img.remove(); } }, renderTemplates: function () { "use strict"; var products = app.products, content = [], template = new t( $("#shopping-cart--list-item-template").html() ); for (var i = 0; i < products.length; i += 1) { content[i] = template.render(products[i]); } $("#shopping-cart--list").html(content.join("")); } }; app.renderTemplates(); app.setProductImages(); app.attachEvents(); </script> I hope we can find a solution together and I look forward to your recommendations.
  6. ok now ive seen it, im the worst, i assume that i just needed an other pair of eyes, thanks psycho
  7. I have to create an id check. For this, an id is generated and written in a cookie, encrypted by the md5 algorithm and a password phrase.Then the id sent to the page and encrypted with the same process and afterwards written to a variable.Then the cookie is read out and compared with the variabele, all well until the fact that the two strings are not considered equal even though they are. <?php $reference = $_GET['id']; setcookie("meoid", md5($reference . "Password") . " OID:" . $reference,time()+(600)); if (isset($_GET['id'])) { $hash = md5(trim(strip_tags($_GET['id'])) . "Password"); if ($hash == $_COOKIE['meoid']) { echo "yes: hash= " . $hash . "::::meoid: " . $_COOKIE['meoid']; } else { echo "no: hash= " . $hash . "::::meoid: " . $_COOKIE['meoid'] . " GENERATET: " . md5($_GET['id'] . "Password"); } } else { header("Location: ../../../../report.php?x=Abuse of Success"); } ?> what am i doing wrong here
  8. Ok, ill do it; what will work out the best for me? Sometimes I have: Split("\n", $foo); #and Split("\|", $bar);
  9. the issue is that you're not adding the mysqli connection. Change the result1 to: $result1 = mysqli_query($connection, $query1);
  10. But, but, i need halp, there are more than 3000 pages of php that i would have to go through and yes i have no life
  11. yes, thank you for that, but id like to change the name for preg_split() to split() in the php lib or install php 5 alongside with 7 without losing 7 as the standart and not to be informed in the fact that its removed/ deprecated
  12. I moved my website to an server and installed php7, but now 50% of data processing dosnt work anymore because split isnt working, how can i migrate split to php7 ? Or how can i accomplish that older functions still work in php7 ?
  13. REQUINIX I FOUND IT http://php.net/manual/en/function.urldecode.php
  14. In case that the error is in the htaccess i post the code below: #DirectoryIndex index.php Options +FollowSymLinks -Multiviews RewriteEngine On RewriteCond %{REQUEST_METHOD} ^TRACE RewriteRule ^ - [F] # Redirect non-www to www: RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] # Unless directory, remove trailing slash RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/$ http://www.vii7.eu/$1 [R=301,L] # Redirect external .php requests to extensionless url RewriteCond %{THE_REQUEST} ^(.+)\.php([#?][^\ ]*)?\ HTTP/ RewriteRule ^(.+)\.php$ http://www.vii7.eu/$1 [R=301,L] # add extension if the php file exists: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php [L] # add extension if the png file exists: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.png -f RewriteRule ^(.*)$ $1.png [L] # add extension if the txt file exists: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.txt -f RewriteRule ^(.*)$ $1.txt [L] # add extension if the html file exists: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(.*)$ $1.html [L] # etc. # finally, route to profile.php if all else fails #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d #RewriteRule ^([a-zA-Z0-9-_.]*)$ /profile.php?id=$1 [L]
  15. Release is at November 23th
  16. Ok, well, because if you want to output something via echo, you have to signalize what. if for example you want to echo out a string, it looks like this: echo "string"; a function on the other hand looks like this: echo $crud->current_date(); http://php.net/manual/en/function.echo.php echo " <form action='insert_data.php' method='post'><pre> Name <input type='text' name='animal_name' /> Date of Birth <input type='text'name='animal_dob' /> Species <input type='text' name='animal_species' /> Colour <input type='text' name='animal_colour' /> Sex <input type='text' name='animal_sex' /> <input type='submit' value='ADD RECORD' /> </pre></form>";
  17. AzeS

    Paypal Variables

    thats paypal even the employes say that the sdk is shit... my suggestion is that you go to an other service provider that has paypal integrated i always use bs payone for example.
  18. so you trying to echo out a form am i right ?
  19. This one is escalating a bit... Be respectfull to each other arght ?
  20. The title advanced member is exaggerated in many cases; we would need more things like annoying member, for me. Or perhaps guy, who asks many questions. Something like an experienced member is, after careful consideration, more a member that have 1000 to 1500 posts. Its then where you can say that you have learned so much, that your are a type of guru or something like that....
  21. Which functions are accessed in this section? which code is behind it for example: _e (...)? And whats the code behind where the $_POST data is sent to ?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.