R10.net

R10.net (https://www.r10.net/index.php)
-   Alışveriş Bölümü (https://www.r10.net/alisveris-bolumu/)
-   -   187 000 Şarkı sözü database'i - PHP scriptiyle birlikte (https://www.r10.net/alisveris-bolumu/43550-187-000-sarki-sozu-databasei-php-scriptiyle-birlikte.html)

domainer56 25-03-2007 18:53:40

187 000 Şarkı sözü database'i - PHP scriptiyle birlikte
 
187000 ingilizce şarkı sözü...Bulabileceğiniz en kapsamlı db...

Birlikte çalıştığı php scriptle birlikte satıyorum...

Toplam boyutu 150 mb...İsteyene mail ile isteyene cd ile...

Satışlar paypal ile ve gittigidiyor kanalı ile yapılacaktır...

Paypal ile 40$
Gittigidiyor ile 50 ytl

Mail ile istenirse
Paypal ile 25$
Gittigidiyor ile 30 ytl

ENVER 25-03-2007 18:59:17

demoyu görebilir miyim

MuratCem 25-03-2007 19:00:55

demo adresi varmı

domainer56 25-03-2007 19:08:33

Demosu ne yazık ki yok arkadaşlar...bir ark. verdi bana satmam için scriptte db scripti, arama scripti ve ekleme scripti var...

phpyi pek bilmediğim için bir demo site hazırlamam da mümkün değil..

domainer56 25-03-2007 19:19:03

search.php

<?php
require ("db_mysql.php");

// Create connection to database:
//////////////////////////////////////////
// Initialise db class
$db = new DB_Sql;

// Set properties
$db->server = 'localhost'; // Enter your database server here, usually 'localhost'
$db->user = 'binet_lyrics'; // Enter your database user here
$db->password = 'pass'; // Enter your database password here
$dbname = 'binet_ldb'; // Enter your database name here

// Connect to database
$db->connect();

// Select database
$db->select_db($dbname);
//////////////////////////////////////////

// Set some inital variables
//////////////////////////////////////////
$perpage = 38;
$action = $_GET['action'];

// Get page
$page = $_GET['page'];

if (!is_numeric($page)) { $page = 1; }
//////////////////////////////////////////

// Select action
if ($action == 'search') {
// Perform search

$artist = $_GET['artist'];
$album = $_GET['album'];
$keywords = $_GET['keywords'];


// Check if there are any filter options
if (empty($artist) AND empty($album) AND empty($keywords)) {
die ("Please enter some keywords or an artist/album to search for.");
}

// Begin WHERE clause
$where = "WHERE 1=1";

if (!empty($keywords)) {
$keywords = str_replace("%", " ", $keywords);
$keywords = trim($keywords);
$keywords = str_replace(" ", "%", $keywords);
$keywords = str_replace("+", "%", $keywords);
$keywords = "%" . $keywords . "%";

$where .= " AND s.title LIKE '" . $db->sqlsafe($keywords) . "'";
}

if (!empty($artist)) {
$where .= " AND a.name = '" . $artist . "'";
}

if (!empty($album)) {
$where .= " AND a.title = '" . $album . "'";
}

// Get count how many lyrics there are
$count = $db->query_first ("SELECT COUNT(*) as songcount FROM songs AS s INNER JOIN artists AS a ON s.primaryartist = a.artistid LEFT JOIN albums AS al ON s.album = al.albumid " . $where);
$total = $count['songcount'];
$totalpages = ceil($total/$perpage);

// Check if current page is higher than total pages
if ($page > $totalpages) {
// Reset to last page
$page = $totalpages;
}

$songs = $db->sql_query ("SELECT s.songid, s.title, s.asin, s.ringtone, al.title AS albumtitle, al.asin, a.name FROM songs AS s INNER JOIN artists AS a ON s.primaryartist = a.artistid LEFT JOIN albums AS al ON s.album = al.albumid " . $where . " ORDER BY a.name ASC LIMIT " . (($page * $perpage)-$perpage) . ", " . $perpage);

Devam ediyor....

Lyrics.php

<?php
require ("db_mysql.php");

// Create connection to database:
//////////////////////////////////////////
// Initialise db class
$db = new DB_Sql;

// Set properties
$db->server = 'localhost'; // Enter your database server here, usually 'localhost'
$db->user = 'binet_lyrics'; // Enter your database user here
$db->password = 'pass'; // Enter your database password here
$dbname = 'binet_ldb'; // Enter your database name here

// Connect to database
$db->connect();

// Select database
$db->select_db($dbname);
//////////////////////////////////////////

// Set some inital variables
//////////////////////////////////////////
$perpage = 38;
$action = $_GET['action'];

// Get page
$page = $_GET['page'];

if (!is_numeric($page)) { $page = 1; }
//////////////////////////////////////////

// select action
if ($action == 'songs') {
// Check if there are any filter options
if (empty($_GET['artist']) && empty($_GET['album']) && empty($_GET['letter'])) {
// No filter options, set to letter 'a'
$letter = '09';
} else {
// Get filter options
$letter = strtolower($_GET['letter']);
$artist = $_GET['artist'];
$album = $_GET['album'];

// Validate letter option
if (!preg_match('([a-z])', $letter)) {
// Invalid letter, set to letter 'a'
$letter = '09';
}
}

// Where clause:
$where = "WHERE s.letter = '" . $letter . "'";

if (!empty($artist)) {
$where .= " AND a.name = '" . $artist . "'";
}

if (!empty($album)) {
$where .= " AND a.title = '" . $album . "'";
}

// Get count how many lyrics there are
$count = $db->query_first ("SELECT COUNT(*) as songcount FROM songs AS s INNER JOIN artists AS a ON s.primaryartist = a.artistid LEFT JOIN albums AS al ON s.album = al.albumid " . $where);
$total = $count['songcount'];
$totalpages = ceil($total/$perpage);

Devam ediyor...

db_mysql.php

<?php
error_reporting(7);
// db class for mysql
// this class is used in all scripts
// do NOT fiddle unless you know what you are doing

class DB_Sql {
var $database = "";

var $link_id = 0;
var $query_id = 0;
var $record = array();

var $errdesc = "";
var $errno = 0;
var $reporterror = 1;

var $server = "";
var $user = "";
var $password = "";

var $appname = "B-Inet Lyrics";
var $appshortname = "B-Inet Lyrics";

function connect() {
global $usepconnect;
// connect to db server

if ( 0 == $this->link_id ) {
if ($this->password=="") {
if ($usepconnect==1) {
$this->link_id=mysql_pconnect($this->server,$this->user);
} else {
$this->link_id=mysql_connect($this->server,$this->user);
}
Devam ediyor...

adsearch.php

<?php
require ("db_mysql.php");

// Create connection to database:
//////////////////////////////////////////
// Initialise db class
$db = new DB_Sql;

// Set properties
$db->server = 'localhost'; // Enter your database server here, usually 'localhost'
$db->user = 'binet_lyrics'; // Enter your database user here
$db->password = 'pass'; // Enter your database password here
$dbname = 'binet_ldb'; // Enter your database name here

// Connect to database
$db->connect();

// Select database
$db->select_db($dbname);
//////////////////////////////////////////

// Set some inital variables
//////////////////////////////////////////
$perpage = 38;
$action = $_GET['action'];

// Get page
$page = $_GET['page'];

if (!is_numeric($page)) { $page = 1; }
//////////////////////////////////////////

// Select action
if ($action == 'search') {
// Perform search

$artist = $_GET['artist'];
$album = $_GET['album'];
$keywords = $_GET['keywords'];


// Check if there are any filter options
if (empty($artist) AND empty($album) AND empty($keywords)) {
die ("Please enter some keywords or an artist/album to search for.");
}

// Begin WHERE clause
$where = "WHERE 1=1";

if (!empty($keywords)) {
$keywords = str_replace("%", " ", $keywords);
$keywords = trim($keywords);
$keywords = str_replace(" ", "%", $keywords);
$keywords = str_replace("+", "%", $keywords);
$keywords = "%" . $keywords . "%";

$where .= " AND s.title LIKE '" . $db->sqlsafe($keywords) . "'";
}

if (!empty($artist)) {
$where .= " AND a.name = '" . $artist . "'";
}

if (!empty($album)) {
$where .= " AND a.title = '" . $album . "'";
}

// Get count how many lyrics there are
$count = $db->query_first ("SELECT COUNT(*) as songcount FROM songs AS s INNER JOIN artists AS a ON s.primaryartist = a.artistid LEFT JOIN albums AS al ON s.album = al.albumid " . $where);
$total = $count['songcount'];
$totalpages = ceil($total/$perpage);

// Check if current page is higher than total pages
if ($page > $totalpages) {
// Reset to last page
$page = $totalpages;
}

$songs = $db->sql_query ("SELECT s.songid, s.title, s.asin, s.ringtone, al.title AS albumtitle, al.asin, a.name FROM songs AS s INNER JOIN artists AS a ON s.primaryartist = a.artistid LEFT JOIN albums AS al ON s.album = al.albumid " . $where . " ORDER BY a.name ASC LIMIT " . (($page * $perpage)-$perpage) . ", " . $perpage);



// Show search results:

// START YOUR PAGE HERE (HTML)
?>

Devam ediyor

Lisans 25-03-2007 19:20:58

o ne yahu :S kaynak kodları açmasaydın bu demo yerine geçmez.

domainer56 25-03-2007 19:22:32

anlamıyorum nasıl olsa php'den :)

Ama sanırım önemli olan script değil, db...hatta dbye uygun script :)

rnmks 25-03-2007 19:24:48

abicim hosta at mysql oluştur olsun bitsin

AlwaysFc 25-03-2007 19:26:00

Alıntı:

domainer56 Nickli Üyeden Alıntı (Mesaj 453143)
anlamıyorum nasıl olsa php'den :)
Ama sanırım önemli olan script değil, db...hatta dbye uygun script :)

sql olusturmayı bılıyorsan gerısı kolay


Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 00:28:01.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.