Find Jobs
Hire Freelancers

187157 basic PHP string replacement

N/A

Concluído
Publicado há mais de 16 anos

N/A

Pago na entrega
Hi! I need a simple PHP string replacement script, that would do the following: ------------ Log in (password protection). Connect to DB Show a list of domains (Domain field in new_ss_sites table), where the field "Status" NOT "Ready". Under the list of domains display a "Build" button. When the user presses the "Build" button, the string replacement script does the following: For each record in new_ss_sites table where "Status" NOT "Ready", repeat: ---------------------------------------------------------------------------------------------------------------------- If the field Template in new_ss_sites table NOT NULL, - Fill variable "TemplateName" with it's value. - Fill variable "Folder" with value of field "FolderToCopy" ( TemplatesList table) where field TemplateName=TemplateName If the field Template in new_ss_sites table is NULL, - pick up a random record from table called TemplatesList - fill variable "TemplateName" with value of field TemplateName ( in selected record of TemplateList table). - fill variable "Folder" with value of field FolderToCopy ( in selected record of TemplateList table). Copy the contents of folder "Folder" (it's in format of complete URL) to folder "/InWork/" (located right below the current script folder). Rename the newly copied folder to value from variable "Domain". Open all ASCII files in the renamed folder (and it's sub-folders) For each record in table called like the contents of variable TemplateName, do the following: --- - Search all open files for string(s) equal to value of OriginalText field. - In case NewText NOT NULL - replace the found string(s) (OriginalText) with content of text file. - In case NewTextFromFile NOT NULL - open that file, copy it's contents and replace the found string(s) with content of that text file. - In case NewTextFromDBfield & NewTextFromDBtable NOT NULL - replace the found string(s) with content of appropriate -current- DB field. - In case NewStringFromFunction NOT NULL - execute the function, and replace the found (OriginalText) string(s) with it's output. --- (ATTENTION: both new and original strings may include several lines, with line breaks.) When all original strings are replaced, save changes that were made to ASCII files. Cut and paste the folder with all of it's content to folder "/Ready/" (located right below the current script folder). Mark the field "Status" in current record if new_ss_sites table to "Ready". Move to next record in new_ss_sites. Repeat all above steps until all records are marked "Ready". When all records in new_ss_sites are marked "Ready", send an email to ADMIN, with following contents: New sites ready to be uploaded: [login to view URL] Site category: Category field from TempSitesTable ....... (a list of all domains that were "processed" this time) Thanks!
ID do Projeto: 1933371

Sobre o projeto

1 proposta
Projeto remoto
Ativo há 12 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
Concedido a:
Avatar do Usuário
Sir, can start the project right away. Please check PMB for more details. Thank you.
$75 USD em 1 dia
5,0 (172 avaliações)
6,6
6,6

Sobre o cliente

Bandeira do(a) ISRAEL
Bat Yam, Israel
4,9
31
Método de pagamento verificado
Membro desde abr. 21, 2003

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.