{"id":19,"date":"2018-06-01T17:41:26","date_gmt":"2018-06-01T17:41:26","guid":{"rendered":"https:\/\/www.randolphtubing.com\/technical-documents\/?page_id=19"},"modified":"2018-06-01T18:27:33","modified_gmt":"2018-06-01T18:27:33","slug":"table-dynamic","status":"publish","type":"page","link":"https:\/\/www.randolphtubing.com\/technical-documents\/table-dynamic\/","title":{"rendered":"table dynamic <!-- DO NOT EDIT -->"},"content":{"rendered":"<p>[insert_php]<br \/>\n$conn = new mysqli(&#8220;localhost&#8221;, &#8220;montagne_techdoc&#8221;, &#8220;UXToIw9hFR7i&#8221;, &#8220;montagne_library&#8221;);<\/p>\n<p>\/* check connection *\/<br \/>\nif ($conn->connect_errno) {<br \/>\n    printf(&#8220;Connect failed: %s\\n&#8221;, $conn->connect_error);<br \/>\n    exit();<br \/>\n}<\/p>\n<p>$selected = $_REQUEST[&#8216;selected&#8217;];<br \/>\necho &#8220;<\/p>\n<div style=\\\"padding-top:30px; padding-bottom:20px;\\\">\n<h1><span  style=\\\"color:#979389; font-weight:500;\\\">Randolph Tubing Technical Documents<\/span><\/h1>\n<\/div>\n<p>&#8220;;<\/p>\n<p>echo &#8220;<\/p>\n<table cellspacing=0 cellpadding=0>&#8220;;<\/p>\n<p>$id_counter = 0;<\/p>\n<p>$result = mysqli_query($conn,&#8221;SELECT * FROM series WHERE series = &#8216;$selected'&#8221;);<br \/>\nwhile($newArray = mysqli_fetch_array($result)){<br \/>\n$series = $newArray[&#8216;series&#8217;];<\/p>\n<p>\tif ( wpmd_is_phone() ) {<br \/>\n\t\techo &#8220;<\/p>\n<tr>\\n<\/p>\n<td valign=top colspan=20 style=\\\"color:#ffffff;\\\"><B>$series SERIES:<\/b><BR><BR><\/td>\n<p>\\n<\/tr>\n<p>&#8220;;<br \/>\n\t} else {<br \/>\n\t\techo &#8220;<\/p>\n<tr>\\n<\/p>\n<td valign=top colspan=20><B>$series SERIES:<\/b><BR><BR><\/td>\n<p>\\n<\/tr>\n<p>&#8220;;<br \/>\n\t}<\/p>\n<p>\t$result2 = mysqli_query($conn,&#8221;SELECT * FROM items WHERE series = &#8216;$selected&#8217; ORDER BY item_number&#8221;);<br \/>\n\twhile($newArray2 = mysqli_fetch_array($result2)){\t<\/p>\n<p>\t\t$id = $newArray2[&#8216;id&#8217;];<br \/>\n\t\t$item_number = trim($newArray2[&#8216;item_number&#8217;]);<br \/>\n\t\t$item_name = $newArray2[&#8216;item_name&#8217;];<\/p>\n<p>\t\t$id_counter++;<\/p>\n<p>\t\t$pdf = $newArray2[&#8216;pdf&#8217;];<br \/>\n\t\t$manual = $newArray2[&#8216;manual&#8217;];<br \/>\n\t\t$cad = $newArray2[&#8216;cad&#8217;];<br \/>\n\t\t$video = $newArray2[&#8216;video&#8217;];<br \/>\n\t\t$youtube_video_id = $newArray2[&#8216;youtube_video_id&#8217;];<\/p>\n<p>\t\techo &#8220;<\/p>\n<tr>\\n&#8221;;<br \/>\n\t\techo &#8220;<\/p>\n<td valign=top style=\\\"font-weight:bold;\\\">$item_number<\/td>\n<p>\\n&#8221;;<\/p>\n<p>\t\techo &#8220;<\/p>\n<td valign=top style=\\\"font-weight:bold;\\\">$item_name<\/td>\n<p>\\n&#8221;;<\/p>\n<p>\t\t\/\/pd<br \/>\n\t\tif($pdf == &#8220;on&#8221;){<br \/>\n\t\t\techo &#8220;<\/p>\n<td valign=top style=\\\"font-weight:bold;\\\"><a href=\\\"https:\/\/www.randolphtubing.com\/technical-documents\/pdfs\/$item_number.pdf\\\" target=\\\"_blank\\\">&#8220;;<br \/>\n\t\t} else {<br \/>\n\t\t\techo &#8220;<\/p>\n<td valign=top>&#8220;;<br \/>\n\t\t}<\/p>\n<p>\t\techo &#8220;PDF&#8221;;<br \/>\n\t\tif($pdf == &#8220;on&#8221;){<br \/>\n\t\t\techo &#8220;<\/a>&#8220;;<br \/>\n\t\t}<br \/>\n\t\techo &#8220;<\/td>\n<p>\\n&#8221;;<\/p>\n<p>\t\t\/\/manual<br \/>\n\t\techo &#8220;<\/p>\n<td valign=top class=link nowrap>&#8220;;<br \/>\n\t\tif($manual == &#8220;on&#8221;){<br \/>\n\t\t\techo &#8220;<\/p>\n<td valign=top style=\\\"font-weight:bold;\\\"><a href=\\\"https:\/\/www.randolphtubing.com\/technical-documents\/manuals\/$item_number.pdf\\\" target=\\\"_blank\\\">&#8220;;<br \/>\n\t\t} else {<br \/>\n\t\t\techo &#8220;<\/p>\n<td valign=top>&#8220;;<br \/>\n\t\t}<\/p>\n<p>\t\techo &#8220;Manual&#8221;;<br \/>\n\t\tif($manual == &#8220;on&#8221;){<br \/>\n\t\t\techo &#8220;<\/a>&#8220;;<br \/>\n\t\t}<br \/>\n\t\techo &#8220;<\/td>\n<p>\\n&#8221;;<\/p>\n<p>\t\t\/\/cad<br \/>\n\t\techo &#8220;<\/p>\n<td valign=top class=link nowrap>&#8220;;<br \/>\n\t\tif($cad == &#8220;on&#8221;){<br \/>\n\t\t\techo &#8220;<\/p>\n<td valign=top style=\\\"font-weight:bold;\\\"><a href=\\\"https:\/\/www.randolphtubing.com\/technical-documents\/cad\/$item_number.zip\\\" target=\\\"_blank\\\">&#8220;;<br \/>\n\t\t} else {<br \/>\n\t\t\techo &#8220;<\/p>\n<td valign=top>&#8220;;<br \/>\n\t\t}<\/p>\n<p>\t\techo &#8220;CAD&#8221;;<br \/>\n\t\tif($cad == &#8220;on&#8221;){<br \/>\n\t\t\techo &#8220;<\/a>&#8220;;<br \/>\n\t\t}<br \/>\n\t\techo &#8220;<\/td>\n<p>\\n&#8221;;<\/p>\n<p>\t\tif ( wpmd_is_phone() ) {<br \/>\n\t\t\techo &#8220;<\/p>\n<td bgcolor=white>&nbsp;<\/td>\n<p>&#8220;;<br \/>\n\t\t}<\/p>\n<p>\t\techo &#8220;<\/tr>\n<p>\\n&#8221;;<\/p>\n<p>\t}\t<\/p>\n<p>}<br \/>\necho &#8220;<\/table>\n<p>&#8220;;<\/p>\n<p>if($id_counter < 1){\n\techo \"<strong>No data found for this series.<\/strong><BR><BR>&#8220;;<br \/>\n}<\/p>\n<p>echo &#8220;<a href=\\\"https:\/\/www.randolphtubing.com\/technical-documents\/\\\"><img src=\\\"https:\/\/www.randolphtubing.com\/technical-documents\/wp-content\/uploads\/2016\/09\/button-return.png\\\"><\/a>&#8220;;<\/p>\n<p>[\/insert_php]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[insert_php] $conn = new mysqli(&#8220;localhost&#8221;, &#8220;montagne_techdoc&#8221;, &#8220;UXToIw9hFR7i&#8221;, &#8220;montagne_library&#8221;); \/* check connection *\/ if ($conn->connect_errno) { printf(&#8220;Connect failed: %s\\n&#8221;, $conn->connect_error); exit(); } $selected = $_REQUEST[&#8216;selected&#8217;]; echo &#8220; Randolph Tubing Technical Documents &#8220;; echo &#8220; &#8220;; $id_counter = 0; $result = mysqli_query($conn,&#8221;SELECT * FROM series WHERE series = &#8216;$selected&#8217;&#8221;); while($newArray = mysqli_fetch_array($result)){ $series = $newArray[&#8216;series&#8217;]; if ( [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-19","page","type-page","status-publish"],"_links":{"self":[{"href":"https:\/\/www.randolphtubing.com\/technical-documents\/wp-json\/wp\/v2\/pages\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.randolphtubing.com\/technical-documents\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.randolphtubing.com\/technical-documents\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.randolphtubing.com\/technical-documents\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.randolphtubing.com\/technical-documents\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":11,"href":"https:\/\/www.randolphtubing.com\/technical-documents\/wp-json\/wp\/v2\/pages\/19\/revisions"}],"predecessor-version":[{"id":45,"href":"https:\/\/www.randolphtubing.com\/technical-documents\/wp-json\/wp\/v2\/pages\/19\/revisions\/45"}],"wp:attachment":[{"href":"https:\/\/www.randolphtubing.com\/technical-documents\/wp-json\/wp\/v2\/media?parent=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}