コード例 #1
0
ファイル: s_receive.php プロジェクト: aniragus0/plataforma
<?php

$name = trim($_POST["name"]);
$class = trim($_POST["type"]);
$singer = trim($_POST["singer"]);
$tag = trim($_POST["tag"]);
$url = strtolower($_POST["url"]);
$picurl = trim(strtolower($_POST["picurl"]));
$ip = $_SERVER["REMOTE_ADDR"];
$time = date("Y-m-d H:i:s");
/*
echo $name.$class.$tag.$url.$picurl.$ip.date("Y-m-d H:i:s");
*/
if ($name != "" && strpos($url, ".") == true && strlen($url) >= 5) {
    include "connection.php";
    $add = new SongData();
    if ($add->add_song($name, $class, $singer, $tag, $url, $picurl, $time, $ip) == true) {
        echo "Your song has been shared successfully! Thank you!";
    } else {
        echo "Sorry Fail to add your song!";
    }
    $add->close();
} else {
    echo "fail";
}
?>

コード例 #2
0
ファイル: pistas1.php プロジェクト: aniragus0/plataforma
<?php 
session_start();
if (!isset($_SESSION["usuario"])) {
    header("Location: ../index.php");
}
$u_ip = $_SERVER["REMOTE_ADDR"];
require "connection.php";
$types = new SongData();
$classes = $types->get_classes();
$selections = "";
$type_list = "";
while ($row = mysql_fetch_array($classes)) {
    $selections .= "<option value='" . $row["c_id"] . "'>" . $row["c_name"] . "</option>";
    $type_list .= " <a style='color:gray' onclick=getList('type','" . $row["c_id"] . "','')  href='javascript:void(0);'>" . $row["c_name"] . "</a> | ";
}
$types->close();
?>
 
<html xml:lang="es" xmlns="http://www.w3.org/1999/xhtml" lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="keywords" content="Musica, mp3...">
<meta name="description" content="All-Muzik Pistas Musicales">
<meta name="author" content="Salvador Aguilar Villaseñor.">
<meta name="COPYRIGHT" content="ceneval.edu.mx">
<title>Pistas</title>
<script type="text/javascript" src="jquery/jquery.min.js"></script>
<script type='text/javascript' src='jquery/jquery.simplemodal.js'></script>
<script type="text/javascript" src="js/default.js"></script>
<!-- Contact Form CSS files -->
<link type='text/css' href='css/basic.css' rel='stylesheet' media='screen' />
コード例 #3
0
ファイル: get_url.php プロジェクト: aniragus0/plataforma
<?php

require "connection.php";
$gurl = new SongData();
$id = trim($_GET["sid"]);
if (is_numeric($id) == true) {
    $gurl->add_playtimes($id);
    echo $gurl->getSongById($id);
    $gurl->close();
} else {
    echo "illegal opreation";
}
コード例 #4
0
ファイル: get_list.php プロジェクト: aniragus0/plataforma
        for ($i = 1; $i <= $totalpage; $i++) {
            if ($i == $page) {
                $num_code .= "| " . $i;
            } else {
                $num_code .= "| <a href='javascript:void(0)' onclick=getList('" . $by . "','" . $type . "','" . $i . "')>" . $i . "</a> ";
            }
        }
        if ($totalpage > $page) {
            if ($page == 1) {
                $pcode = $lptext;
                $pcode .= $num_code;
                $pcode .= " | <a href='javascript:void(0)' onclick=getList('" . $by . "','" . $type . "','" . ($page + 1) . "')>" . $nptext . "</a>";
            } else {
                $pcode = "<a href='javascript:void(0)' onclick=getList('" . $by . "','" . $type . "','" . ($page - 1) . "')>" . $lptext . "</a> ";
                $pcode .= $num_code;
                $pcode .= " | <a href='javascript:void(0)' onclick=getList('" . $by . "','" . $type . "','" . ($page + 1) . "')>" . $nptext . "</a>";
            }
        } else {
            $pcode = "<a href='javascript:void(0)' onclick=getList('" . $by . "','" . $type . "','" . ($page - 1) . "')>" . $lptext . "</a> | ";
            $pcode .= $num_code;
            $pcode .= " | " . $nptext;
        }
    }
    $data->close();
}
echo "<div id='song_list'>";
echo $item;
echo "</div>";
echo "<div id='page_bar'>";
echo $pcode;
echo "</div>";
コード例 #5
0
ファイル: cantplay.php プロジェクト: aniragus0/plataforma
<?php

require "connection.php";
$id = trim($_GET["sid"]);
if (is_numeric($id) == true) {
    $cp = new SongData();
    if ($cp->add_cantplay($id)) {
        echo "success";
    } else {
        echo "fail";
    }
    $cp->close();
}