public function create(User $user) { $order = new Order($this->db); $idUser = $order->getUser()->getId(); $query = "INSERT INTO order (id_user) VALUES('" . $idUser . "')"; try { $res = $db->exec($query); } catch (Exception $e) { return $e->getMessage(); } $id = $db->lastInsertId(); if ($id) { return $this - findByID($id); } }
$vars = aa_info(); if ($vars) { foreach ($vars as $key => $value) { $body->set($key, $value); } } } else { $body = new Template("templates/aa/aa.default.tmpl.php"); } break; case 1: // Search AAs check_authorization(); $body = new Template("templates/aa/aa.searchresults.tmpl.php"); if (isset($_GET['aaid']) && $_GET['aaid'] != "ID") { $results = findByID($_GET['aaid']); } else { $results = findByName($_GET['search']); } $body->set("results", $results); $body->set('eqexpansions', $eqexpansions); break; case 28: // Search by expansion / class check_authorization(); $cls = isset($_GET['cls']) ? $_GET['cls'] : null; $exp = isset($_GET['exp']) ? $_GET['exp'] : null; $body = new Template("templates/aa/aa.searchresults.tmpl.php"); $body->set('eqexpansions', $eqexpansions); $body->set('results', null); if ($cls != null && $exp != null) {
echo '</div>'; echo '<div class="panel panel-body" >'; foreach ($playlist_track as $track) { $playerpath = $track[3]; $trackmp3 = $track[0]; $trackname = $track[2]; $trackmp3 = $track[1]; $track_id = $track[4]; $current_likes = $track[5]; echo '<div class="track-wrapper">'; //xecho "<button onclick='controlMusicPlayer(\"".$track[0]."\" , \"".$track[1]."\" , \"".$track[2]."\" , \"".$track[3]."\" )' class='btn btn-primary' >Play</button>"; echo '<h3 class="track-title">' . "<button onclick='controlMusicPlayer(\"" . $track[0] . "\" , \"" . $track[1] . "\" , \"" . $track[2] . "\" , \"" . $track[3] . "\" )' class='btn btn-primary play-button' >Play</button>" . $track[1] . "</h3>"; echo '<h4 class="track-name">' . $track[2] . "</h4>"; echo '<span class="track-mp3">' . $track[0] . "</span>"; include ROOT . 'config/share.php'; findByID($track_id); //echo '<a class="btn btn-default btn-xs" href="'.$track[3].'" target="_blank">VIEW</a>'; //echo '<a class="btn btn-default btn-xs" href="'.$track[3].'" target="_blank">SHARE</a>'; echo '</div>'; } ?> <style> .track-wrapper ,.track-url { display:block; padding:2%; border-bottom:1px solid #e3e3e3; } .track-wrapper .btn { margin-right:1%;
echo $blog_post_data['user_name']; ?> "><h1><?php echo $blogtitle; ?> </h1></a> <a href="http://freelabel.net/u/<?php echo $blog_post_data['user_name']; ?> "><p class="subline"><?php echo $twitter; ?> </p></a> <p><?php include ROOT . 'config/share.php'; findByID($post_id); ?> </p> </div> <article class="content"> <div> <?php switch ($blog_type) { case 'single': $blogentry = ' <audio controls preload="metadata"> <source src="' . $trackmp3 . '"></source> </audio>'; break; case 'blog': if ($blog_post_data['filetype'] == 'video/mp4') {
echo '</div>'; echo "\n <script>\n function showShareOptions_" . $blog_post_id . "() {\n shareBlock=document.getElementById('postBlock_" . $blog_post_id . "');\n updatePhotoButton=document.getElementById('update_track_button_" . $blog_post_id . "');\n if (shareBlock.style.display == 'block') {\n // if showing, change to none\n shareBlock.style.display = 'none';\n \n //updatePhotoButton.InnerHTML = '<';\n } else {\n shareBlock.style.display = 'block';\n \n dashboardProfileDiv.style.overflow = 'scroll';\n updatePhotoButton.value = 'HIDE';\n }\n \n }\n </script>"; //echo 'this right here'; echo '</div>'; echo "\n\n\n <div id='shareBlock_" . $blog_post_id . "' style='display:none;'>\n\t\t <hr>\n Phone: (" . $blog_phone . ")<br>\n <hr>\n\t\t \t\t<form method='POST' action='http://freelabel.net/x/update_title.php' >\n\t\t\t\t\t<span>Title:</span><input type='text' name='blog_post_title' value='" . $blog_title . "' class='form-control'><br>\n\t\t\t\t\t<span>Twitter:</span><input type='text' name='blog_post_twitter' value='" . $twitter . "' class='form-control' ><br>\n\t\t\t\t\t<span>Entry:</span><textarea type='text' name='blog_post_entry' cols='10' rows='5' class='form-control' >" . $blog_entry . "</textarea><br>\n <span>Write Up:</span><textarea type='text' name='blog_write_up' cols='10' rows='5' class='form-control' >" . $blog_write_up . "</textarea><br>\n\t\t\t\t\t<span>TwitPic:</span><input type='text' name='blog_post_twitpic' value='" . $blog_post_twitpic . "' class='form-control'><br>\n\t\t\t\t\t<input type='hidden' name='type' value='blog'>\n\t\t\t\t\t<input type='hidden' name='blog_post_id' value='" . $blog_post_id . "'>\n\t\t\t\t\t<input type='submit' value='Update' class='btn btn-primary'>\n\t\t\t\t</form>\n\t\t </div>\n\t</td>"; //echo "<td><form method='POST' action='requestsong.php' ><input name='postid' type='hidden' value='".$row['id']."'><input type='submit' id='jointheteam' value='REQUEST'></form></td>"; //echo "<td style='background-image:url('../images/".$row[photo]."');'><a id=\"jointheteam\" href=\"" . $row['beatdownload'] . "\">DOWNLOAD</a></td>"; //echo "<td></td>"; $delete_button = "<td>\n <div id='delete_post_button' ><input name='post_id' type='hidden' value='" . $blog_post_id . "'><input name='blog_type' type='hidden' value='mag'><button type='submit' class='btn btn-danger ' onclick='deleteBlogPost(" . $blog_post_id . ", \"mag\")'><span class='glyphicon glyphicon-trash'></span></button></div>\n <td>"; //echo $_SESSION['user_name'] .' - '. $blog_user_name; //echo $user_name_session .' == ' .$blog_user_name.'<br>'; if ($user_name_session == $blog_user_name or $user_name_session == 'admin') { echo $delete_button; } echo "<td>"; findByID($blog_post_id); echo "<td>"; echo "<td>\n <a class='btn-lg' style='padding:2%;' onclick='showEditOptions_" . $blog_post_id . "()' ><span class='glyphicon glyphicon-option-vertical'></span></a></td>"; echo '<script> function showEditOptions_' . $blog_post_id . '() { $("#shareBlock_' . $blog_post_id . '").slideToggle(750); } </script>'; // echo "<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?\'http\':\'https\';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+\'://platform.twitter.com/widgets.js\';fjs.parentNode.insertBefore(js,fjs);}}(document, \'script\', \'twitter-wjs\');</script></td>"; //echo "<td><div id= 'jointheteam'>► ".$new_counts."</div></td>"; //echo "<td><div id=\"jointheteam\" href=\"" . $row['trackmp3'] . "\">VOTES: ".$row['requests']."</td>"; echo "</tr>"; $single_count = 0; } // IF NO POSTS EXIST if ($i == 1) {
<a class="btn btn-social col-md-4 btn-twitter" target="_blank" href="https://twitter.com/intent/tweet?text=' . $twitter_share . '"> <i class="fa fa-twitter"></i> Twitter </a> <a class="btn btn-social col-md-4 btn-tumblr" target="_blank" href="http://www.tumblr.com/share/photo?source=' . $post_photo . '&caption=%3Ca%20href%3D%22freelabel.net%22%3E' . urlencode($twitter) . ' ' . urlencode($post_title) . '%0A%0Afreelabel.net%3C%2Fa%3E%0A%0A' . urlencode($post_blogentry) . '&name=' . urlencode($twitter) . ' ' . urlencode($post_title) . '"> <i class="fa fa-tumblr"></i> Tumblr </a> <a class="btn btn-social col-md-4 btn-facebook" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=' . $page_url . '"> <i class="fa fa-facebook"></i> Facebook </a> <!--<a href="#' . $track_id . '" onclick="likePost(' . $track_id . ', ' . $current_likes . ' , \'' . $user_name_session . '\')" class="btn btn-success btn-xs" role="button"><span class="glyphicon glyphicon-save"></span> - SAVE</a>--> </p> '; } //print_r($post_data); //echo 'found data!'; echo $share_buttons; } /* ------------------------------------------------ VIEW CONTROLLER -------------------------------------------------------- */ if ($_POST['post_id']) { findByID($_POST['post_id']); } ?>
<div class="thumbnail" style="background-image:url(\'' . $photo_url . '\');background-position:center center;background-size:auto 150%;" > <div id="background_tint_singles" > <a href="' . $blog_story_url . '"><img src="' . $photo_url . '" alt="' . $blog_title . '"></a> <div class="caption"> <a href="' . $blog_story_url . '"><p id="full_track_name">' . $blog_title . '</p></a> <a href="' . $artist_profile . '" target="_blank" ><h5 id="full_track_name">' . $twitter . '</h5></a> <br> <p> <label>' . $how_recent . '</label> ' . $blog->getShareButtons($id) . ' <!-- show share buttons --> </p> <p> '; include ROOT . 'config/share.php'; findByID($blog_id); echo ' <!-- <a href="http://freelabel.net/som/index.php?post=1&text=' . $tweet_blog . '" class="btn btn-primary btn-xs" role="button" target="_blank"><span class="glyphicon glyphicon-retweet"></span></a> <a href="https://twitter.com/intent/tweet?screen_name=&text=' . $tweet_blog . '" class="btn btn-primary btn-xs" role="button" target="_blank"><span class="glyphicon glyphicon-star"></span></a>--> <a href="' . $blog_story_url . '" class="btn btn-default btn-xs" role="button"><span class="glyphicon glyphicon-fullscreen"></span></a> </p> </div> </div><!-- background_tint --> </div> </div>'; } // if ($row['type'] == 'xxxxxfl' OR strtolower($row['twitter'])=='@xxxxxfl') { // $submission_date = $row['submission_date']; // $blog_title = $row['blogtitle']; // $photo_path = $row['photo']; // if ( strpos($photo_path, 'http://freelabel.net/')===false) {
$items = $select->fetchAll(); unset($select); $row_num = count($items); $obj = (object) array('result' => true, 'count' => "Найдено записей: " . $row_num, 'items' => $items); echo json_encode($obj); $result_out = true; } catch (PDOException $e) { $obj = (object) array('result' => false, 'error' => "Ошибка выполнения запроса"); echo json_encode($obj); $result_out = true; exit; } } //выдача информации об организациях по их идентификаторам if (isset($id_c)) { findByID($id_c); } function findByID($id_c) { global $conn; global $result_out; try { $select = $conn->query("SELECT building.adress, company.name\n\t\t\tFROM building\n\t\t\tINNER JOIN company ON (building.id_b = company.id_b) where company.id_c={$id_c}"); $select->setFetchMode(PDO::FETCH_OBJ); $items = $select->fetchAll(); unset($select); $row_num = count($items); $obj = (object) array('result' => true, 'count' => "Найдено записей: " . $row_num, 'items' => $items); } catch (PDOException $e) { $obj = (object) array('result' => false, 'error' => "Ошибка выполнения запроса"); echo json_encode($obj);